Merge pull request #20193 from dreis2211

* gh-20193:
  Explicitly set java home in Maven Plugin integration tests

Closes gh-20193
This commit is contained in:
Andy Wilkinson
2020-02-18 12:06:30 +00:00

View File

@@ -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"));