Jason Reed created MNG-6664:
-------------------------------

             Summary: Maven compiler ignores the configured target version 
settings when higher JDK is installed
                 Key: MNG-6664
                 URL: https://issues.apache.org/jira/browse/MNG-6664
             Project: Maven
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.2
         Environment: Windows 10 64bit
openJDK 11.0.1
Maven 3.5.2
            Reporter: Jason Reed


I have an Open JDK 11 installed on my system and it is configured properly 
through JAVA_HOME. I'm using Maven 3.5.2 to perform compiling via command line 
and through my Eclipse IDE.

I have a project that where I have configured the maven.compiler.source and 
maven.compiler.target for Java 1.8. During development I unintentionally added 
a Java 11 method in my code `isBlank()` for String objects in this case. Even 
though the code should only support Java 8, the maven project compiled without 
error. Only when I attempted to run the program on a system that only has Java 
8 installed was the problem identified.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to