You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Geoffrey De Smet (JIRA)" <ji...@apache.org> on 2016/06/15 13:10:09 UTC
[jira] [Updated] (MCOMPILER-270) Support release=8 on JDK 9 (with
fallback on source=8 and target=8 on JDK 8)
[ https://issues.apache.org/jira/browse/MCOMPILER-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Geoffrey De Smet updated MCOMPILER-270:
---------------------------------------
Description:
JDK 9 now supports the the follow argument:
{code}
javac -release 7
{code}
This replaced both `-source 7` and `-target 7`. And it prevents from using methods introduced in JDK 9 or JDK 8 when compiling for 7 with JDK 9. So `-release 8` basically better in every way than `-source 7 -target 7`.
http://mail.openjdk.java.net/pipermail/jdk9-dev/2015-July/002414.html
Support this in the maven-compiler plugin, something like:
{code}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>7</release>
</configuration>
</plugin>
{code}
When compiling with JDK 9, it should just do `javac -release 7`.
When compiling with JDK 8 or lower, it should fallback to `javac -source 7 -target 7`, so it behaves exactly like:
{code}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
{code}
was:
JDK 9 now supports the the follow argument:
{code}
javac -release 7
{code}
This replaced both `-source 7` and `-target 7`. And it prevents from using methods introduced in JDK 9 or JDK 8 when compiling for 7 with JDK 9. So `-release 8` basically better in every way than `-source 7 -target 7`.
http://mail.openjdk.java.net/pipermail/jdk9-dev/2015-July/002414.html
Support this in the maven-compiler plugin, something like:
{code}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>7</release>
</configuration>
</plugin>
{code}
When compiling with JDK 9, it should just do `javac -release 7`.
When compiling with JDK 8, it should fallback to `javac -source 7 -target 7`, so it behaves exactly like:
{code}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
{code}
> Support release=8 on JDK 9 (with fallback on source=8 and target=8 on JDK 8)
> ----------------------------------------------------------------------------
>
> Key: MCOMPILER-270
> URL: https://issues.apache.org/jira/browse/MCOMPILER-270
> Project: Maven Compiler Plugin
> Issue Type: New Feature
> Affects Versions: 3.5.1
> Reporter: Geoffrey De Smet
> Priority: Blocker
>
> JDK 9 now supports the the follow argument:
> {code}
> javac -release 7
> {code}
> This replaced both `-source 7` and `-target 7`. And it prevents from using methods introduced in JDK 9 or JDK 8 when compiling for 7 with JDK 9. So `-release 8` basically better in every way than `-source 7 -target 7`.
> http://mail.openjdk.java.net/pipermail/jdk9-dev/2015-July/002414.html
> Support this in the maven-compiler plugin, something like:
> {code}
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <release>7</release>
> </configuration>
> </plugin>
> {code}
> When compiling with JDK 9, it should just do `javac -release 7`.
> When compiling with JDK 8 or lower, it should fallback to `javac -source 7 -target 7`, so it behaves exactly like:
> {code}
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>7</source>
> <target>7</target>
> </configuration>
> </plugin>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)