Reputation: 11
i have tried to find an answer reading some ant-contib posts but couldn't get a good one. on my ant build.xml file i have a dynamic paramter name which changes each build. the parameter name includes version of components for example :
<componentX>.<ComponentVersion>=y
how can i access the value of this parameter in my build.xml file ?
i have tried to read the parameter using this :
${componentX.${ComponentVersion}} but it does not work.
thanks
Upvotes: 1
Views: 708
Reputation:
If it is normal ant properties & is set to some value & if you want to get values of concatenated result, then below way would work:
<property name="componentX" value="foo"/>
<property name="ComponentVersion" value="bar"/>
Then outputting like below :
<echo message="${componentX}.${ComponentVersion}"/> <!-- would print foo.bar -->
OR storing in new property
like for later use:
<property name="concat.one" value="${componentX}.${ComponentVersion}"/>
Upvotes: 1