At 03:15 31/12/00 -0800, James Duncan Davidson wrote: >(moved to -dev as this is more a futures "dev" discussion in this follow-up) > >On 12/29/00 3:05 AM, "Peter Donald" <[EMAIL PROTECTED]> wrote: > >> Hopefully in Ant2.0 you will be able to add the attribute >> ant:classpath="..." and it will automagically run it via a new classloader. >> It is something I would find extremely useful thou it is still up to >> discussion thou ... >> Cheers, > >Actually, all tasks should run in a classloader. My gut feeling right now is >that they should get the system classpath (what was there before Ant ran) + >the classpath needed to load the task (usually a .jar). This does assume >that Ant takes care of all of it's dependencies via it's own custom class >loader which allows the user to leave their classpath as free or ugly as >they like it. > >The only thing more needed is additional classpath info which would be >appended to the system classpath in the task's classloader. > >Note that I'm *not* for ignoring the system classloader space. Whatever >users put into their $CLASSPATH env var or is in their /lib/ext, they should >be able to live with. However, I completely buy into the notion that users >shouldn't have things go freaky because Ant itself is relying on a xml >parsing library or such.
Agreed - what do you think of a hierarchy of classloaders such that system <-- client task api (CTA) <-- Task Archive + dependencies so for CTA we would have the task interface/classes + support classes (like pattern/patterset, fileset, mappers etc). Each .tsk jar would have a separate classloader that loads task + dependent jars. SO if we have foo.tsk that has tasks that rely on bar.jar then we add the line "ClassLoader: bar.jar" to the manifest of foo.tsk and the classloader takes care of it. We would also have the hierarchy system <-- client task api (CTA) <-- Ant Runtime engine where the runtime engine included the execution engine + any other relevent files that are not included in CTA. Like/Dislike ? Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*
