Compile Java 11 artifacts with --release - #2033
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Maven compiler configuration in pom.xml to use the <maven.compiler.release> property instead of the separate <maven.compiler.source> and <maven.compiler.target> properties. I have no further feedback to provide as there are no review comments.
jeandersonbc
left a comment
There was a problem hiding this comment.
Hey @gregjotau, thank you not only for raising the issue but providing this PR (along with the Maven reference). We appreciate your time checking it! I also just verified myself for the warning (mvn clean compile) and using the release option. Changes look good to me!
|
Great, we integrate Adyen into reai.no (accounting system) now and we want to contribute and improve all third party libraries we use. Especially important for us that dependencies are modularised in such a way that we bring in as little surface as possible :) thanks @jeandersonbc ! |
Closes #2032.
Replace the separate Java source/target settings with
maven.compiler.release=11. This preserves the Java 11 bytecode and language baseline while also preventing accidental linkage to JDK APIs introduced after Java 11.Verification:
mvn clean test -DskipITs[debug release 11]system modules ... -source 11warning is gone