[ 
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: 
{code}
<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>
{code}
this will cause dependency:analyze to throw a warning on the 
org.freemarker:freemarker dependency because it's unused.

possible sollution:
{code}
<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-tools</artifactId>
  <scope>test</scope>
  <exclusions>
    <exclusion>
      <groupId>freemarker</groupId>
      <artifactId>freemarker</artifactId>
    </exclusion>
  </exclusions>
  <inclusions>
    <inclusion>
       <groupId>org.freemarker</groupId>
       <artifactId>freemarker</artifactId>
    </inclusion>
  </inclusions>
</dependency>
{code}
org.freemarker:freemarker can now be marked as transitive. It would also be 
nice to be able to replace a transitive dependency with more than 1 dependency.

  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: 
{code}
<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>
{code}
this will cause dependency:analyze to throw a warning on the 
org.freemarker:freemarker dependency because it's unused.

possible sollution:
{code}
<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-tools</artifactId>
  <scope>test</scope>
  <exclusions>
    <exclusion>
      <groupId>freemarker</groupId>
      <artifactId>freemarker</artifactId>
    </exclusion>
  </exclusions>
  <inclusions>
    <inclusion>
        <groupId>org.freemarker</groupId>
        <artifactId>freemarker</artifactId>
    </inclusion>
  </inclusions>
</dependency>
{code}
org.freemarker:freemarker can now be marked as transitive. It would also be 
nice to be able to replace a transitive dependency with more than 1 dependency.


> 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: 
> {code}
> <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>
> {code}
> this will cause dependency:analyze to throw a warning on the 
> org.freemarker:freemarker dependency because it's unused.
> possible sollution:
> {code}
> <dependency>
>   <groupId>org.hibernate</groupId>
>   <artifactId>hibernate-tools</artifactId>
>   <scope>test</scope>
>   <exclusions>
>     <exclusion>
>       <groupId>freemarker</groupId>
>       <artifactId>freemarker</artifactId>
>     </exclusion>
>   </exclusions>
>   <inclusions>
>     <inclusion>
>        <groupId>org.freemarker</groupId>
>        <artifactId>freemarker</artifactId>
>     </inclusion>
>   </inclusions>
> </dependency>
> {code}
> org.freemarker:freemarker can now be marked as transitive. It would also be 
> nice to be able to replace a transitive dependency with more than 1 
> dependency.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to