You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jeremy yu (Jira)" <ji...@apache.org> on 2020/10/07 09:53:00 UTC

[jira] [Updated] (MSHADE-378) Shade plugin changes the compression level of nested jar entries

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

jeremy yu updated MSHADE-378:
-----------------------------
    Description: 
I'm trying to shade a part of dependencies from a flat jar which contains many nested jars. However, after shading, the nested jars can't be loaded in JVM and an exception is thrown:  "Exception in thread "main" java.lang.IllegalStateException: Unable to open nested entry 'xxx/xxxxx.jar'.It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file"

The reseaon of the above case is that shade plugin loses the meta information of orignal jar entries when copying nested jar (see DefaultShade#addResource method). 

I am happy to submit a fix for this, but I am not so sure about my solution. I would appreciate if someone can review my fix and give me guidance.

  was:
I'm trying to shade a part of dependencies from a flat jar which contains many nested jars. However, after shading, the nested jars can't be loaded in JVM and an exception is thrown:  "Exception in thread "main" java.lang.IllegalStateException: Unable to open nested entry 'xxx/xxxxx.jar'.It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file"

The reseaon of the above case is that shade plugin loses the meta information of orignal jar entries when copying nested jar (see DefaultShade#addResource method). 

{{}}

I am happy to submit a fix for this, but I am not so sure about my solution. I would appreciate if someone can review my fix and give me guidance.


> Shade plugin changes the compression level of nested jar entries
> ----------------------------------------------------------------
>
>                 Key: MSHADE-378
>                 URL: https://issues.apache.org/jira/browse/MSHADE-378
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>            Reporter: jeremy yu
>            Priority: Major
>
> I'm trying to shade a part of dependencies from a flat jar which contains many nested jars. However, after shading, the nested jars can't be loaded in JVM and an exception is thrown:  "Exception in thread "main" java.lang.IllegalStateException: Unable to open nested entry 'xxx/xxxxx.jar'.It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file"
> The reseaon of the above case is that shade plugin loses the meta information of orignal jar entries when copying nested jar (see DefaultShade#addResource method). 
> I am happy to submit a fix for this, but I am not so sure about my solution. I would appreciate if someone can review my fix and give me guidance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)