A multi-release jar maybe better, if no extra classes for Java 9+
rwperrott opened this issue · 1 comments
rwperrott commented
There are reliable ways to build multi-release jars in Maven, leveraging user-profile .m2 toolchains.xml:
- (https://github.com/meterware/multirelease-parent/blob/master/pom.xml), for which I've copied the useful bits to my parent pom and it works fine, with some property tweaks for java version and toolchain values in the parent and child poms.
- (https://github.com/metlos/multi-release-jar-maven-plugin), I haven't tried this yet, but it maybe a better solution.
lukaseder commented
Thank you very much for your suggestion. We've considered it at the time but opted for releasing separate jars in all our products, some of which still supporting Java 6. Switching now would add substantial busywork with little value