maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] [Commented] (MCOMPILER-323) Support multi-release jars
Date Thu, 17 May 2018 18:51:00 GMT


Robert Scholte commented on MCOMPILER-323:

I've been inspired by Russels
while improving and it works
quite well. There's only one huge BUT: the fix for plexus-languages works because we have
a Travis CI-server which verifies multiple Java versions. And this also means that the unittests
are verified for a specific Java version as well. Downside: IDE doesn't understand it and
sees it as a duplicate class.
Please take a look at the blog and see what matches your situation best.
Creating mrjars will be complex and should be avoided. However, if you need it we should be
able to configure several execution blocks properly to reach the goal. I'm still interested
in the solutions others have. And this should be possible without buildhelper-maven-plugin,
just maven-compiler-plugin and execution-blocks (and ignore the testing part, that's an issue
for another plugin)

> Support multi-release jars
> --------------------------
>                 Key: MCOMPILER-323
>                 URL:
>             Project: Maven Compiler Plugin
>          Issue Type: Improvement
>            Reporter: Mike Drob
>            Priority: Major
> Java 9 allows for JRE version specific code in the form of "multi-release jars"
> Older JREs will treat them as normal jars, while newer JREs will load the appropriate
specific classes. AFAICT, maven does not currently support this.
> Compiler plugin should automatically detect when there are multiple source levels and
set MRJAR=True in the manifest.
> Source directories could potentially be src/main/java, src/main/java9, src/main/java10,
etc. These probably need to be configurable as well, or some deeper discussion about what
makes sense and is intuitive for users.

This message was sent by Atlassian JIRA

View raw message