Dependency excludes applies to subsequent dependencies
------------------------------------------------------

                 Key: MNG-3689
                 URL: http://jira.codehaus.org/browse/MNG-3689
             Project: Maven 2
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 2.0.9, 2.0.8, 2.0.7
         Environment: WinXP - Sun JDK-1.5.0_15
            Reporter: Paul Taylor


Dependency exclusions seem to be in-correctly scoped and so are applying 
to subsequent dependencies at the same level. This results in dependencies
being 'removed' when new dependencies are 'added'.

The issue is apparent in the pom below which use spring-ws-core and spring-core,
which both use the commons-logging-1.1. Commons-logging 1.1 erroneously 
includes servlet-api - a fact which spring-ws-core attempts to resolve with 
exclusions.

a pom which ''only'' has spring-core as a dependency pulls in servlet-api.
the addition of spring-ws-core has the effect of 'removing' commons-logging. 

This behaviour occurs under maven 2.0.8.
Under maven 2.0.9 it is 'dependency order dependant' - swapping the pair
of spring-core and spring-ws-core highlights or hides the erroneous behaviour.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>

  <modelVersion>4.0.0</modelVersion>

  <groupId>a.b.c.d</groupId>
  <artifactId>maven-minimal</artifactId>
  <name>maven-minimal</name>
  <version>1.0-SNAPSHOT</version>

  <dependencies>
    <dependency>
      <groupId>org.springframework.ws</groupId>
      <artifactId>spring-ws-core</artifactId>
      <version>1.0.3</version>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>2.0.7</version>
    </dependency>
  </dependencies>
</project>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to