ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Poor support for selectors
Date Fri, 12 Mar 2004 16:36:09 GMT
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:peter.reilly@corvil.com] 
>>
>>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: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


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


Mime
View raw message