ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Raible" <>
Subject Is it possible to use <script> without putting JARs in $ANT_HOME/lib?
Date Tue, 04 Apr 2006 21:42:58 GMT
I'd like to use the <script> task without putting bsf.jar and js.jar
in ANT_HOME/lib.  Is that possible?

I tried the following, but no dice:

        <taskdef name="foo"
        		<fileset dir="${ant-contrib.dir}" includes="*.jar"/>

		<!-- Using Javascript functions to capitalize and lowercase the -->
         <foo language="javascript"><![CDATA[

             // getting the value
             lowercaseValue = project.getProperty("");

             // the first character
             low = lowercaseValue.substring(0,1).toLowerCase();

             // the rest of the value
             rest = lowercaseValue.substring(1);

            // convert first character to uppercase
             up = low.toUpperCase();

             // concatenate the uppercase with the rest
             uppercaseValue = up + rest;
             lowercaseValue = low + rest;

             // store the result in a new property
             project.setProperty("", lowercaseValue);


I get:

java.lang.NoClassDefFoundError: org/apache/bsf/BSFException

If I move js.jar and bsf.jar in $ANT_HOME/lib, everything works fine. 
The main reason I want to keep the JARs in my project is because 1) I
don't want users to go through an extra "copy JARs into ANT_HOME/lib
step", and 2) I'm using Canoo WebTest uses a newer version of js.jar
(the latest version of rhino) and I don't want the conflict.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message