[
https://issues.apache.org/jira/browse/MDEP-489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17229409#comment-17229409
]
Nik Goodley commented on MDEP-489:
----------------------------------
[~Christian Schudt] if you have the capability to test, can you try running the
Maven executable in a session with admin rights? I've just come across the same
issue, with another Linux .tar.gz on Windows 10 using the [AdoptOpenJDK 8
artifact|https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u272-b10/OpenJDK8U-jre_x64_linux_hotspot_8u272b10.tar.gz]
However in making a test replication POM I've found it works in CMD, Powershell
and Git Bash with admin rights, but not without (by default), so that combined
with your thoughts above (since libjsig.so is indeed a symlink) led me to the
following workaround.
If you have the right to run this, it seems you can go to *Start > Run >
secpol.msc* and in *Local Security Policy > Security Settings > Local Policies
> User Rights Assignment > Create symbolic links*, you can enter value
_*Everyone*_. Then after logging back into Windows it works in non-admin
sessions. Of course if you don't have permission to set that on your machine,
it's not a workaround.
Example plugin configuration I was testing with (using our internal repo, so I
can't share but it does nothing more than the below with an appropriately
uploaded JDK) was:
{code:java}
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includeGroupIds>net.adoptopenjdk</includeGroupIds>
<includeArtifactIds>jre</includeArtifactIds>
<classifier>${classifier}</classifier>
<outputDirectory>${project.build.directory}/${classifier}/java</outputDirectory>
</configuration>
<executions>
<execution>
<id>unpack-jdk</id>
<phase>process-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
{code}
> Regression: unpack-dependencies fails on Windows for tar.gz containing
> executable file
> --------------------------------------------------------------------------------------
>
> Key: MDEP-489
> URL: https://issues.apache.org/jira/browse/MDEP-489
> Project: Maven Dependency Plugin
> Issue Type: Bug
> Components: unpack-dependencies
> Affects Versions: 2.10
> Reporter: Axel Fontaine
> Priority: Major
> Labels: close-pending
> Attachments: pom.xml, screenshot-1.png
>
>
> unpack-dependencies fails on Windows for a tar.gz dependency containing an
> executable file with the following message:
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-dependency-plugin:2.10:unpack-dependencies
> (unpa
> ck-jres) on project boxfuse-commandline: Error unpacking file:
> C:\Users\Axel\.m2\repository\com\oracle\server-
> jre\8.45\server-jre-8.45-linux-x64.tar.gz to:
> C:\Workspaces\boxfuse-client\boxfuse-commandline\target\dependen
> cy\server-jre-linux-x64-tar.gz
> [ERROR] org.codehaus.plexus.archiver.ArchiverException: Error while expanding
> C:\Users\Axel\.m2\repository\com
> \oracle\server-jre\8.45\server-jre-8.45-linux-x64.tar.gz:
> C:\Workspaces\boxfuse-client\boxfuse-commandline\tar
> get\dependency\server-jre-linux-x64-tar.gz\jdk1.8.0_45\jre\lib\amd64\server\libjsig.so:
> A required privilege i
> s not held by the client.
> This was working fine in all previous versions including 2.8 and 2.9
--
This message was sent by Atlassian Jira
(v8.3.4#803005)