Fix unit test coverage settings 29/14629/1
authorLorand Jakab <lojakab@cisco.com>
Fri, 30 Jan 2015 13:51:22 +0000 (15:51 +0200)
committerLorand Jakab <lojakab@cisco.com>
Fri, 30 Jan 2015 13:51:22 +0000 (15:51 +0200)
Change-Id: Iea1cb56557c0f3401fb735088a1092223c375311
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
commons/parent/pom.xml
mappingservice/integrationtest/pom.xml

index ecc466183285d812641034345c4a91e55ff25e79..01370a5001c91208bba138d6a9f0e8b365b5e170 100644 (file)
@@ -43,6 +43,8 @@
     <nsf.version>0.5.0-SNAPSHOT</nsf.version>
     <sal.version>0.9.0-SNAPSHOT</sal.version>
     <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
+    <sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>
+    <sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
     <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
     <statisticsmanager.version>0.5.0</statisticsmanager.version>
     <xtend.dstdir>src/main/xtend-gen</xtend.dstdir>
             </lifecycleMappingMetadata>
           </configuration>
         </plugin>
-        <plugin>
-          <groupId>org.jacoco</groupId>
-          <artifactId>jacoco-maven-plugin</artifactId>
-          <version>${jacoco.version}</version>
-        </plugin>
         <plugin>
           <!-- here we are defining the default generators for yang You may need
                to override this in child poms if you want to define additional generators,
       </plugins>
     </pluginManagement>
     <plugins>
-
       <plugin>
-        <!-- This should run on ALL projects because it makes eclipse import
-             the correct source folders to get rid of hte red x's. This should live in
-             ODLPARENT. -->
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
+        <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>
+           <execution>
+             <id>post-test</id>
+             <phase>test</phase>
+             <goals>
+               <goal>report</goal>
+             </goals>
+           </execution>
+        </executions>
       </plugin>
-
     </plugins>
   </build>
 
index ee8669b4c4a6ada002069ca9d0eeb33538a7c0fa..28fd391495052c4ba47931f24dc422805fe89f0e 100644 (file)
   <name>LISP Flow Mapping Integration Tests</name>
   <version>1.2.0-SNAPSHOT</version>
   <properties>
-      <sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>
-    <sonar.branch>${user.name}-develop</sonar.branch>
-    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
-    <sonar.language>java</sonar.language>
     <exam.version>3.0.0</exam.version>
+    <sonar.jacoco.itReportPath>target/jacoco-it.exec</sonar.jacoco.itReportPath>
+    <sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
+    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
     <!-- Dependency Versions -->
     <junit.version>4.8.1</junit.version>
     <lispflowmapping.version>1.2.0-SNAPSHOT</lispflowmapping.version>
         </configuration>
       </plugin>
       <plugin>
-       <groupId>org.jacoco</groupId>
-       <artifactId>jacoco-maven-plugin</artifactId>
-       <configuration>
-         <includes>
-           <include>org.opendaylight.org.opendaylight.lispflowmapping.*.*</include>
-         </includes>
-       </configuration>
-       <executions>
-         <execution>
-           <id>pre-test</id>
-           <goals>
-             <goal>prepare-agent</goal>
-           </goals>
-         </execution>
-         <execution>
-           <id>post-test</id>
-           <goals>
-             <goal>report</goal>
-           </goals>
-           <phase>test</phase>
-         </execution>
-       </executions>
-     </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>
+           <execution>
+             <id>post-test</id>
+             <phase>test</phase>
+             <goals>
+               <goal>report</goal>
+             </goals>
+           </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.ops4j.pax.exam</groupId>
         <artifactId>maven-paxexam-plugin</artifactId>