Skip to content

Commit e7d19de

Browse files
author
Vladimir Kotal
committed
publish Jacoco results to coveralls.io
1 parent ae2ffdd commit e7d19de

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,26 @@ Portions Copyright (c) 2018, Chris Fraire <[email protected]>.
171171
<groupId>org.jacoco</groupId>
172172
<artifactId>jacoco-maven-plugin</artifactId>
173173
<version>0.7.9</version>
174+
<executions>
175+
<!-- Prepare execution with Surefire -->
176+
<execution>
177+
<id>pre-unit-test</id>
178+
<goals>
179+
<goal>prepare-agent</goal>
180+
</goals>
181+
<configuration>
182+
<propertyName>surefireArgLine</propertyName>
183+
</configuration>
184+
</execution>
185+
<!-- Generate report after tests are run -->
186+
<execution>
187+
<id>post-unit-test</id>
188+
<phase>test</phase>
189+
<goals>
190+
<goal>report</goal>
191+
</goals>
192+
</execution>
193+
</executions>
174194
</plugin>
175195
<plugin>
176196
<groupId>org.apache.maven.plugins</groupId>
@@ -257,10 +277,28 @@ Portions Copyright (c) 2018, Chris Fraire <[email protected]>.
257277
</reportSets>
258278
</plugin>
259279
<plugin>
280+
<!-- UNIT TEST RUNNER -->
260281
<groupId>org.apache.maven.plugins</groupId>
261282
<artifactId>maven-surefire-report-plugin</artifactId>
262283
<version>2.20</version>
284+
<configuration>
285+
<argLine>${surefireArgLine}</argLine>
286+
</configuration>
287+
<executions>
288+
<execution>
289+
<id>run-unit-tests</id>
290+
<goals>
291+
<goal>test</goal>
292+
</goals>
293+
</execution>
294+
</executions>
263295
</plugin>
296+
<!-- CODE COVERAGE PUBLISHER -->
297+
<plugin>
298+
<groupId>org.eluder.coveralls</groupId>
299+
<artifactId>coveralls-maven-plugin</artifactId>
300+
<version>3.1.0</version>
301+
</plugin>
264302
<plugin>
265303
<groupId>org.apache.maven.plugins</groupId>
266304
<artifactId>maven-jxr-plugin</artifactId>

0 commit comments

Comments
 (0)