ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject Re: Dealing with ClassLoaders
Date Tue, 26 Feb 2002 01:46:50 GMT
From: "Stefan Bodewig" <>

> On Sat, 23 Feb 2002, Jose Alberto Fernandez <>
> wrote:
> > <style> is a little special because it is (I think) the only task in
> > the core packages that requires things outside ANT's core. See all
> > the discussion about moving <style> to optional.
> No reason to move the implementation of the <style> task out of
> ant.jar, the implementations of XSLTLiaison need to be separate, and
> they are in optional.jar already, thus would end up in a different
> classloader in your setup anyway.


> >         xml.jar  (maybe, I am not sure who uses this thing)
> Nobody, if you have one, remove it 8-)

Will do.

> > Everything in lib and autolib is loaded and the tasks registered
> > when ANT comes up.
> How would I add xalan.jar and xml-apis.jar to the class loader named
> trax?

You could say:

    <antlib library="xyz.jar" loaderid="trax" >
        <classpath path="xalan.jar;xml-apis.jar" />

You get the idea. Here I have xyz.jar because at the moment <antlib> requires at least
one of the jars in the classpatha and library or file attributes to containing a MANIFEST/antlib.xml.

> > Now for the old things that create their own AntClassLoader.  I
> > would like to be able to instruct AntClassLoader to attach itself to
> > a particular loaderid (the default being "").
> Which would be: the AntClassLoader in style attaches itself to, err,
> what?  We'd have trax, xalan and xslp for the three Liaison
> implementations.  Let the user specify it?

I think in your case the AntClassloader thing is of very little use.
The way to go, I think is with <antlib>.

Jose Alberto

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

View raw message