Re: Dynamically determining the currently executing goal name

2012-09-11 Thread Jeff Maxwell
This works fine: /** The project. */ @Parameter(required = true, readonly = true, defaultValue = "${mojoExecution}") private MojoExecution mojoExecution; @Override public String getGoalName() { return this.mojoExecution.getMojoDescriptor().getGoal(); }

Dynamically determining the currently executing goal name

2012-09-10 Thread Jeff Maxwell
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?