aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@linuxfoundation.org>2019-11-20 12:34:56 -0800
committerJessica Wagantall <jwagantall@linuxfoundation.org>2019-11-20 12:51:26 -0800
commit3adfb4814f1bba2a1bbb772f3e37f4b535d32ed7 (patch)
tree073be33ae15f60e73781524f80eb780238d89beb
parentc2cdc2a06dba09a00bfa1b47fcc0e26c6a744a89 (diff)
Add aggragate coverage support
This adds the build-system-side of aggragating jacoco reports for sonar. Issue-ID: CIMAN-343 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org> Change-Id: If1b0b7dfcf119141c71eeaa783c7a7f62385efcf
-rw-r--r--pom.xml44
1 files changed, 38 insertions, 6 deletions
diff --git a/pom.xml b/pom.xml
index 894e4c0..01b9628 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,44 @@
<url>${onap.nexus.url}/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
+ <profiles>
+ <profile>
+ <id>sonar-jacoco-aggregate</id>
+ <activation>
+ <property>
+ <name>onap.jacoco.aggregateFile</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>merge</id>
+ <goals>
+ <goal>merge</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <destFile>${onap.jacoco.aggregateFile}</destFile>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}</directory>
+ <includes>
+ <include>**/target/code-coverage/*.exec</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<build>
<pluginManagement>
<plugins>
@@ -124,12 +162,6 @@
</execution>
</executions>
</plugin>
- <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
- <plugin>
- <groupId>org.sonarsource.scanner.maven</groupId>
- <artifactId>sonar-maven-plugin</artifactId>
- <version>3.2</version>
- </plugin>
</plugins>
</pluginManagement>
<plugins>