Hi Benson,

By default all plugin's goal/mojo must be invoked via plugin's execution.

In each execution's configuration, you dont need to set 'phase' if
your plugin's mojo already set it in the source anotation

To automatically run your plugin's goal, it must be part of of maven
default build cycle ( maven-compile-plugin ) is an example.)
So change default lifecycle is not possible since its belongs to maven core.

However, you can still create your custom lifecycle to do so.  see
native-maven-plugin for example if you really want to go that far :-)

-Dan

On Fri, Dec 25, 2009 at 8:00 AM, Benson Margulies <[email protected]> wrote:
> I've tried posing this question before, but while I've elicited
> follow-up questions, I've never seemed to get to the bottom of it.
>
> What I want is for a plugin to execute simply by being included in the
> <plugins/> element of the POM, without needing to explicitly configure
> an <execution/> or a <goal/>. What I expected what that declaring an
> @phase and an @goal in the comments on the Mojo class would do this.
> However, I have not been able to get it to work. Nothing happens
> without an execution. I have this feeling that I'm missing something
> simple here. Either that, or this really isn't possible, and it is the
> 'super-POM' that arranges executions of all the standard plugins.
>
> ---------------------------------------------------------------------
> 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