Recognize aggregated sonar reports
[controller.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 20858821d2965a73d0ef1a3fe2b3e237c0351f65..edf9ac4632406b76f37bfc60dfeea41dec73e85e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,12 +4,12 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>2.0.0</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.controller</groupId>
   <artifactId>releasepom</artifactId>
-  <version>0.6.0-SNAPSHOT</version>
+  <version>0.9.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>controller</name>
   <!-- Used by Sonar to set project name -->
@@ -26,9 +26,6 @@
     <module>opendaylight/blueprint</module>
 
     <!-- Parents -->
-    <module>opendaylight/commons/protocol-framework</module>
-    <module>opendaylight/commons/logback_settings</module>
-    <module>opendaylight/commons/liblldp</module>
     <module>benchmark</module>
     <module>opendaylight/commons/jolokia</module>
 
     <!-- archetypes -->
     <module>opendaylight/archetypes</module>
   </modules>
+
+  <profiles>
+    <profile>
+      <id>sonar-jacoco-aggregate</id>
+      <activation>
+        <property>
+          <name>odl.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>${odl.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>
+
   <scm>
     <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>