My current task is to ensure a given Java project runs on Java (JRE) from version 6 to version 9. Is there any ways to do this with Maven?
I guess configuring maven-compilter-plugin is part of it. Should it be
<source>1.6</source>
to ensure no higher version features are used? And what about <target>
?
And which Java version should Maven run with? Java 9?
The animal-sniffer-maven-plugin also looks interesting, but not sure how it fits here. It's also difficult, because Java 6 is not really the minimum API, as AFAIK it has some classes Java 9 has not (e.g. some from the sun and com.sun packages).
What else? Has anyone done this already?