From e0dd526438b6d6b7f5425a2891e9f7c9209b9f20 Mon Sep 17 00:00:00 2001 From: Luciano Vernaschi Date: Tue, 7 Jan 2025 10:15:45 +0100 Subject: [PATCH] don't delete aot args file each time --- .../com/vaadin/hilla/engine/AotBrowserCallableFinder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 0e14c48478..de48e21f6e 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); }