[
https://issues.apache.org/jira/browse/MDEP-691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17112271#comment-17112271
]
Jakub Bochenski commented on MDEP-691:
--------------------------------------
I think in the end it boils down to the presence of
{{groupId/artifactId/version-SNAPSHOT/maven-metadata.xml}}
Typically this file is included in remote repositories, but its not present in
the local repository for some reason. Instead there are files like
{{groupId/artifactId/version-SNAPSHOT/maven-metadata-REPOSITORY_ID.xml}} but
the code that tries to resolve the version fails to read those.
> useBaseVersion ignored when resolving artifacts from lolcal repostory (works
> from remote)
> -----------------------------------------------------------------------------------------
>
> Key: MDEP-691
> URL: https://issues.apache.org/jira/browse/MDEP-691
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: copy
> Reporter: Jakub Bochenski
> Priority: Major
>
> Please compare the results. {{-Psonatype}} enables remote sonatype snapshots
> repository.
> {code}$ mvn dependency:copy
> -Dartifact=com.trello.identifier:package-identifier:0.0.2-SNAPSHOT -Psonatype
> -U -Dmdep.useBaseVersion=false | grep Copying
> [INFO] Copying package-identifier-0.0.2-SNAPSHOT.jar to
> /home/bochja/${project.basedir}/target/dependency/package-identifier-0.0.2-20190311.143402-1.jar
> $ rm -rf '/home/bochja/${project.basedir}/target/dependency'
> $ mvn dependency:copy
> -Dartifact=com.trello.identifier:package-identifier:0.0.2-SNAPSHOT -Psonatype
> -U -Dmdep.useBaseVersion=true | grep Copying
> [INFO] Copying package-identifier-0.0.2-SNAPSHOT.jar to
> /home/bochja/${project.basedir}/target/dependency/package-identifier-0.0.2-SNAPSHOT.jar
> $ rm -rf '/home/bochja/${project.basedir}/target/dependency'
> $ mvn dependency:copy
> -Dartifact=com.trello.identifier:package-identifier:0.0.2-SNAPSHOT -o
> -Dmdep.useBaseVersion=true | grep Copying
> [INFO] Copying package-identifier-0.0.2-SNAPSHOT.jar to
> /home/bochja/${project.basedir}/target/dependency/package-identifier-0.0.2-SNAPSHOT.jar
> $ rm -rf '/home/bochja/${project.basedir}/target/dependency'
> $ mvn dependency:copy
> -Dartifact=com.trello.identifier:package-identifier:0.0.2-SNAPSHOT -o
> -Dmdep.useBaseVersion=false | grep Copying
> [INFO] Copying package-identifier-0.0.2-SNAPSHOT.jar to
> /home/bochja/${project.basedir}/target/dependency/package-identifier-0.0.2-SNAPSHOT.jar
> $ ls ~/.m2/repository/com/trello/identifier/package-identifier/0.0.2-SNAPSHOT/
> maven-metadata-sonatype.xml maven-metadata-sonatype.xml.sha1
> package-identifier-0.0.2-20190311.143402-1.jar
> package-identifier-0.0.2-20190311.143402-1.jar.sha1
> package-identifier-0.0.2-SNAPSHOT.jar _remote.repositories
> resolver-status.properties
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)