ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Build from Build!
Date Wed, 19 Jul 2000 09:36:57 GMT
>>>>> "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