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

Unable to shade Java 8 jarfiles with static interface methods using minimizeJar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2, 2.3
    • 2.4
    • None
    • WIndows 7 (x64)
      Netbeans 8.0 (also occurs on command line)
      Maven 3.2.1
      (Maven) ASM-5.0.2

    Description

      Maven shade does not appear to work with shading in Java 8 jarfiles that include static interface methods. A full log of a build with dependency resolution is attached (as well as an effective-pom and the stacktrace)

      The error header is:

      Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.3:shade (default) on project --: Error creating shaded jar: INVOKESPECIAL/STATIC on interfaces require ASM 5 -> [Help 1]

      (Do note, I already am using ASM 5.0.2)

      I've also created a public, reproducible version of this bug: https://github.com/1Rogue/Maven-Shade-Bug

      You simply can clone that repo and attempt a "mvn clean install", and it should fail accordingly.

      You can also view the stackoverflow question that sent me here: http://stackoverflow.com/questions/24415677/unable-to-shade-jar-with-maven-invokespecial-static/24417179#24417179

      Attachments

        1. diff.1805
          2 kB
          Bram Bouwens
        2. effective-pom.txt
          11 kB
          Pedro Boado
        3. out.txt
          10 kB
          Pedro Boado
        4. stacktrace.txt
          3 kB
          Pedro Boado

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              rogue Pedro Boado
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: