Hi Lennart,

You can't.
And that makes some sense: why should a goal be aware of phases? The user can bind it to another phase if he wants and that shouldn't effect the normal behavior of the plugin. (I said normal, because if somebody binds surefire:test before compiler:test-compile, that won't work although its valid. That's a user-mistake) You could try it the other way around: read the BuildPlan and search for a specific MojoExecution.

Robert

Op Sat, 21 Dec 2013 01:27:41 +0100 schreef Lennart Jörelid <lennart.jore...@gmail.com>:

Hello all,

How can a running Mojo query the Maven API (or some other API) to find out
which Maven Phase it has been invoked in? Something like ...

String currentPhase = getSomeMavenApiHelper().getCurrentPhase();

--

+==============================+
| Bästa hälsningar,
| [sw. "Best regards"]
|
| Lennart Jörelid
| EAI Architect & Integrator
|
| jGuru Europe AB
| Mölnlycke - Kista
|
| Email: l...@jguru.se
| URL:   www.jguru.se
| Phone
| (skype):    jgurueurope
| (intl):     +46 708 507 603
| (domestic): 0708 - 507 603
+==============================+

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to