You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Johno Crawford <jo...@sulake.com> on 2018/07/21 10:37:52 UTC

[MSHADE-215] Shade plugin fails to handle "exploded" jars

Hey all,

When building the Atomix project on GitLab CI [1] we are running into the
same problem as described here
https://issues.apache.org/jira/browse/MSHADE-215

Essentially the artifacts passed into the shade plugin point to the modules
classes directory which fails [2] as the plugin expects jars.

Should the shade plugin be updated to support "exploded" jars? Can we
ignore directories [3]? Should Maven be returning files pointing to
directories in the first place?

[1]
https://github.com/atomix/atomix/pull/721
Apache Maven 3.5.4
Java version: 1.8.0_171
OS name: "linux", version: "4.14.48-coreos-r2", arch: "amd64"

[2]

Caused by: java.io.FileNotFoundException:
/builds/atomix-io/atomix/core/target/classes (Is a directory)
    at java.util.zip.ZipFile.open (Native Method)
    at java.util.zip.ZipFile.<init> (ZipFile.java:225)
    at java.util.zip.ZipFile.<init> (ZipFile.java:155)
    at java.util.jar.JarFile.<init> (JarFile.java:166)
    at java.util.jar.JarFile.<init> (JarFile.java:130)
    at org.apache.maven.plugins.shade.DefaultShader.newJarFile
(DefaultShader.java:371)
    at org.apache.maven.plugins.shade.DefaultShader.goThroughAllJarEntriesForManifestTransformer
(DefaultShader.java:281)
    at org.apache.maven.plugins.shade.DefaultShader.shade
(DefaultShader.java:100)
    at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute
(ShadeMojo.java:442)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
(DefaultBuildPluginManager.java:134)


[3]
https://github.com/johnou/maven-shade-plugin/commit/e9fb7f07b38710ebbd71c7993e04ff4fad4aa613

Cheers,

Johno