diff options
author | jjia <Jennie.Jia@amdocs.com> | 2019-04-05 14:51:26 -0400 |
---|---|---|
committer | jjia <Jennie.Jia@amdocs.com> | 2019-04-05 14:52:09 -0400 |
commit | 6b34334fa325f710093eacb82196c591e6e4e5c9 (patch) | |
tree | aeadccd138ae88ac9a267136bbf84d16eb604845 | |
parent | c48523f7e3aa7eb2f17f71448d679335dc395099 (diff) |
Set Jacoco coverage limit
Issue-ID: AAI-2247
Change-Id: Ib0c82e67dc1bf5b2a9304a5adeb8f705f8422256
Signed-off-by: jjia <Jennie.Jia@amdocs.com>
-rw-r--r-- | pom.xml | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -43,6 +43,7 @@ limitations under the License. <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero> <sonar.projectVersion>${project.version}</sonar.projectVersion> <camel-spring-boot.version>2.22.1</camel-spring-boot.version> + <jacoco.line.coverage.limit>0.71</jacoco.line.coverage.limit> </properties> <dependencies> <dependency> @@ -234,16 +235,30 @@ limitations under the License. <dumpOnExit>true</dumpOnExit> </configuration> <executions> + <execution> - <id>jacoco-initialize-unit-tests</id> - <goals> - <goal>prepare-agent</goal> - </goals> - <configuration> - <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile> - <!-- <append>true</append> --> - </configuration> - </execution> + <id>default-check</id> + <goals> + <goal>check</goal> + </goals> + <configuration> + <dataFile>${sonar.jacoco.reportPath}</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> </plugins> |