JAVA_CMD="`which java`"
JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner.jar:"${SONAR_RUNNER_HOME}"/lib/sonar-batch-bootstrapper.jar
+PROJECT_HOME=`pwd`
#echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME"
#echo "Info: Using java at $JAVACMD"
#echo "Info: Using classpath $JAVACLASSPATH"
+#echo "Info: Using project $PROJECT_HOME"
exec "$JAVA_CMD" \
$SONAR_RUNNER_OPTS \
-classpath $JAVA_CLASSPATH \
"-Drunner.home=${SONAR_RUNNER_HOME}" \
+ "-Dproject.home=${PROJECT_HOME}" \
org.sonar.runner.Main "$@"
:run
echo %SONAR_RUNNER_HOME%
-"%JAVA_HOME%\bin\java.exe" %SONAR_RUNNER_OPTS% -classpath "%SONAR_RUNNER_HOME%\lib\sonar-runner.jar";"%SONAR_RUNNER_HOME%\lib\sonar-batch-bootstrapper.jar" "-Drunner.home=%SONAR_RUNNER_HOME%" org.sonar.runner.Main %*
+
+set PROJECT_HOME=%CD%
+
+"%JAVA_HOME%\bin\java.exe" %SONAR_RUNNER_OPTS% -classpath "%SONAR_RUNNER_HOME%\lib\sonar-runner.jar";"%SONAR_RUNNER_HOME%\lib\sonar-batch-bootstrapper.jar" "-Drunner.home=%SONAR_RUNNER_HOME%" "-Dproject.home=%PROJECT_HOME%" org.sonar.runner.Main %*
}
static Properties loadProperties(String[] args) {
- Properties props = new Properties();
- Properties commandLineProps = parseArguments(args);
- props.putAll(loadRunnerProperties(commandLineProps));
- props.putAll(loadProjectProperties(commandLineProps));
- props.putAll(commandLineProps);
+ Properties props = parseArguments(args);
+ props.putAll(System.getProperties());
+ props.putAll(loadRunnerProperties(props));
+ props.putAll(loadProjectProperties(props));
return props;
}