Override properties in an Ant target
ant
Solution
<?xml version="1.0" encoding="UTF-8" ?>
<project default="all" basedir=".">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
<target name="all">
<property name="prop" value="1" />
<echo message="prop = ${prop}" />
<var name="prop" unset="true"/>
<property name="prop" value="2" />
<echo message="prop = ${prop}" />
</target>
</project>
Problem
We use lots of properties in our Ant scripts, run from Eclipse. I want to set up a parallel deployment which builds the project with slightly different property values, and deploys to a different location... deploy location is also a property. [How] can my new target update some properties to custom test values and then run the normal target to get the desired result? Simple sample script is very welcome, I only know enough Ant to get by :)