Easy multirelease jars
Russell Gold
2018-04-03 19:49:34 UTC
have just developed a new and easier way for building MR Jars <https://github.com/meterware/multirelease-parent>, while waiting for the capability to be built into Maven.

This approach is not only simple to set up (just use the designated parent POM, if you can), it lets you unit test for any supported JDK. For example:

jdk7 && mvn -Dmulti_release clean test
jdk10 && mvn -Dmulti_release clean test

where jdk7 and jdk10 set the appropriate versions for maven to use. Either will run against the appropriate additional code.

To build an MR JAR you set a property on the command line

mvn -Dmulti_release clean install

which happens automatically when doing a release.

I have also explained how it works at Easier Than It Looks <http://www.russgold.net/sw/2018/04/easier-than-it-looks/>
Continue reading on narkive: