Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot extract linux-x86-64 with maven-dependency-plugin in 5.4.0 (only) #1133

Closed
dyorgio opened this issue Sep 11, 2019 · 5 comments
Closed

Comments

@dyorgio
Copy link
Contributor

dyorgio commented Sep 11, 2019

Hi, it is a very stranger bug :P

I normaly can extract from jna jar any resource with maven-dependency-plugin and unpack goal:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-dependency-plugin</artifactId>
    <version>3.1.1</version>
    <executions>
        <execution>
            <id>linux-so-unpack</id>
            <goals>
                <goal>unpack</goal>
            </goals>
            <configuration>
                 <artifactItems>
                     <artifactItem>
                         <groupId>net.java.dev.jna</groupId>
                         <artifactId>jna</artifactId>
                         <version>${version.jna}</version>
                         <overWrite>true</overWrite>
                         <outputDirectory>${project.build.directory}</outputDirectory>
                         <includes>com/sun/jna/linux-x86-64/libjnidispatch.so</includes>
                     </artifactItem>
                </artifactItems>
            </configuration>
        </execution>
    </executions>
</plugin>

But, only in version 5.4.0, I can't, no erros, no file extracted.
I already deleted my maven local copy, download latest binary directly from github project home, nothing works.

If I change to get linux-x86 (or any other package) it works in 5.4.0.
If I change jna version (4.5.0, 5.3.0) it works (linux-x86-64 resource is extracted).

I can extract 5.4.0 without problems too (using native macos utility) and folder/file exists.

Anybody can test if there is a bug on lastest distro or it only occours in my machine?

Running macos Mojave 10.14.6 here, with Zulu OpenJDK 1.8.0_202.

@matthiasblaesing
Copy link
Member

This seems to be a bug (I tracked it down through the maven-dependency-plugin into the archiver and from there to the zip and its fileinfo) - I'm looking into the fix.

However for questions, please use the google-group (as indicated in the issue template), this is the tracker for issues, that were verified to be in the JNA codebase.

@matthiasblaesing
Copy link
Member

@dyorgio could you please see if the attached jna.jar (zipped to keep github happy) fixes the issue for you?

As reference this is the changeset that was used to create the build: https://github.com/matthiasblaesing/jna/tree/invalid_unicodepath_zip

jna.zip

@dyorgio
Copy link
Contributor Author

dyorgio commented Sep 11, 2019

Yes! it was fixed 🧐

@matthiasblaesing
Copy link
Member

Thank you for the quick check - I merged the change to master, it will be part of the next release.

@mlehmannm
Copy link

mlehmannm commented Apr 23, 2020

Hi there. I think this one is back.

We use the org.eclipse.ebr:ebr-maven-plugin to create bundles for Eclipse.
We have the same issue with libjnidispatch.so for linux-x86-64 in JNA 5.5.0.
The ebr-maven-plugin uses the maven-dependency-plugin internally.
https://github.com/eclipse/ebr/blob/master/releng/maven-plugins/ebr-maven-plugin/src/main/java/org/eclipse/ebr/maven/BundleMojo.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants