Согласно FAQ по Apache Ant :
<target name="cond" depends="cond-if"/>
<target name="cond-if" if="prop1">
<antcall target="cond-if-2"/>
</target>
<target name="cond-if-2" if="prop2">
<antcall target="cond-if-3"/>
</target>
<target name="cond-if-3" unless="prop3">
<echo message="yes"/>
</target>
Note: <antcall> tasks do not pass property changes back up to the environment they were called from, so you wouldn't be able to, for example, set a result property in the cond-if-3 target, then do <echo message="result is ${result}"/> in the cond target.
В этом отношении невозможно делать то, что вы хотите, с помощью antcall.
========== изменить ===========
Попробуйте antcallback
: AntCallBack идентичен стандартной задаче 'antcall', за исключением того, что он позволяет свойствам, установленным в вызываемой цели, быть доступными в вызывающей цели.
http://antelope.tigris.org/nonav/docs/manual/bk03ch20.html
Пример кода, вставленный со страницы выше:
<target name="testCallback" description="Test CallBack">
<taskdef name="antcallback" classname="ise.antelope.tasks.AntCallBack" classpath="${antelope.home}/build" />
<antcallback target="-testcb" return="a, b"/>
<echo>a = ${a}</echo>
<echo>b = ${b}</echo>
</target>
<target name="-testcb">
<property name="a" value="A"/>
<property name="b" value="B"/>
</target>