You definitely want your lifecycle and handlers separated from the
plugin. The extensions are loaded into the core classloader and if you
plugin pulls in things like velocity, it will mess up other plugins. (we
had this problem with archetypeng). Also, don't ever use a plugin as a
dependency, other bad things can happen.

-----Original Message-----
From: nicolas de loof [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 4:41 AM
To: Maven Developers List
Subject: Re: plexus classloader issue ?

My extension also defines maven extensions (custom lifecycle and
ArtifactHandler)
I'll have to split it into extension and common-tools, so that
common-tools
can be shared as a dependency.

2007/10/18, Tim Kettler <[EMAIL PROTECTED]>:
>
> Hi,
>
> nicolas de loof schrieb:
> > My first plugin defines some custom components, shored with other
> plugins.
> > It is used from other projects as a maven extension.
> >
> > My second plugin uses this component
> >
> > My main project uses the 2d plugin and has the 1rst one set as
> extension.
> > The second plugin cannot initialize (classloader issue). Seems the
> > UnArchiver class loaded in 2d plugin isn't same as the ZipArchiver
->
> > UnArchiver loaded by the first plugin.
>
> Why don't you just put the shared components in a library jar and
depend
> on that in both plugins. I think, that's the proper way of doing it
and
> would avoid classloader issues and having to use the extensions hack
> altogether.
>
> > I think plugins use separate classloaders :
>
> Yes, each plugin uses its own plexus child container.
>
> [...]
>
> >>>>
> >>>> Nico.
> >>>>
>
> -Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to