From 999f3c158b6be8e813244d83f8d3c9eace729cfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20V=C3=A9rin?= Date: Wed, 21 Oct 2015 09:55:16 +0200 Subject: [PATCH] Switch to jdk8 in pranalysis --- travis.sh | 36 +++++++++++++++++++++++------------- 1 file 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 ;; -- 2.39.5