You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrei Tomashpolskiy (JIRA)" <ji...@apache.org> on 2017/03/16 09:06:41 UTC

[jira] [Updated] (MDEP-558) Dependency version from test scope leaks into compile scope

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

Andrei Tomashpolskiy updated MDEP-558:
--------------------------------------
    Component/s:     (was: analyze)
                 tree

> Dependency version from test scope leaks into compile scope
> -----------------------------------------------------------
>
>                 Key: MDEP-558
>                 URL: https://issues.apache.org/jira/browse/MDEP-558
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: tree
>    Affects Versions: 2.8, 2.10, 3.0.0
>            Reporter: Andrei Tomashpolskiy
>
> Despite test scope being non-transitive [1] it's still used to resolve versions of compile dependencies. This might be causing issues in IDEs that rely on the Dependency plugin to assemble the application's classpath.
> E.g. for the following project configuration *javax.servlet-api* version is resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
> {noformat}
> project1
> |-- project2:compile
> |..|-- jetty-server:compile
> |....|-- javax.servlet-api:3.1.0:compile
> |-- jersey-test-framework-core:test
> |..|-- javax.servlet-api:3.0.1:compile
> {noformat}
> My understanding is that it should rather be resolved to 3.1.0, because version 3.0.1 stems from the test scope and should be ignored (AFAIK Maven Shade plugin works in that way).
> Please see a runnable code example in https://github.com/atomashpolskiy/maven-transitive-test-dependencies
> Thank you!
> [1] http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)