You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Patrick (Jira)" <ji...@apache.org> on 2020/10/30 12:45:00 UTC

[jira] [Created] (MDEP-728) Maven v4 / Plugin v4 Tidy Up parameters and messages

John Patrick created MDEP-728:
---------------------------------

             Summary: Maven v4 / Plugin v4 Tidy Up parameters and messages
                 Key: MDEP-728
                 URL: https://issues.apache.org/jira/browse/MDEP-728
             Project: Maven Dependency Plugin
          Issue Type: Improvement
          Components: get
    Affects Versions: 3.1.2
            Reporter: John Patrick


The error message reads;

{code}
[ERROR] Failed to execute goal on project artifact-id: Could not resolve dependencies for project group-id:artifact-id:jar:VERSION: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.joda:joda-beans:jar:2.8.1 has not been downloaded from it before. -> [Help 1]
{code}

But you can't simply copy and paste that into get like this;
{code:bash}
mvnw -N org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get -Dartifact=org.joda:joda-beans:jar:2.8.1
{code}

It needs to be this;
{code:bash}
mvnw -N org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get -Dartifact=org.joda:joda-beans:2.8.1
{code}

The documentation for get requires this syntax;
{code}groupId:artifactId:version[:packaging[:classifier]].{code}

For Maven v4.x and/or maven-dependency-plugin v4.x could the error message match the input format, or the input format match the error message for easier copy/paste usage.

Personally I would prefer the error message to match the get artifact syntax as it makes more sense for m to be groupId:artifactId:version:packaging.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)