diff --git a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/config/AbstractMergeAgentFilesMojo.java b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/config/AbstractMergeAgentFilesMojo.java index d4d3321c..4b92ce2c 100644 --- a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/config/AbstractMergeAgentFilesMojo.java +++ b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/config/AbstractMergeAgentFilesMojo.java @@ -71,11 +71,11 @@ public File getMergerExecutable() throws MojoExecutionException { private void initializeMergerExecutable() throws MojoExecutionException { Path nativeImage = NativeImageConfigurationUtils.getNativeImage(logger); File nativeImageExecutable = nativeImage.toAbsolutePath().toFile(); - String configureFileName = nativeImageConfigureFileName(); - File mergerExecutable = new File(nativeImageExecutable.getParentFile(), configureFileName); + String nativeImageConfigureFileName = nativeImageConfigureFileName(); + File mergerExecutable = new File(nativeImageExecutable.getParentFile(), nativeImageConfigureFileName); if (!mergerExecutable.exists()) { - throw new MojoExecutionException("'" + configureFileName + "' tool was not found in your " + nativeImage + "." + - "This probably means that the JDK at '" + nativeImage + "' is not a GraalVM distribution." + throw new MojoExecutionException("'" + nativeImageConfigureFileName + "' tool was not found in the GraalVM JDK at '" + nativeImageExecutable.getParentFile().getParentFile() + "'." + + "This probably means that you are using a GraalVM distribution that is not fully supported by the Native Build Tools." ); }