aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-04 09:27:33 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-04 09:27:33 +0100
commit8e723a225bf6a12fdc9ba62c51379b8a97592c81 (patch)
treea3bcddba86746c6fd96eb6bbdb13ba9e3dfbdd79 /src
parent2d09cba4cac8802e4858144ca63c79039cd07cff (diff)
downloadsonar-scanner-cli-8e723a225bf6a12fdc9ba62c51379b8a97592c81.tar.gz
sonar-scanner-cli-8e723a225bf6a12fdc9ba62c51379b8a97592c81.zip
Preserve version in library filename.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main/assembly/bin/sonar-runner8
-rw-r--r--src/main/assembly/bin/sonar-runner.bat6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/main/assembly/bin/sonar-runner b/src/main/assembly/bin/sonar-runner
index 0aaf46b..9ba40c4 100755
--- a/src/main/assembly/bin/sonar-runner
+++ b/src/main/assembly/bin/sonar-runner
@@ -15,14 +15,14 @@ if [ -z "$SONAR_RUNNER_HOME" ] ; then
SONAR_RUNNER_HOME=`cd "$SONAR_RUNNER_HOME" && pwd`
else
# check that the SONAR_RUNNER_HOME has been correctly set
- if [ ! -e "$SONAR_RUNNER_HOME/lib/sonar-runner.jar" ] ; then
+ if [ ! -e "$SONAR_RUNNER_HOME/lib/sonar-runner-${project.version}.jar" ] ; then
echo '$SONAR_RUNNER_HOME' does not point to a valid installation directory: $SONAR_RUNNER_HOME
exit 0
fi
fi
JAVA_CMD="`which java`"
-JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner.jar
+JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner-${project.version}.jar
PROJECT_HOME=`pwd`
#echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME"
@@ -33,6 +33,6 @@ PROJECT_HOME=`pwd`
exec "$JAVA_CMD" \
$SONAR_RUNNER_OPTS \
-classpath $JAVA_CLASSPATH \
- "-Drunner.home=${SONAR_RUNNER_HOME}" \
- "-Dproject.home=${PROJECT_HOME}" \
+ "-Drunner.home=\${SONAR_RUNNER_HOME}" \
+ "-Dproject.home=\${PROJECT_HOME}" \
org.sonar.runner.Main "$@"
diff --git a/src/main/assembly/bin/sonar-runner.bat b/src/main/assembly/bin/sonar-runner.bat
index fd97e3e..50d50c0 100644
--- a/src/main/assembly/bin/sonar-runner.bat
+++ b/src/main/assembly/bin/sonar-runner.bat
@@ -24,7 +24,7 @@ if not "%JAVA_EXEC%" == "" (
if not "%JAVA_EXEC%" == "" goto OkJava
echo.
-echo ERROR: JAVA_HOME not found in your environment, and no Java
+echo ERROR: JAVA_HOME not found in your environment, and no Java
echo executable present in the PATH.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation, or add "java.exe" to the PATH
@@ -54,7 +54,7 @@ goto run
if %SONAR_RUNNER_HOME:~-1%==\ set SONAR_RUNNER_HOME=%SONAR_RUNNER_HOME:~0,-1%
@REM Check if the provided SONAR_RUNNER_HOME is a valid install dir
-IF EXIST "%SONAR_RUNNER_HOME%\lib\sonar-runner.jar" goto run
+IF EXIST "%SONAR_RUNNER_HOME%\lib\sonar-runner-${project.version}.jar" goto run
echo.
echo ERROR: SONAR_RUNNER_HOME exists but does not point to a valid install
@@ -70,7 +70,7 @@ echo %SONAR_RUNNER_HOME%
set PROJECT_HOME=%CD%
-%JAVA_EXEC% %SONAR_RUNNER_OPTS% -classpath "%SONAR_RUNNER_HOME%\lib\sonar-runner.jar" "-Drunner.home=%SONAR_RUNNER_HOME%" "-Dproject.home=%PROJECT_HOME%" org.sonar.runner.Main %*
+%JAVA_EXEC% %SONAR_RUNNER_OPTS% -classpath "%SONAR_RUNNER_HOME%\lib\sonar-runner-${project.version}.jar" "-Drunner.home=%SONAR_RUNNER_HOME%" "-Dproject.home=%PROJECT_HOME%" org.sonar.runner.Main %*