Fix error about coverage 53/102053/4
authoryangyan <yangyanyj@chinamobile.com>
Thu, 20 Feb 2020 07:49:01 +0000 (15:49 +0800)
committerYan Yang <yangyanyj@chinamobile.com>
Thu, 20 Feb 2020 07:52:38 +0000 (07:52 +0000)
Change-Id: I2b0f63662a8705eed68657648fdfca5e9044691a
Issue-ID: VFC-1619
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
nokiav2/driver/pom.xml
nokiav2/generatedapis/pom.xml

index a82fefa..d0d06f9 100644 (file)
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <java.version>1.8</java.version>
+    <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>
   <dependencies>
     <dependency>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-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>
 </project>
index 4d089ca..afa784a 100644 (file)
@@ -335,7 +335,8 @@ Release AAI
              </configuration>
           </execution>
        </executions>
-    </plugin>
+      </plugin>
+
     </plugins>
   </build>
   <dependencies>