summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2020-02-20 11:09:07 +0800
committerYan Yang <yangyanyj@chinamobile.com>2020-02-20 03:10:11 +0000
commitd51241f39026f99b4c6084130858cba48b0276c6 (patch)
treeddf851e8aba91fe68492ca2da6dfdcd6ccc44798
parent1cbcb7de40b2a7046ce629466b9658a82f0dc96b (diff)
Fix error about coverage
Change-Id: Id22ea7f6d6f7f34f4778bbcaa6876500ef9aeb43 Issue-ID: VFC-1619 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rw-r--r--pom.xml30
1 files changed, 30 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 115fd38..b1ceb0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,12 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<package.name>vfc-nfvo-multivimproxy-service</package.name>
+ <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>
<build>
@@ -69,6 +75,30 @@
</instrumentation>
</configuration>
</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>