ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Struck <M.Str...@PopNet.de>
Subject AW: Fw: Problem using script task
Date Wed, 27 Dec 2000 10:41:40 GMT
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.

--
Marco Struck
Software Development

PopNet Kommunikation GmbH & Co KG
Medienpark Kampnagel
Barmbeker Str.10
D-22303 Hamburg

http://www.popnet.de 

Telefon: +49 (0)40 - 27 8 27 - 116
Fax: +49 (0)40 - 27 8 27 - 199
mailto:mstruck@popnet.de


-----Urspr√ľngliche Nachricht-----
Von: Jason Rosenberg [mailto:jason@squaretrade.com]
Gesendet am: Dienstag, 26. Dezember 2000 21:10
An: ant-dev@jakarta.apache.org; ant-user@jakarta.apache.org
Betreff: Re: Fw: Problem using script task

Ok, now I have managed to rebuild the bsf.jar with javascript
stuff included (js.jar was in the classpath, which I got from
http://www.mozilla.org/rhino/download.html)

Now, I get the exception below, when I try to run.  I modified
the ant.bat to print out the LOCALCLASSPATH before starting
the build.  You can see that bsf.jar and js.jar are there....

****************************************************

D:\NewWork\SourceRoot>ant -buildfile text2.xml
"Using
classpath="";"D:\Ant1.2\lib\ant.jar";"D:\Ant1.2\lib\bsf.jar";"D:\Ant1.2\lib\
jaxp.jar";"D:\Ant1.2\lib\js.jar";"D:\Ant1.2\lib\optional
.
jar";"D:\Ant1.2\lib\parser.jar";"D:\jdk1.3\lib\tools.jar""
Buildfile: text2.xml

setup:

BUILD FAILED

D:\NewWork\SourceRoot\text2.xml:5: java.lang.RuntimeException: No Context
associated with current Thread
java.lang.RuntimeException: No Context associated with current Thread
        at org.mozilla.javascript.Context.getContext(Context.java:1713)
        at
org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:492)
        at org.mozilla.javascript.Context.toObject(Context.java:1129)
        at
com.ibm.bsf.engines.javascript.JavaScriptEngine.declareBean(JavaScriptEngine
.java:134)
        at
com.ibm.bsf.engines.javascript.JavaScriptEngine.initialize(JavaScriptEngine.
java:67)
        at com.ibm.bsf.BSFManager.loadScriptingEngine(BSFManager.java:320)
        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)

Total time: 2 seconds
D:\NewWork\SourceRoot>




----- Original Message -----
From: "Jason Rosenberg" <jason@squaretrade.com>
To: <ant-user@jakarta.apache.org>; <ant-dev@jakarta.apache.org>
Sent: Tuesday, December 26, 2000 2:56 PM
Subject: Re: Fw: Problem using script task


> Diane,
>
> Thanks for the help.  I've found the javascript stuff
> from mozilla.org.....
>
> I guess I just thought somehow that I already had javascript
> installed, since my browser uses it on a regular basis, etc.
>
> The only reason I am going the javascript route is because
> I have been disatisfied with the set of available flow control
> features in the core ant stuff.
>
> So, probably, once I get to a point where I've got my preliminary
> build installation working, I'll make an effort to start writing
> some useful flow control tasks.  I assume that wouldn't be
> too difficult.
>
> Or, are there philosophical objections to doing so.  Simple
> things like loops and conditionals, etc.
>
> Jason
>
> ----- Original Message -----
> From: "Diane Holt" <holtdl@yahoo.com>
> To: <ant-dev@jakarta.apache.org>
> Sent: Tuesday, December 26, 2000 2:20 PM
> Subject: Re: Fw: Problem using script task
>
>
> > --- Jason Rosenberg <jason@squaretrade.com> wrote:
> > > So, once I build the BSF stuff, do I then need to include something in
> > > my classpath so that Ant will use it?
> >
> > If you put the jar-files in $ANT_HOME/lib, the 'ant' wrapper-script will
> > include them in the classpath it runs Ant with.
> >
> > > Is this documented already somewhere?
> >
> > Probably not. What with Ant being an OpenSource project and all, it's
not
> > like there's a TechPubs department making sure everything's covered. On
> > the other hand, it also means someone could volunteer to take that task
> > on, if they wanted to.
> >
> > Diane
> >
> >
> > =====
> > (holtdl@yahoo.com)
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Shopping - Thousands of Stores. Millions of Products.
> > http://shopping.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: ant-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org

Mime
View raw message