Add a real JPMS module descriptor: com.github.zrdj.java.properties - #18
Merged
Conversation
The published jar carries neither module-info.class nor an Automatic-Module-Name manifest entry (checked against jitpack.io/.../java-properties-0.2.1.jar). Absent both, the automatic module name javac derives from the jar filename is "java.properties", which sits in the reserved java.* namespace and a named consumer module cannot requires. tibbots/bots just cut itself into five named JPMS modules and needs to requires this library by name, so this is not precautionary. - src/main/java/module-info.java: module com.github.zrdj.java.properties (matches the root package), requires org.slf4j, exports all four packages that exist (com.github.zrdj.java.properties, .error, .naming, .store) -- every class in the source tree is already public, so nothing is held back. - pom.xml: version 0.2.0 -> 0.3.0. Catches up to the already-tagged 0.2.1 (see docs/project/research/2026-09-01-readme-vs-code-drift.md) and goes one further, since this is source-incompatible for JPMS consumers, not a patch. maven.compiler.source/target stay at 11 -- maven-compiler-plugin 3.15.0 auto-detects module-info.java and compiles it under source/target 11 without needing <release>. - docs/project/decisions/2026-09-07-real-module-descriptor-instead-of-automatic-name.md: records the trigger and the export/requires reasoning. Verified in the devcontainer: ./dev build, ./dev test (32 tests green), ./dev check (traceability chain intact), and `jar --describe-module` against the packaged jar confirms the module name, both exports and requires org.slf4j. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6eipDXiCdfdMqoQL7g68v
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/main/java/module-info.java: modulecom.github.zrdj.java.properties(matches theroot package),
requires org.slf4j, exports all four packages that exist(
com.github.zrdj.java.properties,.error,.naming,.store) — every class in the sourcetree is already public, so nothing is held back.
pom.xml: version0.2.0->0.3.0. Catches up to the already-tagged0.2.1and goes onefurther, since this is source-incompatible for JPMS consumers, not a patch.
maven.compiler.source/targetstay at11—maven-compiler-plugin3.15.0 auto-detectsmodule-info.javaand compiles it under source/target 11 without needing<release>.docs/project/decisions/2026-09-07-real-module-descriptor-instead-of-automatic-name.md: recordsthe trigger and the export/requires reasoning.
Why ship a descriptor if the automatic name already works?
The published
0.2.1jar carries neithermodule-info.classnor anAutomatic-Module-Namemanifest entry, so the JPMS filename algorithm derives the automatic module name
java.properties— inside thejava.*namespace the JDK reserves for platform modules.Measured on 2026-09-07 against
tibbots/bots(five named JPMS modules, JDK 25): that name isnot rejected.
requires java.properties;compiles, the reactor builds all five modules, andthe packaged jar starts and shuts down cleanly. Maven emits only the generic automodule warning
that the same build already earns from
inject-1.0.0.jarandjavax.inject-1.jar. An earlierversion of this PR's decision note claimed the requires was rejected outright — that claim didn't
hold up once actually measured, and has been corrected.
The reason nothing breaks today is narrower than "it works": that consumer packages into a single
jar and starts from the classpath, where the runtime module system never resolves the name. A
module-path start, a
jlinkimage, or a JDK that tightens the check would turn a green build red,and nothing in either repo's test suite would catch it beforehand — the descriptor is the only
place the name appears. Shipping a real descriptor also reads as what it is:
requires com.github.zrdj.java.properties;names this library;requires java.properties;readslike a platform module.
Consequences
<dependency>with nomodule-info.javaof itsown) are unaffected — a modular jar keeps working unchanged when read from the classpath.
0.2.1keep working. This removes a latent problem, not a broken state —nothing is urgent about adopting it.
0.3.0only takes effect once this is mergedand a GitHub Release triggers the JitPack build — that decision is left to the maintainer.
Verified in the devcontainer:
./dev build(BUILD SUCCESS) and./dev test(32 tests green).🤖 Generated with Claude Code
https://claude.ai/code/session_01M6eipDXiCdfdMqoQL7g68v