<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
<!-- This project must name Spring as parent; cannot name Portal -->
<parent>
<groupId>org.onap.portal</groupId>
<artifactId>widget-ms</artifactId>
- <version>1.3.0</version>
+ <version>2.3.0</version>
<packaging>jar</packaging>
<name>widget-microservice</name>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<hibernate.version>4.3.11.Final</hibernate.version>
- <skipTests>true</skipTests>
+ <skipTests>false</skipTests>
+ <!-- Replicate this from OParent -->
+ <jacocoVersion>0.7.6.201602180812</jacocoVersion>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
</dependency>
+ <!-- Jacoco offline instrumentation agent -->
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.agent</artifactId>
+ <version>${jacocoVersion}</version>
+ <classifier>runtime</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-core</artifactId>
+ <version>8.5.28</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>1.2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>2.8.10</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>2.8.10</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.8.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>4.1.4.RELEASE</version>
+ </dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
+ <!-- replicated from OParent -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.6.201602180812</version>
+ <version>${jacocoVersion}</version>
<executions>
+ <!-- disable jacoco executions from oparent -->
+ <execution>
+ <id>pre-unit-test</id>
+ <phase>none</phase>
+ </execution>
+ <execution>
+ <id>post-unit-test</id>
+ <phase>none</phase>
+ </execution>
+ <execution>
+ <id>pre-integration-test</id>
+ <phase>none</phase>
+ </execution>
<execution>
- <id>prepare-agent</id>
+ <id>post-integration-test</id>
+ <phase>none</phase>
+ </execution>
+ <!-- Order matters -->
+ <execution>
+ <id>portal-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<destFile>${sonar.jacoco.reportPath}</destFile>
</configuration>
</execution>
+ <!-- offline instrumentation for PowerMock -->
<execution>
- <id>default-instrument</id>
+ <id>portal-offline-instrument</id>
<goals>
<goal>instrument</goal>
</goals>
</execution>
<execution>
- <id>default-restore-instrumented-classes</id>
+ <id>portal-restore-instrumented-classes</id>
<phase>test</phase>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
</execution>
<execution>
- <id>post-unit-test</id>
+ <id>portal-post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
<outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
</configuration>
</execution>
-
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <jacoco-agent.destfile>${project.build.directory}/code-coverage/jacoco-ut.exec</jacoco-agent.destfile>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
</plugins>
</build>