gnodet opened a new pull request, #13531: URL: https://github.com/apache/maven/pull/13531
## Summary Generalizes the project-extension visibility fix from #13319 (which only addressed `PackagingProvider`) into a generic mechanism that benefits all extensible enum registries. SISU visibility filtering only works with explicit runtime lookups, not constructor injection. Project extensions are bound to a project's classloader, so constructor-injected provider lists miss them. This was the root cause of #13306. ### Changes - **`DefaultExtensibleEnumRegistry`**: new constructor accepting `Lookup` and provider `Class`; `lookup()` queries `Lookup.lookupList()` dynamically before falling back to constructor-injected/built-in values. Registries that don't need dynamic lookup (PathScope, ProjectScope, Language) are unaffected. - **`DefaultPackagingRegistry`**: delegates to the generic mechanism via `super(lookup, PackagingProvider.class, providers)`; only overrides `lookup()` for the legacy `LifecycleMapping` fallback. - **`DefaultTypeRegistry`**: dynamic `TypeProvider` lookup is now performed uncached before the `ConcurrentHashMap` fallback, so project-extension types don't leak across reactor projects. - **`DefaultLifecycleRegistry`**: `stream()` merges constructor-injected providers with dynamically discovered ones via `Lookup`, deduplicating by lifecycle id. Supersedes #13319. Closes #13306. ## Test plan - [x] 6 unit tests for the generic `DefaultExtensibleEnumRegistry` mechanism (dynamic lookup, priority, non-retention across projects, fallback) - [x] 4 unit tests for `DefaultPackagingRegistry` (dynamic provider, scoping correctness, constructor-injected, legacy fallback) - [x] 3 unit tests for `DefaultTypeRegistry` (dynamic provider, non-retention across projects, legacy ArtifactHandler fallback) - [x] Full `maven-impl` + `maven-core` test suites pass (737 tests, 0 failures) - [ ] Core IT validation with the packaging-provider extension from #13319 🤖 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]
