maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Rapicault <pas...@rapicault.net>
Subject Hooking before and after a phase
Date Fri, 08 Jun 2012 21:25:19 GMT
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message