GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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.

Copy link
Copy Markdown
Contributor

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;
}
  • Fixes Add/generate module descriptor #89
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)

  • Fixes Add/generate module descriptor #89

💡 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.

All reactions
Copilot AI self-assigned this Nov 1, 2025
Initial plan
1b7b3c3
Copilot AI assigned slachiewicz Nov 1, 2025
Copilot AI and others added 2 commits November 1, 2025 09:33
@slachiewicz
Add module-info.java and configure multi-release compilation
f5f1f07
Co-authored-by: slachiewicz <[email protected]>
@slachiewicz
Explicitly set release=8 in base-compile execution for clarity
a5f41f8
Co-authored-by: slachiewicz <[email protected]>
Copilot AI changed the title [WIP] Add module descriptor to project Add module-info.java for JPMS support Nov 1, 2025
Copilot AI requested a review from slachiewicz November 1, 2025 09:37
slawekjaranowski
slawekjaranowski reviewed Nov 1, 2025
View reviewed changes
Comment thread pom.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

slawekjaranowski
slawekjaranowski reviewed Nov 1, 2025
View reviewed changes
Comment thread pom.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski
Move module compilation to java9+ profile activated on JDK 9+
793c207
Co-authored-by: slawekjaranowski <[email protected]>
Copilot AI requested a review from slawekjaranowski November 1, 2025 09:48
slawekjaranowski
slawekjaranowski reviewed Nov 1, 2025
View reviewed changes
Comment thread src/main/java9/module-info.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski
Move module-info.java to src/main/java9 for multi-release JAR
37ac139
Co-authored-by: slawekjaranowski <[email protected]>
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
Copilot AI requested a review from slawekjaranowski November 1, 2025 09:59
slawekjaranowski
slawekjaranowski reviewed Nov 1, 2025
View reviewed changes
Comment thread src/main/java9/module-info.java Outdated
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;

@slawekjaranowski slawekjaranowski Nov 1, 2025

Copy link
Copy Markdown
Member

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.

All reactions

@rfscholte rfscholte Nov 1, 2025

Copy link
Copy Markdown
Member

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.

All reactions
@slachiewicz
slachiewicz marked this pull request as ready for review November 1, 2025 22:56
@slachiewicz
Remove unnecessary exports from module-info.java
298285e
Removed multiple exports from the module definition.
slawekjaranowski
slawekjaranowski approved these changes Nov 3, 2025
View reviewed changes
@slachiewicz
slachiewicz merged commit a414fed into master Nov 3, 2025
@slachiewicz
slachiewicz deleted the copilot/add-module-descriptor branch November 3, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rfscholte rfscholte rfscholte left review comments
@slawekjaranowski slawekjaranowski slawekjaranowski approved these changes
@slachiewicz slachiewicz Awaiting requested review from slachiewicz

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@slachiewicz slachiewicz

Copilot code review Copilot

Labels

None yet

Projects

None yet

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.

4 participants

@rfscholte @slawekjaranowski @slachiewicz
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.