<?xml version="1.0" encoding="UTF-8"?>
<project default="build" name="build">
<taskdef classname="org.ejen.ant.Ejen" name="ejen"/>
<target name="build">
<ejen>
<option name="namespace" value="var=org.ejen.ext.ThreadGlobalVariables"/>
...
<variable name="myVar1" select="'myValue1'"/>
<variable name="myVar2" select="'myValue2'"/>
...
<!-- printout "myValue1,myValue2" -->
<echo message="{$myVar1},{$myVar2}"/>
<!-- remove "myVar2" variable -->
<exec select="var:remove('myVar2')"/>
<!-- printout "myValue1," -->
<echo message="{$myVar1},{$myVar2}"/>
<!-- clear all variables -->
<exec select="var:clear()"/>
<!-- printout "," -->
<echo message="{$myVar1},{$myVar2}"/>
...
</ejen>
</target>
</project> |