You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Richard Landon <RL...@youbet.com> on 2000/08/14 20:33:53 UTC
Ant dependency evaluation (NT platform): class files are always o
ut of date?
When I run the build using ANT I suspect that it is not properly
evaluating the dependencies between the class and java files.
I think (at least under the NT platform using the MKS or GNU bash shells)
that ANT actually recompiles every java file to a class file every time
I request the javac task regardlesss of whether the class file is "out of
date" relative to the java file.
Here some evidence. I use a depreciated API and multiple targets referencing
from the main compilation target (compile_classes). For example I have a
target
that recursively compiles a directory, one that depends on this for an EJB
jar, and yet
another that packages the JUNIT unit tests into a standard or stock jar.
If I execute a build specifing the targets
build.sh compile_classes ejb jar
I see the posting of the "depreciated API message" (yes, deprectation is on
the compile (ant javac task)) three times.
This may justify my conclusion about a broken dependecny evaluation under
NT?
Please let me know if this is problem or if I am imaging it. (The builds
we do currently compile over 300 java classes, and it seems to be taking
a very long time to compile these. I suspect its because ant compiles
them a multiplicity of times.)
I have not tried this under Linux or Solaris (yet).
Regards, Rick Landon
Re: Ant dependency evaluation (NT platform): class files are
always out of date?
Posted by Peter Donald <do...@mad.scientist.com>.
Send the relevent snippet of build.xml. There are some problems that can
cause a complete recompile - usually to do with badly set up build.xml - we
can help if thats the case :P
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*