Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit 1b6a7cc

Browse files
committed
Use SonarQube.com
Execute Maven with JDK 8, because SonarQube 5.6 requires it. Our tests are failing with JDK 8, so use JDK 7 for tests execution.
1 parent 0611873 commit 1b6a7cc

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

.travis-toolchains.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF8"?>
2+
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
4+
<toolchain>
5+
<type>jdk</type>
6+
<provides>
7+
<id>java7</id>
8+
<version>1.7</version>
9+
<vendor>oracle</vendor>
10+
</provides>
11+
<configuration>
12+
<jdkHome>/usr/lib/jvm/java-7-oracle</jdkHome>
13+
</configuration>
14+
</toolchain>
15+
</toolchains>

.travis.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if [[ ${TRAVIS_PULL_REQUEST} == 'false' && ${TRAVIS_BRANCH} == 'master' ]]
6+
then
7+
mvn -V -B -e \
8+
verify -Djdk.version=1.7 --toolchains=./.travis-toolchains.xml \
9+
sonar:sonar -Dsonar.host.url=${SONARQUBE_URL} -Dsonar.login=${SONARQUBE_TOKEN}
10+
else
11+
mvn -V -B -e \
12+
verify -Djdk.version=1.7 --toolchains=./.travis-toolchains.xml
13+
fi

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
language: java
2+
jdk: oraclejdk8
23

34
# Skip "install" stage:
45
install: true
56

67
# Use container-based infrastructure:
78
sudo: false
89

9-
script: mvn -V -B -e verify
10+
script: bash .travis.sh

com.mountainminds.eclemma.build/pom.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,8 @@
8686
<jacoco.version>0.7.7.201606060606</jacoco.version>
8787
<tycho.testArgLine>-Xmx800m</tycho.testArgLine>
8888

89-
<!-- Sonar -->
90-
<sonar.skippedModules>com.mountainminds.eclemma.target,com.mountainminds.eclemma.core.test,com.mountainminds.eclemma.doc,com.mountainminds.eclemma.feature,com.mountainminds.eclemma.site</sonar.skippedModules>
91-
92-
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
93-
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
89+
<!-- SonarQube -->
90+
<sonar.java.source>1.5</sonar.java.source>
9491
<sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
9592
<sonar.surefire.reportsPath>../${project.artifactId}.test/target/surefire-reports/</sonar.surefire.reportsPath>
9693
</properties>

0 commit comments

Comments
 (0)