[ https://issues.apache.org/jira/browse/MASSEMBLY-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15954166#comment-15954166 ]
Michael Osipov edited comment on MASSEMBLY-851 at 4/3/17 9:14 PM: ------------------------------------------------------------------ Can reproduce: {noformat} [mosipov@bsd10 ~/Projekte/broken-assembly]$ JAVA_VERSION=1.7 mvn -V -q clean verify Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) Maven home: /usr/local/apache-maven-3.3.9 Java version: 1.7.0_111, vendor: Oracle Corporation Java home: /usr/local/openjdk7/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "freebsd", version: "10.3-release-p11", arch: "amd64", family: "unix" ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.github.twz123.brokenassembly.BrokenAssemblyIT Executing [/usr/local/openjdk7/bin/jar, xf, /usr/home/mosipov/Projekte/broken-assembly/target/broken-assembly-0.0.1-SNAPSHOT-broken.jar] java.io.FileNotFoundException: META-INF/maven (Is a directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) at java.io.FileOutputStream.<init>(FileOutputStream.java:171) at sun.tools.jar.Main.copy(Main.java:853) at sun.tools.jar.Main.extractFile(Main.java:1043) at sun.tools.jar.Main.extract(Main.java:938) at sun.tools.jar.Main.run(Main.java:265) at sun.tools.jar.Main.main(Main.java:1262) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.201 sec <<< FAILURE! - in com.github.twz123.brokenassembly.BrokenAssemblyIT unjarBrokenAssembly(com.github.twz123.brokenassembly.BrokenAssemblyIT) Time elapsed: 0.158 sec <<< FAILURE! java.lang.AssertionError: Non-zero exit code from jar executable. Expected: is <0> but: was <1> at com.github.twz123.brokenassembly.BrokenAssemblyIT.unjarBrokenAssembly(BrokenAssemblyIT.java:33) Results : Failed tests: BrokenAssemblyIT.unjarBrokenAssembly:33 Non-zero exit code from jar executable. Expected: is <0> but: was <1> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project broken-assembly: There are test failures. [ERROR] [ERROR] Please refer to /usr/home/mosipov/Projekte/broken-assembly/target/failsafe-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException {noformat} {noformat} [mosipov@bsd10 ~/Projekte/broken-assembly]$ JAVA_VERSION=1.8 mvn -V -q clean verify Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) Maven home: /usr/local/apache-maven-3.3.9 Java version: 1.8.0_112, vendor: Oracle Corporation Java home: /usr/local/openjdk8/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "freebsd", version: "10.3-release-p11", arch: "amd64", family: "unix" ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.github.twz123.brokenassembly.BrokenAssemblyIT Executing [/usr/local/openjdk8/bin/jar, xf, /usr/home/mosipov/Projekte/broken-assembly/target/broken-assembly-0.0.1-SNAPSHOT-broken.jar] 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) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.28 sec <<< FAILURE! - in com.github.twz123.brokenassembly.BrokenAssemblyIT unjarBrokenAssembly(com.github.twz123.brokenassembly.BrokenAssemblyIT) Time elapsed: 0.21 sec <<< FAILURE! java.lang.AssertionError: Non-zero exit code from jar executable. Expected: is <0> but: was <1> at com.github.twz123.brokenassembly.BrokenAssemblyIT.unjarBrokenAssembly(BrokenAssemblyIT.java:33) Results : Failed tests: BrokenAssemblyIT.unjarBrokenAssembly:33 Non-zero exit code from jar executable. Expected: is <0> but: was <1> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project broken-assembly: There are test failures. [ERROR] [ERROR] Please refer to /usr/home/mosipov/Projekte/broken-assembly/target/failsafe-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException {noformat} Native unzip: {noformat} [mosipov@bsd10 ~/Projekte/broken-assembly]$ unzip -t target/broken-assembly-0.0.1-SNAPSHOT.jar Archive: target/broken-assembly-0.0.1-SNAPSHOT.jar testing: META-INF/MANIFEST.MF OK testing: com/github/twz123/brokenassembly/Foo.class OK testing: META-INF/maven/ OK testing: META-INF/maven/com.github.twz123/ OK testing: META-INF/maven/com.github.twz123/broken-assembly/ OK testing: META-INF/maven/com.github.twz123/broken-assembly/pom.xml OK testing: META-INF/maven/com.github.twz123/broken-assembly/pom.properties OK No errors detected in compressed data of target/broken-assembly-0.0.1-SNAPSHOT.jar. [mosipov@bsd10 ~/Projekte/broken-assembly]$ unzip -t target/broken-assembly-0.0.1-SNAPSHOT-broken.jar Archive: target/broken-assembly-0.0.1-SNAPSHOT-broken.jar testing: META-INF/MANIFEST.MF OK testing: com/github/twz123/brokenassembly/Foo.class OK testing: META-INF/maven/com.github.twz123/broken-assembly/pom.xml OK testing: META-INF/maven/com.github.twz123/broken-assembly/pom.properties OK testing: META-INF/maven OK testing: META-INF/maven/com.github.twz123/broken-assembly OK testing: META-INF/maven/com.github.twz123 OK No errors detected in compressed data of target/broken-assembly-0.0.1-SNAPSHOT-broken.jar. [mosipov@bsd10 ~/Projekte/broken-assembly]$ cd target/ [mosipov@bsd10 ~/Projekte/broken-assembly/target]$ unzip broken-assembly-0.0.1-SNAPSHOT.jar Archive: broken-assembly-0.0.1-SNAPSHOT.jar d META-INF extracting: META-INF/MANIFEST.MF d com d com/github d com/github/twz123 d com/github/twz123/brokenassembly extracting: com/github/twz123/brokenassembly/Foo.class unzip: skipping non-regular entry 'META-INF/maven' unzip: skipping non-regular entry 'META-INF/maven/com.github.twz123' unzip: skipping non-regular entry 'META-INF/maven/com.github.twz123/broken-assembly' extracting: META-INF/maven/com.github.twz123/broken-assembly/pom.xml extracting: META-INF/maven/com.github.twz123/broken-assembly/pom.properties [mosipov@bsd10 ~/Projekte/broken-assembly/target]$ unzip broken-assembly-0.0.1-SNAPSHOT-broken.jar Archive: broken-assembly-0.0.1-SNAPSHOT-broken.jar extracting: META-INF/MANIFEST.MF d META-INF d com d com/github d com/github/twz123 d com/github/twz123/brokenassembly extracting: com/github/twz123/brokenassembly/Foo.class extracting: META-INF/maven/com.github.twz123/broken-assembly/pom.xml extracting: META-INF/maven/com.github.twz123/broken-assembly/pom.properties unzip: skipping non-regular entry 'META-INF/maven' unzip: skipping non-regular entry 'META-INF/maven/com.github.twz123/broken-assembly' unzip: skipping non-regular entry 'META-INF/maven/com.github.twz123' {noformat} was (Author: michael-o): Can reproduce: {noformat} [mosipov@bsd10 ~/Projekte/broken-assembly]$ JAVA_VERSION=1.7 mvn -V -q clean verify Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) Maven home: /usr/local/apache-maven-3.3.9 Java version: 1.7.0_111, vendor: Oracle Corporation Java home: /usr/local/openjdk7/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "freebsd", version: "10.3-release-p11", arch: "amd64", family: "unix" ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.github.twz123.brokenassembly.BrokenAssemblyIT Executing [/usr/local/openjdk7/bin/jar, xf, /usr/home/mosipov/Projekte/broken-assembly/target/broken-assembly-0.0.1-SNAPSHOT-broken.jar] java.io.FileNotFoundException: META-INF/maven (Is a directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) at java.io.FileOutputStream.<init>(FileOutputStream.java:171) at sun.tools.jar.Main.copy(Main.java:853) at sun.tools.jar.Main.extractFile(Main.java:1043) at sun.tools.jar.Main.extract(Main.java:938) at sun.tools.jar.Main.run(Main.java:265) at sun.tools.jar.Main.main(Main.java:1262) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.201 sec <<< FAILURE! - in com.github.twz123.brokenassembly.BrokenAssemblyIT unjarBrokenAssembly(com.github.twz123.brokenassembly.BrokenAssemblyIT) Time elapsed: 0.158 sec <<< FAILURE! java.lang.AssertionError: Non-zero exit code from jar executable. Expected: is <0> but: was <1> at com.github.twz123.brokenassembly.BrokenAssemblyIT.unjarBrokenAssembly(BrokenAssemblyIT.java:33) Results : Failed tests: BrokenAssemblyIT.unjarBrokenAssembly:33 Non-zero exit code from jar executable. Expected: is <0> but: was <1> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project broken-assembly: There are test failures. [ERROR] [ERROR] Please refer to /usr/home/mosipov/Projekte/broken-assembly/target/failsafe-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException {noformat} {noformat} [mosipov@bsd10 ~/Projekte/broken-assembly]$ JAVA_VERSION=1.8 mvn -V -q clean verify Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) Maven home: /usr/local/apache-maven-3.3.9 Java version: 1.8.0_112, vendor: Oracle Corporation Java home: /usr/local/openjdk8/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "freebsd", version: "10.3-release-p11", arch: "amd64", family: "unix" ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.github.twz123.brokenassembly.BrokenAssemblyIT Executing [/usr/local/openjdk8/bin/jar, xf, /usr/home/mosipov/Projekte/broken-assembly/target/broken-assembly-0.0.1-SNAPSHOT-broken.jar] 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) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.28 sec <<< FAILURE! - in com.github.twz123.brokenassembly.BrokenAssemblyIT unjarBrokenAssembly(com.github.twz123.brokenassembly.BrokenAssemblyIT) Time elapsed: 0.21 sec <<< FAILURE! java.lang.AssertionError: Non-zero exit code from jar executable. Expected: is <0> but: was <1> at com.github.twz123.brokenassembly.BrokenAssemblyIT.unjarBrokenAssembly(BrokenAssemblyIT.java:33) Results : Failed tests: BrokenAssemblyIT.unjarBrokenAssembly:33 Non-zero exit code from jar executable. Expected: is <0> but: was <1> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project broken-assembly: There are test failures. [ERROR] [ERROR] Please refer to /usr/home/mosipov/Projekte/broken-assembly/target/failsafe-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException {noformat} > "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)