Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
-
None
-
None
-
* Maven 3.5.3
* CLI
* macOS and CentOS
Description
Steps to reproduce
1. Get a sample dependency first
mvn dependency:get -DgroupId=org.apache.ant -DartifactId=ant -Dversion=1.8.3 -Dpackaging=jar
2. Delete the file ~/.m2/repository/org/apache/ant/ant/1.8.3/_remote.repositories
3. Unpack the dependency somewhere
cd /tmp mkdir unpack mvn dependency:unpack -Dartifact=org.apache.ant:ant:1.8.3:jar -DoutputDirectory=./unpack
4. Observe that ${project.basedir} was created
$ ls -l /tmp/unpack total 0 ... ${project.basedir} ... unpack
Note Step 2 is only necessary because of getting the dependency, this wouldn't have to be done if it had been installed. This doesn't affect whether the bug occurs or not.
Workarounds
The closest would be to use mvn dependency:copy and then unpack manually through a subsequent command. Interestingly this shows that the bug doesn't affect mvn dependency:copy.
Similar/related issues (their fixes don't apply here):