eolivelli commented on a change in pull request #233: WIP - Issue 232: Add
code-coverage report using JaCoCo
URL: https://github.com/apache/bookkeeper/pull/233#discussion_r126493073
##########
File path: bookkeeper-server/pom.xml
##########
@@ -432,5 +432,78 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>code-coverage</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.9</version>
+ <executions>
+ <execution>
+ <id>default-instrument</id>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-restore-instrumented-classes</id>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-report</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <rule
implementation="org.jacoco.maven.RuleConfiguration">
+ <element>BUNDLE</element>
+ <!--
+ <limits>
+ <limit
implementation="org.jacoco.report.check.Limit">
Review comment:
We should define a limit and a criterion to fail the build otherwise we can
run the plugin and simply publish the report.
I would prefer to add a limit, maybe on the max number of uncovered lines
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services