apache / apache/maven-dependency-plugin

[MDEP-728] Maven v4 / Plugin v4 Tidy Up parameters and messages

Open
#1,245 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
175
Forks
196
Avg merge
19h 30m
Merged PRs (30d)
5

Description

**[John Patrick](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nhoj.patrick)** opened **[MDEP-728](https://issues.apache.org/jira/browse/MDEP-728?redirect=false)** and commented

The error message reads;

```
[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]
```

But you can't simply copy and paste that into get like this;

```bash
mvnw -N org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get -Dartifact=org.joda:joda-beans:jar:2.8.1
```

It needs to be this;

```bash
mvnw -N org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get -Dartifact=org.joda:joda-beans:2.8.1
```

The documentation for get requires this syntax;

```
groupId:artifactId:version[:packaging[:classifier]].
```

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 me to be groupId:artifactId:version:packaging.

---

**Affects:** 3.1.2

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue identifies the dependency-resolution error and the maven-dependency-plugin get goal, but no source file or test. Start by locating the code that formats the offline error and the get goal's artifact-coordinate parsing, then compare their formats. Done means the displayed coordinates follow the documented get syntax and relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.