Commit e0819ce
committed
Change default attachedOutputs to include classes and test-classes
Previously, when attachedOutputs was not specified in maven-build-cache-config.xml,
the build cache would return an empty list, meaning no directories were cached
by default. This caused issues where compiled classes were not restored from cache,
leading to build failures or inconsistent behavior.
Changes:
- Modified CacheConfigImpl.getAttachedOutputs() to return a default list containing
'classes' and 'test-classes' directories when attachedOutputs is not configured
- Added getDefaultAttachedOutputs() helper method to create the default configuration
- Updated usage.md to reflect that classes and test-classes are now restored by default
- Updated build-cache-config.mdo documentation to document the new default behavior
This change addresses user reports in issues #259 and #340 where builds failed
after cache restoration due to missing compiled classes. It also aligns with
user expectations from PR #177 discussion where this default was requested.
Fixes: #259, #340
Related: #1771 parent 10eb2c4 commit e0819ce
File tree
3 files changed
+26
-8
lines changed- src
- main
- java/org/apache/maven/buildcache/xml
- mdo
- site/markdown
3 files changed
+26
-8
lines changedLines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
579 | 596 | | |
580 | 597 | | |
581 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
| 378 | + | |
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
384 | 385 | | |
385 | | - | |
| 386 | + | |
| 387 | + | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
0 commit comments