Skip to content

Put multi-release sibling output directories on the module path - #1139

Draft
slachiewicz wants to merge 1 commit into
maven-compiler-plugin-3.xfrom
agent/mr-sibling-module-path
Draft

slachiewicz wants to merge 1 commit into
maven-compiler-plugin-3.xfrom
agent/mr-sibling-module-path

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Fixes #1137. A reactor sibling built with multiReleaseOutput has its module-info.class only under META-INF/versions/<N> until it is packaged, and javac reads an exploded module only from its root. Such a directory is now replaced on the module path by its versioned descriptor directory and patches its module with --patch-module, in both compile and testCompile, so mvn compile and mvn test work without package.

Depends on codehaus-plexus/plexus-languages#236, which lets plexus-java recognise the directory as a module; plexus-java.version gets bumped to that release before this leaves draft. The descriptor version follows release, then target; making plexus-java use the same version is #1138.

Verified against plexus-java 1.6.1-SNAPSHOT: mvn -Prun-its verify → 81 ITs pass; the new IT fails with module not found without the change.

javac reads an exploded module only from its root, so the META-INF/versions/<N> directory goes on the module path and the output directory patches the module. Needs plexus-java with codehaus-plexus/plexus-languages#236.
@slachiewicz slachiewicz added bug Something isn't working 3.x labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant