summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openecomp-be/pom.xml33
-rw-r--r--pom.xml29
2 files changed, 27 insertions, 35 deletions
diff --git a/openecomp-be/pom.xml b/openecomp-be/pom.xml
index 8d7de5c15f..7474467b88 100644
--- a/openecomp-be/pom.xml
+++ b/openecomp-be/pom.xml
@@ -57,39 +57,6 @@
<artifactId>maven-jar-plugin</artifactId>
<version>${mvn.jar.version}</version>
</plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>default-prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- <execution>
- <id>report</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>report</goal>
- </goals>
- </execution>
- <execution>
- <id>post-unit-test</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <!-- Sets the path to the file which contains the execution data. -->
- <dataFile>target/jacoco.exec</dataFile>
- <!-- Sets the output directory for the code coverage report. -->
- <outputDirectory>target/jacoco-ut</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
</plugins>
</build>
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>