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

Transitive dependencies with scope provided ending up in the final artifact

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0.3, 3.0.4
    • Fix Version/s: None
    • Component/s: Dependencies
    • Labels:
      None
    • Environment:
      Windows 7, Sun OS 5.1

      Description

      Marking jaxws-rt as a provided dependency:

      <dependency>
      	<groupId>com.sun.xml.ws</groupId>
      	<artifactId>jaxws-rt</artifactId>
      	<version>2.1.4</version>
      	<scope>provided</scope>
      </dependency>

      Correctly resolves jaxb-impl as a provided dependency (dependency:tree output from 3.0.3 and 3.0.4):

      [INFO] +- com.sun.xml.ws:jaxws-rt:jar:2.1.4:provided
      [INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.1.7:provided
      [INFO] | +- com.sun.xml.stream.buffer:streambuffer:jar:0.7:provided
      [INFO] | +- com.sun.xml.stream:sjsxp:jar:1.0.1:provided
      [INFO] | +- org.jvnet.staxex:stax-ex:jar:1.2:provided
      [INFO] | +- com.sun.org.apache.xml.internal:resolver:jar:20050927:provided
      [INFO] | \- org.jvnet:mimepull:jar:1.2:provided 

      But for some reason, in Maven 3 (tried 3.0.3 and 3.0.4), using a packaging type of "war", jaxb-impl-2.1.7 ends up in the final artifact.

      It is correctly omitted from the final artifact in maven 2.x.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jvanzyl Jason van Zyl
                Reporter:
                iphipps Ian Phipps
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: