aboutsummaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorkooper <sergey.sachkov@est.tech>2019-05-07 08:44:41 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-05-08 07:30:27 +0000
commitfaaad99b7304d2d0901c282e7597acc453a77655 (patch)
treed8cec5c7ca91dd00f3ee6089949129afab85a0cb /pom.xml
parent51411acd1d4b06fc9bbc40338a27dd061dba425f (diff)
Jacoco doesn't show coverage for tests that use PowerMock
Change-Id: I28ff85e10dc449bf41b7ce6657ecdf455e9360d4 Issue-ID: SDC-2260 Signed-off-by: kooper <sergey.sachkov@est.tech>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml29
1 files changed, 27 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml
index 7f11a549a5..04d4a24746 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,6 +139,8 @@ Modifications copyright (c) 2018 Nokia
<joda.time.version>2.9.9</joda.time.version>
+ <!--jacoco-->
+ <jacoco.version>0.8.1</jacoco.version>
</properties>
@@ -232,6 +234,17 @@ Modifications copyright (c) 2018 Nokia
</dependencies>
</dependencyManagement>
+ <dependencies>
+ <dependency>
+ <!-- must be on the classpath -->
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.agent</artifactId>
+ <classifier>runtime</classifier>
+ <version>${jacoco.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<reporting>
<plugins>
<plugin>
@@ -389,9 +402,15 @@ Modifications copyright (c) 2018 Nokia
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
- <id>default-prepare-agent</id>
+ <id>default-instrument</id>
<goals>
- <goal>prepare-agent</goal>
+ <goal>instrument</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-restore-instrumented-classes</id>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
</goals>
</execution>
<execution>
@@ -399,6 +418,9 @@ Modifications copyright (c) 2018 Nokia
<goals>
<goal>report</goal>
</goals>
+ <configuration>
+ <dataFile>${project.build.directory}/jacoco.exec</dataFile>
+ </configuration>
</execution>
</executions>
</plugin>
@@ -454,6 +476,9 @@ Modifications copyright (c) 2018 Nokia
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<printSummary>false</printSummary>
+ <systemPropertyVariables>
+ <jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
+ </systemPropertyVariables>
</configuration>
</plugin>
<plugin>