ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Fetzer <elstonk...@yahoo.com>
Subject Re: AW: AW: Reversing a list
Date Thu, 06 Aug 2009 15:08:02 GMT
If you want to reuse the same property, there is a task in antelope called unset.  You can
use this task so that you can change the value of a property.  I would create a macrodef
if using it a lot:

<taskdef name="unset" classname="ise.antelope.tasks.Unset"/>

<macrodef name="modifyProperty">
  <attributes var.propertyName/>
  <attributes var.propertyValue/>
  <sequential>
    <unset name="@{var.propertyName}" />
    <property name="@{var.propertyName}" value="@{var.propertyValue}" />
  </sequential>
</macrodef>




 



________________________________
From: Raagu <rknilekani2005@gmail.com>
To: user@ant.apache.org
Sent: Wednesday, August 5, 2009 11:09:23 PM
Subject: RE: AW: AW: Reversing a list


Hello people 

I have used javascript code written above and i gave new proerty name for
each iteration while calling javascript scriptdef.. It works fine..

Thanks for useful replies :)




Joshua Wunder-2 wrote:
> 
> For these situations I like to use the following:
> 
> http://ant-contrib.sourceforge.net/tasks/tasks/variable_task.html
> 
> -----Original Message-----
> From: Raagu [mailto:rknilekani2005@gmail.com] 
> Sent: Wednesday, August 05, 2009 16:36
> To: user@ant.apache.org
> Subject: Re: AW: AW: Reversing a list
> 
> 
> "Try giving the property a new name"
> 
> I didnt get this.. 
> pls can u explain ??
> 
> 
> 
> 
> Jan.Materne wrote:
>> 
>>>How can i access the the newlist here (outside <groovy> task)
>>>I tried            ${list}
>>>But it is giving old values .. which is set initially..
>>>please do reply.
>> 
>> Maybe you are not doing anything wrong.
>> Properties in Ant are immutable. Try giving the property a new name.
>> 
>> Jan
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Reversing-a-list-tp24823814p24827129.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reversing-a-list-tp24823814p24840410.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message