You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Swapnil Sapar (JIRA)" <ji...@codehaus.org> on 2012/06/08 06:20:21 UTC
[jira] (MNG-5296) maven-plugin-api to provide a configuration to
'skip' the execution
Swapnil Sapar created MNG-5296:
----------------------------------
Summary: maven-plugin-api to provide a configuration to 'skip' the execution
Key: MNG-5296
URL: https://jira.codehaus.org/browse/MNG-5296
Project: Maven 2 & 3
Issue Type: Improvement
Components: Plugin API
Affects Versions: 3.0.4
Environment: Maven 3.0.4
Reporter: Swapnil Sapar
I have used many maven plugins to accomplish different tasks and greatly enjoy the plugin architecture that Maven offers.
Many of the modern versions of plugins offer {{<skip>}} as an additional/optional parameter.
e.g.
[maven-assembly-plugin|http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#skipAssembly]
[maven-site-plugin|http://maven.apache.org/plugins/maven-site-plugin/site-mojo.html#skip]
[maven-surefire-plugin|http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#skip]
Such {{skip}} parameter is very useful in playing around with properties that allow the functionalities to turn ON/OFF from outer scope.
But such a parameter needs to be explicitly offered by the plugin and coded in the sub-classed Mojo accordingly. But there are tons of plugins out there who lack this useful {{skip}} parameter. Updating all those plugins with additional {{skip}} could address this issue but I'm thinking something different.
What if there is an *implicit* {{skip}} parameter inside the maven-plugin-api? Then it need not be coded *explicitly* by the plugin/Mojo authors. Upon encountering {{skip==true}}, maven-plugin-api can simply skip over the {{execute()}} method of [AbstractMojo|http://maven.apache.org/ref/3.0.4/maven-plugin-api/apidocs/src-html/org/apache/maven/plugin/Mojo.html#line.52].
This is just a preliminary thought and proposal towards a plausible solution.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MNG-5296) maven-plugin-api to provide a configuration to
'skip' the execution
Posted by "Swapnil Sapar (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MNG-5296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=300593#comment-300593 ]
Swapnil Sapar commented on MNG-5296:
------------------------------------
Ref: Jump over [mojo.execute();|http://maven.apache.org/ref/3.0.4/maven-core/xref/org/apache/maven/plugin/DefaultBuildPluginManager.html#99] upon checking the skip flag.
> maven-plugin-api to provide a configuration to 'skip' the execution
> -------------------------------------------------------------------
>
> Key: MNG-5296
> URL: https://jira.codehaus.org/browse/MNG-5296
> Project: Maven 2 & 3
> Issue Type: Improvement
> Components: Plugin API
> Affects Versions: 3.0.4
> Environment: Maven 3.0.4
> Reporter: Swapnil Sapar
>
> I have used many maven plugins to accomplish different tasks and greatly enjoy the plugin architecture that Maven offers.
> Many of the modern versions of plugins offer {{<skip>}} as an additional/optional parameter.
> e.g.
> [maven-assembly-plugin|http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#skipAssembly]
> [maven-site-plugin|http://maven.apache.org/plugins/maven-site-plugin/site-mojo.html#skip]
> [maven-surefire-plugin|http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#skip]
> Such {{skip}} parameter is very useful in playing around with properties that allow the functionalities to turn ON/OFF from outer scope.
> But such a parameter needs to be explicitly offered by the plugin and coded in the sub-classed Mojo accordingly. But there are tons of plugins out there who lack this useful {{skip}} parameter. Updating all those plugins with additional {{skip}} could address this issue but I'm thinking something different.
> What if there is an *implicit* {{skip}} parameter inside the maven-plugin-api? Then it need not be coded *explicitly* by the plugin/Mojo authors. Upon encountering {{skip==true}}, maven-plugin-api can simply skip over the {{execute()}} method of [AbstractMojo|http://maven.apache.org/ref/3.0.4/maven-plugin-api/apidocs/src-html/org/apache/maven/plugin/Mojo.html#line.52].
> This is just a preliminary thought and proposal towards a plausible solution.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira