ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Build from Build!
Date Wed, 19 Jul 2000 12:45:48 GMT

I've done much the same thing in my build projects, and it works pretty
well.  Its a general technique you can use to manage a large number of
related targets that you need to run on a regular basis.

Glenn McAllister
TID - Software Developer - VisualAge for Java
IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey

Please respond to

Subject:        Re: Build from Build!

>>>>> "TR" == Thirumurugan Rengasamy <> writes:

 TR> How can I include that build.xml's(more than one!!) targets in
TR> the single target of the base build.xml?

You are right, the <ant> task only supports one target. There are
several ways you can work around this limitation (if it is one).

Two ways you could invoke more than one target:

(1) Use an <exec> task to start Ant and specify more than one
target. You will find that this approach has its own limits and

(2) In your sub buildfiles create empty targets that depend on the
targets you wanted to specify. I.e. if you wanted to use something
like (which doesn't work)

<ant dir="subdir" target="target1,target2" />

make that

<ant dir="subdir" target="compoundtarget" />


<target name="compoundtarget" depends="target1,target2" />

in subdir/build.xml.

I feel this second approach is even clearer than allowing more than
one target to the <ant> task.



View raw message