Introduce javaVersion property for maven.compiler.* configuration#551
Conversation
|
as follow of: and suppress for: |
| <!-- https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html, affects m-compiler-p and m-javadoc-p --> | ||
| <maven.compiler.release>8</maven.compiler.release> | ||
| <minimalJavaBuildVersion>${maven.compiler.release}</minimalJavaBuildVersion> | ||
| <maven.compiler.release>${javaVersion}</maven.compiler.release> |
There was a problem hiding this comment.
I wish I had reviewed this prior to release. This profile should set all 3. Some plugins still read maven.compiler.source and/or maven.compiler.target (formatting tools, static analysis tools, etc.) Not all plugins have been updated to know about maven.compiler.release and use it as an alternative. It was really convenient to have these set in one spot in the parent POM. Now that they are removed, they need to be added to every child POM to avoid breaking any builds using plugins that don't use maven.compiler.release.
There was a problem hiding this comment.
Also, the premise of this PR was a bit misleading: users already could set all three with one property in apache-35. They only needed to set maven.compiler.target. That's not ideal, and having the single javaVersion property is certainly better (though I prefer all lowercase, java.version or similar), but I still think the profile for 9+ should set all 3.
There was a problem hiding this comment.
I opened #569 to implement my suggestion to keep the source and target properties in the jdk9+ profile.
child projects can simply override only one property, without additional profiles