Hi,

this is tricky and may involve some trial and error. Maven executes mojos
in the same phase in the order their plugins are listed in the POM. You can
try to define all plugins, including plugins automatically defined by the
eclipse-plugin lifecycle, in the required order. The relative order is
maintained even when plugins are merged from parents and profiles. I don't
remember now exactly the whole algorithm, but I hope this can help you.
Also, this behavior may change in future.


Regards,
htfv (Aliaksei Lahachou)



On Fri, Jun 8, 2012 at 11:25 PM, Pascal Rapicault <pas...@rapicault.net>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: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to