Do not force md download always#11908
Merged
cstamas merged 6 commits intoapache:maven-3.10.xfrom Apr 13, 2026
Merged
Conversation
Right now, metadata discovery causes all metadata download over and over, for maven plugins that does not have G level metadata. Usually those plugins are enlisted in POM. One of most prominent plugin is spotless. So this PR adds following change: * discover via G level metadata (will not succeed) * discover via project (here will) * try harder via G level metadata (set policy "always")
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
slawekjaranowski
approved these changes
Apr 13, 2026
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.
My proposal, go back to original behaviour with a twist:
Rationale: original change was IMHO wrong: not only it allowed "takeover" of prefix, user was not able to do anything about it. The original code (where this PR goes back to) was done like this on purpose: the user input (POM) is mandatory, so if user defines a plugin, and it has given prefix, that must be used, whatever any remote repository G level metadata says. Only if there is no user instruction, go for prefix discovery via metadata.
Code uses
Setand gets rid of the possible double resolution of same plugin, as they may coexist (usually is) in project/build/plugins and project/build/pluginManagement/plugins.Fixes #11905