ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Tuft Muller" <...@online.no>
Subject RE: javascript and ant.
Date Tue, 16 Apr 2002 12:37:01 GMT
Zacky,

You must recompile Ant with the Bean Scripting Framework from IBM
(http://www-124.ibm.com/developerworks/projects/bsf), and Mozilla
implementation Rhino 1.5 R1 js.jar available from
http://www.mozilla.org/rhino

In order to use it from an Ant project you must define the following task
before you use it:

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

--

Thomas


| -----Original Message-----
| From: Azoulay, Zacky [mailto:zacky.azoulay@sapportals.com]
| Sent: 16 April 2002 13:24
| To: 'ant-user@jakarta.apache.org'
| Subject: javascript and ant.
|
|
| Hi,
|
| I put the bsf.jar in the ANT_HOME/lib
|
| I try to test xml that contain the following example ( exist in the 1.4.1
| doc)
|
| <project name="squares" default="main" basedir=".">
|
|   <target name="setup">
|
|     <script language="javascript"> <![CDATA[
|
|       for (i=1; i<=10; i++) {
|         echo = squares.createTask("echo");
|         main.addTask(echo);
|         echo.setMessage(i*i);
|       }
|
|     ]]> </script>
|
|   </target>
|
|   <target name="main" depends="setup"/>
|
| </project>
|
| I got the following err
|
| BUILD FAILED
|
| C:\ant_test\test1.xml:5: java.lang.NoClassDefFoundError:
| org/mozilla/javascript/
| JavaScriptException
|
| any help would be appreciated,
|
| regards zacky
|
|
|
|
| --
| To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
| For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
|
|



*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message