Set up sonar with jacoco 00/25200/1
authorKai GAO <gaok12@mails.tsinghua.edu.cn>
Wed, 12 Aug 2015 13:03:41 +0000 (21:03 +0800)
committerKai GAO <gaok12@mails.tsinghua.edu.cn>
Wed, 12 Aug 2015 13:03:41 +0000 (21:03 +0800)
Already tested on local machine

Change-Id: I980c419534235906c90166bb1b05bafc748ad7fd
Signed-off-by: Kai GAO <gaok12@mails.tsinghua.edu.cn>
.gitignore
pom.xml

index dcd00626546a4f05e9962adc83132817f2035ffd..13d6c9445564cf3410df08935fe9c96789d84258 100644 (file)
@@ -31,3 +31,4 @@ maven-eclipse.xml
 **/*.swp
 **/*.checkstyle
 **/*.swo
+.zsh*
diff --git a/pom.xml b/pom.xml
index d3ee411ff22795d00bb0d9180500433a3a20e84e..720bd9b6fca8cbf2a52bfa8cd59536ceb2634144 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -29,9 +29,8 @@
     <module>alto-services/api</module>
     <module>alto-services/provider</module>
     <module>alto-extensions</module>
-    <!-- <module>alto-karaf</module> -->
     <module>alto-northbound</module>
-    <module>alto-karaf</module>
+    <!-- <module>alto-karaf</module> -->
   </modules>
 
   <properties>
             </dependency>
           </dependencies>
         </plugin>
+
+        <plugin>
+          <groupId>org.jacoco</groupId>
+          <artifactId>jacoco-maven-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>prepare-ut-agent</id>
+              <phase>process-test-classes</phase>
+              <goals>
+                <goal>prepare-agent</goal>
+              </goals>
+              <configuration>
+                <destFile>${sonar.jacoco.reportPath}</destFile>
+              </configuration>
+            </execution>
+            <execution>
+              <id>prepare-it-agent</id>
+              <phase>pre-integration-test</phase>
+              <goals>
+                <goal>prepare-agent</goal>
+              </goals>
+              <configuration>
+                <destFile>${sonar.jacoco.itReportPath}</destFile>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
       </plugins>
     </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
   </build>
 </project>