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:58:51 UTC
[PR] Put module-info.class in the jar root instead of a multi-release jar [poi-xmlbeans]
pjfanning opened a new pull request, #128:
URL: https://github.com/apache/poi-xmlbeans/pull/128
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. This mirrors apache/poi#1365.
- `module-info.class` goes in the jar root and the `Multi-Release` manifest attribute is dropped.
- `src/main/java9/module-info.java` moves to `src/main/jpms/module-info.java`, and the sources jar now includes it.
- Gradle: `compileJava9` becomes `compileModuleInfo`, which uses `release 17` and the project toolchain instead of its own `jdkVersion` toolchain. The `java9` configuration (the module path, kept separate so the maven plugin dependencies stay off it) is renamed to `jpms`.
- Ant: the module-info compile pointed at `src/main/multimodule/java9`, which no longer exists. It now compiles `src/main/jpms` into `build/classes-jpms` and puts the descriptor in the jar root.
- `src/main/java9` also had a Java 9+ `MavenPluginResolver` based on `javax.xml.catalog`. It replaces the Java 8 version, which used the JDK-internal `com.sun.org.apache.xml.internal.resolver` API. Supported JDKs already ran the `javax.xml.catalog` version, so the maven plugin behaves as before. The `com.sun.org.apache.xml.internal:resolver` dependency is removed from Gradle, Ant and the bundled plugin POM.
- animalsniffer ignores `javax.xml.catalog.*`, which Android lacks. Only the maven plugin uses it.
Checked locally:
- `./gradlew jar sourcesJar animalsnifferMain forbiddenApisMain` passes.
- The jar has a single root `module-info.class` (class version 61), no `versions/9` entries and no `Multi-Release` attribute. `jar --describe-module` reports `org.apache.xmlbeans`.
- The Ant build was not run; tests are left to CI.
🤖 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-xmlbeans]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #128:
URL: https://github.com/apache/poi-xmlbeans/pull/128
--
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