1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
4 Copyright (c) 2021 Bell Canada.
5 Modifications Copyright (C) 2021 Nordix Foundation.
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
19 SPDX-License-Identifier: Apache-2.0
20 ============LICENSE_END=========================================================
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
25 <modelVersion>4.0.0</modelVersion>
28 <groupId>org.onap.oparent</groupId>
29 <artifactId>oparent</artifactId>
30 <version>3.2.0</version>
34 <groupId>org.onap.cps</groupId>
35 <artifactId>cps-temporal</artifactId>
36 <version>0.0.1-SNAPSHOT</version>
37 <name>cps-temporal</name>
38 <description>CPS Temporal Service</description>
41 <docker.repository.pull>nexus3.onap.org:10001/</docker.repository.pull>
42 <docker.repository.push>nexus3.onap.org:10003/</docker.repository.push>
43 <image.base>${docker.repository.pull}onap/integration-java11:8.0.0</image.base>
44 <image.name>${docker.repository.push}onap/cps-temporal</image.name>
45 <java.version>11</java.version>
46 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
47 <minimum-coverage>0.8</minimum-coverage>
48 <!-- Application dependencies versions -->
49 <!--cps.version need to be changed to released Istanbul version-->
50 <cps.version>1.1.0-SNAPSHOT</cps.version>
51 <mapstruct.version>1.4.2.Final</mapstruct.version>
54 <dependencyManagement>
57 <groupId>org.springframework.boot</groupId>
58 <artifactId>spring-boot-dependencies</artifactId>
59 <version>2.5.0</version>
64 <groupId>org.spockframework</groupId>
65 <artifactId>spock-bom</artifactId>
66 <version>2.0-M4-groovy-3.0</version>
71 </dependencyManagement>
75 <groupId>org.springframework.boot</groupId>
76 <artifactId>spring-boot-starter</artifactId>
79 <groupId>org.springframework.boot</groupId>
80 <artifactId>spring-boot-starter-web</artifactId>
83 <groupId>org.springframework.boot</groupId>
84 <artifactId>spring-boot-starter-data-jpa</artifactId>
87 <groupId>com.vladmihalcea</groupId>
88 <artifactId>hibernate-types-52</artifactId>
89 <version>2.10.0</version>
92 <groupId>org.liquibase</groupId>
93 <artifactId>liquibase-core</artifactId>
94 <version>4.3.2</version>
97 <groupId>org.projectlombok</groupId>
98 <artifactId>lombok</artifactId>
101 <groupId>org.springframework.boot</groupId>
102 <artifactId>spring-boot-starter-validation</artifactId>
105 <groupId>org.mapstruct</groupId>
106 <artifactId>mapstruct</artifactId>
107 <version>${mapstruct.version}</version>
110 <groupId>org.springframework.kafka</groupId>
111 <artifactId>spring-kafka</artifactId>
114 <groupId>org.onap.cps</groupId>
115 <artifactId>cps-events</artifactId>
116 <version>1.1.0-SNAPSHOT</version>
119 <groupId>org.springdoc</groupId>
120 <artifactId>springdoc-openapi-ui</artifactId>
121 <version>1.5.9</version>
123 <!-- Runtime dependencies-->
125 <groupId>org.postgresql</groupId>
126 <artifactId>postgresql</artifactId>
127 <scope>runtime</scope>
129 <!-- Test dependencies-->
131 <groupId>org.codehaus.groovy</groupId>
132 <artifactId>groovy</artifactId>
133 <version>3.0.7</version>
136 <groupId>org.springframework.boot</groupId>
137 <artifactId>spring-boot-starter-test</artifactId>
141 <groupId>org.junit.vintage</groupId>
142 <artifactId>junit-vintage-engine</artifactId>
147 <groupId>org.spockframework</groupId>
148 <artifactId>spock-core</artifactId>
152 <groupId>org.spockframework</groupId>
153 <artifactId>spock-spring</artifactId>
157 <groupId>org.testcontainers</groupId>
158 <artifactId>junit-jupiter</artifactId>
159 <version>1.15.2</version>
163 <groupId>org.testcontainers</groupId>
164 <artifactId>postgresql</artifactId>
165 <version>1.15.2</version>
169 <groupId>org.testcontainers</groupId>
170 <artifactId>kafka</artifactId>
171 <version>1.15.3</version>
175 <groupId>org.springframework.kafka</groupId>
176 <artifactId>spring-kafka-test</artifactId>
180 <groupId>com.tngtech.archunit</groupId>
181 <artifactId>archunit-junit5</artifactId>
182 <version>0.18.0</version>
190 <directory>docs/api</directory>
191 <targetPath>static</targetPath>
192 <filtering>true</filtering>
195 <directory>src/main/resources</directory>
196 <filtering>true</filtering>
201 <groupId>org.apache.maven.plugins</groupId>
202 <artifactId>maven-compiler-plugin</artifactId>
203 <version>3.8.1</version>
205 <annotationProcessorPaths>
207 <groupId>org.projectlombok</groupId>
208 <artifactId>lombok</artifactId>
209 <version>1.18.20</version>
212 <groupId>org.mapstruct</groupId>
213 <artifactId>mapstruct-processor</artifactId>
214 <version>${mapstruct.version}</version>
216 </annotationProcessorPaths>
220 <groupId>org.springframework.boot</groupId>
221 <artifactId>spring-boot-maven-plugin</artifactId>
222 <version>2.3.3.RELEASE</version>
226 <goal>build-info</goal>
227 <goal>repackage</goal>
233 <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
234 visit https://github.com/groovy/GMavenPlus/wiki -->
235 <groupId>org.codehaus.gmavenplus</groupId>
236 <artifactId>gmavenplus-plugin</artifactId>
237 <version>1.12.1</version>
242 <goal>compileTests</goal>
248 <groupId>org.apache.maven.plugins</groupId>
249 <artifactId>maven-checkstyle-plugin</artifactId>
252 <id>onap-license</id>
256 <phase>process-sources</phase>
258 <configLocation>onap-checkstyle/check-license.xml</configLocation>
259 <includeResources>false</includeResources>
260 <includeTestSourceDirectory>true</includeTestSourceDirectory>
261 <includeTestResources>false</includeTestResources>
263 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
265 <consoleOutput>false</consoleOutput>
266 <violationSeverity>warning</violationSeverity>
267 <failOnViolation>true</failOnViolation>
271 <id>onap-java-style</id>
275 <phase>process-sources</phase>
277 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
279 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
281 <includeResources>true</includeResources>
282 <includeTestSourceDirectory>true</includeTestSourceDirectory>
283 <includeTestResources>true</includeTestResources>
284 <consoleOutput>false</consoleOutput>
285 <violationSeverity>warning</violationSeverity>
286 <failOnViolation>true</failOnViolation>
290 <id>cps-java-style</id>
294 <phase>process-sources</phase>
296 <configLocation>cps-java-style.xml</configLocation>
298 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
300 <includeResources>true</includeResources>
301 <includeTestSourceDirectory>true</includeTestSourceDirectory>
302 <includeTestResources>true</includeTestResources>
303 <consoleOutput>true</consoleOutput>
304 <violationSeverity>warning</violationSeverity>
305 <failOnViolation>true</failOnViolation>
311 <groupId>org.onap.oparent</groupId>
312 <artifactId>checkstyle</artifactId>
313 <version>3.2.0</version>
316 <groupId>org.onap.cps</groupId>
317 <artifactId>checkstyle</artifactId>
318 <version>${cps.version}</version>
323 <groupId>com.github.spotbugs</groupId>
324 <artifactId>spotbugs-maven-plugin</artifactId>
325 <version>4.1.3</version>
328 <groupId>com.github.spotbugs</groupId>
329 <artifactId>spotbugs</artifactId>
330 <version>4.2.0</version>
333 <groupId>org.onap.cps</groupId>
334 <artifactId>spotbugs</artifactId>
335 <version>${cps.version}</version>
338 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
339 <groupId>org.slf4j</groupId>
340 <artifactId>slf4j-simple</artifactId>
341 <version>1.8.0-beta4</version>
347 <groupId>jp.skypencil.findbugs.slf4j</groupId>
348 <artifactId>bug-pattern</artifactId>
349 <version>1.5.0</version>
353 Enables analysis which takes more memory but finds more bugs.
354 If you run out of memory, changes the value of the effort element
358 <addSourceDirs>true</addSourceDirs>
359 <!-- Reports all bugs (other values are medium and max) -->
360 <threshold>Low</threshold>
361 <!-- Build doesn't fail if problems are found -->
362 <failOnError>true</failOnError>
363 <!-- References the excluded rules -->
364 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
365 <!-- Produces XML report -->
366 <xmlOutput>true</xmlOutput>
367 <!-- Configures the directory in which the XML report is created -->
368 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
372 Ensures that SpotBugs inspects source code when project is compiled.
375 <id>analyze-compile</id>
376 <phase>compile</phase>
384 <groupId>org.apache.maven.plugins</groupId>
385 <artifactId>maven-surefire-plugin</artifactId>
387 <!--suppress UnresolvedMavenProperty -->
388 <argLine>${surefireArgLine}</argLine>
389 <useFile>false</useFile>
391 <include>**/*Spec.java</include>
392 <include>**/*Test.java</include>
394 <environmentVariables>
396 Disable privileged container usage to cleanup the test containers;
397 these are removed automatically on jvm termination;
398 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
400 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
401 </environmentVariables>
405 <groupId>org.jacoco</groupId>
406 <artifactId>jacoco-maven-plugin</artifactId>
409 <id>coverage-prepare-agent</id>
411 <goal>prepare-agent</goal>
415 <id>coverage-check</id>
421 <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude>
423 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
426 <element>BUNDLE</element>
429 <counter>INSTRUCTION</counter>
430 <value>COVEREDRATIO</value>
431 <minimum>${minimum-coverage}</minimum>
439 <id>coverage-report</id>
444 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
450 <groupId>io.swagger.codegen.v3</groupId>
451 <artifactId>swagger-codegen-maven-plugin</artifactId>
452 <version>3.0.27</version>
456 <goal>generate</goal>
459 <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
460 <invokerPackage>org.onap.cps.temporal.controller.rest</invokerPackage>
461 <modelPackage>org.onap.cps.temporal.controller.rest.model</modelPackage>
462 <apiPackage>org.onap.cps.temporal.controller.rest</apiPackage>
463 <language>spring</language>
464 <generateSupportingFiles>false</generateSupportingFiles>
466 <sourceFolder>src/gen/java</sourceFolder>
467 <dateLibrary>java11</dateLibrary>
468 <interfaceOnly>true</interfaceOnly>
469 <useTags>true</useTags>
480 <groupId>com.google.cloud.tools</groupId>
481 <artifactId>jib-maven-plugin</artifactId>
482 <version>3.0.0</version>
485 <mainClass>${app}</mainClass>
486 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
489 <image>${image.base}</image>
495 <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
500 <phase>package</phase>
503 <goal>dockerBuild</goal>
507 <phase>deploy</phase>
508 <id>buildAndPush</id>
521 <id>cps-temporal-docker</id>
525 <groupId>com.google.cloud.tools</groupId>
526 <artifactId>jib-maven-plugin</artifactId>