Skip to content

Commit d16a005

Browse files
committed
update pom.xml to integrate with codecov
1 parent 760777b commit d16a005

File tree

2 files changed

+80
-4
lines changed

2 files changed

+80
-4
lines changed

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ dist: trusty
33
language: java
44

55
cache:
6-
directories:
7-
- $HOME/.m2
6+
directories:
7+
- $HOME/.m2
88

99
jdk:
10-
- oraclejdk8
10+
- oraclejdk8
11+
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash)

pom.xml

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
<goal>prepare-agent</goal>
232232
</goals>
233233
<configuration>
234-
<propertyName>surefireArgLine</propertyName>
234+
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
235235
</configuration>
236236
</execution>
237237
<execution>
@@ -240,7 +240,35 @@
240240
<goals>
241241
<goal>report</goal>
242242
</goals>
243+
<configuration>
244+
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
245+
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
246+
</configuration>
243247
</execution>
248+
<!-- End Executions for unit tests -->
249+
<!-- The Executions for integration tests -->
250+
<execution>
251+
<id>pre-integration-test</id>
252+
<phase>pre-integration-test</phase>
253+
<goals>
254+
<goal>prepare-agent</goal>
255+
</goals>
256+
<configuration>
257+
<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
258+
</configuration>
259+
</execution>
260+
<execution>
261+
<id>post-integration-test</id>
262+
<phase>post-integration-test</phase>
263+
<goals>
264+
<goal>report</goal>
265+
</goals>
266+
<configuration>
267+
<dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
268+
<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
269+
</configuration>
270+
</execution>
271+
<!-- End Executions for integration tests -->
244272
</executions>
245273
</plugin>
246274
<!-- end JACOCO -->
@@ -256,6 +284,51 @@
256284
</plugins>
257285
</reporting>
258286
<profiles>
287+
<profile>
288+
<id>dev</id>
289+
<build>
290+
<plugins>
291+
<plugin>
292+
<groupId>org.jacoco</groupId>
293+
<artifactId>jacoco-maven-plugin</artifactId>
294+
<version>${version.jacoco}</version>
295+
<executions>
296+
<!-- The Executions for merging -->
297+
<execution>
298+
<id>merge-results</id>
299+
<phase>verify</phase>
300+
<goals>
301+
<goal>merge</goal>
302+
</goals>
303+
<configuration>
304+
<fileSets>
305+
<fileSet>
306+
<directory>${project.build.directory}/coverage-reports</directory>
307+
<includes>
308+
<include>*.exec</include>
309+
</includes>
310+
</fileSet>
311+
</fileSets>
312+
<destFile>${project.build.directory}/coverage-reports/aggregate.exec</destFile>
313+
</configuration>
314+
</execution>
315+
<execution>
316+
<id>post-merge-report</id>
317+
<phase>verify</phase>
318+
<goals>
319+
<goal>report</goal>
320+
</goals>
321+
<configuration>
322+
<dataFile>${project.build.directory}/coverage-reports/aggregate.exec</dataFile>
323+
<outputDirectory>${project.reporting.outputDirectory}/jacoco-aggregate</outputDirectory>
324+
</configuration>
325+
</execution>
326+
<!-- End Executions for merging -->
327+
</executions>
328+
</plugin>
329+
</plugins>
330+
</build>
331+
</profile>
259332
<profile>
260333
<id>release-sign-artifacts</id>
261334
<activation>

0 commit comments

Comments
 (0)