Add following member to your Mojo and inspect what is injected:
/**
* Mojo execution.
*
* @parameter default-value="${mojoExecution}"
* @required
* @readonly
*/
private org.apache.maven.plugin.MojoExecution mojoExecution;
Hope helps,
~t~
On Mon, Sep 10, 2012 at 6:59 PM, Jeff Maxwell <[email protected]>wrote:
> I would like to dynamically determine the currently executing goal from a
> MOJO.
>
> I attempted this using reflection but the new annotations are not available
> at runtime.
>
> All other solutions I have seen appear to require access to the executing
> MOJO's groupId and artifactId.
>
> Anyone have a solution?
> Is there an issue with having the annotations available at runtime?
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Dynamically-determining-the-currently-executing-goal-name-tp5721050.html
> Sent from the Maven Developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>