This is an automated email from the ASF dual-hosted git repository.

thecarlhall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbutils.git

commit f48128284e2277a3b3450a9d91704ac46831b960
Author: Carl Hall <[email protected]>
AuthorDate: Sun Oct 20 20:53:16 2019 -0700

    Add jacoco plugin to build
---
 pom.xml | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/pom.xml b/pom.xml
index ebb62a8..b436af2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -239,6 +239,7 @@
     <maven.compiler.target>1.7</maven.compiler.target>
 
     <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
+    <jacoco.plugin.version>0.8.5</jacoco.plugin.version>
 
     <commons.componentid>dbutils</commons.componentid>
     <commons.module.name>org.apache.commons.dbutils</commons.module.name>
@@ -299,6 +300,46 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <version>${jacoco.plugin.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+          </execution>
+          <!-- attached to Maven test phase -->
+          <execution>
+            <id>report</id>
+            <phase>test</phase>
+              <goals>
+                <goal>report</goal>
+              </goals>
+          </execution>
+          <execution>
+            <id>jacoco-check</id>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <rule>
+                  <element>PACKAGE</element>
+                  <limits>
+                    <limit>
+                      <counter>LINE</counter>
+                      <value>COVEREDRATIO</value>
+                      <minimum>0.9</minimum>
+                    </limit>
+                  </limits>
+                </rule>
+              </rules>
+            </configuration>
+        </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

Reply via email to