Replace RepositorySystem usages with Aether Resolver #5646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
org.apache.maven.repository.RepositorySystemis deprecated and slated for removal in Maven 4.x. This PR migrates all usages to the modern Aether Resolver API (org.eclipse.aether.RepositorySystem), following the pattern established in the maven-compiler-plugin migration.Migration Pattern
Before:
After:
Changes
MavenDependenciesResolverConfigurer— Migrated toCollectRequest/DependencyRequest/ArtifactRequestAPIsMavenDependencyInjector— ReplacedrepositorySystem.createArtifactRepository()with directMavenArtifactRepositoryinstantiation; removedRepositorySystemandSettingsparametersP2DependencyResolver— Removed unusedRepositorySystemfieldDefaultStandaloneDirectorRuntimeFactory— Removed unusedRepositorySystemfieldAbstractEclipseTestMojo— Migrated framework extension resolution to Aether APITychoIntegrationTestMojo— Migrated dependency resolution with scope filtering viaDependencyFilterUtilsDocletArtifactsResolver— Migrated to Aether APIMavenDependenciesResolverTest— Updated test setup to useLegacyLocalRepositoryManager.overlay()for proper session configurationP2ArtifactMappingToMavenRepoTest— ReplacedRepositorySystem.DEFAULT_REMOTE_REPO_URLconstant with literal to remove deprecated importWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
testng.org/opt/hostedtoolcache/CodeQL/2.23.3/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.23.3/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.23.3/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/tycho/.codeql-scratch/dbs/java/working/files-to-index10798835212826357474.list --sourceArchiveDir=/home/REDACTED/work/tycho/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/tycho/.codeql-scratch/dbs/java/trap/java(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Replace RepositorySystem usages with Aether Resolver</issue_title>
<issue_description>
org.apache.maven.repository.RepositorySystemshoudl/could be replaced with Aether Resolver like shown herehttps://github.com/apache/maven-compiler-plugin/pull/151/files
For example in the MavenURLHandler.</issue_description>
<agent_instructions>Check where we already use the old org.apache.maven.repository.RepositorySystem and suggest upgrade to using the new Aether API. As we have done this already on some places there should even be examples for such migration in the source code of this repository.</agent_instructions>
Comments on the Issue (you are @copilot in this section)
@laeubi Probably related see