I was testing setting this with scripttypedef.
Both groovy and beanshell ignore the setting
of the classloader on the BSF engine.
With groovy, one can work around the problem
by setting the context classloader, but this
does not work for beanshell.
Peter
Jose Alberto Fernandez wrote:

From: Peter Reilly [mailto:[EMAIL PROTECTED]

This is a known problem with beanshell 2.0b1.
You need to just call the script once in a top-level
target (! i.e. do not place the script task at the top-level!) and then use the antcall's.


<scripttypedef/> solves this problem by checking if the scripttypedef has been defined before.




Another thing we could do, and this is two fold:

1) Add classpathref and/or classloader attribute to <script>
So that one can indicate it should use a different classloader.
The API is there in BSF, but we do not use it.

2) This will allow all java-based languages to find and use
classes not loaded by ANT directly. Andin particular, since this
would instantiate an internal AntClassLoader, then we have
the dispossable classloader effect we were looking for.

It should all work as long as the parent classloader is correctly set.

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to