From 0e0cf7a4fa5b04a6dea2c4f63b73084515aa84af Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Wed, 10 Apr 2024 12:55:22 +0200 Subject: [PATCH] Change error message when mergerExecutable does not exist --- .../maven/config/AbstractMergeAgentFilesMojo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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." ); }