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

test-scoped artifact excluded, even if it is also a transitive dep

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.3.2, 1.4
    • None

    Description

      A test-scoped artifact is excluded from the final jar, even if that artifact is also a transitive dependency of some other (non-test-scoped) dep.

      MY_POM
        |
        |
        +-- dep A (scope: test)
        |
        |
        +-- dep B (scope: compile)
              |
              |
              +-- dep A (scope: compile)
      

      In the above scenario, I would expect 'dep A' to be included in the final jar, even though it's in the 'test' scope in my POM. The rationale is that it is required for 'dep B' to run; its absence will result in a java.lang.ClassNotFoundException at runtime.

      Behavior observed with maven-shade-plugin versions 1.3.2 and 1.4; other versions not tested.

      I'll put together a test case later tonight when I have more time and attach it here.

      Attachments

        1. MSHADE-95-IT.patch
          5 kB
          Robert Scholte

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asalewski Alan D. Salewski
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: