Fix #53 Using MAVEN_HOME may clash with other tools

This commit is contained in:
Peter Palaga
2020-08-12 11:47:38 +02:00
parent 44e29598ff
commit 156ab7e323
11 changed files with 24 additions and 23 deletions

View File

@@ -66,7 +66,7 @@ public class InstallDaemonNativeIT {
Environment.MVND_DIST_URI.asCommandLineProperty(mvndDistUri),
Environment.MVND_PROPERTIES_PATH.asCommandLineProperty(mvndPropertiesPath.toString()),
Environment.JAVA_HOME.asCommandLineProperty(layout.javaHome().toString()),
Environment.MAVEN_HOME.asCommandLineProperty(mavenHome.toString()))
Environment.MVND_HOME.asCommandLineProperty(mavenHome.toString()))
.assertSuccess();
Assertions.assertThat(mvndPropertiesPath).exists();

View File

@@ -69,8 +69,8 @@ public class NativeTestClient implements Client {
.redirectErrorStream(true);
final Map<String, String> env = builder.environment();
if (!Environment.MAVEN_HOME.hasCommandLineProperty(args)) {
env.put("MAVEN_HOME", System.getProperty("mvnd.home"));
if (!Environment.MVND_HOME.hasCommandLineProperty(args)) {
env.put("MVND_HOME", System.getProperty("mvnd.home"));
}
if (!Environment.JAVA_HOME.hasCommandLineProperty(args)) {
env.put("JAVA_HOME", System.getProperty("java.home"));