diff options
-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> |