slachiewicz commented on PR #1712:
URL: https://github.com/apache/maven-mvnd/pull/1712#issuecomment-5179240901
### Investigation into CI `BootstrapPluginTest` failure
The GraalVM 25 ARM64 `stat@GLIBC_2.17` shim and test hermeticity fixes in
this PR are verified and complete.
Separately, `BootstrapPluginTest.cleanInstall` hit a race condition:
```
Caused by: java.nio.file.NoSuchFileException:
/.../target/project-local-repo/org.reproducer/bootstrap
at org.apache.maven.plugins.clean.CleanMojo.execute(CleanMojo.java:277)
```
#### Root Cause
In Maven 4, `ReactorReader` provisions a shared session-scoped repository at
`${session.rootDirectory}/target/project-local-repo`.
When `mvnd clean install` executes a multi-module project in parallel (via
`SmartBuilder` with multiple threads):
1. **Thread 1** (Root project `clean` phase): `maven-clean-plugin`
recursively deletes the root `target/` directory (which includes
`target/project-local-repo`).
2. **Thread 2** (Submodule `install`/`build` phase): Submodule `bootstrap`
finishes building and `ReactorReader` writes/installs artifacts into
`${session.rootDirectory}/target/project-local-repo/org.reproducer/bootstrap/`.
Because `project-local-repo` is located inside `target/`, Thread 1 deletes
subdirectories mid-traversal while Thread 2 is actively reading or writing into
`project-local-repo`, resulting in `java.nio.file.NoSuchFileException`.
#### Proposed Architectural Fixes
- **In test project (`src/test/projects/bootstrap-plugin/pom.xml`):**
Exclude `project-local-repo` from `maven-clean-plugin` target deletion during
parallel reactor execution.
- **In Maven 4 Core / `ReactorReader`:** Ensure session-scoped
`project-local-repo` is managed with proper lifecycle locking or excluded from
module-level `clean` tasks during parallel builds.
--
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]