You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@apache.org> on 2016/07/07 00:11:11 UTC

[jira] [Updated] (MNG-6058) Test dependencies should override application dependencies only during testing.

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

Christian Schulte updated MNG-6058:
-----------------------------------
    Attachment: MNG-6058.zip

Example demonstrating the issue. Unzip and run {{mng6058.sh}}. This will install various artifacts to group id {{localhost}} you can remove afterwards. Running  {{mvn compile}}, the compile classpath does not contain {{b-2.0.jar}} although that is an application dependency.

{code}
[DEBUG] localhost:mng6058:jar:20160707
[DEBUG]    localhost:a:jar:2.0:compile
[DEBUG]    localhost:b:jar:1.0:test
{code}


> 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
>            Assignee: Christian Schulte
>         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 should be part of the application classpath and that  the dependency on b in version 1.0 will be part of the test classpath overriding the application classpath.



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