diff options
author | Tian Lee <TianL@amdocs.com> | 2019-04-01 13:34:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-01 13:34:47 +0000 |
commit | 89f8bf3e0fbc93b43c7eea7d1f20cfb0ec14be7f (patch) | |
tree | 155825ca61050c7885e1450d72a4bc33cdafe58f | |
parent | a6a0a0d2acc7903df3e4a0fccde8b14f8c102eb0 (diff) | |
parent | 178e838b632cf90fd3e8ec4406aba33d23a6f199 (diff) |
Merge "Configure Jacoco plugin to enforce min coverage"
-rw-r--r-- | pom.xml | 31 |
1 files changed, 22 insertions, 9 deletions
@@ -39,6 +39,10 @@ <event.client.version>1.4.0-SNAPSHOT</event.client.version> <version.aai-schema>1.0.0</version.aai-schema> <version.aai-schema-ingest>1.4.1</version.aai-schema-ingest> + <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in + coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 --> + <jacoco.line.coverage.limit>0.55</jacoco.line.coverage.limit> + <jacoco.report.directory>${project.build.directory}/code-coverage</jacoco.report.directory> </properties> <dependencyManagement> @@ -283,17 +287,26 @@ <artifactId>jacoco-maven-plugin</artifactId> <executions> <execution> - <id>prepare-agent</id> + <id>default-check</id> <goals> - <goal>prepare-agent</goal> - </goals> - </execution> - <execution> - <id>report</id> - <phase>package</phase> - <goals> - <goal>report</goal> + <goal>check</goal> </goals> + <configuration> + <dataFile>${jacoco.report.directory}/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> |