Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MCOMPILER-534] Document conditional setting of the --release property #187

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/site/apt/examples/set-compiler-release.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,29 @@ Setting the <<<--release>>> of the Java Compiler
since Java 9. As such, the release number does not start with 1.x anymore. Also note that the
supported <<<release>>> targets include the release of the currently used JDK plus a limited number
of previous releases.

* Usage on JDK 8

The <<<--release>>> option is not supported using JDK 8. To enable a project that targets Java 8
to be built using JDK 8 and also JDK 9 or later requires the conditional usage of the
<<<--release>>> option. This may be done through the use of a profile:

+-----
<project>
[...]
<profiles>
[...]
<profile>
<id>set-compiler-release</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
[...]
</profiles>
[...]
</project>
+-----