GeezerVison is showing github.com — Add module-info.java for JPMS support using multi-release JAR by Copilot · Pull Request #90 · codehaus-plexus/plexus-interpolation
Conversation
Copilot
AI
commented
Nov 1, 2025
•
edited by slachiewicz
Loading
Uh oh!
There was an error while loading. Please reload this page.
Adds Java Platform Module System (JPMS) support via module-info.java while maintaining Java 8 compatibility using a multi-release JAR approach.
Changes
-
Created src/main/java9/module-info.java: Declares module org.codehaus.plexus.interpolation with exports for all 7 public packages (interpolation, fixed, multi, object, os, reflection, util)
-
Updated pom.xml: Added a java9+ Maven profile that activates on JDK 9+ using multi-release JAR (MRJAR) approach:
- Profile activates automatically when building with JDK 9 or higher via
<jdk>[9,)</jdk>
compile-java9: Compiles module-info.java from src/main/java9/ with Java 9 and places it in META-INF/versions/9/
maven-jar-plugin: Configured to add Multi-Release: true to MANIFEST.MF
- When building with JDK 8, the profile is inactive and module-info.java is skipped
- No JDK toolchain configuration required
Result: When built with JDK 9+, a multi-release JAR is created with module-info.class in META-INF/versions/9/ (bytecode version 53) and all other classes remain Java 8 (bytecode version 52). When built with JDK 8, only Java 8 classes are produced. OSGi Bundle metadata in MANIFEST.MF unchanged.
module org.codehaus.plexus.interpolation {
exports org.codehaus.plexus.interpolation;
}
Original prompt
This section details on the original issue you should resolve
<issue_title>Add/generate module descriptor</issue_title>
<issue_description>this project has no dependencies and the manifest already contains Bundle info, so it should be a small step to also have the module-info.java</issue_description>
Comments on the Issue (you are @copilot in this section)
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Copilot
AI
changed the title
[WIP] Add module descriptor to project
Add module-info.java for JPMS support
Nov 1, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Copilot
AI
changed the title
Add module-info.java for JPMS support
Add module-info.java for JPMS support using multi-release JAR
Nov 1, 2025
Comment on lines
+2
to
+8
|
|
exports org.codehaus.plexus.interpolation;
|
|
|
exports org.codehaus.plexus.interpolation.fixed;
|
|
|
exports org.codehaus.plexus.interpolation.multi;
|
|
|
exports org.codehaus.plexus.interpolation.object;
|
|
|
exports org.codehaus.plexus.interpolation.os;
|
|
|
exports org.codehaus.plexus.interpolation.reflection;
|
|
|
exports org.codehaus.plexus.interpolation.util;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rfscholte @slachiewicz do we need export all packages ....?
eg org.codehaus.plexus.interpolation.os look like internal one?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my hope was only org.codehaus.plexus.interpolation;
however, a quick scan through the Maven codebase:
DefaultToolchainsBuilderTest uses org.codehaus.plexus.interpolation.os.OperatingSystemUtils
PathTranslatingPostProcessor uses org.codehaus.plexus.interpolation.util.ValueSourceUtils
as long as Maven is not using the modulepath that's not an issue.
I would probably go for only org.codehaus.plexus.interpolation and investigate if there are requests for opening more packages
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Removed multiple exports from the module definition.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Add/generate module descriptor
Uh oh!
There was an error while loading. Please reload this page.
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.
|