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

Benjamin Bentmann updated MNG-4724:
-----------------------------------

          Description: 
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...

  was:Sanity check scenario from MNG-1895 in context of plugin dependency 
resolution. Also check that scope filter used to pick plugin classpath does not 
prematurely prune non-runtime deps from dependency graph (which would eliminate 
potential conflicts and hence cause different runtime classpath than during 
plugin building).

             Priority: Minor  (was: Major)
    Affects Version/s: 2.2.1
                       3.0-beta-1
           Attachment: mng-4724.zip
    Testcase included: yes
           Issue Type: Bug  (was: Task)
              Summary: Plugin runtime classpath during execution differs from 
runtime classpath during building when conflicts with test/provided scope 
dependencies are involved  (was: Create an integration test to sanity check 
version/scope conflict resolution during plugin resolution)

> Plugin runtime classpath during execution differs from runtime classpath 
> during building when conflicts with test/provided scope dependencies are 
> involved
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4724
>                 URL: http://jira.codehaus.org/browse/MNG-4724
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Integration Tests
>    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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to