Skip to content

Commit

Permalink
Merge pull request #1771 from usethesource/fix-non-java-home-inheritance
Browse files Browse the repository at this point in the history
Copy calculated JAVA_HOME path to make sure maven works
  • Loading branch information
DavyLandman committed Feb 10, 2023
2 parents 3f5c1b9 + c644f2c commit 86ad532
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/org/rascalmpl/library/util/PathConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ private static IList getPomXmlCompilerClasspath(ISourceLocation manifestRoot) {
);

processBuilder.directory(new File(manifestRoot.getPath()));
processBuilder.environment().put("JAVA_HOME", System.getProperty("java.home", System.getenv("JAVA_HOME")));

Process process = processBuilder.start();

Expand Down Expand Up @@ -720,6 +721,7 @@ private static void installNecessaryMavenPlugins(String mvnCommand) {
"-DartifactId=maven-dependency-plugin",
"-Dversion=2.8",
trustStoreFix());
processBuilder.environment().put("JAVA_HOME", System.getProperty("java.home", System.getenv("JAVA_HOME")));

Process process = processBuilder.start();
if (process.waitFor() != 0) {
Expand Down

0 comments on commit 86ad532

Please sign in to comment.