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: How to replace substring into property and get result intoanother property ?
Date Tue, 29 Aug 2006 10:47:25 GMT
One possible solution via <script>, f.e.
with javascript =

<property name="foobar"
value="lib/iaik/iaik_jce.jar,lib/iaik/iaikPkcs11Provider.jar"/>

<target name="depends">
     
<script language="javascript">
        s=project.getProperty("foobar").replace(',',':');
        project.setProperty("myotherproperty", s);
</script>

<!-- also possible to overwrite ${foobar} when using

<script language="javascript">
        s=project.getProperty("foobar").replace(',',':');
        project.setProperty("foobar", s);
</script>

-->


<echo>$${myotherproperty} == ${myotherproperty}</echo>

</target>

depends:
     [echo] ${myotherproperty} ==
lib/iaik/iaik_jce.jar:lib/iaik/iaikPkcs11Provider.jar


Regards, Gilbert


-----Original Message-----
From: Willy Reinhardt [mailto:wreinhardt@ctp.com] 
Sent: Tuesday, August 29, 2006 12:32 PM
To: Ant Users List
Subject: How to replace substring into property and get result
intoanother property ?

Hi, 
I get a property value as : 
lib/iaik/iaik_jce.jar,lib/iaik/iaikPkcs11Provider.jar 

and would replace character "," by ";" or ":" 

is a ant task can do that ? 

Thanks 

Willy 

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


Mime
View raw message