java - Use value for build.properties in replacetoken ant task -


i have following replacefilter:

<replacefilter>    <replacetoken><![cdata[jdbcdatasource="xyz"]]></replacetoken>     <replacevalue><![cdata[jdbcdatasource="abc"]]></replacevalue> </replacefilter> 

how can pass variable build.properties file in replacetoken , replacevalue tag such as:

<replacefilter>    <replacetoken><![cdata[jdbcdatasource="${var1}"]]></replacetoken>     <replacevalue><![cdata[jdbcdatasource="${var2}"]]></replacevalue> </replacefilter> 

you need use expandproperties attribute:

<replacefilter>     <replacetoken expandproperties="true"><![cdata[jdbcdatasource="${var1}"]]></replacetoken>      <replacevalue expandproperties="true"><![cdata[jdbcdatasource="${var2}"]]></replacevalue> </replacefilter> 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -