You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix timestamp preservation when extracting cached files
The build cache extension was not properly preserving file and directory
timestamps when restoring attachedOutputs from cache. This caused Maven
to warn about files being 'more recent than the packaged artifact' even
after a successful build.
Root Causes:
1. The zip() method did not store directory entries with timestamps
2. The unzip() method set directory timestamps immediately, but they
were later modified by Files.copy() operations for files within
Changes:
- Modified CacheUtils.zip() to store directory entries with timestamps
via preVisitDirectory() callback
- Modified CacheUtils.unzip() to defer directory timestamp updates until
after all files are extracted, preventing them from being overwritten
- Added Map<Path, Long> to track directory timestamps during extraction
This ensures that cached build outputs maintain their original timestamps,
preventing spurious warnings and improving build cache consistency.
0 commit comments