Fix error about coverage 45/102045/2
authoryangyan <yangyanyj@chinamobile.com>
Thu, 20 Feb 2020 06:33:38 +0000 (14:33 +0800)
committerYan Yang <yangyanyj@chinamobile.com>
Thu, 20 Feb 2020 06:35:08 +0000 (06:35 +0000)
Change-Id: I613f27e0f356a34d5144bf9da4c2e6f532c68821
Issue-ID: VFC-1619
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
huawei/vnfmadapter/pom.xml
nokiav2/generatedapis/pom.xml

index 7824513..f3f82b4 100644 (file)
     <packaging>pom</packaging>
     <name>vfc-nfvo-driver-vnfm-svnfm</name>
     <description>nfvo vnfmadapter</description>
+    <properties>
+    <packagename>VnfmadapterService</packagename>
+    <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>
     <modules>
         <module>VnfmadapterService</module>
     </modules>
                     </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>
 
index 909fefd..4d089ca 100644 (file)
     <threetenbp-version>1.3.5</threetenbp-version>
     <oltu-version>1.0.1</oltu-version>
     <swagger-core-version>1.5.15</swagger-core-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>
   <build>
     <plugins>
@@ -309,6 +314,28 @@ Release AAI
           <target>1.8</target>
         </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>
   <dependencies>