Override oparent sonar 92/100292/1
authorPamela Dragosh <pdragosh@research.att.com>
Tue, 14 Jan 2020 19:11:20 +0000 (14:11 -0500)
committerPamela Dragosh <pdragosh@research.att.com>
Tue, 14 Jan 2020 19:11:25 +0000 (14:11 -0500)
We don't have any IT tests, so let's skip them. This
may have a trivial bump in speed.

Use the same datafile, and make sure the results are
being appended to support multi-module.

This will result in all the repos removing this
configuration as it only needs to be set here in
policy/parent. Cleans up things a bit.

Issue-ID: POLICY-2321
Change-Id: I999cb3bb8a7a764ffc7459fc9e0b9b8377dbecb3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
integration/pom.xml

index 4090372..c840fac 100644 (file)
@@ -47,6 +47,7 @@
         <version.javax.bind>2.3.1</version.javax.bind>
         <version.javax.json>1.1.4</version.javax.json>
         <version.json>20190722</version.json>
+        <jacoco.dataFile>${project.basedir}/../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
     </properties>
 
     <distributionManagement>
                     <target>${java.version}</target>
                 </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>${jacoco.dataFile}</destFile>
+                            <append>true</append>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>post-unit-test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <dataFile>${jacoco.dataFile}</dataFile>
+                        </configuration>
+                    </execution>
+                    <execution>
+                      <id>pre-integration-test</id>
+                      <phase>pre-integration-test</phase>
+                      <goals>
+                        <goal>prepare-agent</goal>
+                      </goals>
+                      <configuration>
+                        <skip>true</skip>
+                      </configuration>
+                    </execution>
+                    <execution>
+                      <id>post-integration-test</id>
+                      <phase>post-integration-test</phase>
+                      <goals>
+                        <goal>report</goal>
+                      </goals>
+                      <configuration>
+                        <skip>true</skip>
+                      </configuration>
+                    </execution>
+
+                </executions>
+            </plugin>
         </plugins>
     </build>