gnodet opened a new pull request, #13494: URL: https://github.com/apache/maven/pull/13494
## Summary Builds on #13490 (internalize plexus-classworlds) and is independent of #13491 (JLine module-path). - Plugins can opt into JPMS module loading via `<modular>true</modular>` in their plugin descriptor - Plugin JARs and dependencies are placed on the module path and resolved into an isolated per-plugin `ModuleLayer` via `Configuration.resolveAndBind()` + `defineModulesWithOneLoader()` - No fallback to classpath loading — a modular plugin that cannot be resolved as a module causes a hard `ModuleLayerCreationException` - `ClassRealm` gains `getModuleLayer()`, `isModular()`, `addExports()`, `addOpens()` for module access control - `META-INF/maven/module-access` descriptors let classpath plugins declare `add-exports`/`add-opens`/`add-reads` declaratively - `PluginRealmCache` keys encode the `modular` flag to avoid cache collisions ## Test plan - [ ] Classpath plugins continue to work unchanged - [ ] A plugin with `<modular>true</modular>` and valid `module-info.class` loads in its own `ModuleLayer` - [ ] A modular plugin with split packages fails with `ModuleLayerCreationException` - [ ] Cache correctly differentiates modular vs classpath entries for the same plugin coordinates 🤖 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]
