Henry Hoendervangers created MNG-5866:
-----------------------------------------
Summary: A way to replace a transitive dependency
Key: MNG-5866
URL: https://issues.apache.org/jira/browse/MNG-5866
Project: Maven
Issue Type: New Feature
Components: Dependencies
Affects Versions: 3.3.3
Environment: all
Reporter: Henry Hoendervangers
Priority: Minor
we need a way to replace a transitive dependency. It is needed because the
dependency:analyze will throw a warning if you exclude the transitive
dependency and declare another dependency to replace the transitive dependency.
For example:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>freemarker</groupId>
<artifactId>freemarker</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>
this will cause dependency:analyze to throw a warning on the
org.freemarker:freemarker dependency because it's unused.
possible sollution:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>freemarker</groupId>
<artifactId>freemarker</artifactId>
<replace>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</replace>
</exclusion>
</exclusions>
</dependency>
org.freemarker:freemarker can now be marked as transitive.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)