Uploaded image for project: 'Maven Shade Plugin'
  1. Maven Shade Plugin
  2. MSHADE-378

Shade plugin changes the compression level of nested jar entries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              rmannibucau Romain Manni-Bucau
              jeremy yu jeremy yu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: