How to attach a maven plugin to a phase by default?
I have a maven plugin that should run in the compile phase, so in the project that consumes my plugin, I have to do something like this: <executions> <execution> <phase>compile</phase> <goals> <goal>my-goal</goal> </goals> </execution> </executions> What I need is to by default attach my-goal to the compile phase if the user has included my plugin already (ideally the above part wouldn't be necessary, just the plugin declaration). Is this possible? Put an @phase annotation in your Mojo classdef annotations. The doc says: @phase <phaseName> This annotation specifies the default phase for this