<?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>
- <groupId>org.openecomp.portal</groupId>
- <artifactId>widget-ms</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>widget-microservice</name>
+ <modelVersion>4.0.0</modelVersion>
+ <!-- This project must name Spring as parent; cannot name Portal -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<relativePath /> <!-- lookup parent from repository -->
</parent>
+ <groupId>org.onap.portal</groupId>
+ <artifactId>widget-ms</artifactId>
+ <version>2.2</version>
+ <packaging>jar</packaging>
+ <name>widget-microservice</name>
+
<properties>
<docker.imagename>widget-ms</docker.imagename>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<hibernate.version>4.3.11.Final</hibernate.version>
<skipTests>true</skipTests>
+ <!-- Replicate this from OParent -->
+ <jacocoVersion>0.7.6.201602180812</jacocoVersion>
</properties>
<dependencies>
+ <!-- This pom pulls in artifacts -->
+ <dependency>
+ <groupId>org.onap.portal</groupId>
+ <artifactId>common-widgets</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ </dependency>
<dependency>
<!-- Setup Spring Data JPA Repository support -->
<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>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<!-- To add resources, must name all including usual src/main/resources -->
- <resources>
+ <resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
- <resource>
- <directory>../common-widgets/target</directory>
- <includes>
- <include>**/*.zip</include>
- </includes>
- </resource>
- </resources>
+ <resource>
+ <directory>../common-widgets/target</directory>
+ <includes>
+ <include>**/*.zip</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <pluginManagement>
+ <plugins>
+ <!-- replicated from OParent -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.6</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.10</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
+ <!-- No deployment step for this project -->
<plugin>
- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.4.11</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <!-- version set by spring <version>2.8</version> -->
<configuration>
- <imageName>${project.artifactId}</imageName>
- <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <directory>${project.build.directory}</directory>
- <include>${project.build.finalName}.jar</include>
- </resource>
- </resources>
+ <skip>true</skip>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <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>post-integration-test</id>
+ <phase>none</phase>
+ </execution>
+ <!-- Order matters -->
+ <execution>
+ <id>portal-prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <!-- offline instrumentation for PowerMock -->
+ <execution>
+ <id>portal-offline-instrument</id>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>portal-restore-instrumented-classes</id>
+ <phase>test</phase>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>portal-post-unit-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <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>
+ <!-- This POM cannot inherit from OParent -->
+ <distributionManagement>
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:https://nexus.onap.org/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</url>
+ </site>
+ </distributionManagement>
+
</project>