Skip to content

[MDEP-785] dependency:go-offline does not download all dependencies #1293

Description

@jira-importer

Wei Lin opened MDEP-785 and commented

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.

Steps to reproduce

1. Resolve the pom in attached tar ball

$ 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

2. Verify some jars and poms are missing

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
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

3. maven test requires more files to be downloaded

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
........

4. Verify the missing files are downloaded

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

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions