ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <Nico.Sees...@epost.de>
Subject Re: Fw: Problem using script task
Date Wed, 27 Dec 2000 23:53:00 GMT
Hi,

the problem is not inside ant, it seems to be a problem with BSF if there
are properties (in ant) handed over to BSF containing String's.

I just posted the following patch to bsf-discussion (and hope someone will
commit it)

Index: JavaScriptEngine.java
===================================================================
RCS file:
/usr/cvs/bsf/bsf-src/src/com/ibm/bsf/engines/javascript/JavaScriptEngine.jav
a,v
retrieving revision 1.3
diff -u -r1.3 JavaScriptEngine.java
--- JavaScriptEngine.java 2000/11/14 15:28:20 1.3
+++ JavaScriptEngine.java 2000/12/28 00:32:55
@@ -58,14 +58,14 @@
       global = cx.initStandardObjects (new ImporterTopLevel ());
       Scriptable bsf = cx.toObject (new BSFFunctions (mgr, this), global);
       global.put ("bsf", global, bsf);
+
+      int size = declaredBeans.size ();
+      for (int i = 0; i < size; i++) {
+        declareBean ((BSFDeclaredBean) declaredBeans.elementAt (i));
+      }
     } finally {
       Context.exit();
     }
-
-    int size = declaredBeans.size ();
-    for (int i = 0; i < size; i++) {
-      declareBean ((BSFDeclaredBean) declaredBeans.elementAt (i));
-    }
   }

   /**

This was a change introduced in revision 1.3, so if you want to build bsf
you need to explicitely get rev 1.2 of the file.

The sample works for me with this patch.

Bad testing there :-)

Nico

----- Original Message -----
From: "Marco Struck" <M.Struck@PopNet.de>
To: <ant-dev@jakarta.apache.org>
Sent: Wednesday, December 27, 2000 11:41 AM
Subject: AW: Fw: Problem using script task


Hi Jason, you are not alone. I've gone the same way like you and failed at
the same
exception. The script task is the last hope for some logical rulings in
Ant1.2, but
unfortunately it doesn't work. Nobody knows why.

Perhaps there is one of the programmers of the script task ... I think it's
easier for
one of them to solve that problem.




Mime
View raw message