apache / apache/maven-dependency-plugin

[MDEP-688] dependency:go-offline does not resolve classifier

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

Description

**[Fabrice Bacchella](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=fbacchella)** opened **[MDEP-688](https://issues.apache.org/jira/browse/MDEP-688?redirect=false)** and commented

I have a dependency on dojo-toolkit that says:

```xml

org.dojotoolkit
dojo
zip
${dojo.version}
distribution

```

This is a multi-module project, and this is declared in a sub-module.
When I try to run it, it fails with:

```
$ mvn dependency:go-offline
...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/dojotoolkit/dojo/1.10.8/dojo-1.10.8.zip
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline (default-cli) on project jrds-webapp: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.dojotoolkit:dojo:zip:1.10.8 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
```

When I do a simple build:

```
mvn install
...
Downloading from central: https://repo.maven.apache.org/maven2/org/dojotoolkit/dojo/1.10.8/dojo-1.10.8-distribution.zip
Downloaded from central: https://repo.maven.apache.org/maven2/org/dojotoolkit/dojo/1.10.8/dojo-1.10.8-distribution.zip (13 MB at 10 MB/s)
```

The URL is not the same, mvn install did resolve the good file (dojo-1.10.8-distribution.zip) where dependency:go-offline only sees dojo-1.10.8-distribution.zip.

---

**Affects:** 3.1.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the dependency:go-offline goal and compare its artifact resolution with the simple mvn install shown in the report. Reproduce the multi-module dependency using the zip classifier, then verify that go-offline resolves dojo-1.10.8-distribution.zip instead of the unclassified artifact.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.