On Fri, 2003-06-20 at 06:23, Costin Manolache wrote: > 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.
Hi Costin, looking at classloader, it seems to imply that it can be used at to ant's default classloader, to help in defining tasks/types. However when I try to do: <project name="c"> <mkdir dir="classes"/> <javac srcdir="src" destdir="classes"/> <classloader> <classpath path="classes"/> </classloader> <taskdef name="myecho" classname="org.acme.MyEcho" classpath="classes"/> <myecho>hello</myecho> <taskdef name="myecho2" classname="org.acme.MyEcho" /> <myecho2>hello</myecho2> </project> The first myecho works, but the second does not. Peter. > > 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: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > 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]