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/02/06 09:55:00 UTC

[jira] [Commented] (MDEP-785) dependency:go-offline does not download all dependencies

    [ https://issues.apache.org/jira/browse/MDEP-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487662#comment-17487662 ] 

Wei Lin commented on MDEP-785:
------------------------------

Running {{mvn -B -f /tmp/demo/pom.xml org.apache.maven.plugins:maven-dependency-plugin:3.2.0:go-offline}} does resolve the partial downloading problem, but still does not go completely offline.

Running {{mvn test}} after {{go-offline}} still requires one more downloading: {{org.apache.maven.surefire:surefire-junit3:2.12.4}}

This might be another issue though. Should I close this ticket and open a new one?

> dependency:go-offline does not download all dependencies
> --------------------------------------------------------
>
>                 Key: MDEP-785
>                 URL: https://issues.apache.org/jira/browse/MDEP-785
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>            Reporter: Wei Lin
>            Priority: Minor
>              Labels: waiting-for-feedback
>         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)