Repository navigation
Use getRemoteProjectRepositories() in DefaultDependencyCollectorBuilder - #170
Open
devesh95official wants to merge 1 commit into
Open
devesh95official wants to merge 1 commit into
devesh95official wants to merge 1 commit into
Conversation
The collector converted the deprecated ArtifactRepository list from getRemoteArtifactRepositories() to resolver repositories by hand. MavenProject already exposes that list as getRemoteProjectRepositories(), which is also what Maven core uses for its own collect requests, so use it directly and drop the ArtifactRepository import. Fixes apache#169 Signed-off-by: Devesh Singh <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DefaultDependencyCollectorBuilderread the deprecatedArtifactRepositorylist fromgetRemoteArtifactRepositories()and converted it withRepositoryUtils.toRepos().MavenProjectalready exposes the resolver repositories asgetRemoteProjectRepositories()(what Maven core itself uses for its collect requests), so the collector now passes those straight to theCollectRequestand theArtifactRepositoryimport is gone.Fixes #169
Tested locally with
mvn verify -Prun-its(JDK 21, Maven 3.9.9): 11 unit tests and all 10 invoker ITs (including the verbose-tree ones that go through this collector) pass.To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
check one of the following: