Adam Czepil created SUREFIRE-1735:
-------------------------------------

             Summary: Using GraalVM toolchain causes NPE when default java is 
not set to GraalVM JDK
                 Key: SUREFIRE-1735
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1735
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin
    Affects Versions: 3.0.0-M4
            Reporter: Adam Czepil


When I use toolchains and configure GraalVM as the active toolchain AND my 
default JDK is NOT GraalVM (JAVA_HOME != GraalVM) I'm getting NPE from surefire 
plugin

{{Caused by: java.lang.NullPointerException}}
{{ at org.apache.maven.surefire.booter.SystemUtils.toJdkVersionFromReleaseFile 
(SystemUtils.java:141) }}

It works fine when I change JAVA_HOME to point to GraalVM home.

The reason is that 
[https://github.com/apache/maven-surefire/blob/master/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemUtils.java]
 try to read JAVA_VERSION from releases file and GraalVM doesn't have this 
variable there.

I'm not sure who is at fault, maybe GraalVM should export that var.



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

Reply via email to