Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Building Dependent targets

Building Dependent targets

2007-05-24       - By Steve Loughran
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

query wrote:
> Earlier I was using some other build tool to build my project. Here if a
target is built and if the same target is used to build some other target, it
compares the timestamp and will not build the dependent targets again.

Ant doesnt compare the timestamps on targets, but it looks at the
timestamp of artifacts consumed and created by tasks. e.g  <javac> does
work only if there is java source to compile, but the <javac> task is
called on every build.

> As I started working on ANT, I found it very useful and intersting.

But in ANT, while building each target, it will try to build all the
dependent targets that many times as it occurs in different targets.

As a result it is increasing project\'s build time.Is there any task to
ensure that the dependent targets once built will not&nbsp; be built
again ????

Every target in a build file should run once. if the same targets run
again and again in a single build, your are using <ant> when you dont
need to. Every task in a target should do its own dependency rules,
though some <javadoc> dont. You can use <uptodate> to determine if
targets need skipping


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.