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

Wrong resolution of dependency scope by Maven 3

    XMLWordPrintableJSON

Details

    Description

      For the following POM:

      <project> 
          <modelVersion>4.0.0</modelVersion> 
      
          <groupId>test</groupId> 
          <artifactId>A</artifactId> 
          <version>1.0</version> 
      
          <dependencies> 
              <dependency> 
                  <groupId>org.apache.axis2</groupId> 
                  <artifactId>axis2-xmlbeans</artifactId> 
                  <version>1.5</version> 
                  <scope>provided</scope> 
              </dependency> 
              <dependency> 
                  <groupId>org.apache.axis2</groupId> 
                  <artifactId>axis2-codegen</artifactId> 
                  <version>1.5</version> 
                  <exclusions> 
                      <exclusion> 
                          <groupId>org.apache.geronimo.specs</groupId> 
                          <artifactId>geronimo-stax-api_1.0_spec</artifactId> 
                      </exclusion> 
                  </exclusions> 
              </dependency> 
          </dependencies> 
      </project> 
      

      running 'mvn dependency:resolve' using Maven 3.0.4 yields a wrong result.
      Namely, geronimo-stax-api_1.0_spec dependency is reported as having the resolved scope of 'compile'. With Maven 2.2.1 I get the 'provided' scope, as expected.

      Debug log is attached.

      Attachments

        1. example.zip
          0.4 kB
          Dmitry Batrak
        2. compile-as-transitive-of-provided.tgz
          16 kB
          Renat Sabitov
        3. build.log
          21 kB
          Dmitry Batrak

        Issue Links

          Activity

            People

              Unassigned Unassigned
              batrdmi Dmitry Batrak
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: