You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2005/05/04 12:44:40 UTC

RFC - rewrite of the delegating classloader FAQ

Hi,

while talking to Elliotte Rusty Harold (I know I've not been the only
one), I realized that at least "ant -lib here-is/junit.jar" should
have been mentioned.

I've been pondering on a longer article on Ant classloaders even
including some images for those who can make use of them, but realized
I wouldn't find time to do so.

I also shortly thought about explaining the dangerous solutions (which
probably work), but I'm not sure we want to talk about <taskdef
reverseloader="true"> or even the <classloader> task in the Ant FAQ.

The major thing I'm unsure about is that I called the classloader
loading Ant in 1.6.x the "coreloader", something that may give false
ideas to people reading Ant's source.

Stefan

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


Re: RFC - rewrite of the delegating classloader FAQ

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 04 May 2005, Peter Reilly <pe...@apache.org> wrote:
> Stefan Bodewig wrote:

>>I also shortly thought about explaining the dangerous solutions
>>(which probably work), but I'm not sure we want to talk about
>><taskdef reverseloader="true">
>>
> I tried this, it does not work too good (well ....  I could not get
> it to work at all) - it seems to get defeated because some of the
> classes are already paritially loaded already.

In my test, DefBase#createLoader() is the problem, in particular

            // need to load Task via system classloader or the new
            // task we want to define will never be a Task but always
            // be wrapped into a TaskAdapter.
            ((AntClassLoader) createdLoader)
                .addSystemPackageRoot("org.apache.tools.ant");

which means that reverseloader is ignored for all classes that are in
Ant's package, including the JUnit task itself.

>>The major thing I'm unsure about is that I called the classloader
>>loading Ant in 1.6.x the "coreloader", something that may give false
>>ideas to people reading Ant's source.
>>
> Indeed, we should try to clean this up -- maybe deprecate the
> Project#setCoreloader() method.

Are we sure they are really dead code?  If so, yes, let's deprecate
them - and document that they are not used for what one could think by
looking at the name.

Stefan

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


Re: RFC - rewrite of the delegating classloader FAQ

Posted by Peter Reilly <pe...@apache.org>.
Stefan Bodewig wrote:

>Hi,
>
>while talking to Elliotte Rusty Harold (I know I've not been the only
>one), I realized that at least "ant -lib here-is/junit.jar" should
>have been mentioned.
>
>I've been pondering on a longer article on Ant classloaders even
>including some images for those who can make use of them, but realized
>I wouldn't find time to do so.
>
>I also shortly thought about explaining the dangerous solutions (which
>probably work), but I'm not sure we want to talk about <taskdef
>reverseloader="true">
>
I tried this, it does not work too good (well ....  I could not get it 
to work
at all) - it seems to get defeated because some of
the classes are already paritially loaded already.

> or even the <classloader> task in the Ant FAQ.
>
>The major thing I'm unsure about is that I called the classloader
>loading Ant in 1.6.x the "coreloader", something that may give false
>ideas to people reading Ant's source.
>  
>
Indeed, we should try to clean this up -- maybe deprecate the 
Project#setCoreloader() method.

Peter

>Stefan
>
>---------------------------------------------------------------------
>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