There is one option that can be used in Ant, antcall
It allows modification of a param property.
However, please use it caution and sparingly.
Below is taken from
http://ant.apache.org/manual/CoreTasks/antcall.html Examples
<target name="default">
<antcall target="doSomethingElse">
<param name="param1" value="value"/>
</antcall>
</target>
<target name="doSomethingElse">
<echo message="param1=${param1}"/>
</target>
Will run the target 'doSomethingElse' and echo 'param1=value'.
<antcall ... >
<reference refid="path1" torefid="path2"/>
</antcall>