Make sure the maven.home and maven.conf properties are correctly set when the JVM is started, fixes #553

This commit is contained in:
Guillaume Nodet
2022-01-11 08:12:18 +01:00
committed by GitHub
parent 716fc1a9cc
commit 4c99b52e03
7 changed files with 131 additions and 12 deletions

View File

@@ -260,17 +260,6 @@ public class DaemonMavenCli {
throw new ExitException(1);
}
System.setProperty("maven.multiModuleProjectDirectory", cliRequest.multiModuleProjectDirectory.toString());
//
// Make sure the Maven home directory is an absolute path to save us from confusion with say drive-relative
// Windows paths.
//
String mvndHome = System.getProperty("mvnd.home");
if (mvndHome != null) {
System.setProperty("mvnd.home", new File(mvndHome).getAbsolutePath());
System.setProperty("maven.home", new File(mvndHome + "/mvn").getAbsolutePath());
}
}
void cli(CliRequest cliRequest)