Le 24/10/2025 à 01:57, Polarian a écrit :

A little side question then, is there any benefit of setting the target
Java version within the maven compiler plugin or is it just best to
always use JAVA_HOME to decide (as the JDK version will the default
version)?

I would suggest to set the target Java version instead, and use JAVA_HOME only in last resort. It is not only easier, but may also be safer since the compiler of old releases may have unfixed issues if unmaintained (e.g., javadoc generating HTML pages with a vulnerability in the JavaScript code). If a project cannot compile or run without a specific JAVA_HOME, it is probably because they are using internal API, which is a deprecated practice and normally not allowed anymore if they were using the Java Module system.

    Martin



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to