ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Is there a difference between...
Date Tue, 19 Feb 2002 06:56:38 GMT
On Tue, 19 Feb 2002, Michael J. McGonagle <fndsnd@rcnchicago.com>
wrote:
> My question is if there is any functional difference between the two
> following piece of xml...
> 
> <target name="myCompoundTarget" depends="subTarget1, subTarget2" />
> 
> <target name="myCompoundTarget">
> 	<antcall target="subTarget1" />
> 	<antcall target="subTarget2" />
> </target>

Several, the later will run two independent build processes for the
two targets - if subTarget1 and subTarget2 depend on a common target
target3, this one will be executed twice, properties set during the
execution of subTarget1 (or targets it depends upon) will not be
available to subTarget2.

Your first version will run all targets at most once, if subTarget1
doesn't depend on subTarget2, it will be executed first.  Properties
set during the execution of subTarget1 will be available for
subTarget2.

The second case is equivalent to

> ant subTarget1 subTarget2

which in turn is equivalent to

> ant subTarget1
> ant subTarget2

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message