From: Simon Brandhof Date: Wed, 9 Feb 2011 09:33:58 +0000 (+0000) Subject: Sonar runner: move assembly sources in src/main/assembly X-Git-Tag: 2.5-rc1~351 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3ef2a7311179e438b31215a8e50494f3b0bff2b4;p=sonar-scanner-cli.git Sonar runner: move assembly sources in src/main/assembly --- diff --git a/assembly.xml b/assembly.xml new file mode 100644 index 0000000..b451abb --- /dev/null +++ b/assembly.xml @@ -0,0 +1,40 @@ + + + bin + + zip + + true + + + true + lib + ${artifact.artifactId}.${artifact.extension} + 0644 + + + + + src/main/assembly/bin + bin + + sonar-runner.bat + + dos + + + src/main/assembly/bin + bin + + sonar-runner + + unix + 0755 + + + src/main/assembly/conf + conf + 0644 + + + diff --git a/pom.xml b/pom.xml index 6967359..bc2f33a 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ false - ${basedir}/src/main/assembly/assembly.xml + ${basedir}/assembly.xml diff --git a/src/bin/sonar-runner b/src/bin/sonar-runner deleted file mode 100755 index af95fd5..0000000 --- a/src/bin/sonar-runner +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Sonar Runner Startup Script for Unix -# - -if [ -z "$SONAR_RUNNER_HOME" ] ; then - PRG="$0" - - SONAR_RUNNER_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - SONAR_RUNNER_HOME=`cd "$SONAR_RUNNER_HOME" && pwd` -fi - -JAVA_CMD="`which java`" -JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner.jar:"${SONAR_RUNNER_HOME}"/lib/sonar-batch-bootstrapper.jar - -#echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME" -#echo "Info: Using java at $JAVACMD" -#echo "Info: Using classpath $JAVACLASSPATH" - -exec "$JAVA_CMD" \ - -classpath $JAVA_CLASSPATH \ - "-Drunner.home=${SONAR_RUNNER_HOME}" \ - org.sonar.runner.Main "$@" diff --git a/src/bin/sonar-runner.bat b/src/bin/sonar-runner.bat deleted file mode 100644 index 45bca45..0000000 --- a/src/bin/sonar-runner.bat +++ /dev/null @@ -1,5 +0,0 @@ -@REM Sonar Runner Startup Script for Windows - -@echo off - -"%JAVA_HOME%\bin\java.exe" -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 %* diff --git a/src/conf/sonar-runner.properties b/src/conf/sonar-runner.properties deleted file mode 100644 index 5f01622..0000000 --- a/src/conf/sonar-runner.properties +++ /dev/null @@ -1,25 +0,0 @@ -#----- Default directory layout -sources=src/main/java -tests=src/test/java -binaries=target/classes - -sonar.sourceEncoding=UTF-8 - -#----- Default Sonar server -#sonar.host.url=http://localhost:9000 - -#----- PostgreSQL -#sonar.jdbc.url=jdbc:postgresql://localhost/sonar -#sonar.jdbc.driver=org.postgresql.Driver - -#----- MySQL -#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 -#sonar.jdbc.driver=com.mysql.jdbc.Driver - -#----- Oracle -#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE -#sonar.jdbc.driver=oracle.jdbc.driver.OracleDriver - -#----- Global database settings -#sonar.jdbc.username=sonar -#sonar.jdbc.password=sonar diff --git a/src/main/assembly/assembly.xml b/src/main/assembly/assembly.xml deleted file mode 100644 index 0419764..0000000 --- a/src/main/assembly/assembly.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - bin - - zip - - true - - - true - lib - ${artifact.artifactId}.${artifact.extension} - 0644 - - - - - src/bin - bin - - sonar-runner.bat - - dos - - - src/bin - bin - - sonar-runner - - unix - 0755 - - - src/conf - conf - 0644 - - - diff --git a/src/main/assembly/bin/sonar-runner b/src/main/assembly/bin/sonar-runner new file mode 100755 index 0000000..af95fd5 --- /dev/null +++ b/src/main/assembly/bin/sonar-runner @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Sonar Runner Startup Script for Unix +# + +if [ -z "$SONAR_RUNNER_HOME" ] ; then + PRG="$0" + + SONAR_RUNNER_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + SONAR_RUNNER_HOME=`cd "$SONAR_RUNNER_HOME" && pwd` +fi + +JAVA_CMD="`which java`" +JAVA_CLASSPATH="${SONAR_RUNNER_HOME}"/lib/sonar-runner.jar:"${SONAR_RUNNER_HOME}"/lib/sonar-batch-bootstrapper.jar + +#echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME" +#echo "Info: Using java at $JAVACMD" +#echo "Info: Using classpath $JAVACLASSPATH" + +exec "$JAVA_CMD" \ + -classpath $JAVA_CLASSPATH \ + "-Drunner.home=${SONAR_RUNNER_HOME}" \ + org.sonar.runner.Main "$@" diff --git a/src/main/assembly/bin/sonar-runner.bat b/src/main/assembly/bin/sonar-runner.bat new file mode 100644 index 0000000..45bca45 --- /dev/null +++ b/src/main/assembly/bin/sonar-runner.bat @@ -0,0 +1,5 @@ +@REM Sonar Runner Startup Script for Windows + +@echo off + +"%JAVA_HOME%\bin\java.exe" -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 %* diff --git a/src/main/assembly/conf/sonar-runner.properties b/src/main/assembly/conf/sonar-runner.properties new file mode 100644 index 0000000..5f01622 --- /dev/null +++ b/src/main/assembly/conf/sonar-runner.properties @@ -0,0 +1,25 @@ +#----- Default directory layout +sources=src/main/java +tests=src/test/java +binaries=target/classes + +sonar.sourceEncoding=UTF-8 + +#----- Default Sonar server +#sonar.host.url=http://localhost:9000 + +#----- PostgreSQL +#sonar.jdbc.url=jdbc:postgresql://localhost/sonar +#sonar.jdbc.driver=org.postgresql.Driver + +#----- MySQL +#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 +#sonar.jdbc.driver=com.mysql.jdbc.Driver + +#----- Oracle +#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE +#sonar.jdbc.driver=oracle.jdbc.driver.OracleDriver + +#----- Global database settings +#sonar.jdbc.username=sonar +#sonar.jdbc.password=sonar