]> source.dussan.org Git - sonarqube.git/commitdiff
Switch to jdk8 in pranalysis 594/head
authorThomas Vérin <thomas.verin@sonarsource.com>
Wed, 21 Oct 2015 07:55:16 +0000 (09:55 +0200)
committerThomas Vérin <thomas.verin@sonarsource.com>
Wed, 21 Oct 2015 08:56:28 +0000 (10:56 +0200)
travis.sh

index 6b95be9b3f9aef8aa311dd6746c70ce41a70bba1..c3521a72a9f352f9fe528113bb03ec8bf4d283ac 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -40,19 +40,29 @@ set +eu
   ;;
 
 PRANALYSIS)
-  if [ -n "$SONAR_GITHUB_OAUTH" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
-    echo "Start pullrequest analysis"
-    mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B -e -V -Panalysis \
-     -Dmaven.test.failure.ignore=true \
-     -Dclirr=true \
-     -Dsonar.analysis.mode=preview \
-     -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
-     -Dsonar.github.repository=$SONAR_GITHUB_REPOSITORY \
-     -Dsonar.github.login=$SONAR_GITHUB_LOGIN \
-     -Dsonar.github.oauth=$SONAR_GITHUB_OAUTH \
-     -Dsonar.host.url=$SONAR_HOST_URL \
-     -Dsonar.login=$SONAR_LOGIN \
-     -Dsonar.password=$SONAR_PASSWD
+  export JAVA_HOME=/usr/lib/jvm/java-8-oracle
+  export PATH=$JAVA_HOME/bin:$PATH
+  java -Xmx32m -version
+  javac -J-Xmx32m -version
+  if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+         if [ -n "$SONAR_GITHUB_OAUTH" ]; then
+           echo "Start pullrequest analysis"
+           mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B -e -V -Panalysis \
+            -Dmaven.test.failure.ignore=true \
+            -Dclirr=true \
+            -Dsonar.analysis.mode=preview \
+            -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
+            -Dsonar.github.repository=$SONAR_GITHUB_REPOSITORY \
+            -Dsonar.github.login=$SONAR_GITHUB_LOGIN \
+            -Dsonar.github.oauth=$SONAR_GITHUB_OAUTH \
+            -Dsonar.host.url=$SONAR_HOST_URL \
+            -Dsonar.login=$SONAR_LOGIN \
+            -Dsonar.password=$SONAR_PASSWD
+         else
+               echo "No oauth token available"
+         fi
+  else
+       echo "Not in a pull request"
   fi
   ;;