You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/07/09 08:17:14 UTC

[GitHub] [maven] michael-o commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917237430


##########
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##########
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, MavenSession session, Mave
         }
         else if ( numTokens == 3 )
         {
-            // We have everything that we need except the version
-            //
-            // org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-            //
-            // groupId
-            // artifactId
-            // ???
-            // goal
-            //
-            plugin = new Plugin();
-            plugin.setGroupId( tok.nextToken() );
-            plugin.setArtifactId( tok.nextToken() );
+            // groupId:artifactId:goal or pluginPrefix:version:goal (since Maven 3.9)

Review Comment:
   3.9.0



##########
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##########
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, MavenSession session, Mave
         }
         else if ( numTokens == 3 )
         {
-            // We have everything that we need except the version
-            //
-            // org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-            //
-            // groupId
-            // artifactId
-            // ???
-            // goal
-            //
-            plugin = new Plugin();
-            plugin.setGroupId( tok.nextToken() );
-            plugin.setArtifactId( tok.nextToken() );
+            // groupId:artifactId:goal or pluginPrefix:version:goal (since Maven 3.9)
+
+            String firstToken = tok.nextToken();
+            // groupId or pluginPrefix? heuristics: groupId contains . but not pluginPrefix

Review Comment:
   ...contains dot (.), but ...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org