Skip to content

[MNG-12984] Backport: Fix invalid Automatic-Module-Name entries in mvnup plugin upgrades - #13013

Merged
gnodet merged 1 commit into
maven-4.0.xfrom
backport/12995-to-maven-4.0.x
Sep 2, 2026
Merged

[MNG-12984] Backport: Fix invalid Automatic-Module-Name entries in mvnup plugin upgrades#13013
gnodet merged 1 commit into
maven-4.0.xfrom
backport/12995-to-maven-4.0.x

Conversation

@gnodet

@gnodet gnodet commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Backport of #12995 to maven-4.0.x.

Summary

Add ModuleNameFixStrategy (Priority 12) that scans packaging plugin configurations for Automatic-Module-Name manifest entries containing hyphens and replaces them with dots. Since maven-archiver 3.3.0 (MSHARED-773), the archiver validates module names via SourceVersion.isName() and rejects hyphens. When mvnup upgrades maven-jar-plugin to versions using the newer archiver, previously-unchecked invalid names surface as build failures.

Cherry-picked cleanly from 799c1ad — no conflicts.

Closes #12984

… upgrades

Add ModuleNameFixStrategy (Priority 12) that scans packaging plugin
configurations for Automatic-Module-Name manifest entries containing
hyphens and replaces them with dots. Since maven-archiver 3.3.0
(MSHARED-773), the archiver validates module names via
SourceVersion.isName() and rejects hyphens. When mvnup upgrades
maven-jar-plugin to versions using the newer archiver,
previously-unchecked invalid names surface as build failures.

The strategy handles jar, war, ejb, ear, rar, and shade plugins
across build/plugins, pluginManagement, and profiles. Property
references (${...}) are skipped since they cannot be resolved
statically.

Closes #12984
@gnodet gnodet added this to the 4.0.0-rc-7 milestone Sep 2, 2026
@gnodet gnodet added enhancement New feature or request backport labels Sep 2, 2026
@gnodet gnodet self-assigned this Sep 2, 2026
@gnodet
gnodet merged commit ef8550b into maven-4.0.x Sep 2, 2026
24 checks passed
@gnodet
gnodet deleted the backport/12995-to-maven-4.0.x branch September 2, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant