You would be interested in the new "props" AntLib in the sandbox ...
https://svn.apache.org/repos/asf/ant/sandbox/antlibs/props/trunk/


Jan

>-----Ursprüngliche Nachricht-----
>Von: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] 
>Gesendet: Dienstag, 26. Juni 2007 08:06
>An: Ant Users List
>Betreff: RE: Convert Value to lower case
>
> 
>Hi,
>
>-----Original Message-----
>From: Hardy Grueneis [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, June 26, 2007 6:41 AM
>To: user@ant.apache.org
>Subject: Convert Value to lower case
>
>/*
>I want to convert the value of a property into lower cases.
>How can I do this with Ant 1.6.2?
> */
>
>i would go via <script> task and i.e JRuby =
>
><project name="bla" default="main" basedir=".">
>
><property name="testprop" value="DEMO"/>
>
><target name="depends">
>  <script language="ruby">
>  <![CDATA[
>    $project.setProperty "testprop" , $testprop.downcase
>  ]]>
> </script>                         
> </target>
>
><target name="main" depends="depends">
>  <echo>
>  $${testprop} == ${testprop}
>  </echo>  
> </target>
></project>
>
>gives you =
>
>[echo] ${testprop} == demo
>
>
>But beware, this does not follow the standard Ant convention of
>property immutability
>
>There are also possibillities with addon tasks
>like antelope <stringutils> or antcontrib (see property tasks)
>if you don't like using a scripting language like jruby,groovy,
>javascript, beanshell, jython ....
>
>http://antelope.tigris.org/
>http://ant-contrib.sourceforge.net/
>
>that's non standard Ant too; 
>this tasks does not follow the standard Ant convention of property
>immutability either;
>
> 
>Regards, Gilbert
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to