Add report aggregator 44/100544/1
authorDan Timoney <dtimoney@att.com>
Tue, 21 Jan 2020 13:52:37 +0000 (08:52 -0500)
committerDan Timoney <dtimoney@att.com>
Tue, 21 Jan 2020 13:52:37 +0000 (08:52 -0500)
For new Sonar scanner, need to add report aggregate so that tests
run in sli/provider against classes in sli/provider-base will be
counted correctly.

Change-Id: I0a73a0a50353f995ea4b90c09649e55b057f024a
Issue-ID: CCSDK-2029
Signed-off-by: Dan Timoney <dtimoney@att.com>
sli/provider-base/pom.xml
sli/provider/pom.xml

index 214cbe9..7f9e66b 100644 (file)
        <groupId>org.onap.ccsdk.sli.core</groupId>
        <artifactId>sli-provider-base</artifactId>
        <version>0.7.0-SNAPSHOT</version>
-    
-    <properties>
-    
-        <sonar.jacoco.reportPaths>target/code-coverage/jacoco-ut.exec,target/code-coverage/jacoco-it.exec,../provider/target/code-coverage/jacoco-ut.exec,../provider/target/code-coverage/jacoco-it.exec</sonar.jacoco.reportPaths>
-    </properties>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml,${project.reporting.outputDirectory}/jacoco-it/jacoco.xml,../provider/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+       </properties>
 
        <dependencyManagement>
                <dependencies>
@@ -61,4 +61,5 @@
        </dependencies>
 
 
+
 </project>
index 66717b7..cf4e004 100755 (executable)
                                </configuration>
 
                        </plugin>
+                       <!-- Jacoco / Sonar -->
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>${jacoco.version}</version>
+                               <executions>
+                                       <execution>
+                                               <id>aggregate-report</id>
+                                               <phase>verify</phase>
+                                               <goals>
+                                                       <goal>report-aggregate</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <dataFileIncludes>
+                                                               target/code-coverage/jacoco-ut.exec,
+                                                               target/code-coverage/jacoco-it.exec,
+                                                               ../provider-base/target/code-coverage/jacoco-ut.exec,
+                                                               ../provider-base/target/code-coverage/jacoco-it.exec
+                                                       </dataFileIncludes>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
 
        </build>
+
 </project>