[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-dev
Subject:    [jira] [Created] (MNG-5866) A way to replace a transitive dependency
From:       "Henry Hoendervangers (JIRA)" <jira () apache ! org>
Date:       2015-07-30 13:45:05
Message-ID: JIRA.12850240.1438263868000.330318.1438263905018 () Atlassian ! JIRA
[Download RAW message or body]

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)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic