Skip to content

Instantly share code, notes, and snippets.

@nicholasdunbar
Last active August 29, 2015 14:11
Show Gist options
  • Save nicholasdunbar/cbc5bf3f504163ee96aa to your computer and use it in GitHub Desktop.
Save nicholasdunbar/cbc5bf3f504163ee96aa to your computer and use it in GitHub Desktop.
Example of how to replace a token with a variable or inline property in ANT
<property name="CRONTAB_PATH" value="/some/dir/"/>
<task name="generateCrontab">
<copy file="crontab"
tofile="crontabTest.txt"
overwrite="true">
<filterchain>
<replacetokens>
<token key="cronPath" value="${CRONTAB_PATH}"/>
</replacetokens>
</filterchain>
</copy>
</task>
<!--
Code excerpt from http://boulderapps.co/replace-a-token-with-a-variable-using-ant
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment