configure jacoco for code-coverage generation
@@ -150,6 +150,7 @@ limitations under the License.
<guava.version>22.0</guava.version>
<findbugs.version>3.0.2</findbugs.version>
+ <jacoco.version>0.7.9</jacoco.version>
<buildergen.version>0.1</buildergen.version>
@@ -259,6 +260,34 @@ limitations under the License.
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ <executions>
+ <execution>
+ <id>prepare-report</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ <!-- re-generate over previous reports, to have unified UTs and ITs -->
+ <execution>
+ <id>report-integration</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -483,6 +512,18 @@ limitations under the License.
</plugins>
</build>
</profile>
+ <profile>
+ <id>code-coverage</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>netbeans-private-testng</id>
<activation>
