Updated travis

This commit is contained in:
tastybento 2019-05-04 23:27:56 -07:00
parent 42c3ac8c6b
commit e429205ce8
2 changed files with 30 additions and 2 deletions

View File

@ -12,8 +12,9 @@ jdk:
- openjdk8
script:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package -P sonar sonar:sonar -B
- echo "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
# JaCoCo is used to have code coverage, the agent has to be activated
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent org.jacoco:jacoco-maven-plugin:report package sonar:sonar
cache:
directories:
- '$HOME/.m2/repository'

27
pom.xml
View File

@ -228,4 +228,31 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sonar</id>
<properties>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>tastybento-github</sonar.organization>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.1.1168</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>