I didn't intend for this topic to turn into a drawn-out discussion. My original
intuition of how things would work with Ant and properties was different than how
it actually worked. Originally I had a file like this:
<project name="foo" default="all" basedir=".">
<target name="all">
<antcall target="a"/>
<antcall target="b"/>
<antcall target="c"/>
</target>
<target name="a">
<property name="my.name" value="a"/>
<echo message="My name is ${my.name}"/>
</target>
<target name="b">
<property name="my.name" value="b"/>
<echo message="My name is ${my.name}"/>
</target>
<target name="c">
<property name="my.name" value="c"/>
<echo message="My name is ${my.name}"/>
</target>
</project>
And it worked exactly like I expected, it printed out something like this:
My name is a
My name is b
My name is c
But when I added a dependency on "c" to "b" I ended up with:
My name is a
My name is c
My name is c
That is not what I anticipated. I understand how it works now and understand why
it works that way, although it is not exactly how I would like it to be. Oh well,
I can live with it.
Thanks,
-> richard