You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Henry Hoendervangers (JIRA)" <ji...@apache.org> on 2015/07/30 15:50:05 UTC

[jira] [Updated] (MNG-5866) A way to replace a transitive dependency

     [ https://issues.apache.org/jira/browse/MNG-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Hoendervangers updated MNG-5866:
--------------------------------------
    Description: 
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: 
{{monospaced}}
<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.

  was:
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.


> 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: 
> {{monospaced}}
> <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)