[
https://issues.apache.org/jira/browse/MDEP-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16511637#comment-16511637
]
Michael Osipov commented on MDEP-620:
-------------------------------------
on Unix either:
{noformat}
[mosipov@mika-ion ~/Projekte/plexus-io]$ mvn -V dependency:unpack
"-Dartifact=org.apache.maven:maven-core:3.5.3:jar" -DoutputDirectory=toll
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297;
2018-02-24T20:49:05+01:00)
Maven home: /usr/local/share/java/maven
Java version: 1.8.0_162, vendor: Oracle Corporation
Java home: /usr/local/openjdk8/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "freebsd", version: "11.1-release-p10", arch: "i386", family: "unix"
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< org.codehaus.plexus:plexus-io >--------------------
[INFO] Building Plexus IO Components 3.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack (default-cli) @ plexus-io ---
[INFO] Configured Artifact: org.apache.maven:maven-core:3.5.3:jar
Downloading from central:
https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/3.5.3/maven-core-3.5.3.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/3.5.3/maven-core-3.5.3.jar
(631 kB at 193 kB/s)
[INFO] Unpacking
/home/mosipov/.m2/repository/org/apache/maven/maven-core/3.5.3/maven-core-3.5.3.jar
to /usr/home/mosipov/Projekte/plexus-io/toll with includes "" and excludes ""
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.208 s
[INFO] Finished at: 2018-06-13T22:42:41+02:00
[INFO] ------------------------------------------------------------------------
[mosipov@mika-ion ~/Projekte/plexus-io]$ ls
NOTICE.txt pom.xml src target toll
[mosipov@mika-ion ~/Projekte/plexus-io]$
{noformat}
> mvn dependency:unpack via CLI generates ${project.basedir} folder
> -----------------------------------------------------------------
>
> Key: MDEP-620
> URL: https://issues.apache.org/jira/browse/MDEP-620
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: unpack
> Environment: * Maven 3.5.3
> * CLI
> * macOS and CentOS
> Reporter: Dimitri R
> Priority: Major
>
> h3. Steps to reproduce
> 1. Get a sample dependency first
> {noformat}
> mvn dependency:get -DgroupId=org.apache.ant -DartifactId=ant -Dversion=1.8.3
> -Dpackaging=jar
> {noformat}
> 2. Delete the file
> *~/.m2/repository/org/apache/ant/ant/1.8.3/_remote.repositories*
> 3. Unpack the dependency somewhere
> {noformat}
> cd /tmp
> mkdir unpack
> mvn dependency:unpack -Dartifact=org.apache.ant:ant:1.8.3:jar
> -DoutputDirectory=./unpack
> {noformat}
> 4. Observe that *${project.basedir}* was created
> {noformat}
> $ ls -l /tmp/unpack
> total 0
> ... ${project.basedir}
> ... unpack
> {noformat}
> *_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.
> h3. 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):
> - [https://stackoverflow.com/q/11669446/321797]
> - [https://netbeans.org/bugzilla/show_bug.cgi?id=221560]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)