Skip to content

Commit d6d22fd

Browse files
committed
Adding support for coveralls coverage reporting
1 parent 8179e85 commit d6d22fd

2 files changed

Lines changed: 59 additions & 30 deletions

File tree

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ jdk:
44
- openjdk6
55
- openjdk7
66

7+
after-success:
8+
- mvn clean cobertura:cobertura coveralls:report

pom.xml

Lines changed: 57 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
43
<modelVersion>4.0.0</modelVersion>
54
<groupId>org.buddycloud</groupId>
65
<artifactId>channelserver</artifactId>
@@ -169,14 +168,11 @@
169168
<phase>test</phase>
170169
<configuration>
171170
<tasks unless="maven.test.skip">
172-
<junitreport
173-
todir="target/surefire-reports">
174-
<fileset
175-
dir="target/surefire-reports">
171+
<junitreport todir="target/surefire-reports">
172+
<fileset dir="target/surefire-reports">
176173
<include name="**/*.xml" />
177174
</fileset>
178-
<report format="noframes"
179-
todir="target/surefire-reports" />
175+
<report format="noframes" todir="target/surefire-reports" />
180176
</junitreport>
181177
</tasks>
182178
</configuration>
@@ -222,28 +218,27 @@
222218
<target>1.6</target>
223219
</configuration>
224220
</plugin>
225-
<plugin>
226-
<groupId>org.apache.maven.plugins</groupId>
227-
<artifactId>maven-shade-plugin</artifactId>
228-
<version>2.3</version>
229-
<configuration>
230-
<outputFile>${project.build.directory}/${project.build.finalName}-${project.build.withDependencies}.jar</outputFile>
231-
<transformers>
232-
<transformer
233-
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
234-
<mainClass>org.buddycloud.channelserver.Main</mainClass>
235-
</transformer>
236-
</transformers>
237-
</configuration>
238-
<executions>
239-
<execution>
240-
<phase>package</phase>
241-
<goals>
242-
<goal>shade</goal>
243-
</goals>
244-
</execution>
245-
</executions>
246-
</plugin>
221+
<plugin>
222+
<groupId>org.apache.maven.plugins</groupId>
223+
<artifactId>maven-shade-plugin</artifactId>
224+
<version>2.3</version>
225+
<configuration>
226+
<outputFile>${project.build.directory}/${project.build.finalName}-${project.build.withDependencies}.jar</outputFile>
227+
<transformers>
228+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
229+
<mainClass>org.buddycloud.channelserver.Main</mainClass>
230+
</transformer>
231+
</transformers>
232+
</configuration>
233+
<executions>
234+
<execution>
235+
<phase>package</phase>
236+
<goals>
237+
<goal>shade</goal>
238+
</goals>
239+
</execution>
240+
</executions>
241+
</plugin>
247242
<plugin>
248243
<groupId>org.apache.maven.plugins</groupId>
249244
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -267,8 +262,40 @@
267262
</execution>
268263
</executions>
269264
</plugin>
265+
<plugin>
266+
<groupId>org.codehaus.mojo</groupId>
267+
<artifactId>cobertura-maven-plugin</artifactId>
268+
<version>2.6</version>
269+
</plugin>
270+
<plugin>
271+
<groupId>org.eluder.coveralls</groupId>
272+
<artifactId>coveralls-maven-plugin</artifactId>
273+
<version>2.2.0</version>
274+
<configuration>
275+
<format>xml</format>
276+
<maxmem>256m</maxmem>
277+
<aggregate>true</aggregate>
278+
<sourceEncoding>UTF-8</sourceEncoding>
279+
</configuration>
280+
</plugin>
270281
</plugins>
271282
</pluginManagement>
272283
</build>
273284

285+
<reporting>
286+
<plugins>
287+
<plugin>
288+
<groupId>org.codehaus.mojo</groupId>
289+
<artifactId>cobertura-maven-plugin</artifactId>
290+
<version>2.6</version>
291+
<configuration>
292+
<formats>
293+
<format>html</format>
294+
<format>xml</format>
295+
</formats>
296+
</configuration>
297+
</plugin>
298+
</plugins>
299+
</reporting>
300+
274301
</project>

0 commit comments

Comments
 (0)