ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gladdish <>
Subject Clearing a property
Date Tue, 08 Mar 2005 11:46:59 GMT

I'm struggling with clearing a property value that was set using the 
<loadfile> task.

Here's the relevant section of my build file:

         <loadfile property="web-xml-fragment" 
         <filter token="precompiled_jsp" value="${web-xml-fragment}"/>
         <copy file="${source.web.dir}/WEB-INF/web.xml" 
tofile="${target.custom.webinf.dir}/web.xml" filtering="true" 
overwrite="true" />
         <property name="web-xml-fragment" value="nothing"/>
         <echo>web-xml-fragment: ${web-xml-fragment}</echo>

The web-xml-fragment property gets set correctly, and I get the 
correctly filtered web.xml out at the end of the <copy> task. That's 
all fine.
I then set the web-xml-fragment property to be "nothing".
The <echo> statement should then just print the word "nothing", 
shouldn't it?

In fact, it prints the contents of generated_web.xml.

So,  <property name="web-xml-fragment" value="nothing"/>, in fact 
doesn't appear to set anything.

I need to clear the property, so that it doesn't overwhelm my junit 

ant -version
 > Apache Ant version 1.6.2 compiled on July 16 2004

Any help would be greatly appreciated.

Many thanks,

Martin Gladdish
e-Government Solutions (UK) Ltd

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message