Commit 22fd6f5
Skip redundant property override in child when parent declares same dependency (#6955)
* Skip redundant property override in child POM when local parent also declares dependency
When UpgradeDependencyVersion processes a managed dependency whose
version is a property, and a local parent POM also declares the same
dependency, the parent will handle the property change. The child
should skip it to avoid a redundant property override.
Fixes #6945
* rollback formatter changes to reduce PR noise
* Only skip child when parent declares dependency without explicit version
Addresses review feedback: if the local parent declares the same
dependency with an explicit version, it will update the version tag
directly and won't handle the property change. The child must still
add the property override in that case.
---------
Co-authored-by: Tim te Beek <tim@moderne.io>1 parent f4e766e commit 22fd6f5
2 files changed
Lines changed: 101 additions & 6 deletions
File tree
- rewrite-maven/src
- main/java/org/openrewrite/maven
- test/java/org/openrewrite/maven
Lines changed: 30 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
318 | 341 | | |
319 | 342 | | |
320 | 343 | | |
| |||
330 | 353 | | |
331 | 354 | | |
332 | 355 | | |
333 | | - | |
334 | | - | |
335 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
336 | 362 | | |
337 | 363 | | |
338 | 364 | | |
| |||
489 | 515 | | |
490 | 516 | | |
491 | 517 | | |
492 | | - | |
493 | 518 | | |
494 | 519 | | |
495 | 520 | | |
| |||
520 | 545 | | |
521 | 546 | | |
522 | 547 | | |
523 | | - | |
524 | 548 | | |
525 | 549 | | |
526 | 550 | | |
| |||
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
1293 | 1364 | | |
1294 | 1365 | | |
1295 | 1366 | | |
| |||
0 commit comments