ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <ja...@zenplex.com>
Subject Re: ClassLoader and Properties handling behaviour
Date Mon, 03 Mar 2003 13:55:18 GMT
On Mon, 2003-03-03 at 07:35, Conor MacNeill wrote:
> Jason van Zyl wrote:
> > Hi,
> > 
> > I
> > have heard that it is now possible to specify ClassLoaders and
> > Properties handlers. Is this true?
> 
> These are experimental at this stage. They have been added but not used much 
> or extensively tested. I think more work remains in this areas.

No problem. I have found a way to override the AntClassLoader.

> > 
> > In Maven we embed the use of Ant and I would like Ant to use the
> > ClassWorlds (classworlds.werken.com) mechanism we have in place and
> > remove the use the commons-sandbox Grant project.
> 
> We are not using Grant at the moment. I think you are probably referring to 
> Maven, but just to be clear. As for ClassWorlds, how would you envisage this 
> would be used in Ant? I'm not clear where it would fit.

ClassWorlds is what is going to be used to fully control classloading in
Maven. It is also being used in the Plexus avalon-based container which
is what Maven will eventually sit upon.

> Also, I'm a little concerned about violating the classloading hierarchy - it 
> leads to Linkage errors in my experience. I have the same concern with the 
> ClassLoader task.

Well, I plan to by pass the classloading mechanism which is controlled
by ClassWorlds. ClassLoading in general is much easier to control using
ClassWorlds. I'm definitely aware of potential problems but I've got my
share of ClassLoader experience :-)

> > 
> > If this is indeed true could someone point me at the the relevant code?
> 
> The ClassLoader task is here
> http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/ant/taskdefs/Classloader.java
> 
> The PropertyHelper clas is here but you'll need to follow the relationships 
> to see how it is used
> http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/ant/PropertyHelper.java
> 
> > 
> > Also, someone pointed James at the lifecycle document for taskdefs but
> > can't seem to find it, could someone point me at that also?
> > 
> 
> I don't know who James is in this case, but the document is here
> http://ant.apache.org/manual/develop.html#writingowntask

Cool, much appreciated!

> Conor
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


Mime
View raw message