Fix error about coverage 36/101436/2
authoryangyan <yangyanyj@chinamobile.com>
Wed, 19 Feb 2020 07:48:19 +0000 (15:48 +0800)
committeryangyan <yangyanyj@chinamobile.com>
Wed, 19 Feb 2020 07:48:26 +0000 (15:48 +0800)
Change-Id: I601f7fbe53fd864f20db0275db06ab8411f75702
Issue-ID: VFC-1619
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
ResmanagementService/deployment/pom.xml

index 9d6325f..a7c69b4 100644 (file)
 
     <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>
 
     <build>
                     </execution>
                 </executions>
             </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>