ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <ja...@squaretrade.com>
Subject Re: Problem using script task
Date Tue, 26 Dec 2000 16:01:11 GMT
Ok,

Now it looks like I need something special to use javascript within bsf....

Looking at the build.xml that is used to build bsf, it looks like it is
checking for the availability of 

    <available property="rhino.present" 
               classname="org.mozilla.javascript.Scriptable"/>

Anyone know where I can find this class?  Am I missing some
documentation somewhere that describes this, or does it just
not exist anywhere.  In the Ant doc under optional tasks, it
describes the <script> task, and makes it sound as though it
is just hunky-dory to just start using it....Hmmm....

Error log below:

BUILD FAILED

D:\NewWork\SourceRoot\text2.xml:8: java.lang.ClassNotFoundException: com.ibm.bsf.engines.javascript.JavaScriptEngine
java.lang.ClassNotFoundException: com.ibm.bsf.engines.javascript.JavaScriptEngine
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at com.ibm.bsf.BSFManager.loadScriptingEngine(BSFManager.java:316)
        at com.ibm.bsf.BSFManager.exec(BSFManager.java:481)
        at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:110)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.Project.executeTargets(Project.java:506)
        at org.apache.tools.ant.Main.runBuild(Main.java:420)
        at org.apache.tools.ant.Main.main(Main.java:149)


Jason

  ----- Original Message ----- 
  From: Jason Rosenberg 
  To: ant-user@jakarta.apache.org 
  Sent: Tuesday, December 26, 2000 10:34 AM
  Subject: Re: Problem using script task


  Ok,

  So, once I build the BSF stuff, do I then need to include something in my
  classpath so that Ant will use it?  Is this documented already somewhere?
  I didn't see anything, so far...

  Jason
    ----- Original Message ----- 
    From: Nico Seessle 
    To: ant-user@jakarta.apache.org 
    Sent: Tuesday, December 26, 2000 8:56 AM
    Subject: Re: Problem using script task


      ----- Original Message ----- 
      From: Jason Rosenberg 
      To: ant-user@jakarta.apache.org ; ant-dev@jakarta.apache.org 
      Sent: Tuesday, December 26, 2000 7:26 AM
      Subject: Re: Problem using script task


      Also,

      When I installed Ant1.2, I installed the binary version, and so I don't
      have any bootstrap files to run, etc....I manually placed the optional.jar
      in my /Ant1.2/lib directory, and the ant script is finding it ok and adding
      it to the classpath.....

      I get the same error with a <junit> class, so I think I am definitely not
      properly configured for optional tasks.

      Jason
    You need some external packages to use <script> and <junit>. 

    For junit: Download JUnit from http://sourceforge.net/projects/junit/
    For scripting: BSF (Bean Scripting Framework) is hosted at http://oss.software.ibm.com/developerworks/opensource/bsf/index.html.
Unfortunately there is no binary download available and you must get (and build) it yourself.


    Nico



Mime
View raw message