Skip to content

Commit 01aedbd

Browse files
committed
Switch to jacoco code coverage analysis iluwatar#59
1 parent a736341 commit 01aedbd

File tree

2 files changed

+52
-10
lines changed

2 files changed

+52
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ branches:
99
- master
1010

1111
after_success:
12-
- mvn clean cobertura:cobertura coveralls:report
12+
- mvn clean test jacoco:report coveralls:report

pom.xml

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<junit.version>4.12</junit.version>
1616
<compiler.version>3.0</compiler.version>
1717
<coveralls.version>3.1.0</coveralls.version>
18-
<cobertura.version>2.6</cobertura.version>
18+
<jacoco.version>0.7.2.201409121644</jacoco.version>
1919
</properties>
2020
<modules>
2121
<module>abstract-factory</module>
@@ -88,8 +88,47 @@
8888
</dependency>
8989
</dependencies>
9090
</dependencyManagement>
91+
9192

9293
<build>
94+
<pluginManagement>
95+
<plugins>
96+
<!--
97+
This plugin's configuration is used to store Eclipse m2e settings only.
98+
It has no influence on the Maven build itself.
99+
TODO: Remove when the m2e plugin can correctly bind to Maven lifecycle
100+
-->
101+
<plugin>
102+
<groupId>org.eclipse.m2e</groupId>
103+
<artifactId>lifecycle-mapping</artifactId>
104+
<version>1.0.0</version>
105+
<configuration>
106+
<lifecycleMappingMetadata>
107+
<pluginExecutions>
108+
<pluginExecution>
109+
<pluginExecutionFilter>
110+
<groupId>org.jacoco</groupId>
111+
<artifactId>
112+
jacoco-maven-plugin
113+
</artifactId>
114+
<versionRange>
115+
[0.6.2,)
116+
</versionRange>
117+
<goals>
118+
<goal>prepare-agent</goal>
119+
</goals>
120+
</pluginExecutionFilter>
121+
<action>
122+
<ignore />
123+
</action>
124+
</pluginExecution>
125+
</pluginExecutions>
126+
</lifecycleMappingMetadata>
127+
</configuration>
128+
</plugin>
129+
</plugins>
130+
</pluginManagement>
131+
93132
<plugins>
94133
<!-- Tell maven to compile using Java 8 -->
95134
<plugin>
@@ -110,14 +149,17 @@
110149
</configuration>
111150
</plugin>
112151
<plugin>
113-
<groupId>org.codehaus.mojo</groupId>
114-
<artifactId>cobertura-maven-plugin</artifactId>
115-
<version>${cobertura.version}</version>
116-
<configuration>
117-
<format>xml</format>
118-
<maxmem>256m</maxmem>
119-
<aggregate>true</aggregate>
120-
</configuration>
152+
<groupId>org.jacoco</groupId>
153+
<artifactId>jacoco-maven-plugin</artifactId>
154+
<version>${jacoco.version}</version>
155+
<executions>
156+
<execution>
157+
<id>prepare-agent</id>
158+
<goals>
159+
<goal>prepare-agent</goal>
160+
</goals>
161+
</execution>
162+
</executions>
121163
</plugin>
122164
</plugins>
123165
</build>

0 commit comments

Comments
 (0)