2018-04-03 19:49:34 UTC
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/>