gnodet opened a new issue, #13465: URL: https://github.com/apache/maven/issues/13465
Part of #13460 — Migrate Maven internals from v3 to v4 API ## Context The plugin system (~28 files) handles plugin resolution, class realm creation, caching, and mojo configuration. It operates entirely on v3 types, with plugin caches keyed on v3 `Artifact`. **Important**: The plugin-facing API (`AbstractMojo`, `Mojo`, `PluginDescriptor`, `MojoDescriptor`) stays in `compat/maven-plugin-api` and is not changed by this migration. This issue is about the **internal** plugin management machinery. ## Goal Migrate internal plugin resolution, caching, and management to v4 types. ## Key files **Plugin management:** - `DefaultMavenPluginManager` (heavy v3 usage — MavenProject, MavenSession, v3 Artifact) - `DefaultBuildPluginManager` - `PluginParameterExpressionEvaluator` **Caches (keyed on v3 Artifact):** - `PluginRealmCache` / `DefaultPluginRealmCache` - `PluginArtifactsCache` / `DefaultPluginArtifactsCache` - `ExtensionRealmCache` / `DefaultExtensionRealmCache` **Validation:** - `DefaultMavenPluginValidator` - `PluginDescriptorRequirementsValidator` - `DeprecatedPluginValidator` **Legacy bridge:** - `LegacySupport` / `DefaultLegacySupport` ## Approach 1. Re-key plugin caches to use v4 `Artifact` (or `ArtifactCoordinates`) 2. Migrate `DefaultMavenPluginManager` to work with v4 `Session`, `Project` 3. Update `PluginParameterExpressionEvaluator` to resolve against v4 session/project 4. `LegacySupport` may be simplified or deprecated once session is inverted ## Dependencies - Benefits from Session (#13462) and Project Builder (#13461) inversions - Should be done after or alongside Lifecycle (#13464) ## Complexity High. The plugin system sits at the boundary between Maven internals and the plugin-facing API. _Claude Code on behalf of Guillaume Nodet_ -- 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]
