You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (Jira)" <ji...@apache.org> on 2022/06/18 21:23:00 UTC

[jira] [Comment Edited] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

    [ https://issues.apache.org/jira/browse/MNG-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17512945#comment-17512945 ] 

Herve Boutemy edited comment on MNG-7353 at 6/18/22 9:22 PM:
-------------------------------------------------------------

[https://github.com/apache/maven/blob/3599d3414f046de2324203b78ddcf9b5e4388aa0/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java#L97]
{noformat}
// "pluginPrefix:goal" or "groupId:artifactId[:version]:goal"{noformat}

we'll need to differentiate existing
{noformat}
groupId:artifactId:goal{noformat}
from new
{noformat}
pluginPrefix:version:goal{noformat}

and implement in https://github.com/apache/maven/blob/3599d3414f046de2324203b78ddcf9b5e4388aa0/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java#L141

I don't know if it's easiest trying to differentiate:
- a groupId from a pluginPrefix (groupId contain dots but not pluginPrefixes?)
- or an artifactId from a version (version starts with a numeric, but it happens that artifactIds also, even if perhaps not plugin's artifactIds...)


was (Author: hboutemy):
[https://github.com/apache/maven/blob/3599d3414f046de2324203b78ddcf9b5e4388aa0/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java#L97]
{noformat}
// "pluginPrefix:goal" or "groupId:artifactId[:version]:goal"{noformat}
we'll need to differentiate existing
{noformat}
groupId:artifactId:goal{noformat}
from new
{noformat}
pluginPrefix:version:goal{noformat}
I don't know what's best: trying to differentiate a groupId from a pluginPrefix or an artifactId from a version

> add support for "mvn pluginPrefix:version:goal"
> -----------------------------------------------
>
>                 Key: MNG-7353
>                 URL: https://issues.apache.org/jira/browse/MNG-7353
>             Project: Maven
>          Issue Type: New Feature
>          Components: Command Line
>    Affects Versions: 3.8.4
>            Reporter: Herve Boutemy
>            Priority: Major
>             Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)