A Maven module's Java level was taken from the maven.compiler.release, java.version, maven.compiler.source and maven.compiler.target properties before the compiler plugin's configuration. With spring-boot-starter-parent (java.version 17) and <release>21</release> in the module's maven-compiler-plugin, the model said 17, so Maven and javac got JDK 17 and the build failed with "release version 21 not supported".
The level is now read the way maven-compiler-plugin hands it to javac: release before source and target, and the plugin's configuration (merged element by element through parents, <pluginManagement> and active profiles) before the maven.compiler.* property it defaults to. java.version is read only while the parent that passes it on is not in the local repository yet. ide-sdk's JDK pick follows the same order.
Co-authored-by: ntbang0901 <[email protected]>