Conversation
|
This change removes the dependency of The Circular Dependency Cycle
When Maven Resolver 2.0 dropped Because internal classes ( Proposed Changes
Impact & Compatibility Analysis
Resulting Dependency Graph |
|
I have another patch that would remove the dependency from maven-core by restoring back the maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSessionBuilderSupplier.java the same way maven 4 keeps them. That would completely remove the cycle and the graph would be: But this one would partially revert Tamas' commit 27f7b54 and I did not want to join the two together. Eventually, if you are opened towards it, I could submit as a follow-up PR. It lives currently in fridrich@98fe900 |
|
@fridrich Thanks for working on this! I agree with your assessment, in fact, today I see as wrong decision of mine, when I placed "suppliers" into Resolver, they should go into Maven (as they are Maven version specific) in fact. Longer story: supplier module was introduced in 1.9 (where ServiceLocator still exists), to provide simple transitioning for users of ServiceLocator, as explained on page https://maven.apache.org/resolver/third-party-integrations.html But today, for Resolver 2.x things got more complicated, and Resolver 2.x offering "mvn3 supplier" -- that is using 3.9.x classes makes things brrrr. I would really like to see some cleanup and sanitization in this area. Ideally, maven-resolver (sans "demos", that are one plugin and some code that demonstrate "live resolver", there Maven classes are must) should not depend on Maven, and ideally maven-resolver-provider (with resolver JARs on classpath) should be able to bring up usable Resolver instance (object graph, either via Sisu or "manually" like suppliers did). And ideally, this should be sorted before 3.10 goes out. All in all, maven-resolver-provider pull in supplier was a bad decision. Maybe just copy-pasta the classes from supplier? Note: when reverting/undoing 27f7b54 the "ADR decorator" should survive! edit: created "counter PR" (reusing most of this PR) that I think is really what we want: #13266 |
Following this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.