Regarding the timestamp variable in the ant script, I can see how to build it using a macrodef
, but I don't see the way to read it afterwards, even though its name was saved in a variable.
<macrodef name="macro1">
<attribute name="propName"/>
<attribute name="propValue"/>
<sequential>
<property name="@{propName}" value="@{propValue}"/>
<echo> dans macrodef $${@{propName}} : ${@{propName}}</echo>
</sequential>
</macrodef>
<tstamp>
<format property="rightNow" pattern="yyyyMMdd" locale="en,UK" />
</tstamp>
<var name="nomProp" value="${rightNow}"/>
<macro1 propName="${rightNow}" propValue="at Paris"/>
When the property is named, it is ok, but this is useless :
<echo>property $${20170531} content : ${20170531}</echo>
...so what is the trick to get it ? this syntax does not work
<echo> property $${nomProp} content : ${${nomProp}}</echo>