zrlw commented on issue #990: URL: https://github.com/apache/maven-compiler-plugin/issues/990#issuecomment-3496149233
> Hi [@zrlw](https://github.com/zrlw) - could you confirm you understand there are two options `--target` and `--release` for `javac` that serve different purpose and act differently? https://github.com/apache/maven-compiler-plugin/blob/master/src/site/markdown/examples/set-compiler-release.md?plain=1#L20 ``` Starting with JDK 9, the `javac` executable can accept the `--release` option to specify against which Java SE release you want to build the project. For example, you have JDK 17 installed and used by Maven, but you want to build the project against Java 11. The `--release` option ensures that the code is compiled following the rules of the programming language of the specified release, and that generated classes target the release as well as the public API of that release. This means that, unlike the old `--source` and `--target` options, the compiler will detect and generate an error when using APIs that don't exist in previous releases of Java SE. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
