ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <>
Subject Problem with <var> task
Date Thu, 02 Sep 2004 08:02:48 GMT
Hi all, 

I am using a var task to reset the value of a property inside a for loop. Since a new value
will be taken by property I have to reset it somehow. I am also using 
<available> task to check for the presence of file. 

<for param="sitecomponent" list="${report.componentlist}"> 

<available file="${basepath}/@{sitecomponent}/build/test/report/html/@{sitecomponent}/checkstylereport/checkstylereport.html"
<if> <equals arg1="${p1}" arg2="true" /> 
<var name="p1" unset="true"/> 
<!-- I get the error here : the error is:
The <var> type doesn't support the "unset" attribute.-->

<!--more available tasks with property names as p2,p3,p4 etcc--> 

Can some one kindly tell me whats wrong with the var task I am using, all I want to do is
to unset the property name p1 so that it can be used again in the forloop.
Even a simple example is not working, i copied the example
<property name="x" value="6"/>
    <echo>${x}</echo>   <!-- will print 6 -->
    <var name="x" unset="true"/>
    <property name="x" value="12"/>
    <echo>${x}</echo>   <!-- will print 12 -->
for this again I get the same error
The <var> type doesn't support the "unset" attribute.
Whats the problem. I am using ant1.6.2 and I also have the ant-contrib jar in classpath.
with regards,

Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message