[ 
https://issues.apache.org/jira/browse/MRESOLVER-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827555#comment-17827555
 ] 

ASF GitHub Bot commented on MRESOLVER-512:
------------------------------------------

cstamas commented on PR #445:
URL: https://github.com/apache/maven-resolver/pull/445#issuecomment-2000046152

   Well, IMO this PR goes exactly in direction of MRESOLVER-471, as:
   * scope manager is optional, in a sense, if you want to use Resolver 2.x as 
you did Resolver 1.x, go for it
   * ScopeManager solves the problem of "Resolver should be oblivious about 
scopes" (MRESOLVER-471), as Resolver 1.x implemented scope related logic 
scattered across several (dozen?) classes, and actions like "introducing new 
scope" or "removal of a scope" was impossible exactly due that (as Resolver was 
not oblivious, but had them cemented as String constants spread across dozen 
classes). Hence Resolver was "this xor that". 
   
   With ScopeManager Resolver IS really oblivious, as they are defined by 
client project, the app that is integrating Resolver 2.




> Scope Manager
> -------------
>
>                 Key: MRESOLVER-512
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-512
>             Project: Maven Resolver
>          Issue Type: New Feature
>          Components: Resolver
>            Reporter: Tamas Cservenak
>            Assignee: Tamas Cservenak
>            Priority: Major
>             Fix For: 2.0.0, 2.0.0-alpha-9
>
>
> In Resolver 1.x times, resolver was unaware of "resolution scope", to get the 
> wanted resolution scope caller had to tweak and set up various nits and bits, 
> like selectors, filters, and so on. It was easy to miss. Similarly, resolver 
> had no "first class" type for "dependency scope" either, they were just 
> string labels (that everyone knew HOW should behave, but was never codified) 
> and its meaning and notion was sprinkled across several classes. Introducing 
> new scope in these conditions (or alter selector to something that would have 
> new scopes, like Maven4 plans) was nearly impossible.
> The ScopeManager aims to solve these issues: it defines "resolution scope" 
> and "dependency scope", interprets them, and allows caller to simply make a 
> call to "resolve me main-runtime" resolution scope. No hoops and loops. 
> Moreover, it is FASTER than Resolver 1.x was, that used always same selector 
> (to build dirty graph), so potentially huge graph even if you needed just a 
> bit of it, that was later chopped down to clean up the graph. ScopeManager 
> automates selector selection/setup, and goes directly for result, in most 
> cases the resulting tree is done in first pass.
> Finally, and most importantly, ScopeManager allows to be "configured": by 
> supplying the recipe for dependency and resolution scopes, hence, makes 
> Resolver 2.x versatile, in a sense, it is not "this or that" anymore, it can 
> obey Maven3 and Maven4 dependency scopes at the same time.



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

Reply via email to