vladilm opened a new pull request, #576:
URL: https://github.com/apache/maven-build-cache-extension/pull/576
The compatibility problems appeared when testing Maven 4’s concurrent
builder. Unlike the smart builder, which primarily parallelizes whole modules,
concurrent schedules individual lifecycle steps and can execute steps within
the same module concurrently. This exposed three assumptions in the extension:
1. Lifecycle phase names differed. Maven 4 treats process-resources as an
alias for after:resources. Concurrent passed the original name to the
extension, which rejected it with Unsupported phase: process-resources. Added
alias normalization and regression tests.
2. Repeated staging removed required classes. The extension temporarily
moves existing outputs aside to avoid caching stale artifacts. Running this
before each concurrent step could remove classes produced earlier in the same
build. Restoration also traversed staging shared by other modules. We
restricted staging to once per project per session and restoration to that
project’s staged outputs.
3. Attached artifacts were modified concurrently. Multiple steps of the
same project could execute cache operations simultaneously, causing
ConcurrentModificationException. The build could still report success despite
failing to save the cache. We serialized execution through the cache strategy
for each MavenProject, while preserving parallel execution across different
projects.
The conflict is between the concurrent builder’s execution model and the
extension’s assumptions - not the mvnd daemon itself. The smart builder
remained compatible in tests.
---
To make clear that you license your contribution under
the [Apache License Version 2.0, January
2004](https://www.apache.org/licenses/LICENSE-2.0)
check one of the following:
- [x] I hereby declare this contribution to be licensed under the [Apache
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
- [x] I hereby declare that I have filed an [Apache Individual Contributor
License Agreement](https://www.apache.org/licenses/icla.pdf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]