> -----Original Message-----
> From: Trygve Laugstшl [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 12, 2005 7:44 PM
> 
> On Fri, Aug 12, 2005 at 07:36:32PM +0400, Alexander Azarov wrote:
> > 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.
> 
> Why do you need it, a concrete example would be good. If you 

We are running Maven2 from Eclipse (in the same VM) and our Mojos must have
an access to Eclipse infrastructure.

Another way would be running Eclipse from Maven2 as a container for all the
Mojos and I do have serious doubts this way is simpler and even possible.

> are trying embed Maven you can add Plexus components to the 
> root class realm and in your Mojo have a paremeter with an 
> expression like this:
> 
>  @parameter expression=${component.my.role}

Well, will it help me in my task (using Eclipse classloader from the my
Mojos)? Could you please suggest how I can get it? I am not experienced with
ClassWorlds and Plexus in fact (yet).

> The reason as to why you can't get access to the classloader 
> of the core is that the Mojos are supposed to be independent 
> of their enviroment and they should be executed independently 
> in separate class loaders. Giving the Mojos access to the 
> root class loader will conflict with these ideas.

I see, but our build environment is developed on assumption that we run
under Eclipse. We are trying to move to Maven2, but we can avoid Eclipse in
no way.

Thank you.


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

Reply via email to