Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7691

Provide a generic way to skip Maven Goals for a specified plugin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Plugins and Lifecycle
    • None

    Description

      From (Baeldung:

      "Many plugins feature a skip parameter. We can use the skip parameter to disable the plugin. Support for the skip parameter should be the first thing we check because it is the simplest solution and the most conventional.".

      I was thinking that there should be a generic way to skip maven plugin goals in the core of Maven, i.e. it should not have to be implemented in each plugin.

      Would something like this work?

      -Dmaven.skip.goals=groupID:artifactId:goal (is there a need to specify version?)

      E.g.

      -Dmaven.skip.goals=io.spring.javaformat:spring-javaformat-maven-plugin:apply

      -Dmaven.skip.goals=io.spring.javaformat:spring-javaformat-maven-plugin:apply+validate

      -Dmaven.skip.goals=io.spring.javaformat:spring-javaformat-maven-plugin:apply+validate,org.apache.maven.plugins:maven-enforcer-plugin:enforce

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lfvjimisola Jimisola Laursen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: