You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tom Wieczorek (JIRA)" <ji...@apache.org> on 2017/04/10 07:04:41 UTC

[jira] [Closed] (MASSEMBLY-851) "Unextractable" JAR files created by assembly:single

     [ https://issues.apache.org/jira/browse/MASSEMBLY-851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Wieczorek closed MASSEMBLY-851.
-----------------------------------
    Resolution: Not A Bug

> "Unextractable" JAR files created by assembly:single
> ----------------------------------------------------
>
>                 Key: MASSEMBLY-851
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-851
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
> Java version: 1.8.0_121, vendor: Oracle Corporation
> Default locale: de_DE, platform encoding: UTF-8
> OS name: "linux", version: "4.8.0-41-generic", arch: "amd64", family: "unix"
>            Reporter: Tom Wieczorek
>         Attachments: mvn.log
>
>
> Under certain circumstances, {{assembly:single}} generates "unextractable" JAR files, because of some directory entries in the JAR file are not ending with a slash, hence they're treated as file entries.
> If such a JAR file is tried to be extracted via the {{jar}} executable, an Exception is thrown and extraction is aborted:
> {code}
> java.io.FileNotFoundException: META-INF/maven (Is a directory)
>         at java.io.FileOutputStream.open0(Native Method)
>         at java.io.FileOutputStream.open(FileOutputStream.java:270)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
>         at sun.tools.jar.Main.copy(Main.java:909)
>         at sun.tools.jar.Main.extractFile(Main.java:1069)
>         at sun.tools.jar.Main.extract(Main.java:981)
>         at sun.tools.jar.Main.run(Main.java:311)
>         at sun.tools.jar.Main.main(Main.java:1288)
> {code}
> A [sample project|https://github.com/twz123/broken-assembly] is on GitHub.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)