I am trying to move a file (specified by a template) to a given location in Ant macrodef:
<macrodef name="extract"> <attribute name="package"/> <sequential> <path id="source_refid"> <dirset dir="${dep}/lib/@{package}/extracted/"> <include name="@{package}-*"/> </dirset> </path> <property name="source_name" refid="source_refid"/> <move file="${source_name}" tofile="${dep}/@{package}/" overwrite="true" /> </sequential> </macrodef>
This will only work once since ${source_name} is immutable.
The parameter would have to use the variable task, but I did not find a way to assign refid to var .
Is there a way to have something similar to a local variable in macrodex? Or (problem XY) is there a better way to solve my problem?
source share