Exclusions in dependencies should not exclude a direct dependency
-----------------------------------------------------------------

         Key: MNG-2138
         URL: http://jira.codehaus.org/browse/MNG-2138
     Project: Maven 2
        Type: Bug

  Components: Ant tasks  
    Versions: 2.0, 2.0.1, 2.0.2    
 Environment: Any (tested on windows)
    Reporter: Bruce Brouwer
    Priority: Minor


Here's the situation: My pom declares a dependency on artifact B, but excludes 
the transitive dependency on C. This same pom also directly depends on C. When 
getting the dependencies, C does not show up in the list, even though it is a 
direct dependency. Here is the relevant section of the pom:

<project ...>
  <dependencies>
    <dependency>
      <groupId>groupB</groupId>
      <artifactId>artifactB</artifactId>
      <exclusions>
        <exclusion>
          <groupId>groupC</groupId>
          <artifactId>artifactC</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>groupC</groupId>
      <artifactId>artifactC</artifactId>
    </dependency>
  </dependencies>
</project>

Then using that ant task:
<artifact:dependencies 
    pomrefid="maven.project"
    pathId="compile.classpath" 
    verbose="true" 
    useScope="compile" />

-- 
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