Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4526

[regression] Shade plugin includes too much (relative to 2.2.1)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0-alpha-6
    • 3.0-alpha-7
    • Plugins and Lifecycle
    • None
    • OS X 10.5.8

    Description

      When creating a shaded jar using the maven 3.0-alpha-6, I get too many dependencies included. I think it's incorrectly including things in provided scope.

      My project is jslint4java. This is what I see when I run mvn -Pdist clean package:

      [INFO] --- maven-shade-plugin:1.2.2:shade (make-shaded-jar) @ jslint4java-ant ---
      [INFO] Including com.googlecode.jslint4java:jslint4java:jar:1.3.4-SNAPSHOT in the shaded jar.
      [INFO] Including rhino:js:jar:1.7R1 in the shaded jar.
      [INFO] Including org.apache.ant:ant:jar:1.7.1 in the shaded jar.
      [INFO] Including org.apache.ant:ant-launcher:jar:1.7.1 in the shaded jar.
      [INFO] Including org.apache.ant:ant-antunit:jar:1.1 in the shaded jar.
      [INFO] Including junit:junit:jar:4.6 in the shaded jar.
      [INFO] Attaching shaded artifact.
      

      Of those dependencies, only the first two should be included. This worked correctly in maven-2.2.1.

      Unfortunately, I've no idea what's going wrong — whether it's the shade plugin or something in core maven. I've attached a zip of the source, as well as mvn -X output for both 3.0-alpha-6 and 2.2.1.

      Attachments

        1. happygiraffe-jslint4java-957bfd1.zip
          116 kB
          Dominic Mitchell
        2. jslint4java-mvn-2.2.1.out
          401 kB
          Dominic Mitchell
        3. jslint4java-mvn-3.0-alpha-6.out
          274 kB
          Dominic Mitchell

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              happygiraffe Dominic Mitchell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: