by oftenwrong · 4y ago · 0 comments
1. For selecting the correct JDK to use with standard plugins, including the compiler plugin, there's support for toolchains:
https://maven.apache.org/guides/mini/guide-using-toolchains....
2. For ensuring Maven itself is run with the correct JDK, it is a commom recommendation to use the Enforcer plugin to specify the required JDK version and/or vendor, as well as the Maven version:
https://maven.apache.org/enforcer/enforcer-rules/index.html
3. It is increasingly common to use Maven Wrapper to supply Maven, which you seem to be aware of.
4. Maven will run with the JDK pointed to by JAVA_HOME, of course.
No comments yet.