1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6 <groupId>org.onap.oparent</groupId>
7 <artifactId>oparent</artifactId>
8 <version>3.1.0</version>
11 <modelVersion>4.0.0</modelVersion>
13 <groupId>org.onap.cps</groupId>
14 <artifactId>cps-parent</artifactId>
15 <version>0.0.1-SNAPSHOT</version>
16 <packaging>pom</packaging>
19 <app>org.onap.cps.Application</app>
20 <base.image>openjdk:11-jre-slim</base.image>
21 <java.version>11</java.version>
22 <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
23 <minimum-coverage>0.20</minimum-coverage>
24 <nexusproxy>https://nexus.onap.org</nexusproxy>
25 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
26 <oparent.version>3.1.0</oparent.version>
27 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
29 <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
30 <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
31 <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
32 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
33 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
34 <tag.version>${project.version}</tag.version>
37 <distributionManagement>
39 <id>ecomp-releases</id>
40 <name>ECOMP Release Repository</name>
41 <url>${nexusproxy}${releaseNexusPath}</url>
44 <id>ecomp-snapshots</id>
45 <name>ECOMP Snapshot Repository</name>
46 <url>${nexusproxy}${snapshotNexusPath}</url>
48 </distributionManagement>
54 <activeByDefault>false</activeByDefault>
60 <groupId>com.google.cloud.tools</groupId>
61 <artifactId>jib-maven-plugin</artifactId>
62 <version>${jib-maven-plugin.version}</version>
65 <mainClass>${app}</mainClass>
66 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
69 <image>${base.image}</image>
72 <image>${repository.name}</image>
74 <tag>${tag.version}</tag>
80 <phase>package</phase>
83 <goal>dockerBuild</goal>
101 <dependencyManagement>
104 <groupId>org.onap.cps</groupId>
105 <artifactId>cps-dependencies</artifactId>
106 <version>${project.version}</version>
108 <scope>import</scope>
111 <groupId>org.onap.cps</groupId>
112 <artifactId>cps-bom</artifactId>
113 <version>${project.version}</version>
115 <scope>import</scope>
118 </dependencyManagement>
123 <directory>src/main/resources</directory>
124 <filtering>true</filtering>
127 <directory>target/generated-sources/license</directory>
129 <include>third-party-licenses.txt</include>
133 <directory>target/generated-resources/licenses</directory>
135 <include>*.*</include>
137 <targetPath>third-party-licenses</targetPath>
143 <groupId>org.springframework.boot</groupId>
144 <artifactId>spring-boot-maven-plugin</artifactId>
145 <version>${spring-boot-maven-plugin.version}</version>
149 <goal>build-info</goal>
150 <goal>repackage</goal>
155 <!-- Swagger code generation. -->
157 <groupId>io.swagger.codegen.v3</groupId>
158 <artifactId>swagger-codegen-maven-plugin</artifactId>
159 <version>${swagger-codegen-maven-plugin.version}</version>
163 <goal>generate</goal>
166 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
167 <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
168 <modelPackage>org.onap.cps.rest.model</modelPackage>
169 <apiPackage>org.onap.cps.rest.api</apiPackage>
170 <language>spring</language>
171 <generateSupportingFiles>false</generateSupportingFiles>
173 <sourceFolder>src/gen/java</sourceFolder>
174 <dateLibrary>java11</dateLibrary>
175 <interfaceOnly>true</interfaceOnly>
176 <useTags>true</useTags>
183 <groupId>com.google.cloud.tools</groupId>
184 <artifactId>jib-maven-plugin</artifactId>
185 <version>${jib-maven-plugin.version}</version>
188 <mainClass>${app}</mainClass>
189 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
192 <image>${base.image}</image>
195 <image>${repository.name}</image>
197 <tag>${tag.version}</tag>
206 <groupId>org.apache.maven.plugins</groupId>
207 <artifactId>maven-compiler-plugin</artifactId>
209 <source>${java.version}</source>
210 <target>${java.version}</target>
214 <groupId>org.apache.maven.plugins</groupId>
215 <artifactId>maven-checkstyle-plugin</artifactId>
218 <id>onap-license</id>
222 <phase>process-sources</phase>
224 <configLocation>onap-checkstyle/check-license.xml</configLocation>
225 <includeResources>false</includeResources>
226 <includeTestSourceDirectory>true</includeTestSourceDirectory>
227 <includeTestResources>false</includeTestResources>
229 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
231 <consoleOutput>false</consoleOutput>
232 <violationSeverity>warning</violationSeverity>
233 <failOnViolation>true</failOnViolation>
237 <id>onap-java-style</id>
241 <phase>process-sources</phase>
243 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
245 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
247 <includeResources>true</includeResources>
248 <includeTestSourceDirectory>true</includeTestSourceDirectory>
249 <includeTestResources>true</includeTestResources>
250 <consoleOutput>false</consoleOutput>
251 <violationSeverity>warning</violationSeverity>
252 <failOnViolation>true</failOnViolation>
256 <id>cps-java-style</id>
260 <phase>process-sources</phase>
262 <configLocation>cps-java-style.xml</configLocation>
264 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
266 <includeResources>true</includeResources>
267 <includeTestSourceDirectory>true</includeTestSourceDirectory>
268 <includeTestResources>true</includeTestResources>
269 <consoleOutput>true</consoleOutput>
270 <violationSeverity>warning</violationSeverity>
271 <failOnViolation>true</failOnViolation>
277 <groupId>org.onap.oparent</groupId>
278 <artifactId>checkstyle</artifactId>
279 <version>${oparent.version}</version>
282 <groupId>${project.groupId}</groupId>
283 <artifactId>checkstyle</artifactId>
284 <version>${project.version}</version>
288 <!-- Mandatory plugins for using Spock -->
290 <!-- The gmavenplus plugin is used to compile Groovy code.
291 To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
292 <groupId>org.codehaus.gmavenplus</groupId>
293 <artifactId>gmavenplus-plugin</artifactId>
294 <version>1.9.0</version>
298 <goal>compileTests</goal>
303 <!-- Required because names of spec classes don't match default
304 Surefire patterns (`*Test` etc.) -->
306 <groupId>org.apache.maven.plugins</groupId>
307 <artifactId>maven-surefire-plugin</artifactId>
309 <argLine>${surefireArgLine}</argLine>
310 <useFile>false</useFile>
312 <include>**/*Spec.java</include>
313 <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
316 <exclude>**/IT*.java</exclude>
321 <groupId>org.jacoco</groupId>
322 <artifactId>jacoco-maven-plugin</artifactId>
325 <id>default-prepare-agent</id>
327 <goal>prepare-agent</goal>
331 <id>coverage-check</id>
336 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
339 <element>BUNDLE</element>
342 <counter>INSTRUCTION</counter>
343 <value>COVEREDRATIO</value>
344 <minimum>${minimum-coverage}</minimum>