ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Replacing chars in a property
Date Mon, 19 Nov 2007 09:03:14 GMT
 

-----Original Message-----
From: Nicolai Kamenzky [mailto:kamenzky@inf.fu-berlin.de] 
Sent: Sunday, November 18, 2007 10:33 PM
To: Ant Users List
Subject: Re: Replacing chars in a property

/*
...
I wonder why simple string operations seem to be unavailable for
working solely on properties...
...
*/

Because in core ant, once set properties are immutable.

But there are existing tasks and workarounds for that restriction.

The stringutils  [1] you're are searching for are part of the excellent
tasksuite antelope [2]. 
Also the antcontrib task suite [3] has such tasks, for example
propertyregex.

Beside that you can always go with script, and project.setProperty() 
i.e. see an example [4] to change or overwrite existing properties.
If you don't want to overwrite use the setNewProperty() method instead.


See =
[1] http://antelope.tigris.org/nonav/docs/manual/bk03ch13.html
[2] http://antelope.tigris.org/
[3] http://ant-contrib.sourceforge.net/
[4] http://marc.info/?l=ant-user&m=119511436111431&w=2

Regards, Gilbert

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


Mime
View raw message