]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
SONARPLUGINS-1114 Automatically determine SONAR_RUNNER_HOME on Windows
authorEvgeny Mandrikov <mandrikov@gmail.com>
Tue, 26 Apr 2011 15:08:37 +0000 (15:08 +0000)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Tue, 26 Apr 2011 15:08:37 +0000 (15:08 +0000)
src/main/assembly/bin/sonar-runner.bat

index 5d6137e142e7836f28b5b966dd778cd020955e87..4635e80f31b9e5d64eb6887129134692f2d651b5 100644 (file)
@@ -2,11 +2,16 @@
 @REM
 @REM Required ENV vars:
 @REM   JAVA_HOME - location of a JDK home dir
-@REM   SONAR_RUNNER_HOME - location of runner's installed home dir
 @REM
 @REM Optional ENV vars:
+@REM   SONAR_RUNNER_HOME - location of runner's installed home dir
 @REM   SONAR_RUNNER_OPTS - parameters passed to the Java VM when running Sonar
 
 @echo off
 
+if NOT "%SONAR_RUNNER_HOME%"=="" goto run
+set SONAR_RUNNER_HOME=%~dp0..
+
+: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 %*