You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kurt Zettel <ku...@metova.com> on 2010/05/03 19:11:23 UTC

Mojo not being contextualized

I have a custom plugin which
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable.
 It has been working fine with the older alphas (5 and 6) but with alpha-7
and beta-1 my plugin is no longer being contextualized.  The
method contextualize is not being called.  Any thoughts on what changed or
what I could be doing wrong?

Thank you,

--
Kurt Zettel, Chief Architect
Metova, Inc.

Re: Mojo not being contextualized

Posted by Benjamin Bentmann <be...@udo.edu>.
Kurt Zettel wrote:

> The jars were in two different groups. [...] plexus versus org.codehaus.plexus.

Ah, now I got it, thanks. That's unintended and scheduled for fixing in 
the next release [0].


Benjamin


[0] http://jira.codehaus.org/browse/MNG-4666

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Mojo not being contextualized

Posted by Kurt Zettel <ku...@metova.com>.
The jars were in two different groups.  We are
using: plexus:plexus-log4j-logging:1.0 which imports an old version of the
plexus-container which is in the group plexus versus org.codehaus.plexus.

--
Kurt

On Wed, May 5, 2010 at 2:44 PM, Benjamin Bentmann <benjamin.bentmann@udo.edu
> wrote:

> Kurt Zettel wrote:
>
>  I figured it out.  Turns out I had two different versions
>> of plexus-container-default as Maven dependencies.
>>
>
> This sounds strange. For one, Maven's dependency resolution ensures only a
> single version per groupId:artifactId:type[:classifier] is present in the
> dependency tree. And finally, org.codehaus.plexus:plexus-container-default
> is filtered out of the plugin runtime class path. So I don't quite
> understand how your plugin ended up with two different versions. If you have
> some more details on this, please let me know.
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Mojo not being contextualized

Posted by Benjamin Bentmann <be...@udo.edu>.
Kurt Zettel wrote:

> I figured it out.  Turns out I had two different versions
> of plexus-container-default as Maven dependencies.

This sounds strange. For one, Maven's dependency resolution ensures only 
a single version per groupId:artifactId:type[:classifier] is present in 
the dependency tree. And finally, 
org.codehaus.plexus:plexus-container-default is filtered out of the 
plugin runtime class path. So I don't quite understand how your plugin 
ended up with two different versions. If you have some more details on 
this, please let me know.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Mojo not being contextualized

Posted by Kurt Zettel <ku...@metova.com>.
I figured it out.  Turns out I had two different versions
of plexus-container-default as Maven dependencies.  This caused the
instanceof check in the ContextualizePhase to return false even though my
Mojo implemented Contextualizable.  I corrected my pom and it is working as
expected now.

Thank you,

Kurt

On Mon, May 3, 2010 at 5:11 PM, Kurt Zettel <ku...@metova.com> wrote:

> I have a custom plugin which
> implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable.
>  It has been working fine with the older alphas (5 and 6) but with alpha-7
> and beta-1 my plugin is no longer being contextualized.  The
> method contextualize is not being called.  Any thoughts on what changed or
> what I could be doing wrong?
>
> Thank you,
>
> --
> Kurt Zettel, Chief Architect
> Metova, Inc.
>
>