gnodet commented on PR #12551: URL: https://github.com/apache/maven/pull/12551#issuecomment-5096420395
### Reproduced Locally **Setup**: Built Maven from master with Sisu 1.1.0, extracted the distribution, tested with/without Mimir extension. **Without Mimir** → ✅ BUILD SUCCESS. NameMapper discovery works fine. **With Mimir, daemon JAR cached** → ✅ BUILD SUCCESS, but the warning appears: ``` [WARNING] Failed to resolve daemon: Unknown NameMapper name: 'file-gaecv', known ones: [] ``` (Build passes only because Mimir skips resolution when the daemon JAR already exists on disk.) **With Mimir, daemon JAR removed** (= CI's fresh runner state) → ❌ Exact CI error reproduced: ``` [ERROR] Error enabling Mimir: java.io.IOException: Mimir daemon JAR not found ``` **Same test with Sisu 1.0.1** → ✅ Resolves daemon JAR, starts daemon, BUILD SUCCESS. ### Why Maven 3.10.x passes Sisu 1.1.0 was merged to `maven-3.10.x` (#12547) and CI is green — but the 3.10.x CI **doesn't use Mimir**. So the extension realm filtering path is never exercised. ### Debug output reveals the mechanism With `-X`, the debug log shows NameMapper discovery works during initial container setup but fails during Mimir's lifecycle: **Phase 1 (initial container, TCCL = container realm):** ``` available name mappers [discriminating, file-gaecv, file-gav, file-hgaecv, file-hgav, file-static, gaecv, gav, static] ``` **Phase 2 (Mimir lifecycle, TCCL = extension realm via `callListeners()` line 376):** ``` Unknown NameMapper name: 'file-gaecv', known ones: [] ``` ``` at NamedLockFactoryAdapterFactoryImpl.selectNameMapper(line 158) at NamedLockFactoryAdapterFactoryImpl.createAdapter(line 129) at NamedLockFactoryAdapterFactoryImpl.lambda$getAdapter$0(line 122) at DefaultSessionData.lambda$computeIfAbsent$0(line 71) ``` The `Map<String, NameMapper>` in `NamedLockFactoryAdapterFactoryImpl` is a **lazy supplier** (via `SisuDiBridgeModule.getMapSupplier()`). It's first evaluated inside `DefaultSessionData.computeIfAbsent` during Mimir's `afterSessionStart`. At that point, TCCL = Mimir's `ClassRealm`, and Sisu 1.1.0's `FilteredBeans` hides all core NameMapper beans. -- 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]
