[ci] Add coveralls.io

Updated jacoco, add maven profile "coveralls"
This commit is contained in:
Andreas Dangel
2017-07-08 12:25:54 +02:00
parent d669395bab
commit e8dcbda839
3 changed files with 61 additions and 14 deletions

View File

@ -25,6 +25,7 @@ env:
- BUILD=deploy
- BUILD=site
- BUILD=sonar
- BUILD=coveralls
matrix:
fast_finish: true

View File

@ -0,0 +1,16 @@
#!/bin/bash
set -e
source .travis/common-functions.sh
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
echo "Building PMD Coveralls.io report ${VERSION} on branch ${TRAVIS_BRANCH}"
if ! travis_isPush; then
echo "Not proceeding, since this is not a push!"
exit 0
fi
travis_wait ./mvnw -q clean test jacoco:report coveralls:report -Pcoveralls

58
pom.xml
View File

@ -264,7 +264,7 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
<checkstyle.version>2.17</checkstyle.version>
<pmd.plugin.version>3.8</pmd.plugin.version>
<java.version>1.7</java.version>
<jacoco.version>0.7.5.201505241946</jacoco.version>
<jacoco.version>0.7.9</jacoco.version>
<ant.version>1.9.6</ant.version>
<javadoc.plugin.version>2.10.4</javadoc.plugin.version>
<antlr.version>4.5.2-1</antlr.version>
@ -540,19 +540,6 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
@ -997,6 +984,23 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
@ -1018,6 +1022,32 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
</pluginManagement>
</build>
</profile>
<profile>
<id>coveralls</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>