Repository navigation
Put module-info.class in the jar root instead of a multi-release jar - #128
Merged
Merged
Conversation
Java 17 is now the minimum, so the module descriptor no longer needs to be hidden from Java 8 under META-INF/versions/9. - move src/main/java9/module-info.java to src/main/jpms - replace compileJava9 with compileModuleInfo (release 17, project toolchain) and rename the java9 configuration to jpms - drop the Multi-Release manifest attribute (Gradle and Ant) - fix the Ant build, which compiled from the missing src/main/multimodule/java9 directory - the javax.xml.catalog based MavenPluginResolver replaces the Java 8 one, so the com.sun.org.apache.xml.internal:resolver dependency goes - ignore javax.xml.catalog in animalsniffer (maven plugin only) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Now that Java 17 is the minimum, the module descriptor no longer needs to be hidden from Java 8 under
META-INF/versions/9in a multi-release jar. This mirrors apache/poi#1365.module-info.classgoes in the jar root and theMulti-Releasemanifest attribute is dropped.src/main/java9/module-info.javamoves tosrc/main/jpms/module-info.java, and the sources jar now includes it.compileJava9becomescompileModuleInfo, which usesrelease 17and the project toolchain instead of its ownjdkVersiontoolchain. Thejava9configuration (the module path, kept separate so the maven plugin dependencies stay off it) is renamed tojpms.src/main/multimodule/java9, which no longer exists. It now compilessrc/main/jpmsintobuild/classes-jpmsand puts the descriptor in the jar root.src/main/java9also had a Java 9+MavenPluginResolverbased onjavax.xml.catalog. It replaces the Java 8 version, which used the JDK-internalcom.sun.org.apache.xml.internal.resolverAPI. Supported JDKs already ran thejavax.xml.catalogversion, so the maven plugin behaves as before. Thecom.sun.org.apache.xml.internal:resolverdependency is removed from Gradle, Ant and the bundled plugin POM.javax.xml.catalog.*, which Android lacks. Only the maven plugin uses it.Checked locally:
./gradlew jar sourcesJar animalsnifferMain forbiddenApisMainpasses.module-info.class(class version 61), noversions/9entries and noMulti-Releaseattribute.jar --describe-modulereportsorg.apache.xmlbeans.🤖 Generated with Claude Code