ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: Javac task design problems
Date Sun, 23 Feb 2003 18:31:04 GMT

----- Original Message -----
From: "Stefano Mazzocchi" <stefano@apache.org>
To: "Conor MacNeill" <conor@cortexebusiness.com.au>
Cc: "Ant Developers List" <dev@ant.apache.org>
Sent: Sunday, February 23, 2003 01:31
Subject: Re: Javac task design problems


> Conor MacNeill wrote:
> > Stefano Mazzocchi wrote:
> >
> >>
> >> Build time went from 25 minutes to 5 minutes on my machine (a pentium
> >> II 366 ronzputer). Other people experienced equivalent speedups and
> >> everybody is joyful, singing and dancing and with renewed faith on
> >> mankind.
> >
> >
> > If you keep that up, the government will declare it illegal.
>
> LOL :)
>
> >>
> >> The ideal solution to the problem (without requiring to filter
> >> everything out would be)
> >>
> >>     <copy todir="${build.src}" filtering="on">
> >>       <fileset dir="${src}">
> >>         <include name="**/Constants.java"/>
> >>       </fileset>
> >>     </copy>
> >>
> >>     <javac destdir="${build.dest}">
> >>       <src>
> >>        <fileset dir="${src}">
> >>         <exclude name="**/Constants.java"/>
> >>        </fileset>
> >>        <path location="${build.src}"/>
> >>       </src>
> >>     </javac>
> >>
> >> too bad it doesn't work because the <javac> tasks assumes that each
> >> file in its fileset is a directory!
> >
> >
> > Not quite true, I think. The problem is more likely to come from javac
> > itself since it will go looking for files based on the source paths.
>
> then how do the exclude/include work?
>
> > IOW, there is a disconnect between javac the task and javac the
compiler.
>
> Did you guys ever thought about usign the Eclipse java compiler? It's
> *very* nice, fast as hell and entirely embeddable and incremental. Plus
> is IBM public license so its totally legal to redistribute with Ant.
>
> > Why not this:
> >      <javac destdir="${build.dest}">
> >        <src>
> >         <path location="${build.src}"/>
> >         <path location="${src}"/>
> >        </src>
> >      </javac>
> >
> > That should cause javac to pick up the changed files first and ignore
> > the other copy in src. Well I haven't tried it, so YMMV ...
>
> Nop, tried that and doesn't work. Javac tries to compile both copies of
> the file, complians about the duplication and fails.

Why have Constants.java in the primary source tree at all? Keep it somewhere
else, copy/filter/autocreate it in build/generated alongside all the castor,
axis, and xdoclet generated source


Mime
View raw message