[ 
https://issues.apache.org/jira/browse/MPOM-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated MPOM-264:
---------------------------------
    Description: 
Instead of using {{source}} and {{target}} the new parameter {{release}} 
(https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release)
 should be used with Java 9+ as that also checks whether the used API is 
provided in the target Java release 
(https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471).

To be able to support both compilation with Java < 9 and above a profile should 
be used which either configures {{source}} and {{target}} or {{release}}. 
You have  to observe though that the parameter values are different though, as 
the former supports 1.6, 1.7 and 1.8 while the latter only supports 6, 7 and 8.

  was:
Instead of using {{source}} and {{target}} the new parameter {{release}} 
(https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release)
 should be used with Java 9+ as that also checks whether the used API is 
provided in the target Java release 
(https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471).

To be able to support both compilation with Java < 9 and above a profile should 
be used which either configured {{source}} and {{target}} or {{release}}. 
You have  to observe though that the parameter values are different though, as 
the former supports 1.6, 1.7 and 1.8 the latter only supports 6, 7 and 8.


> Parameterize maven-compiler-plugin with parameter "release" when running on 
> JDK 9+
> ----------------------------------------------------------------------------------
>
>                 Key: MPOM-264
>                 URL: https://issues.apache.org/jira/browse/MPOM-264
>             Project: Maven POMs
>          Issue Type: Improvement
>          Components: asf
>    Affects Versions: ASF-23
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Instead of using {{source}} and {{target}} the new parameter {{release}} 
> (https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release)
>  should be used with Java 9+ as that also checks whether the used API is 
> provided in the target Java release 
> (https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471).
> To be able to support both compilation with Java < 9 and above a profile 
> should be used which either configures {{source}} and {{target}} or 
> {{release}}. 
> You have  to observe though that the parameter values are different though, 
> as the former supports 1.6, 1.7 and 1.8 while the latter only supports 6, 7 
> and 8.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to