gnodet opened a new pull request, #12554:
URL: https://github.com/apache/maven/pull/12554
## Summary
- Bumps Eclipse Sisu from 1.0.1 to 1.1.0 (addresses PRs #12551 and #12552)
- Fixes extension realm visibility so that Sisu 1.1.0's new JSR330 bean
filtering works correctly with Maven's ClassRealm hierarchy
## Root Cause
Sisu 1.1.0 introduces `jsr330ComponentVisibilityFollowsPlexusVisibility` (on
by default), which filters beans based on ClassRealm visibility via
`RealmManager.computeVisibleNames()`. This BFS traversal walks parent and
import realms from the current TCCL.
**The problem:** Extension realms have `plexus.core` as their parent, but
beans discovered in the container are sourced from the `maven.ext` realm. Since
extension realms had no import relationship to `maven.ext`, the BFS traversal
from an extension realm produces `{extension_realm, plexus.core}` — missing
`maven.ext` entirely.
**When it breaks:** During lifecycle callbacks (e.g., Mimir extension),
`DefaultMaven.callListeners()` sets TCCL to the extension's ClassRealm. If the
callback triggers a Sisu dynamic map access (like `Map<String,
NameMapper>.get()`), `FilteredBeans` evaluates the visibility predicate with
the extension realm as context, finds `maven.ext` unreachable, and filters out
all container-sourced beans → `IllegalArgumentException: Unknown NameMapper
name`.
## Fix
Adds a reverse import from each extension realm to the container realm
(`maven.ext`), using the same `importFrom(realm, realm.getId())` pattern
already used for the forward direction. This makes `maven.ext` reachable in
Sisu's visibility BFS, so container-sourced beans remain visible when TCCL is
an extension realm.
This works **with** Sisu 1.1.0's filtering feature (not against it) — the
realm visibility graph is corrected to reflect the actual relationship between
extension and container realms.
## Verified
- ✅ Full `mvn verify` passes with Sisu 1.1.0 (595+ tests, 0 failures)
- ✅ Build succeeds with Mimir extension (`~/.m2/extensions.xml`)
- ✅ Mimir lifecycle callbacks work correctly (no NameMapper errors)
## Test plan
- [x] `mvn verify -Dversion.sisu-maven-plugin=1.1.0` passes locally
- [x] Build test project with Mimir extension enabled — BUILD SUCCESS
- [ ] CI build passes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]