ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: How to provide reusable ClassPaths in ANT
Date Tue, 17 Dec 2002 19:12:17 GMT

> From: Costin Manolache []
> Some time ago I made a proposal similar with yours ( associate
> all <paths> with a classloader ). I think an explicit <classloader>
> task would be much better. 
> Something like:
>   <classloader id="myLoader" >
>     <path refid="..."/>
>   </classloader>
> And 
>   <classloader id="ant.loader">...</>
> This form would set ( modify?) the main loader. Very usefull for 
> junit and similar optional tasks ( if you don't include everything
> in ant/lib ). 

The only issue here is how to retrofit all the tasks to be able to use the new
feature, that is quite a big job, I think.

This is why I proposed modifying <path> or maybe making <classloader>
extend <path>, that way we would hardly need to do any changes to the using tasks
and could embed all the glue necessary on itself.

If you pass to the constructor a <classloader> as the Path instance, it will 
just delegate all calls to that ClassLoader and efectively implemet sharing
eventhough the code still thinks it is creating separate ClassLoaders all over the place.

Maybe there is a better way, some of the tasks do really strange things
with their Path instances. But hey lets keep on talking.

Jose Alberto

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message