gnodet opened a new issue, #12987:
URL: https://github.com/apache/maven/issues/12987
## Problem
When building with Maven 4, projects using `maven-bundle-plugin` or
`bnd-maven-plugin` fail with a `ConcurrentModificationException` in the BND
library during dependency graph traversal:
```
[ERROR] Failed to execute goal
org.apache.felix:maven-bundle-plugin:4.0.0:bundle
on project geronimo-metrics-common:
Error calculating revision for project ...
java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1605)
```
The builds are single-threaded (no `-T` flag), so this is **not** caused by
parallel Maven execution. The CME occurs in BND's internal collection iteration
during dependency analysis.
## Affected projects (7)
| Project | Plugin | Version |
|---------|--------|---------|
| geronimo-health | maven-bundle-plugin | 4.0.0 |
| geronimo-metrics | maven-bundle-plugin | 4.0.0 |
| geronimo-opentracing | maven-bundle-plugin | 4.1.0 |
| geronimo-config | maven-bundle-plugin | 4.2.1 |
| geronimo-jcache-simple | maven-bundle-plugin | 4.2.1 |
| aries-journaled-events | bnd-maven-plugin | 4.1.0 |
| aries-tx-control | bnd-maven-plugin | 4.1.0 |
## Analysis
The builds run single-threaded (`mvn -V -B -e clean package`), confirming
this is not a multi-threading issue. The CME likely comes from Maven 4's
different model resolution order or dependency graph structure causing BND to
iterate a collection that is concurrently modified by its own internal logic
(BND's analyzer walks dependencies and modifies a HashMap while another part of
BND iterates it).
This may be triggered by Maven 4's `TransitiveDependencyManager` changes
presenting dependencies in a different order or structure than Maven 3.
## Expected behavior
The build should not fail with a CME. Either:
1. Maven 4's dependency resolution should present dependencies in a way that
doesn't trigger this BND bug
2. Or a workaround/compatibility shim should be provided
## Context
Data from [maven4-testing](https://github.com/gnodet/maven4-testing) run
#13307 testing `maven-4.0.x` against all Apache projects. All 7 projects build
successfully with Maven 3.9.9.
--
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]