From 76d2bc27eb95b2b2e3de7db53758bc441b812ab5 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Sat, 15 Feb 2020 09:11:50 +0100 Subject: [PATCH] Explicitly set java home in Maven Plugin integration tests See gh-20193 --- .../intTest/java/org/springframework/boot/maven/MavenBuild.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/MavenBuild.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/MavenBuild.java index 6e3e6a838c..ad5485e8d5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/MavenBuild.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/MavenBuild.java @@ -166,6 +166,7 @@ class MavenBuild { Files.write(destination.resolve("settings.xml"), settingsXml.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE_NEW); request.setBaseDirectory(this.temp); + request.setJavaHome(new File(System.getProperty("java.home"))); request.setProperties(this.properties); request.setGoals(this.goals.isEmpty() ? Collections.singletonList("package") : this.goals); request.setUserSettingsFile(new File(this.temp, "settings.xml"));