apache / apache/maven-dependency-plugin
[MDEP-691] useBaseVersion ignored when resolving artifacts from local repository (works from remote)
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[Jakub Bochenski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jbochenski)** opened **[MDEP-691](https://issues.apache.org/jira/browse/MDEP-691?redirect=false)** and commented
Please compare the results. `-Psonatype` enables remote sonatype snapshots repository.
```
$ 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
```
---
No further details from [MDEP-691](https://issues.apache.org/jira/browse/MDEP-691?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the four `mvn dependency:copy` commands shown in the issue, comparing remote and offline resolution with `-Dmdep.useBaseVersion` set to true and false. Trace the dependency-copy resolution path used by those commands and verify that local repositories honor the flag by checking the copied artifact filename against the expected base or timestamped version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100