diff --git a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/AotBrowserCallableFinder.java b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/AotBrowserCallableFinder.java index 5ac5c4d8ba..1b11037291 100644 --- a/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/AotBrowserCallableFinder.java +++ b/packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/AotBrowserCallableFinder.java @@ -80,7 +80,7 @@ private static Path generateAotArtifacts( engineConfiguration.getArtifactId()).toList(); var argsFile = engineConfiguration.getBuildDir() - .resolve("aot-args-" + System.currentTimeMillis() + ".txt"); + .resolve("hilla-aot-args.txt"); Files.write(argsFile, settings); var javaExecutable = ProcessHandle.current().info().command() @@ -92,9 +92,7 @@ private static Path generateAotArtifacts( int exitCode = new ProcessBuilder().inheritIO() .command(javaExecutable, "@" + argsFile).start().waitFor(); - if (exitCode == 0) { - Files.delete(argsFile); - } else { + if (exitCode != 0) { LOGGER.error( SPRING_AOT_PROCESSOR + " exited with code: " + exitCode); }