[
http://jira.codehaus.org/browse/MNG-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100241
]
Paul Gier commented on MNG-3062:
--------------------------------
My use case is basically what I said in the description. I would like to be
able to call only certain executions of the surefire plugin. I'm currently
accomplishing something similar using profiles, but it seemed like there should
be an easier way to just call an execution. I was thinking that if the plugin
had access to the execution id you could do something like:
mvn test -Dmaven.test.execution1
Then the plugin could check the property to see if it should run or not. Not
sure if this is the best way to do it, but it is one idea.
Another idea would be to just add the execution ID to the plugin API, and set
it when the plugin is initialized, maybe in the same place the log is
initialized. But I thought there might be other useful information in the
mojoExecution object.
> Allow access to mojoExecution from within plugin.
> -------------------------------------------------
>
> Key: MNG-3062
> URL: http://jira.codehaus.org/browse/MNG-3062
> Project: Maven 2
> Issue Type: Improvement
> Affects Versions: 2.0.6
> Reporter: Paul Gier
> Fix For: 2.0.x
>
> Attachments: PluginParameterExpressionEvaluator.patch
>
>
> I would like to be able to access the execution ID from within a plugin.
> This could be useful for example to run only certain executions. This could
> be done with a small change to the plugin expression evaluator.
> I created a patch that would give the plugin access to the current
> MojoExecution.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira