Hello,

there is no way in Maven to insert a Mojo between two Mojo from a
packaging. Each Mojo you add in your POM will be executed after the ones
from the packaging.
If you want to execute your Mojo before any Mojo of the package phase, then
you can bind it to the prepare-package phase.

Jeff


On Fri, Jun 8, 2012 at 11:25 PM, Pascal Rapicault <[email protected]>wrote:

> Hi,
>
> I have a situation where I need to execute a mojo just before the
> execution of the mojo bound to the phase. Is there a way to achieve this
> without binding my mojo to the previous phase but to the phase that I'm
> interested in?
>
> For example, the "eclipse-plugin" packaging type has the following phases:
> - […]
> - process-test-resources
> - package (which itself executes 2 mojos)
> - […]
>
> I would like to execute a mojo just before the first mojo of the package
> phase is executed, or even better in between the execution of the two mojos
> executed by the package phase.
>
> I could hook my mojo to the process-test-resources but I feel that this is
> incorrect since the execution of my mojo should only happen if the package
> phase does, otherwise it may screw up following builds.
>
> Thanks.
>
> Pascal
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Reply via email to