Skip to content

Use getRemoteProjectRepositories() in DefaultDependencyCollectorBuilder - #170

Open
devesh95official wants to merge 1 commit into
apache:masterfrom
devesh95official:remote-project-repos
Open

devesh95official wants to merge 1 commit into
apache:masterfrom
devesh95official:remote-project-repos

Conversation

@devesh95official

Copy link
Copy Markdown

DefaultDependencyCollectorBuilder read the deprecated ArtifactRepository list from getRemoteArtifactRepositories() and converted it with RepositoryUtils.toRepos(). MavenProject already exposes the resolver repositories as getRemoteProjectRepositories() (what Maven core itself uses for its collect requests), so the collector now passes those straight to the CollectRequest and the ArtifactRepository import 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:

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move off the Maven API deprecated since Maven 3

1 participant