[ https://issues.apache.org/jira/browse/MNG-7691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17712508#comment-17712508 ]
ASF GitHub Bot commented on MNG-7691: ------------------------------------- gnodet commented on PR #1086: URL: https://github.com/apache/maven/pull/1086#issuecomment-1509116733 > To demonstrate: https://github.com/cstamas/plugin-clash/blob/main/README.md (and project that creates two different GA plugins and use them in build). Hence, IMHO any coherence with console output would be misleading: prefix _cannot uniquely identify a plugin_ I'm not sure how that's relevant. Your syntax supports wildcards, which definitely cannot uniquely identify a plugin. My points is not to restrict the supported syntax to `pluginPrefix[:version]:goal` and `groupId:artifactId[:version]:goal`, but to support it. And I would also support the optional `e` after, i.e. `pluginPrefix[:version]:goal[:executionId]` and `groupId:artifactId[:version]:goal[:executionId]`, but more importantly, at least support `pluginPrefix:version:goal` so that people can simply copy/paste from the console to skip a given plugin goal, instead of having to find out the `groupId:artifactId`. For example, how can you simply relate `spotless:2.28.0:apply (default)` from the console output to `com.diffplug.spotless:spotless-maven-plugin:apply` when that plugin is defined in a parent outside of the project ? I'd like to find a syntax that would support just copy/pasting the output from the console, certainly not be limited to that. > Provide a generic way to skip Maven Goals for a specified plugin > ---------------------------------------------------------------- > > Key: MNG-7691 > URL: https://issues.apache.org/jira/browse/MNG-7691 > Project: Maven > Issue Type: Improvement > Components: Plugins and Lifecycle > Reporter: Jimisola Laursen > Priority: Major > > From ([Baeldung|https://www.baeldung.com/maven-disable-parent-pom-plugin]: > "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 -- This message was sent by Atlassian Jira (v8.20.10#820010)