ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vinod.na...@iflexsolutions.com>
Subject RE: UpperCase or similar task
Date Tue, 25 May 2004 09:22:44 GMT
Hi Jan,

Could you please help me in this..

<taskdef name="scriptdef" classname="org.apache.tools.ant.taskdefs.optional.script.ScriptDef"
/>

<scriptdef name="SplitBeanInfo" language="javascript">
  <attribute name="bean-set"/>
    project.setProperty("bean-name",attributes.get("bean-set"));
</scriptdef>

<target name="EntityBeans">
	<for list="${e-beans}" delimiter="," param="ebean-set">
	<sequential>
		<echo message="@{ebean-set}"/>
		<SplitBeanInfo bean-set="@{ebean-set}"/>
	</sequential>
	</for>
</target>

after calling the 'EntityBeans' target i am getting this error.

EntityBeans:
     [echo] Rco

BUILD FAILED
java.lang.NoSuchMethodError

This is my ant classpath.
ANT_CLASSPATH=$ANT_HOME/lib/ant.jar:$ANT_HOME/lib/ant-launcher.jar:$ANT_HOME/lib/xercesImpl.jar:$ANT_HOME/lib/xml-apis.jar:$ANT_HOME/lib/js.jar:$ANT_HOME/lib/bsf.jar:$ANT_HOME/lib/ant-contrib.jar:$ANT_HOME/lib/ant-apache-bsf.jar:$JAVA_HOME/lib/tools.jar

Thanks in advance,
Vinod.

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Tuesday, May 25, 2004 2:40 PM
To: user@ant.apache.org
Subject: RE: UpperCase or similar task


There is no task.

But you can use the java.lang.String.toUpperCase() method:

    <scriptdef name="uc" language="javascript">
        <attribute name="property"/>
        <attribute name="value"/>
        project.setNewProperty(attributes.get("property"),
attributes.get("value").toUpperCase());
    </scriptdef>

    <uc property="one" value="one"/>
    <echo>one = ${one}</echo>

    <uc property="one" value="another"/>
    <echo>one = ${one}</echo>

    <uc property="two" value="Two"/>
    <echo>two = ${two}</echo>

[echo] one = ONE
[echo] one = ONE   <----- properties are immutable (therefore use of
set_New_Property() )
[echo] two = TWO


Jan

> -----Original Message-----
> From: skalsky@oksystem.cz [mailto:skalsky@oksystem.cz]
> Sent: Tuesday, May 25, 2004 10:53 AM
> To: user@ant.apache.org
> Subject: UpperCase or similar task
> 
> 
> Hello there,
> 	I have a problem with strings in ANT. Is there any task 
> to make upperCase (or lowerCase) of string in ANT ? I can't 
> find anything in the apache.org :(
> 
> 	Thanx 4 your help.
> 		Milan
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message