gnodet opened a new pull request, #12995: URL: https://github.com/apache/maven/pull/12995
## Summary - Adds `ModuleNameFixStrategy` (Priority 12) that runs after plugin upgrades to fix invalid `Automatic-Module-Name` manifest entries - **Part 1:** Fixes existing `Automatic-Module-Name` entries containing hyphens by replacing them with dots (standard JDK convention) - **Part 2:** For jar-packaged modules with hyphenated artifactIds lacking an explicit `Automatic-Module-Name`, adds one with hyphens sanitized to dots — preventing `jar-plugin 3.5.0+` from auto-generating an invalid name ## Problem When `mvnup` upgrades `maven-jar-plugin` to 3.5.0, the plugin auto-generates `Automatic-Module-Name` from `groupId.artifactId`. If the artifactId contains hyphens (e.g. `integration-test`), the generated module name (`org.apache.geronimo.arthur.integration-test`) is invalid because Java module identifiers cannot contain hyphens. Affected projects: geronimo-arthur, karaf-winegrower, openwebbeans-meecrowave, atlas. ## Test plan - [x] 28 unit tests covering both fix scenarios (existing entries, missing entries) - [x] Tests for all affected projects from the issue (geronimo-arthur, karaf-winegrower, meecrowave) - [x] Edge cases: pom packaging (skipped), war packaging (skipped), non-hyphenated (skipped), parent groupId resolution, pluginManagement, profiles - [x] Existing `PluginUpgradeStrategyTest` and `CompatibilityFixStrategyTest` pass unchanged Fixes #12984 🤖 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]
