ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject RE: Two issues
Date Wed, 21 Feb 2001 02:48:11 GMT
> IC.  I was not aware that dependent targets are somehow considered
> parent targets of the depender (thus the parameters set in 
> them are set
> in the depender).  Seems kind of strange, but now that I know this at
> least I can understand what it is doing.

OK, I'm not sure if I follow you correctly.
Each time I read it, I get a different view of what you are saying.

In this case:

<target name="A">
	<property name="prop" value="A"/>
	<echo message="${prop}"/>
</target>

<target name="B" depends="A">
	<property name="prop" value="B"/>
	<echo message="${prop}"/>
</target>

$ ant B

should print

A
A

The series of steps ant performs is

Run "target-B"
"target-B" requires "target-A", so..
Run "target-A"
	prop="A"
	echo ${prop}
(End target-A)
	prop="B"  - prop is already set, do nothing
	echo ${prop}
(End target-B)


Mime
View raw message