ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Donaldson" <>
Subject Script task not found
Date Mon, 24 Apr 2006 15:15:42 GMT

I need to perform some simple arithmetic on the contents of a string. I have
read that the Script task is suitable for this purpose.

I define my task as:
<taskdef name="script"

But I keep getting the message:
file:build.xml:5: taskdef class cannot be found

I can see the class in optional.jar. optional.jar is in my ant lib folder. I
have tried adding a classpath attribute to the taskdef and setting it to the
ant lib folder, but with the same result. 

Does anyone know the reason for this?

Not that it gets this far, but the target that uses the script task is
defined as:

  <target name="setup">

    <script language="javascript"> <![CDATA[

      for (i=1; i<=10; i++) {
        echo = squares.createTask("echo");

    ]]> </script>


I am using Ant version 1.5.1
I have downloaded and installed to ANT_HOME/lib:
js.jar version 1.6 R2 from
bsf.jar 2.3.0 from

Many thanks,

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

View raw message