Added SonarCloud
This commit is contained in:
parent
fc471a2bee
commit
b24e76ec67
|
@ -84,3 +84,4 @@ nbdist/
|
||||||
nbactions.xml
|
nbactions.xml
|
||||||
nb-configuration.xml
|
nb-configuration.xml
|
||||||
.nb-gradle/
|
.nb-gradle/
|
||||||
|
/.idea/
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
language: java
|
||||||
|
sudo: false
|
||||||
|
addons:
|
||||||
|
sonarcloud:
|
||||||
|
organization: "bentobox-world"
|
||||||
|
token:
|
||||||
|
secure: $SONAR_TOKEN
|
||||||
|
|
||||||
|
jdk:
|
||||||
|
- openjdk8
|
||||||
|
- openjdk11
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- jdk: openjdk11
|
||||||
|
|
||||||
|
script:
|
||||||
|
# the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
|
||||||
|
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=BentoBoxWorld_Limits
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- '$HOME/.m2/repository'
|
||||||
|
- '$HOME/.sonar/cache'
|
31
pom.xml
31
pom.xml
|
@ -95,6 +95,30 @@
|
||||||
<build.number></build.number>
|
<build.number></build.number>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>sonar</id>
|
||||||
|
<properties>
|
||||||
|
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||||
|
<sonar.organization>bentobox-world</sonar.organization>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||||
|
<artifactId>sonar-maven-plugin</artifactId>
|
||||||
|
<version>3.6.0.1398</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sonar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -213,9 +237,14 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>0.8.1</version>
|
<version>0.8.3</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<append>true</append>
|
<append>true</append>
|
||||||
|
<excludes>
|
||||||
|
<!-- This is required to prevent Jacoco from adding
|
||||||
|
synthetic fields to a JavaBean class (causes errors in testing) -->
|
||||||
|
<exclude>**/*Names*</exclude>
|
||||||
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
Loading…
Reference in New Issue