You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/10/04 13:09:21 UTC

[PR] Put module-info.class in the jar root instead of a multi-release jar [poi]

pjfanning opened a new pull request, #1365:
URL: https://github.com/apache/poi/pull/1365

   Now that Java 17 is the minimum, the module descriptor no longer needs to be hidden from Java 8 under `META-INF/versions/9` in a multi-release jar.
   
   - `module-info.class` goes in the jar root. The `Multi-Release` and (redundant) `Automatic-Module-Name` manifest attributes are dropped. `poi-integration`'s main jar keeps `Automatic-Module-Name` because it has no `module-info`.
   - `src/*/java9/module-info.java` moves to `src/*/jpms/module-info.java`.
   - Gradle: the copy-pasted `compileJava9`/`compileTest9` tasks become `compileModuleInfo`/`compileTestModuleInfo`. They are registered through a shared `registerModuleInfoCompile` helper in the root `build.gradle` that uses `release 17` and the project toolchain. The `Math.max(17, jdkVersion)` toolchain and source/target overrides are gone, and so is the duplicated toolchain block in `poi-ooxml-lite-agent`.
   - `verifyModuleInfoPresent` now requires a root `module-info.class` and fails on a `versions/9` one.
   - Ant: `module-info` is compiled into `build/` instead of into `src/`, so the `.gitignore` rule for it goes away. The descriptor goes in the jar root, and the unused `maven-jar` macro is removed. `clean` now also removes the `poi-ooxml-lite` and `poi-ooxml-lite-agent` build dirs.
   
   Checked locally:
   - `./gradlew jar testJar verifyModuleInfoPresent` passes. Every modular jar, main and tests, has exactly one root `module-info.class` (class version 61), no `versions/9` entry and no `Multi-Release` attribute. Test jars carry the test descriptor.
   - Module-path test runs pass for `poi-excelant` (all tests) and for single test classes in `poi`, `poi-ooxml` and `poi-scratchpad`.
   - `ant clean jar` builds every jar up to `compile-ooxml-lite` with the same jar layout. That target then stopped on a font-metric autosize assertion that fails on my machine regardless of this change. The Ant ooxml-lite and integration jars are left for CI to confirm.
   
   🤖 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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [PR] Put module-info.class in the jar root instead of a multi-release jar [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #1365:
URL: https://github.com/apache/poi/pull/1365


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [PR] Put module-info.class in the jar root instead of a multi-release jar [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning closed pull request #1365: Put module-info.class in the jar root instead of a multi-release jar
URL: https://github.com/apache/poi/pull/1365


-- 
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: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org