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>1.1.0-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>2.1.0-SNAPSHOT</cps.version>
50 <mapstruct.version>1.4.2.Final</mapstruct.version>
53 <dependencyManagement>
56 <groupId>org.springframework.boot</groupId>
57 <artifactId>spring-boot-dependencies</artifactId>
58 <version>2.5.5</version>
63 <groupId>org.spockframework</groupId>
64 <artifactId>spock-bom</artifactId>
65 <version>2.0-M4-groovy-3.0</version>
70 <groupId>org.testcontainers</groupId>
71 <artifactId>testcontainers-bom</artifactId>
72 <version>1.15.3</version>
77 <groupId>org.apache.logging.log4j</groupId>
78 <artifactId>log4j-api</artifactId>
79 <version>2.17.1</version>
82 <groupId>org.apache.logging.log4j</groupId>
83 <artifactId>log4j-to-slf4j</artifactId>
84 <version>2.17.1</version>
87 </dependencyManagement>
91 <groupId>org.springframework.boot</groupId>
92 <artifactId>spring-boot-starter</artifactId>
95 <groupId>org.springframework.boot</groupId>
96 <artifactId>spring-boot-starter-web</artifactId>
99 <groupId>org.springframework.boot</groupId>
100 <artifactId>spring-boot-starter-data-jpa</artifactId>
103 <groupId>org.springframework.boot</groupId>
104 <artifactId>spring-boot-starter-security</artifactId>
107 <groupId>org.springframework.boot</groupId>
108 <artifactId>spring-boot-starter-actuator</artifactId>
111 <groupId>io.micrometer</groupId>
112 <artifactId>micrometer-registry-prometheus</artifactId>
115 <groupId>com.vladmihalcea</groupId>
116 <artifactId>hibernate-types-52</artifactId>
117 <version>2.10.0</version>
120 <groupId>org.liquibase</groupId>
121 <artifactId>liquibase-core</artifactId>
122 <version>4.4.2-nordix</version>
125 <groupId>org.projectlombok</groupId>
126 <artifactId>lombok</artifactId>
129 <groupId>org.springframework.boot</groupId>
130 <artifactId>spring-boot-starter-validation</artifactId>
133 <groupId>org.springframework.boot</groupId>
134 <artifactId>spring-boot-starter-hateoas</artifactId>
137 <groupId>org.mapstruct</groupId>
138 <artifactId>mapstruct</artifactId>
139 <version>${mapstruct.version}</version>
142 <groupId>org.springframework.kafka</groupId>
143 <artifactId>spring-kafka</artifactId>
146 <groupId>org.onap.cps</groupId>
147 <artifactId>cps-events</artifactId>
148 <version>${cps.version}</version>
151 <groupId>org.springdoc</groupId>
152 <artifactId>springdoc-openapi-ui</artifactId>
153 <version>1.5.9</version>
155 <!-- Runtime dependencies-->
157 <groupId>org.postgresql</groupId>
158 <artifactId>postgresql</artifactId>
159 <scope>runtime</scope>
161 <!-- Test dependencies-->
163 <groupId>org.codehaus.groovy</groupId>
164 <artifactId>groovy</artifactId>
165 <version>3.0.7</version>
168 <groupId>org.springframework.boot</groupId>
169 <artifactId>spring-boot-starter-test</artifactId>
173 <groupId>org.junit.vintage</groupId>
174 <artifactId>junit-vintage-engine</artifactId>
179 <groupId>org.springframework.security</groupId>
180 <artifactId>spring-security-test</artifactId>
184 <groupId>org.spockframework</groupId>
185 <artifactId>spock-core</artifactId>
189 <groupId>org.spockframework</groupId>
190 <artifactId>spock-spring</artifactId>
194 <groupId>org.testcontainers</groupId>
195 <artifactId>spock</artifactId>
199 <groupId>org.testcontainers</groupId>
200 <artifactId>postgresql</artifactId>
204 <groupId>org.testcontainers</groupId>
205 <artifactId>kafka</artifactId>
209 <groupId>org.springframework.kafka</groupId>
210 <artifactId>spring-kafka-test</artifactId>
214 <groupId>com.tngtech.archunit</groupId>
215 <artifactId>archunit-junit5</artifactId>
216 <version>0.18.0</version>
224 <directory>openapi</directory>
225 <targetPath>static</targetPath>
226 <filtering>true</filtering>
229 <directory>src/main/resources</directory>
230 <filtering>true</filtering>
235 <groupId>org.apache.maven.plugins</groupId>
236 <artifactId>maven-compiler-plugin</artifactId>
237 <version>3.8.1</version>
239 <annotationProcessorPaths>
241 <groupId>org.projectlombok</groupId>
242 <artifactId>lombok</artifactId>
243 <version>1.18.20</version>
246 <groupId>org.mapstruct</groupId>
247 <artifactId>mapstruct-processor</artifactId>
248 <version>${mapstruct.version}</version>
250 </annotationProcessorPaths>
254 <groupId>org.springframework.boot</groupId>
255 <artifactId>spring-boot-maven-plugin</artifactId>
256 <version>2.3.3.RELEASE</version>
260 <goal>build-info</goal>
261 <goal>repackage</goal>
267 <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
268 visit https://github.com/groovy/GMavenPlus/wiki -->
269 <groupId>org.codehaus.gmavenplus</groupId>
270 <artifactId>gmavenplus-plugin</artifactId>
271 <version>1.12.1</version>
276 <goal>compileTests</goal>
282 <groupId>org.apache.maven.plugins</groupId>
283 <artifactId>maven-checkstyle-plugin</artifactId>
286 <id>onap-license</id>
290 <phase>process-sources</phase>
292 <configLocation>onap-checkstyle/check-license.xml</configLocation>
293 <includeResources>false</includeResources>
294 <includeTestSourceDirectory>true</includeTestSourceDirectory>
295 <includeTestResources>false</includeTestResources>
297 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
299 <consoleOutput>false</consoleOutput>
300 <violationSeverity>warning</violationSeverity>
301 <failOnViolation>true</failOnViolation>
305 <id>onap-java-style</id>
309 <phase>process-sources</phase>
311 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
313 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
315 <includeResources>true</includeResources>
316 <includeTestSourceDirectory>true</includeTestSourceDirectory>
317 <includeTestResources>true</includeTestResources>
318 <consoleOutput>false</consoleOutput>
319 <violationSeverity>warning</violationSeverity>
320 <failOnViolation>true</failOnViolation>
324 <id>cps-java-style</id>
328 <phase>process-sources</phase>
330 <configLocation>cps-java-style.xml</configLocation>
332 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
334 <includeResources>true</includeResources>
335 <includeTestSourceDirectory>true</includeTestSourceDirectory>
336 <includeTestResources>true</includeTestResources>
337 <consoleOutput>true</consoleOutput>
338 <violationSeverity>warning</violationSeverity>
339 <failOnViolation>true</failOnViolation>
345 <groupId>org.onap.oparent</groupId>
346 <artifactId>checkstyle</artifactId>
347 <version>3.2.0</version>
350 <groupId>org.onap.cps</groupId>
351 <artifactId>checkstyle</artifactId>
352 <version>${cps.version}</version>
357 <groupId>com.github.spotbugs</groupId>
358 <artifactId>spotbugs-maven-plugin</artifactId>
359 <version>4.1.3</version>
362 <groupId>com.github.spotbugs</groupId>
363 <artifactId>spotbugs</artifactId>
364 <version>4.2.0</version>
367 <groupId>org.onap.cps</groupId>
368 <artifactId>spotbugs</artifactId>
369 <version>${cps.version}</version>
372 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
373 <groupId>org.slf4j</groupId>
374 <artifactId>slf4j-simple</artifactId>
375 <version>1.8.0-beta4</version>
381 <groupId>jp.skypencil.findbugs.slf4j</groupId>
382 <artifactId>bug-pattern</artifactId>
383 <version>1.5.0</version>
387 Enables analysis which takes more memory but finds more bugs.
388 If you run out of memory, changes the value of the effort element
392 <addSourceDirs>true</addSourceDirs>
393 <!-- Reports all bugs (other values are medium and max) -->
394 <threshold>Low</threshold>
395 <!-- Build doesn't fail if problems are found -->
396 <failOnError>true</failOnError>
397 <!-- References the excluded rules -->
398 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
399 <!-- Produces XML report -->
400 <xmlOutput>true</xmlOutput>
401 <!-- Configures the directory in which the XML report is created -->
402 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
406 Ensures that SpotBugs inspects source code when project is compiled.
409 <id>analyze-compile</id>
410 <phase>compile</phase>
418 <groupId>org.apache.maven.plugins</groupId>
419 <artifactId>maven-surefire-plugin</artifactId>
421 <!--suppress UnresolvedMavenProperty -->
422 <argLine>${surefireArgLine}</argLine>
423 <useFile>false</useFile>
425 <include>**/*Spec.java</include>
426 <include>**/*Test.java</include>
428 <environmentVariables>
430 Disable privileged container usage to cleanup the test containers;
431 these are removed automatically on jvm termination;
432 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
434 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
435 </environmentVariables>
439 <groupId>org.jacoco</groupId>
440 <artifactId>jacoco-maven-plugin</artifactId>
443 <id>coverage-prepare-agent</id>
445 <goal>prepare-agent</goal>
449 <id>coverage-check</id>
455 <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude>
457 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
460 <element>BUNDLE</element>
463 <counter>INSTRUCTION</counter>
464 <value>COVEREDRATIO</value>
465 <minimum>${minimum-coverage}</minimum>
473 <id>coverage-report</id>
478 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
484 <groupId>io.swagger.codegen.v3</groupId>
485 <artifactId>swagger-codegen-maven-plugin</artifactId>
486 <version>3.0.27</version>
490 <goal>generate</goal>
493 <inputSpec>${project.basedir}/openapi/swagger/openapi.yml</inputSpec>
494 <invokerPackage>org.onap.cps.temporal.controller.rest</invokerPackage>
495 <modelPackage>org.onap.cps.temporal.controller.rest.model</modelPackage>
496 <apiPackage>org.onap.cps.temporal.controller.rest</apiPackage>
497 <language>spring</language>
498 <generateSupportingFiles>false</generateSupportingFiles>
500 <sourceFolder>src/gen/java</sourceFolder>
501 <dateLibrary>java11</dateLibrary>
502 <interfaceOnly>true</interfaceOnly>
503 <useTags>true</useTags>
514 <groupId>org.apache.maven.plugins</groupId>
515 <artifactId>maven-surefire-plugin</artifactId>
516 <version>3.0.0-M5</version>
519 <groupId>com.google.cloud.tools</groupId>
520 <artifactId>jib-maven-plugin</artifactId>
521 <version>3.0.0</version>
524 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
527 <image>${image.base}</image>
533 <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
538 <phase>package</phase>
541 <goal>dockerBuild</goal>
545 <phase>deploy</phase>
546 <id>buildAndPush</id>
559 <id>nordix-liquibase-repo</id>
560 <name>liquibase</name>
561 <url>https://artifactory.nordix.org/artifactory/liquibase</url>
571 <groupId>com.google.cloud.tools</groupId>
572 <artifactId>jib-maven-plugin</artifactId>