summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Vérin <thomas.verin@sonarsource.com>2015-10-21 09:55:16 +0200
committerThomas Vérin <thomas.verin@sonarsource.com>2015-10-21 10:56:28 +0200
commit999f3c158b6be8e813244d83f8d3c9eace729cfe (patch)
treeb12d21a1bddcb903d9ab7db96ddc530e148dc589
parenta9c8177a15dc9ca390bc0ded7149568f30b11674 (diff)
downloadsonarqube-999f3c158b6be8e813244d83f8d3c9eace729cfe.tar.gz
sonarqube-999f3c158b6be8e813244d83f8d3c9eace729cfe.zip
Switch to jdk8 in pranalysis
-rwxr-xr-xtravis.sh36
1 files changed, 23 insertions, 13 deletions
diff --git a/travis.sh b/travis.sh
index 6b95be9b3f9..c3521a72a9f 100755
--- 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
;;