set the code coverage limit check 78/84378/2
authorrenealr <reneal.rogers@amdocs.com>
Fri, 5 Apr 2019 17:41:48 +0000 (13:41 -0400)
committerrenealr <reneal.rogers@amdocs.com>
Fri, 5 Apr 2019 17:46:37 +0000 (13:46 -0400)
Issue-ID: AAI-2321

Change-Id: Ib363bbec09a2f9eea8bc62dd871bb7d6254fcc9b
Signed-off-by: renealr <reneal.rogers@amdocs.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 251e63c..752b5c9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -42,6 +42,7 @@
         <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
         <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
         <sonar.projectVersion>${project.version}</sonar.projectVersion>
+        <jacoco.line.coverage.limit>0.84</jacoco.line.coverage.limit>
     </properties>
 
     <dependencies>
                 <artifactId>jacoco-maven-plugin</artifactId>
                 <version>0.7.7.201606060606</version>
                 <configuration>
-                    <dumpOnExit>true</dumpOnExit>
+                     <dumpOnExit>true</dumpOnExit>
                 </configuration>
                 <executions>
                     <execution>
                             <!-- <append>true</append> -->
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>default-check</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <configuration>
+                            <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
+                            <rules>
+                                <!--  implementation is needed only for Maven 2  -->
+                                <rule implementation="org.jacoco.maven.RuleConfiguration">
+                                    <element>BUNDLE</element>
+                                    <limits>
+                                        <limit implementation="org.jacoco.report.check.Limit">
+                                            <counter>LINE</counter>
+                                            <value>COVEREDRATIO</value>
+                                            <minimum>${jacoco.line.coverage.limit}</minimum>
+                                        </limit>
+                                    </limits>
+                                </rule>
+                            </rules>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>