From 0ee277b8c3f3dc92e480c9b71169d54ef9b4c0f9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 6 Oct 2022 10:19:22 +0100 Subject: [PATCH] Ensure that run mojo's child process is killed when Maven is killed Fixes gh-32607 --- .../java/org/springframework/boot/maven/JavaProcessExecutor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/JavaProcessExecutor.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/JavaProcessExecutor.java index e1cc9252598..e12688621e9 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/JavaProcessExecutor.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/JavaProcessExecutor.java @@ -65,6 +65,7 @@ class JavaProcessExecutor { int run(File workingDirectory, List args, Map environmentVariables) throws MojoExecutionException { RunProcess runProcess = new RunProcess(workingDirectory, getJavaExecutable()); + this.runProcessCustomizer.accept(runProcess); try { int exitCode = runProcess.run(true, args, environmentVariables); if (!hasTerminatedSuccessfully(exitCode)) {