On Wed, 7 Nov 2001 09:34, Jose Alberto Fernandez wrote:
> From: "Glenn McAllister" <[EMAIL PROTECTED]>
>
> > Jose Alberto Fernandez wrote:
> > > From: "Peter Donald" <[EMAIL PROTECTED]>
> > >
> > > > The problem was that it is not backwards compatible and several tasks
> > > > make the assumption that the system classloader contains the ant
> > > > classes. Hence we can't really implement it in Ant1.
> > >
> > > No offence, but isn't is possible to modify the offending tasks?
> > >  What was insurmountable about it?
> >
> > Of course its possible for us to change our tasks.  But what about custom
> > tasks? We've made a reasonable commitment to break as little as possible
> > before Ant 2. If we change something as potentially fundamental as that,
> > we could break a lot of people.
>
> What kind of tasks are we talking about. Can someone explain?
> As far as I know, there is nothing in ANT1's API that can be thought to be
> guaranteeing that classes must be loaded from the CLASSPATH.

Most tasks that need to create their own ClassLoaders will do something like

URLClassLoader classLoader = new URLClassLoader( myURLs );

where they would need to do something like

URLClassLoader classLoader = new URLClassLoader( myURLs, 
            this.getClass().getClassLoader() );

if they wanted the ant runtime classes to be included in classLoader (which 
many do need). It would not be a good idea to break all tasks that create 
their own classloaders (many of which do)..

> That is make quite clear by the public entrypoint
> org.apache.tools.ant.Main.start() which it is there so that things like
> GUIs can provide their own ClassLoader when invoking ANT1. Given that it
> has been there since from at least 3 releases I would argue that any task
> making CLASSPATH assumptions contins bugs and needs to be fixed.

has nothing to do with the entry point.

-- 
Cheers,

Pete

"Artists can color the sky red because they know it's blue.  Those of us who
 aren't artists must color things the way they really are or people might 
 think we're stupid." -- Jules Feiffer 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to