You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Gene Margolin <gm...@futuresource.com> on 2000/08/31 01:34:06 UTC

Build using dependencies

Is it possible in ant to compile only those java-files on which
some specific file or package depends (e.g. as JBuilder does )?
Recursive compiling of all packages significantly increases
the size of products.

Gene.



Re: javac task always rebuilds all

Posted by "Peter C. Brown" <pb...@cs.umass.edu>.
yep, that was the problem...the packages did match the directory
structure, but my srcdir was not at the top level of the directory
hierarchy, e.g., instead of (using your example) srcdir='src', i was using
srcdir='src/com/blubber'...i changed it and it works fine now...thanks!

PB>>

On Thu, 31 Aug 2000, Fergus Gallagher wrote:

> Do you have your directory structure matching your package name?  The javac 
> task doesn't look at the package name as such but used the path to infer it.
> 
> e.g.,
> 
>          src/com/blubber/Something.java
> 
> should be in "package com.blubber"
> 
> At 10:08 31/08/00 -0400, you wrote:
> >hi,
> >
> >every time i run ant, all of my classes are rebuilt by the javac task, not
> >just the ones that either don't exist, or are out of date with respect to
> >the source file (as claimed in the documentation)..i am using the
> >'classic' compiler (jdk 1.2) on nt4.0, and ant version 1.1 compiled on
> >july 18 2000..any suggestions on getting javac to work as advertised would
> >be appreciated...thanks,
> >
> >PB>>
> >_____________________________________________________
> >  Peter Brown                  Senior Staff Programmer
> >  Dept. of Computer Science        140 Governors Drive
> >  University of Massachusetts   Amherst, MA 01003-4610
> >  Phone: (413) 577-2505            Fax: (413) 545-1249
> >  pbrown@cs.umass.edu  http://www.cs.umass.edu/~pbrown
> >-----------------------------------------------------
> 
> --
> Fergus Gallagher
> Orbis
> http://www.orbisuk.com/
> +44-(0)20-8987 0717
> 

_____________________________________________________
 Peter Brown                  Senior Staff Programmer
 Dept. of Computer Science        140 Governors Drive
 University of Massachusetts   Amherst, MA 01003-4610
 Phone: (413) 577-2505            Fax: (413) 545-1249
 pbrown@cs.umass.edu  http://www.cs.umass.edu/~pbrown
-----------------------------------------------------



Re: javac task always rebuilds all

Posted by Fergus Gallagher <Fe...@OrbisUK.com>.
Do you have your directory structure matching your package name?  The javac 
task doesn't look at the package name as such but used the path to infer it.

e.g.,

         src/com/blubber/Something.java

should be in "package com.blubber"

At 10:08 31/08/00 -0400, you wrote:
>hi,
>
>every time i run ant, all of my classes are rebuilt by the javac task, not
>just the ones that either don't exist, or are out of date with respect to
>the source file (as claimed in the documentation)..i am using the
>'classic' compiler (jdk 1.2) on nt4.0, and ant version 1.1 compiled on
>july 18 2000..any suggestions on getting javac to work as advertised would
>be appreciated...thanks,
>
>PB>>
>_____________________________________________________
>  Peter Brown                  Senior Staff Programmer
>  Dept. of Computer Science        140 Governors Drive
>  University of Massachusetts   Amherst, MA 01003-4610
>  Phone: (413) 577-2505            Fax: (413) 545-1249
>  pbrown@cs.umass.edu  http://www.cs.umass.edu/~pbrown
>-----------------------------------------------------

--
Fergus Gallagher
Orbis
http://www.orbisuk.com/
+44-(0)20-8987 0717


javac task always rebuilds all

Posted by "Peter C. Brown" <pb...@cs.umass.edu>.
hi,

every time i run ant, all of my classes are rebuilt by the javac task, not
just the ones that either don't exist, or are out of date with respect to
the source file (as claimed in the documentation)..i am using the
'classic' compiler (jdk 1.2) on nt4.0, and ant version 1.1 compiled on
july 18 2000..any suggestions on getting javac to work as advertised would
be appreciated...thanks,

PB>>
_____________________________________________________
 Peter Brown                  Senior Staff Programmer
 Dept. of Computer Science        140 Governors Drive
 University of Massachusetts   Amherst, MA 01003-4610
 Phone: (413) 577-2505            Fax: (413) 545-1249
 pbrown@cs.umass.edu  http://www.cs.umass.edu/~pbrown
-----------------------------------------------------