So in
Ant, properties set when calling a subtarget from the "depends" clause of a target are accessible to the parent target, but properties set when calling a target with "antcall" are not. Gotcha. That means I had to change this:
<target name="myTarget" depends="setPaths">
<!-- target stuff, with paths set based on a version -->
</target>
<target name="setPaths">
<!-- get a variable needed to set paths, name it "version" -->
<antcall target="setPathsFor${version}">
</antcall></target>
<target name="setPathsFor123">
<!-- set paths for version 123 -->
</target>
<target name="setPathsFor456">
<!-- set paths for version 456 -->
</target>to this:
<target name="myTarget" depends="getVersion,setPathsFor123,setPathsFor456">
<!-- target stuff, with paths set based on a version -->
</target>
<target name="getVersion">
<!-- get the version into a property named "Version" -->
<property name="ver${Version}" value="true">
</property></target>
<target name="setPathsFor123" if="ver123">
<!-- set paths for version 123 -->
</target>
<target name="setPathsFor456" if="ver456">
<!-- set paths for version 456 -->
</target>The upshot of which is that my "depends" line gets unmanageably long as I add supported versions, and I call each and every one of the setPathsFor targets. Is there a better way to do this?