Experiment: aggregate jacoco for sonar
[yangtools.git] / yang / rfc6536-parser-support / pom.xml
index 4f8864f7861ed96b95d0f7d0fa81c73288edc025..bfc0ce2ce89db4e3fbe8bf10efb3625a3d83268d 100644 (file)
     <name>${project.artifactId}</name>
     <description>RFC6536 parser support</description>
 
+    <properties>
+        <sonar.jacoco.reportPath>${project.base.directory}/../../target/jacoco.exec</sonar.jacoco.reportPath>
+    </properties>
+
     <dependencyManagement>
         <dependencies>
             <dependency>
                     <failOnError>true</failOnError>
                 </configuration>
            </plugin>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>pre-unit-test</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <destFile>${project.build.directory}/code-coverage/jacoco.exec</destFile>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>post-unit-test</id>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>