aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@searchbox.com>2014-08-12 14:25:26 +0200
committerStephane Gamard <stephane.gamard@searchbox.com>2014-08-12 14:25:50 +0200
commit80aa231222ce602fb955f5d9edf0876dab354c23 (patch)
treea5362fec15cbb59cad2cc5d702d8aec628d97542 /sonar-application/src
parentcae764c4348e68ceb31012f2bc4224de70a61524 (diff)
downloadsonarqube-80aa231222ce602fb955f5d9edf0876dab354c23.tar.gz
sonarqube-80aa231222ce602fb955f5d9edf0876dab354c23.zip
SONAR-4898 - Can run in install dir with spaces in path.
Diffstat (limited to 'sonar-application/src')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 3bdcf63a21d..fb8941d71b6 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -56,16 +56,16 @@ public class App implements ProcessMXBean {
monitor.start();
File homeDir = props.fileOf("sonar.path.home");
- String tempDir = props.of("sonar.path.temp");
+ File tempDir = props.fileOf("sonar.path.temp");
elasticsearch = new ProcessWrapper(JmxUtils.SEARCH_SERVER_NAME)
.setWorkDir(homeDir)
.setJmxPort(props.intOf(DefaultSettings.SEARCH_JMX_PORT))
.addJavaOpts(props.of(DefaultSettings.SEARCH_JAVA_OPTS))
- .addJavaOpts(String.format("-Djava.io.tmpdir=%s", tempDir))
+ .setTempDirectory(tempDir.getAbsoluteFile())
.setClassName("org.sonar.search.SearchServer")
.addProperties(props.rawProperties())
- .addClasspath(starPath(homeDir, "lib/common"))
- .addClasspath(starPath(homeDir, "lib/search"));
+ .addClasspath("./lib/common/*")
+ .addClasspath("./lib/search/*");
if (elasticsearch.execute()) {
monitor.registerProcess(elasticsearch);
if (elasticsearch.waitForReady()) {
@@ -77,13 +77,13 @@ public class App implements ProcessMXBean {
.setWorkDir(homeDir)
.setJmxPort(props.intOf(DefaultSettings.WEB_JMX_PORT))
.addJavaOpts(props.of(DefaultSettings.WEB_JAVA_OPTS))
- .addJavaOpts(String.format("-Djava.io.tmpdir=%s", tempDir))
+ .setTempDirectory(tempDir.getAbsoluteFile())
// required for logback tomcat valve
- .addJavaOpts(String.format("-Dsonar.path.logs=%s", props.of("sonar.path.logs")))
+ .setLogDir(props.fileOf("sonar.path.logs"))
.setClassName("org.sonar.server.app.WebServer")
.addProperties(props.rawProperties())
- .addClasspath(starPath(homeDir, "lib/common"))
- .addClasspath(starPath(homeDir, "lib/server"));
+ .addClasspath("./lib/common/*")
+ .addClasspath("./lib/server/*");
String driverPath = props.of(JdbcSettings.PROPERTY_DRIVER_PATH);
if (driverPath != null) {
server.addClasspath(driverPath);