Commit 1d85c5d
committed
Add ignorePattern attribute to TrackedProperty for array filtering
Fixes #375 - Maven 4 auto-injects --module-version to compilerArgs during
cache storage but not during validation, causing parameter mismatches.
Changes:
- Add ignorePattern field to TrackedProperty in MDO model
- Implement regex-based filtering in BuildCacheMojosExecutionStrategy
- Filter arrays before comparison (both runtime and cached values)
The ignorePattern attribute allows filtering specific array elements
before comparison, solving the Maven 4 module-version problem while
still detecting legitimate compilerArgs changes.
Users can configure this in maven-build-cache-config.xml:
<reconcile propertyName="compilerArgs" ignorePattern="--module-version"/>
Tested with multi-module JPMS project using Maven 4.0.0-rc-4.1 parent 5990c9f commit 1d85c5d
File tree
2 files changed
+62
-2
lines changed- src/main
- java/org/apache/maven/buildcache
- mdo
2 files changed
+62
-2
lines changedLines changed: 57 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
392 | 398 | | |
393 | 399 | | |
394 | 400 | | |
| |||
434 | 440 | | |
435 | 441 | | |
436 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
437 | 492 | | |
438 | 493 | | |
439 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1462 | 1467 | | |
1463 | 1468 | | |
1464 | 1469 | | |
| |||
0 commit comments