ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vinod.na...@iflexsolutions.com>
Subject RE: UpperCase example by JanMaterne
Date Tue, 25 May 2004 11:31:50 GMT
Hi All,

In my case too its the same problem..
But i don't know how did Skalsky find the method where it is failing to invoke.

Peter,

if i move this classpath location to the ANT_CLASSPATH it works!!
else it throws NoClassDefFound message for ScriptDef.

  <taskdef name="scriptdef" classname="org.apache.tools.ant.taskdefs.optional.script.ScriptDef">
    <classpath>
      <pathelement location="${env.ANT_BSF1_JAR}:${env.ANT_BSF2_JAR}:${env.ANT_JS_JAR}"/>
    </classpath>
  </taskdef> 

For your more information if i echo any of this like [${env.ANT_BSF1_JAR}] in any target it
displays correct path.

Regards,
Vinod.

-----Original Message-----
From: skalsky@oksystem.cz [mailto:skalsky@oksystem.cz]
Sent: Tuesday, May 25, 2004 4:31 PM
To: user@ant.apache.org
Subject: RE: UpperCase example by JanMaterne


Hello there,
	I've problems with example by Jan Materne :(
	(I'm a beginner with ANT and Java so I may only bad understand the example)I made this steps.

Because the task <scriptdef> needs BeanScriptingFramework,I downloaded bsf.jar.
The script fell because it can't find  class  org.mozilla.javascript.JavaScriptException 
- also I downloaded js.jar from http://www.mozilla.org/rhino/download.html - the Latest build.

But now it's falling because it can't find  in the js.jar method Context.getDebuggableContext();
  (the class really doesn't contains the method). But the older releases of Rhino js.jar don't
contain any other classes (bex.: debut.debugger)

How can I run the example without complication and what I need to?

Thanx 4 your help.
		Milan

P.S.
  The ant code:
 <target name="uc">
       <scriptdef name="upper" language="javascript">
          <attribute name="prop"/>
          <attribute name="val"/>
				project.setNewProperty(attributes.get("prop"),attributes.get("val").toUpperCase());
      </scriptdef>

       <property name="prop1 " value=" hello world"/> 
       <echo message="before: ${prop1}"/> 
       <upper property="prop2" value="${prop1}"/>
       <echo message="after: ${prop2}"/> 
   </target>


---------------------------------------------------------------------
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