gnodet opened a new pull request, #12973: URL: https://github.com/apache/maven/pull/12973
## Summary - **Share Maven 4 API Session** across all strategy instances via DCL singleton, enabling the `RequestCache` to deduplicate effective model builds across `PluginUpgradeStrategy`, `ToolchainPluginStrategy`, and `CompatibilityFixStrategy` - **Route `buildEffectiveModel()` through `InternalSession.request()`** to leverage the `RequestCache` — identical `ModelBuilderRequest` objects (same POM path) return cached results - **Add effective model fallback** in `ToolchainPluginStrategy`: when the local POM XML has no `--source`/`--release` config, resolve the fully-inherited effective model to detect compiler settings from parent POMs (e.g. `org.apache.sling:sling-parent` setting `--source 6`) - **8 new tests** for effective model source level detection (properties, plugin config, pluginManagement, precedence rules) ## Problem When a project inherits `--source 6` from a remote parent POM, `mvnup`'s `ToolchainPluginStrategy` said "No source level configured" and skipped adding the toolchains plugin. This caused Maven 4 build failures because: 1. `detectSourceLevel()` only inspected the local POM XML DOM 2. Inherited compiler configuration from parent POMs was invisible to the strategy ## Test plan - [x] All 28 `ToolchainPluginStrategyTest` tests pass - [x] All 510 mvnup tests pass (1 pre-existing unrelated error in `PluginUpgradeCliTest`) - [ ] 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]
