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

Robert Scholte updated MNG-5540:
--------------------------------

    Description: 
I am thinking of a new feature since Maven's exclusion are two steps process in 
practice.

In order to change the scope from compile to provided on transitive dependency 
you exclude dependency via
{code:xml}
<dependencies>
 <dependency>
 ...
 <exludes>
  <exclude>
   ... transitive dependency ...
  </exclude>
 </exludes>
 </dependency>
</dependencies>
{code}
Then put such transitive {{</dependency>}} with {{scope=provided}} which was 
excluded above.
{code:xml}
<dependencies>
 <dependency>
 ...
 <scope>provided</scope>
 </dependency>
</dependencies>
{code}
This is waste because you have to touch the exc.dependency twice and the POM 
xml is getting huge.

Maybe another syntax would simplify:
{code:xml}
<dependencies>
 <dependency>
  ...
  <includes/>
   <include/>
     ... transitive dependency ...
     <scope>provided</scope>
   <include/>
  <includes/>
 </dependency>
</dependencies>
{code}
Validation should fail if no such transitive dependency in includes section is 
specified for the wrapping dependency.

If the transitive dependency is specified in other sections or inherited, the 
scopes should be merged.

  was:
I am thinking of a new feature since Maven's exclusion are two steps process in 
practice.

In order to change the scope from compile to provided on transitive dependency 
you exclude dependency via

<dependencies>
 <dependency>
 ...
 <exludes>
  <exclude>
   ... transitive dependency ...
  </exclude>
 </exludes>
 </dependency>
</dependencies>

Then put such transitive </dependency> with scope=provided which was excluded 
above.

<dependencies>
 <dependency>
 ...
 <scope>provided</scope>
 </dependency>
</dependencies>

This is waste because you have to touch the exc.dependency twice and the POM 
xml is getting huge.

Maybe another syntax would simplify:

<dependencies>
 <dependency>
  ...
  <includes/>
   <include/>
     ... transitive dependency ...
     <scope>provided</scope>
   <include/>
  <includes/>
 </dependency>
</dependencies>

Validation should fail if no such transitive dependency in includes section is 
specified for the wrapping dependency.

If the transitive dependency is specified in other sections or inherited, the 
scopes should be merged.

    
> Simplyfied form of overridden scope on transitive dependencies
> --------------------------------------------------------------
>
>                 Key: MNG-5540
>                 URL: https://jira.codehaus.org/browse/MNG-5540
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Dependencies
>    Affects Versions: 3.1.1
>            Reporter: Tibor Digana
>            Priority: Critical
>
> I am thinking of a new feature since Maven's exclusion are two steps process 
> in practice.
> In order to change the scope from compile to provided on transitive 
> dependency you exclude dependency via
> {code:xml}
> <dependencies>
>  <dependency>
>  ...
>  <exludes>
>   <exclude>
>    ... transitive dependency ...
>   </exclude>
>  </exludes>
>  </dependency>
> </dependencies>
> {code}
> Then put such transitive {{</dependency>}} with {{scope=provided}} which was 
> excluded above.
> {code:xml}
> <dependencies>
>  <dependency>
>  ...
>  <scope>provided</scope>
>  </dependency>
> </dependencies>
> {code}
> This is waste because you have to touch the exc.dependency twice and the POM 
> xml is getting huge.
> Maybe another syntax would simplify:
> {code:xml}
> <dependencies>
>  <dependency>
>   ...
>   <includes/>
>    <include/>
>      ... transitive dependency ...
>      <scope>provided</scope>
>    <include/>
>   <includes/>
>  </dependency>
> </dependencies>
> {code}
> Validation should fail if no such transitive dependency in includes section 
> is specified for the wrapping dependency.
> If the transitive dependency is specified in other sections or inherited, the 
> scopes should be merged.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to