Create an integration test to capture effects of exclusions from dependency
management in combination with exclusions from regular dependencies
-----------------------------------------------------------------------------------------------------------------------------------------------
Key: MNG-4720
URL: http://jira.codehaus.org/browse/MNG-4720
Project: Maven 2 & 3
Issue Type: Task
Components: Integration Tests
Reporter: Benjamin Bentmann
Given this innocent POM snippet:
{code:xml}
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>2.0.6</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<exclusions>
<exclusion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
{code}
What will be the effective exclusions applied to the dependencies of
maven-model?
It depends on the context in which the POM is processed. Technically, the two
exclusions are not merged in the effective POM (right now, the effective POM
only propagates managed exclusions to a dependency if the dependency has no
exclusions declared). However, for a local project POM, the artifact collector
superimposes the exclusion of plexus-utils from the dependency management onto
the maven-model artifact such that eventually both exclusions apply during
dependency resolution. In contrast, for a dependency POM, this superimposition
does not happen, such that exclusions from dependency management do not apply
to dependencies that by themselves have already exclusions specified.
--
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