You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lars Fischer <lf...@fastmail.fm> on 2010/11/22 18:34:04 UTC

[m3] extending an existing Mojo from another plug-in

Hello,

I would like to create a new maven plug-in to extend another plug-in (P_O)
to solve some very special requirements.

I defined a dependency to P_O and created a "NewMojo" by extending an
existing "BaseMojo" from P_O. But parameters defined in the BaseMojo are not
injected. They are always null. Defining the same parameter inside my
NewMojo the values are injected.

Searching for the reason, I found that extending other plug-ins is no good
idea when using Maven2.

I use Maven3 and have no need to run my plug-in with Maven2. Is there a way
to enable the inheritance from other Mojos to pretend duplicating the code?

Kind regards,
Lars