You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Benedict (JIRA)" <ji...@codehaus.org> on 2014/07/02 15:44:39 UTC

[jira] (MNG-4724) Plugin runtime classpath during execution differs from runtime classpath during building when conflicts with test/provided scope dependencies are involved

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

Paul Benedict updated MNG-4724:
-------------------------------

    Fix Version/s:     (was: Issues to be reviewed for 3.x)

> Plugin runtime classpath during execution differs from runtime classpath during building when conflicts with test/provided scope dependencies are involved
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4724
>                 URL: https://jira.codehaus.org/browse/MNG-4724
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies, Plugins and Lifecycle
>    Affects Versions: 2.2.1, 3.0-beta-1
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>         Attachments: mng-4724.zip
>
>
> Consider this unresolved dependency tree:
> {noformat}
> plugin
> +- b:0.1:test
> |  \- a:0.2:compile
> \- c:0.1:compile
>    +- a:0.1:compile
>    \- b:0.1:compile
>       \- a:0.2:compile
> {noformat}
> which resolves to
> {noformat}
> [INFO] [dependency:tree {execution: default-cli}]
> [INFO] org.apache.maven.its.mng4724:maven-mng4724-plugin:maven-plugin:0.1
> [INFO] +- org.apache.maven.its.mng4724:b:jar:0.1:test (scope not updated to compile)
> [INFO] \- org.apache.maven.its.mng4724:c:jar:0.1:compile
> [INFO]    \- org.apache.maven.its.mng4724:a:jar:0.2:compile
> {noformat}
> i.e. while building the plugin, the runtime class path consists of {{c-0.1.jar}} and {{a-0.2.jar}}.
> In contrast, when executing the plugin, the resolved tree looks like
> {noformat}
> [INFO] org.apache.maven.its.mng4724:maven-mng4724-plugin:maven-plugin:0.1
> [INFO] \- org.apache.maven.its.mng4724:c:jar:0.1:compile
> [INFO]    +- org.apache.maven.its.mng4724:a:jar:0.1:compile
> [INFO]    \- org.apache.maven.its.mng4724:b:jar:0.1:compile
> {noformat}
> i.e. {{b-0.1.jar}} is now included and instead of {{a-0.2.jar}} we get {{a-0.1.jar}}.
> The cause is that in the latter case the test-scope dependency on b (and its dependency sub tree) wasn't considered at all during resolution, which hides a conflict from the process and yields a different result.
> Besides the plugin class realm, this generally affects the consumption of one project by another.
> IT attached, though given the apparently minor relevance for practical use and the performance loss the fix would cause, not sure we actually want to fix this...



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)