[MNG-7994] Update to Resolver 2.0.0-alpha-6 (#1373)

Update to alpha-6. Also, move off from deprecated default ctor of def repo session in tests.

---

https://issues.apache.org/jira/browse/MNG-7994
This commit is contained in:
Tamas Cservenak 2024-01-11 13:16:51 +01:00 committed by GitHub
parent cfa13f5cc7
commit c4ccba7bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 6 deletions

View File

@ -369,7 +369,7 @@ public class RepositoryUtils {
} }
newSession = new DefaultRepositorySystemSession(session); newSession = new DefaultRepositorySystemSession(session);
} else { } else {
newSession = new DefaultRepositorySystemSession(); newSession = new DefaultRepositorySystemSession(h -> false); // no close handle used
} }
final LocalRepositoryManager llrm = final LocalRepositoryManager llrm =

View File

@ -65,7 +65,10 @@ class LifecycleModuleBuilderTest {
mavenExecutionRequest.setExecutionListener(new AbstractExecutionListener()); mavenExecutionRequest.setExecutionListener(new AbstractExecutionListener());
mavenExecutionRequest.setGoals(Arrays.asList("clean")); mavenExecutionRequest.setGoals(Arrays.asList("clean"));
final MavenSession session = new MavenSession( final MavenSession session = new MavenSession(
null, new DefaultRepositorySystemSession(), mavenExecutionRequest, defaultMavenExecutionResult); null,
new DefaultRepositorySystemSession(h -> false),
mavenExecutionRequest,
defaultMavenExecutionResult);
final ProjectDependencyGraphStub dependencyGraphStub = new ProjectDependencyGraphStub(); final ProjectDependencyGraphStub dependencyGraphStub = new ProjectDependencyGraphStub();
session.setProjectDependencyGraph(dependencyGraphStub); session.setProjectDependencyGraph(dependencyGraphStub);
session.setProjects(dependencyGraphStub.getSortedProjects()); session.setProjects(dependencyGraphStub.getSortedProjects());

View File

@ -312,7 +312,8 @@ public class PluginParameterExpressionEvaluatorV4Test extends AbstractCoreMavenC
.setBaseDirectory(new File("")) .setBaseDirectory(new File(""))
.setLocalRepository(repo); .setLocalRepository(repo);
DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession(); DefaultRepositorySystemSession repositorySession =
new DefaultRepositorySystemSession(h -> false); // no close handle
repositorySession.setLocalRepositoryManager(new SimpleLocalRepositoryManagerFactory() repositorySession.setLocalRepositoryManager(new SimpleLocalRepositoryManagerFactory()
.newInstance(repositorySession, new LocalRepository(repo.getUrl()))); .newInstance(repositorySession, new LocalRepository(repo.getUrl())));
MavenSession session = MavenSession session =

View File

@ -72,7 +72,7 @@ class ConsoleMavenTransferListenerTest {
TransferResource resource = new TransferResource(null, null, "http://maven.org/test/test-resource", null, null); TransferResource resource = new TransferResource(null, null, "http://maven.org/test/test-resource", null, null);
resource.setContentLength(size - 1); resource.setContentLength(size - 1);
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(); DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(h -> false); // no close handle
// warm up // warm up
test(listener, session, resource, 0); test(listener, session, resource, 0);

View File

@ -63,7 +63,7 @@ public final class MavenRepositorySystemUtils {
*/ */
@Deprecated @Deprecated
public static DefaultRepositorySystemSession newSession() { public static DefaultRepositorySystemSession newSession() {
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(); DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(h -> false); // no close handle
DependencyTraverser depTraverser = new FatArtifactTraverser(); DependencyTraverser depTraverser = new FatArtifactTraverser();
session.setDependencyTraverser(depTraverser); session.setDependencyTraverser(depTraverser);

View File

@ -176,7 +176,7 @@ under the License.
<plexusInterpolationVersion>1.26</plexusInterpolationVersion> <plexusInterpolationVersion>1.26</plexusInterpolationVersion>
<plexusTestingVersion>1.0.0</plexusTestingVersion> <plexusTestingVersion>1.0.0</plexusTestingVersion>
<plexusXmlVersion>4.0.1</plexusXmlVersion> <plexusXmlVersion>4.0.1</plexusXmlVersion>
<resolverVersion>2.0.0-alpha-5</resolverVersion> <resolverVersion>2.0.0-alpha-6</resolverVersion>
<securityDispatcherVersion>2.0</securityDispatcherVersion> <securityDispatcherVersion>2.0</securityDispatcherVersion>
<sisuVersion>0.9.0.M2</sisuVersion> <sisuVersion>0.9.0.M2</sisuVersion>
<slf4jVersion>2.0.11</slf4jVersion> <slf4jVersion>2.0.11</slf4jVersion>