Skip to content

fix(jpms): align Automatic-Module-Name with module-info names - #401

Open
arimu1 wants to merge 1 commit into
failsafe-lib:masterfrom
arimu1:fix/jpms-automatic-module-name-386
Open

fix(jpms): align Automatic-Module-Name with module-info names#401
arimu1 wants to merge 1 commit into
failsafe-lib:masterfrom
arimu1:fix/jpms-automatic-module-name-386

Conversation

@arimu1

@arimu1 arimu1 commented Aug 15, 2026

Copy link
Copy Markdown

Summary

  • Use ${java.module.name} for the Automatic-Module-Name manifest entry instead of the hardcoded dev.failsafe, so each artifact gets a distinct module name on the module path.
  • Add ModuleManifestTest in core, okhttp, and retrofit to guard against regressions.

Problem

All Failsafe jars previously declared Automatic-Module-Name: dev.failsafe in their manifest, while moditect injects multi-release module-info with names like dev.failsafe.core, dev.failsafe.okhttp, and dev.failsafe.retrofit. When used on the JPMS module path this mismatch can cause split-package conflicts and NoClassDefFoundError for types such as dev.failsafe.Policy (see #386).

Test plan

  • mvn -pl core test -Dtest=ModuleManifestTest
  • mvn -pl modules/okhttp,modules/retrofit -am test -Dtest=ModuleManifestTest
  • Verified packaged jars expose Automatic-Module-Name: dev.failsafe.core|okhttp|retrofit

Fixes #386

Use each module's java.module.name property for the manifest entry so
core, okhttp, and retrofit no longer share dev.failsafe on the module path.

Fixes failsafe-lib#386
@arimu1
arimu1 force-pushed the fix/jpms-automatic-module-name-386 branch from d2247ec to 909c759 Compare August 15, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.lang.NoClassDefFoundError: dev/failsafe/Policy in java modul

1 participant