Commit d51a7ab
committed
Preserve dependency scope in plugin artifacts
What changed:
- Added `RepositoryUtils.toArtifact(ArtifactResult)` to convert resolved artifacts and copy dependency metadata from the resolution request.
- Set Maven `Artifact` scope and optional flag from the resolved dependency node instead of converting only the raw Aether artifact.
- Updated `DefaultMavenPluginManager` to use the new conversion path for plugin realm and extension artifact resolution.
Why:
- `PluginDescriptor.getArtifacts()` returned artifacts with `null` scope in Maven 3.10.0-rc-1.
- Restoring scope/optional metadata brings behavior back in line with 3.9.x and avoids regressions in plugins that depend on artifact scope.
fix #124971 parent e002e45 commit d51a7ab
2 files changed
Lines changed: 25 additions & 2 deletions
File tree
- maven-core/src/main/java/org/apache/maven
- plugin/internal
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
159 | 182 | | |
160 | 183 | | |
161 | 184 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
0 commit comments