diff options
author | Dan Timoney <dtimoney@att.com> | 2020-01-21 08:52:37 -0500 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2020-01-21 08:52:37 -0500 |
commit | bfff55a06c555babe476eab98d39e468c19063f9 (patch) | |
tree | 68f75ee6f8efcb76b24e95ca37b16b5093461d1b | |
parent | 4da70e483b8f177b9dad4ea59a80757e82b575c6 (diff) |
Add report aggregator
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>
-rw-r--r-- | sli/provider-base/pom.xml | 11 | ||||
-rwxr-xr-x | sli/provider/pom.xml | 24 |
2 files changed, 30 insertions, 5 deletions
diff --git a/sli/provider-base/pom.xml b/sli/provider-base/pom.xml index 214cbe94b..7f9e66b04 100644 --- a/sli/provider-base/pom.xml +++ b/sli/provider-base/pom.xml @@ -12,11 +12,11 @@ <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> diff --git a/sli/provider/pom.xml b/sli/provider/pom.xml index 66717b7ff..cf4e004b3 100755 --- a/sli/provider/pom.xml +++ b/sli/provider/pom.xml @@ -110,7 +110,31 @@ </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> |