Yes, my problem is exactly that Mojo runs in its own ClassLoader while I
would like to get another, specified on top of embedded Maven2.

I.e. I am trying to embed Maven2 into another application and I would like
to get access to that application's ClassLoader in my Mojo. Still cannot
figure out how to do that.

Alexander

> -----Original Message-----
> From: Trygve Laugstшl [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 12, 2005 7:21 PM
> To: Maven Users List
> Subject: Re: [m2] Mojo development: need ClassWorld
> 
> 
> On Fri, Aug 12, 2005 at 07:17:47PM +0400, Alexander Azarov wrote:
> > How may I get a ClassWorld instance from Mojo execute method?
> 
> There is no standard way of getting an instance of a 
> ClassWorld. What are you trying to do? The Mojo itself should 
> probably construct a new ClassLoader and use either 
> this.getClass().getClassLoader() or
> Thread.currentThread.getContextClassLoader() as the parent 
> class loader.
> 
> Creating a sub-class of URLClassLoader is often a good start.
> 
> --
> Trygve
> 


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

Reply via email to