Skip to content

Commit

Permalink
Extract Native Image configure file name into variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dnestoro committed Apr 10, 2024
1 parent 6f0e6c2 commit dab33dd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ public File getMergerExecutable() throws MojoExecutionException {
private void initializeMergerExecutable() throws MojoExecutionException {
Path nativeImage = NativeImageConfigurationUtils.getNativeImage(logger);
File nativeImageExecutable = nativeImage.toAbsolutePath().toFile();
File mergerExecutable = new File(nativeImageExecutable.getParentFile(), nativeImageConfigureFileName());
String configureFileName = nativeImageConfigureFileName();
File mergerExecutable = new File(nativeImageExecutable.getParentFile(), configureFileName);
if (!mergerExecutable.exists()) {
throw new MojoExecutionException("'" + nativeImageConfigureFileName() + "' tool was not found in your " + nativeImage + "." +
throw new MojoExecutionException("'" + configureFileName + "' tool was not found in your " + nativeImage + "." +
"This probably means that the JDK at '" + nativeImage + "' is not a GraalVM distribution."
);
}
Expand Down

0 comments on commit dab33dd

Please sign in to comment.