diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-07-11 11:53:38 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-07-11 11:53:38 +0200 |
commit | bd16629d64fd515eb026c65ed84b29527d9e984e (patch) | |
tree | e79c214b856698abda324297dd17763b35281a14 /sonar-start | |
parent | f0f0be6440dc01f2678840e40f044135025ecba3 (diff) | |
download | sonarqube-bd16629d64fd515eb026c65ed84b29527d9e984e.tar.gz sonarqube-bd16629d64fd515eb026c65ed84b29527d9e984e.zip |
SONAR-5408 - Passing SONAR_HOME env to child processes
Diffstat (limited to 'sonar-start')
-rw-r--r-- | sonar-start/src/main/java/org/sonar/start/StartServer.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-start/src/main/java/org/sonar/start/StartServer.java b/sonar-start/src/main/java/org/sonar/start/StartServer.java index fa50ff60033..918c1142ae6 100644 --- a/sonar-start/src/main/java/org/sonar/start/StartServer.java +++ b/sonar-start/src/main/java/org/sonar/start/StartServer.java @@ -121,7 +121,9 @@ public final class StartServer { sonarqube = new ProcessWrapper( "org.sonar.application.StartServer", new String[]{env.rootDir().getAbsolutePath() + "/lib/server/sonar-application-4.5-SNAPSHOT.jar"}, - ImmutableMap.of("test", "test"), + ImmutableMap.of( + "SONAR_HOME", env.rootDir().getAbsolutePath(), + "test", "test"), "SQ", monitor.getMonitoringPort()); registerProcess(sonarqube); @@ -132,6 +134,7 @@ public final class StartServer { "org.sonar.search.ElasticSearch", new String[]{env.rootDir().getAbsolutePath() + "/lib/search/sonar-search-4.5-SNAPSHOT.jar"}, ImmutableMap.of( + "SONAR_HOME", env.rootDir().getAbsolutePath(), "esDebug", properties.containsKey("esDebug") ? properties.get("esDebug") : "false", "esPort", esPort, "esHome", env.rootDir().getAbsolutePath()), @@ -147,7 +150,6 @@ public final class StartServer { //Check if we have a SONAR_HOME if (StringUtils.isEmpty(home)) { home = new File(".").getAbsolutePath(); - System.getenv().put("SONAR_HOME", home); } new StartServer(new Env(home), args).start(); |