Fix unit test coverage settings
[lispflowmapping.git] / commons / parent / 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>