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

Tom Wieczorek commented on MDEP-569:
------------------------------------

I see. Thanks for the explanation. It indeed works with the 
{{--legacy-local-repository}} command line switch. Given that Maven 3 will 
always verify repositories, would it make sense to also add 
{{-DremoteRepositories}} support to the copy goal? Then it should work without 
{{--legacy-local-repository}}, right?

> copy fails on artifacts previously downloaded via get from repo specified via 
> CLI
> ---------------------------------------------------------------------------------
>
>                 Key: MDEP-569
>                 URL: https://issues.apache.org/jira/browse/MDEP-569
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: copy, get
>    Affects Versions: 3.0.1
>         Environment: Apache Maven 3.5.0 
> (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T19:39:06Z)
> Maven home: /usr/share/maven
> Java version: 1.8.0_121, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-1.8-openjdk/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.8.0-52-generic", arch: "amd64", family: "unix"
>            Reporter: Tom Wieczorek
>         Attachments: dependency-copy-problem-output.txt
>
>
> {{dependency:copy}} fails to copy artifacts that were previously downloaded 
> via {{dependency:get}} from a remote repository that has been specified on 
> the command line. The error message is:
> bq. The POM for artifact is missing, no dependency information available
> and later on
> bq. Failed to execute goal dependency:copy (default-cli) on project 
> standalone-pom: Unable to find/resolve artifact. Failure to find artifact in 
> https://repo.maven.apache.org/maven2 was cached in the local repository, 
> resolution will not be reattempted until the update interval of central has 
> elapsed or updates are forced
> But: {{dependency:get}} actually succeeded and the artifact and its POM are 
> in the local repo.
> {code:none|title=Reproducing shell snippet}
> mvn -version
> mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.1:get \
>     org.apache.maven.plugins:maven-dependency-plugin:3.0.1:copy \
>     -DremoteRepositories=http://packages.confluent.io/maven/ \
>     -Dartifact=io.confluent:kafka-schema-registry:3.1.1
> ls -la ~/.m2/repository/io/confluent/kafka-schema-registry/3.1.1
> {code}
> I've attached the output of the above test snippets.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to