ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: Using classloader for Junit
Date Fri, 20 Jun 2003 05:23:37 GMT
Nick Chalko wrote:

> After I slept on it,  I thought of how I could extend the antclassloader
> to handle the situations I need.
> I am considering a <antlibclassloader />
> That will explicitly allow the optional ant task to be loaded in the
> child classloader.
> I may even go so far as  automatically adding this fileset
> ${ant.home}/lib/ant-*.jar   to the classloader.
> 
> That should handle the usecase I have in mind.

Are you talking about a single child loader for all optional tasks ?
This may work - if you use normal delegation. The code that instantiate
the tasks needs to have a reference to the child loader, and I don't
think core tasks have dependencies on the classes in the optional.

> peter reilly wrote:
> 
>>Ah, I see.
>>That would be nice, but the classloader task is not
>>yet complete.

The part that loads junit.jar to the main loader is complete.

There are other possible enhancements to create arbitrary loaders
or support reloading which are not yet implemented.

Costin



>>
>>Peter
>>
>>On Thu, 2003-06-19 at 08:52, Nick Chalko wrote:
>>  
>>
>>>peter reilly wrote:
>>>
>>>    
>>>
>>>>Check the ant faq http://ant.apache.org/faq.html#delegating-classloader
>>>>In essence you need to place the junit.jar file in ${ant.home}/lib
>>>>
>>>> 
>>>>
>>>>      
>>>>
>>>I had hoped that was what the <classloader/> task would let me avoid.
>>>
>>>
>>>    
>>>
>>
>>
>>---------------------------------------------------------------------
>>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