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

Tamas Cservenak updated MNG-8041:
---------------------------------
    Description: 
This bug affects all released Maven versions.

Description of the bug: when a Mojo requires Core to collect/resolver given 
ResolutionScope, Maven Core does it wrong. Problem is how 
LifecycleDependencyResolver and DefaultProjectDependenciesResolver colaborate 
plus, how Resolver works. LDR constructs the Resolver filters properly, then it 
calls into DPDR, that performs collection. To achieve that, it **blindly** adds 
all the dependencies to Collect request (graph root). But this is wrong, as 
this should happen with considering requested (to be included or to be 
excluded) scopes. Next what happens, that when collect request processed by 
Resolver it will contain nodes from unwanted scopes (as Maven Core blindly 
added all of them from POM), and due that, conflict resolver may possibly 
eliminate other nodes (as POM ones "always wins", are closest to graph root), 
and also, even the winners will be eliminate in subsequent step, for example 
due scope filtering. This results in incomplete resolution scope.

  was:
This bug affects all released Maven versions.

Description of the bug: when a Mojo requires Core to collect/resolver given 
ResolutionScope, Maven Core does it wrong.


> Maven Core bug regarding resolution scopes for Mojos
> ----------------------------------------------------
>
>                 Key: MNG-8041
>                 URL: https://issues.apache.org/jira/browse/MNG-8041
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>            Reporter: Tamas Cservenak
>            Priority: Major
>
> This bug affects all released Maven versions.
> Description of the bug: when a Mojo requires Core to collect/resolver given 
> ResolutionScope, Maven Core does it wrong. Problem is how 
> LifecycleDependencyResolver and DefaultProjectDependenciesResolver colaborate 
> plus, how Resolver works. LDR constructs the Resolver filters properly, then 
> it calls into DPDR, that performs collection. To achieve that, it **blindly** 
> adds all the dependencies to Collect request (graph root). But this is wrong, 
> as this should happen with considering requested (to be included or to be 
> excluded) scopes. Next what happens, that when collect request processed by 
> Resolver it will contain nodes from unwanted scopes (as Maven Core blindly 
> added all of them from POM), and due that, conflict resolver may possibly 
> eliminate other nodes (as POM ones "always wins", are closest to graph root), 
> and also, even the winners will be eliminate in subsequent step, for example 
> due scope filtering. This results in incomplete resolution scope.



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

Reply via email to