[ 
https://issues.apache.org/jira/browse/MNG-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815574#comment-17815574
 ] 

Tamas Cservenak commented on MNG-6058:
--------------------------------------

This is a long outstanding bug (present since 3.0.0) explained here MNG-8041

Resolver does not work like this, as explained here 
[https://maven.apache.org/resolver-archives/resolver-2.0.0-alpha-7/common-misconceptions.html#misconception-no2-%E2%80%9Ctest-graph%E2%80%9D-is-superset-of-%E2%80%9Cruntime-graph%E2%80%9D]

Unsure will this be fixed for 3.x as that line worked like this from start. 
Most probably to be fixed in 4.x

> Test dependencies should override application dependencies only during testing
> ------------------------------------------------------------------------------
>
>                 Key: MNG-6058
>                 URL: https://issues.apache.org/jira/browse/MNG-6058
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Christian Schulte
>            Priority: Critical
>         Attachments: MNG-6058.zip
>
>
> The following graph
> {code}
> POM
> |->a 2.0 compile
> |-->b 2.0 compile
> |->b 1.0 test
> {code}
> will be mediated to
> {code}
> POM
> |->a 2.0 compile
> |->b 1.0 test
> {code}
> The test dependency on b will make the transitive application dependency on b 
> disappear. Maven should understand that the application dependency on b in 
> version 2.0 is part of the application classpath and that  the test 
> dependency on b in version 1.0 is part of the test classpath only (overriding 
> the application classpath). If someone adds a dependency on a project like 
> that, the test dependency will disappear because the test scope is not 
> transitive so that a "consuming" project gets a different application 
> classpath than the project itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to