Skip to content

Commit

Permalink
[MCOMPILER-534] Document conditional setting of the --release property
Browse files Browse the repository at this point in the history
This closes #187
  • Loading branch information
aherbert authored and michael-o committed May 1, 2023
1 parent 546a322 commit 6dfe7f9
Showing 1 changed file with 26 additions and 0 deletions.
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>
+-----

0 comments on commit 6dfe7f9

Please sign in to comment.