jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-3321

Skip plugin and/or execution

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0.8
  • Fix Version/s: 3.1
  • Component/s: Command Line
  • Labels:
    None

Description

Add ability to skip the execution of certain plugins. From the command line this could look something like:

mvn -Dskip.plugin:org.apache.maven.plugins:maven-surefire-plugin install

Also useful would be the ability to skip individual executions of a plugin. For example, if the surefire plugin had two executions defined as "ex1" and "ex2", you could do something like this:

mvn -Dskip.plugin:org.apache.maven.plugins:maven-surefire-plugin:ex1 install

This would skip ex1 but still run ex2.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    MNG-3321-core-integration-testing.patch
    05/Feb/11 6:40 AM
    11 kB
    Kalyan C. Akella
  2. Text File
    MNG-3321-core-integration-testing.patch
    28/Jan/11 8:27 PM
    7 kB
    Kalyan C. Akella
  3. Text File
    MNG-3321-maven-core.patch
    05/Feb/11 6:40 AM
    22 kB
    Kalyan C. Akella
  4. Text File
    MNG-3321-maven-core.patch
    28/Jan/11 8:27 PM
    13 kB
    Kalyan C. Akella
  5. Text File
    MNG-3321-maven-core.patch
    27/Jan/11 10:40 PM
    11 kB
    Kalyan C. Akella
  6. Text File
    MNG-3321-maven-model.patch
    05/Feb/11 6:40 AM
    1 kB
    Kalyan C. Akella

Issue Links

is related to

New Feature - A new feature of the product, which has yet to be developed. MNG-3102 Add a skip attribute to the plugin, similar to inherited to allow for a plugin to be skipped for a particular child project if that plugin is inherited

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Paul Gier added a comment - 14/Dec/07 4:47 PM

Additionally, maybe multiple plugins could be skipped by passing a comma separated list. Like this:

mvn -Dskip.plugins=org.apache.maven.plugins:maven-surefire-plugin,org.apache.maven.plugins:maven-jar-plugin install

The same syntax could be applied to skipping individual executions.

Show
Paul Gier added a comment - 14/Dec/07 4:47 PM Additionally, maybe multiple plugins could be skipped by passing a comma separated list. Like this: mvn -Dskip.plugins=org.apache.maven.plugins:maven-surefire-plugin,org.apache.maven.plugins:maven-jar-plugin install The same syntax could be applied to skipping individual executions.
Hide
Permalink
Paul Gier added a comment - 11/Jan/08 12:21 PM

I don't think this is a duplicate of MNG-3102. While the two issues are related, they are not the same. I would like to be able to skip certain plugins and/or executions of plugins from the command line without having to modify the pom.

This could be used for things like running only one of several surefire configurations (yes, I know this can be done with profiles, but it would be a lot cleaner this way IMO), or skipping just the test part of the build but still compiling the tests.

Show
Paul Gier added a comment - 11/Jan/08 12:21 PM I don't think this is a duplicate of MNG-3102. While the two issues are related, they are not the same. I would like to be able to skip certain plugins and/or executions of plugins from the command line without having to modify the pom. This could be used for things like running only one of several surefire configurations (yes, I know this can be done with profiles, but it would be a lot cleaner this way IMO), or skipping just the test part of the build but still compiling the tests.
Hide
Permalink
Kalyan C. Akella added a comment - 26/Jan/11 6:20 AM

I am working on this issue right now. Will update my progress on the dev list.

Show
Kalyan C. Akella added a comment - 26/Jan/11 6:20 AM I am working on this issue right now. Will update my progress on the dev list.
Hide
Permalink
Kalyan C. Akella added a comment - 27/Jan/11 10:40 PM

Attaching the patch that implements this feature. The patch modifies execution plan calculation algorithm to eliminate plugins & their executions that need to be skipped.

Show
Kalyan C. Akella added a comment - 27/Jan/11 10:40 PM Attaching the patch that implements this feature. The patch modifies execution plan calculation algorithm to eliminate plugins & their executions that need to be skipped.
Hide
Permalink
Kristian Rosenvold added a comment - 28/Jan/11 1:24 AM

Kalyan; thanks for the patch, which I think looks very good, the unit tests were good. I have a few comments:

1. License headers must be added to all the new files.
2. Any features added to core also have corresponding integration tests, which are in a separate project (https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk). In this case I believe the tests should cover skipping plugin and execution and demonstrate end-to-end effect of the feature. We do not commit new features such as this without such tests.
3. Documentation. This needs to be added to the documentation, somewhere
4. Code style. This is only a minor issue but if you use the ide-templates at http://maven.apache.org/developers/committer-environment.html while making patches, your patch will
follow maven code style. In general this makes the patch easier to apply and reduce the risk of patch rot.

Show
Kristian Rosenvold added a comment - 28/Jan/11 1:24 AM Kalyan; thanks for the patch, which I think looks very good, the unit tests were good. I have a few comments: 1. License headers must be added to all the new files. 2. Any features added to core also have corresponding integration tests, which are in a separate project (https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk). In this case I believe the tests should cover skipping plugin and execution and demonstrate end-to-end effect of the feature. We do not commit new features such as this without such tests. 3. Documentation. This needs to be added to the documentation, somewhere 4. Code style. This is only a minor issue but if you use the ide-templates at http://maven.apache.org/developers/committer-environment.html while making patches, your patch will follow maven code style. In general this makes the patch easier to apply and reduce the risk of patch rot.
Hide
Permalink
Kalyan C. Akella added a comment - 28/Jan/11 8:27 PM

Thank you for the comments. Attaching the patch files with the following changes,

1. Added the license headers.
2. Added integration tests. Tests for normal execution when no skip.plugin property specified, skipping of plugin & skipping of an execution within a plugin.
3. Fixed the code style to use the maven project settings in my IDE.

Show
Kalyan C. Akella added a comment - 28/Jan/11 8:27 PM Thank you for the comments. Attaching the patch files with the following changes, 1. Added the license headers. 2. Added integration tests. Tests for normal execution when no skip.plugin property specified, skipping of plugin & skipping of an execution within a plugin. 3. Fixed the code style to use the maven project settings in my IDE.
Hide
Permalink
John Casey added a comment - 01/Feb/11 2:28 PM

I've noted this on the dev@ ML, but I'll add a short comment here as well.

I think this is a great idea, and I like the approach of the patch. However, I'd like to see us take it a little further before we consider releasing a version of Maven with this patch in place. I'd like to have an option to trigger plugin/execution suppression from somewhere in the POM, not just via CLI option. This allows us to say, "My build uses the jar packaging, but I never want the X plugin to run."

To me, this is important because it means we don't have to worry about users getting the right CLI options in place to run a build (or, more importantly, a release). In many cases, failing to use the suppressing CLI option may break the build, but in others it may lead to incorrect build results being released for public consumption. Also, in cases where it's important that users can rebuild the project from source (as in cases where ASF votes are taken), requiring a CLI option to produce a correct build adds a new layer of build complexity. It takes us away from the common vocabulary that makes Maven so effective, and back toward something more like Ant, where you have to know the correct incantation to produce a build.

I hope this patch is applied, but I think we need to spend a little more time focusing on how to codify these suppressions in the POM before releasing a Maven version with this patch in place.

Show
John Casey added a comment - 01/Feb/11 2:28 PM I've noted this on the dev@ ML, but I'll add a short comment here as well. I think this is a great idea, and I like the approach of the patch. However, I'd like to see us take it a little further before we consider releasing a version of Maven with this patch in place. I'd like to have an option to trigger plugin/execution suppression from somewhere in the POM, not just via CLI option. This allows us to say, "My build uses the jar packaging, but I never want the X plugin to run." To me, this is important because it means we don't have to worry about users getting the right CLI options in place to run a build (or, more importantly, a release). In many cases, failing to use the suppressing CLI option may break the build, but in others it may lead to incorrect build results being released for public consumption. Also, in cases where it's important that users can rebuild the project from source (as in cases where ASF votes are taken), requiring a CLI option to produce a correct build adds a new layer of build complexity. It takes us away from the common vocabulary that makes Maven so effective, and back toward something more like Ant, where you have to know the correct incantation to produce a build. I hope this patch is applied, but I think we need to spend a little more time focusing on how to codify these suppressions in the POM before releasing a Maven version with this patch in place.
Hide
Permalink
Kristian Rosenvold added a comment - 01/Feb/11 3:52 PM

I'm leaving this issue assigned to "3.1", and requesting that interested parties attach use cases to this issue. The dev list discussion is at

http://mail-archives.apache.org/mod_mbox/maven-dev/201101.mbox/%3CAANLkTi=DJx9q-qEd+sQ2-41Y-iK0G4cj0EhLaLMON-BJ@mail.gmail.com%3E

and http://mail-archives.apache.org/mod_mbox/maven-dev/201102.mbox/%3CAANLkTikdjE+FLd4K-0s1-R-F9MhsK-vdqnYGF57QkByd@mail.gmail.com%3E

Show
Kristian Rosenvold added a comment - 01/Feb/11 3:52 PM I'm leaving this issue assigned to "3.1", and requesting that interested parties attach use cases to this issue. The dev list discussion is at http://mail-archives.apache.org/mod_mbox/maven-dev/201101.mbox/%3CAANLkTi=DJx9q-qEd+sQ2-41Y-iK0G4cj0EhLaLMON-BJ@mail.gmail.com%3E and http://mail-archives.apache.org/mod_mbox/maven-dev/201102.mbox/%3CAANLkTikdjE+FLd4K-0s1-R-F9MhsK-vdqnYGF57QkByd@mail.gmail.com%3E
Hide
Permalink
Kalyan C. Akella added a comment - 05/Feb/11 6:40 AM

Attaching the revised patches that implement the following:

1. ability to skip multiple plugin executions at CLI,
2. ability to skip plugins & their executions in POM using the <skip> element

I also attached the same patches to the related issue, MNG-3102 with the same patch file names.

Show
Kalyan C. Akella added a comment - 05/Feb/11 6:40 AM Attaching the revised patches that implement the following: 1. ability to skip multiple plugin executions at CLI, 2. ability to skip plugins & their executions in POM using the <skip> element I also attached the same patches to the related issue, MNG-3102 with the same patch file names.

People

  • Assignee:
    Unassigned
    Reporter:
    Paul Gier
Vote (13)
Watch (12)

Dates

  • Created:
    14/Dec/07 4:43 PM
    Updated:
    05/Feb/11 6:40 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.