Commit 0691e55
authored
Do not force md download always (#11908)
My proposal, go back to original behaviour with a twist:
* discover via project (if present) -- but added slight heuristics to try to prioritize plugins that have prefix in A (ie "spotless" -> "spotless-maven-plugin"), and then try all the remainers if not found
* discover via G level metadata
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 `Set` and 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 #119051 parent f8f5335 commit 0691e55
1 file changed
Lines changed: 39 additions & 10 deletions
File tree
- maven-core/src/main/java/org/apache/maven/plugin/prefix/internal
Lines changed: 39 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
135 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
136 | 165 | | |
137 | 166 | | |
138 | 167 | | |
| |||
0 commit comments