You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Wei Lin (Jira)" <ji...@apache.org> on 2022/01/21 23:54:00 UTC
[jira] [Created] (MNG-7394) dependency:go-offline does not download all dependencies
Wei Lin created MNG-7394:
----------------------------
Summary: dependency:go-offline does not download all dependencies
Key: MNG-7394
URL: https://issues.apache.org/jira/browse/MNG-7394
Project: Maven
Issue Type: Bug
Components: Plugins and Lifecycle
Affects Versions: 3.8.4
Reporter: Wei Lin
Attachments: demo.tar.gz
It appears the go-offline goal of the maven dependency plugin downloads only jar but no pom for some of the dependencies, and only pom but no jar for some other dependencies.
h2. Steps to reproduce
h3. 1. Resolve the pom in attached tar ball
{code}
$ docker run -it --rm -v $(greadlink -f demo):/tmp/demo:ro maven:3.8.4-eclipse-temurin-11-alpine bash
bash-5.1# mvn -B -f /tmp/demo/pom.xml dependency:go-offline
{code}
h3. 2. Verify some jars and poms are missing
{code:title=there is no pom.xml for maven-core 2.0.6}
bash-5.1# ls ~/.m2/repository/org/apache/maven/maven-core/2.0.6/
_remote.repositories maven-core-2.0.6.jar maven-core-2.0.6.jar.sha1
{code}
{code:title=there is no jar for maven-profile 2.0.6}
bash-5.1# ls ~/.m2/repository/org/apache/maven/maven-profile/2.0.6/
_remote.repositories maven-profile-2.0.6.pom maven-profile-2.0.6.pom.sha1
{code}
h3. 3. maven test requires more files to be downloaded
{code}
bash-5.1# mvn test [0/1962]
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< org.example:demo >--------------------------
[INFO] Building demo 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo ---
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.pom (6.7 kB at 3.5 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6.pom
........
{code}
h3. 4. Verify the missing files are downloaded
{code}
bash-5.1# ls ~/.m2/repository/org/apache/maven/maven-profile/2.0.6/
_remote.repositories maven-profile-2.0.6.jar maven-profile-2.0.6.jar.sha1 maven-profile-2.0.6.pom maven-profile-2.0.6.pom.sha1
bash-5.1# ls ~/.m2/repository/org/apache/maven/maven-core/2.0.6/
_remote.repositories maven-core-2.0.6.jar maven-core-2.0.6.jar.sha1 maven-core-2.0.6.pom maven-core-2.0.6.pom.sha1
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)