Konrad Windszus created MCOMPILER-468:
-----------------------------------------

             Summary: Introduce parameter to be used for source, target and 
release
                 Key: MCOMPILER-468
                 URL: https://issues.apache.org/jira/browse/MCOMPILER-468
             Project: Maven Compiler Plugin
          Issue Type: Improvement
    Affects Versions: 3.8.1
            Reporter: Konrad Windszus


Setting up the maven-compiler-plugin in a way that is compatible with both JDK 
< 9 and JDK 9+ is tricky as
# parameter {{release}} breaks compilation with javac 8 or older 
(https://github.com/codehaus-plexus/plexus-compiler/issues/140)
# {{source}}, {{target}} and {{release}} accept different values: JDK <= 8 only 
supports values starting with {{1.}} while JDK 9+ accepts only {{6}}, {{7}}, 
{{8}}, {{9}}, ... for {{release}} and in addition also {{1.6}}, {{1.7}} and 
{{1.8}} for {{source}} and {{target}}.

I propose to introduce a new parameter which hides that complexity called 
{{targetJavaVersion}} accepting both {{1.6}}, {{1.7}} and {{1.8}} and {{6}}, 
{{7}}, {{8}}, {{9}}, ... and affect either {{release}} for JDK9 + or {{source}} 
and {{target}} for JDK < 9.



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

Reply via email to