Please to not top-post when replying to mails.

On Fri, Aug 12, 2005 at 07:36:32PM +0400, Alexander Azarov wrote:
> 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.

As a Mojo you don't know anything about your execution enviroment except
the parementers you're requiring to be set.

> 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 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}

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.

--
Trygve

Attachment: signature.asc
Description: Digital signature

Reply via email to