Skip to content

Instantly share code, notes, and snippets.

@devbhuwan
Last active November 3, 2016 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devbhuwan/139ac452abb81e61d4fc6d01de6896cc to your computer and use it in GitHub Desktop.
Save devbhuwan/139ac452abb81e61d4fc6d01de6896cc to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" ?>
<project>
<target name="antReplace">
<!--
<buildDir> and <srcDir> properties are pass in pom.xml in ant target configuration
<rootDir> property pass in antBuild.xml of antBuild target
-->
<ac:for param="token" list="outputLocation1,outputLocation2,outputLocation3" xmlns:ac="antlib:net.sf.antcontrib">
<sequential>
<echo message="@{token}"/>
<replace file="${buildDir}/classes/config.properties">
<replacetoken>@{token}</replacetoken>
<replacevalue>@{token}=/home/app/location</replacevalue>
<!-- for multiline token or value use CDATA -->
</replace>
</sequential>
</ac:for>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment