diff options
author | Victor Gao <victor.gao@huawei.com> | 2020-02-21 11:48:35 +0800 |
---|---|---|
committer | Victor Gao <victor.gao@huawei.com> | 2020-02-21 11:48:35 +0800 |
commit | 46aea03bcf6a5783c43a32d826fcef1e63e96bb3 (patch) | |
tree | e484cf45be539ee8eeae4c55be231ab58d846997 | |
parent | b27292ec11b3dfa7bd2a3c0e2c15ea6027aaea10 (diff) |
recover code coverage
Issue-ID: VNFSDK-548
Signed-off-by: Victor Gao <victor.gao@huawei.com>
Change-Id: I833f8c17fb64a2df1cd6a99205a46d0a820c5bd0
-rw-r--r-- | pom.xml | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -14,6 +14,16 @@ <name>vnfsdk-validation</name> <packaging>pom</packaging> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <sonar.language>java</sonar.language> + <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> + <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> + <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> + </properties> + <scm> <tag>HEAD</tag> </scm> @@ -56,6 +66,28 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <goals> + <goal>report</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> |