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.0.0</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.0</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 </dependencyManagement>
81 <groupId>org.springframework.boot</groupId>
82 <artifactId>spring-boot-starter</artifactId>
85 <groupId>org.springframework.boot</groupId>
86 <artifactId>spring-boot-starter-web</artifactId>
89 <groupId>org.springframework.boot</groupId>
90 <artifactId>spring-boot-starter-data-jpa</artifactId>
93 <groupId>org.springframework.boot</groupId>
94 <artifactId>spring-boot-starter-security</artifactId>
97 <groupId>org.springframework.boot</groupId>
98 <artifactId>spring-boot-starter-actuator</artifactId>
101 <groupId>io.micrometer</groupId>
102 <artifactId>micrometer-registry-prometheus</artifactId>
105 <groupId>com.vladmihalcea</groupId>
106 <artifactId>hibernate-types-52</artifactId>
107 <version>2.10.0</version>
110 <groupId>org.liquibase</groupId>
111 <artifactId>liquibase-core</artifactId>
112 <version>4.4.2-nordix</version>
115 <groupId>org.projectlombok</groupId>
116 <artifactId>lombok</artifactId>
119 <groupId>org.springframework.boot</groupId>
120 <artifactId>spring-boot-starter-validation</artifactId>
123 <groupId>org.springframework.boot</groupId>
124 <artifactId>spring-boot-starter-hateoas</artifactId>
127 <groupId>org.mapstruct</groupId>
128 <artifactId>mapstruct</artifactId>
129 <version>${mapstruct.version}</version>
132 <groupId>org.springframework.kafka</groupId>
133 <artifactId>spring-kafka</artifactId>
136 <groupId>org.onap.cps</groupId>
137 <artifactId>cps-events</artifactId>
138 <version>${cps.version}</version>
141 <groupId>org.springdoc</groupId>
142 <artifactId>springdoc-openapi-ui</artifactId>
143 <version>1.5.9</version>
145 <!-- Runtime dependencies-->
147 <groupId>org.postgresql</groupId>
148 <artifactId>postgresql</artifactId>
149 <scope>runtime</scope>
151 <!-- Test dependencies-->
153 <groupId>org.codehaus.groovy</groupId>
154 <artifactId>groovy</artifactId>
155 <version>3.0.7</version>
158 <groupId>org.springframework.boot</groupId>
159 <artifactId>spring-boot-starter-test</artifactId>
163 <groupId>org.junit.vintage</groupId>
164 <artifactId>junit-vintage-engine</artifactId>
169 <groupId>org.springframework.security</groupId>
170 <artifactId>spring-security-test</artifactId>
174 <groupId>org.spockframework</groupId>
175 <artifactId>spock-core</artifactId>
179 <groupId>org.spockframework</groupId>
180 <artifactId>spock-spring</artifactId>
184 <groupId>org.testcontainers</groupId>
185 <artifactId>spock</artifactId>
189 <groupId>org.testcontainers</groupId>
190 <artifactId>postgresql</artifactId>
194 <groupId>org.testcontainers</groupId>
195 <artifactId>kafka</artifactId>
199 <groupId>org.springframework.kafka</groupId>
200 <artifactId>spring-kafka-test</artifactId>
204 <groupId>com.tngtech.archunit</groupId>
205 <artifactId>archunit-junit5</artifactId>
206 <version>0.18.0</version>
214 <directory>openapi</directory>
215 <targetPath>static</targetPath>
216 <filtering>true</filtering>
219 <directory>src/main/resources</directory>
220 <filtering>true</filtering>
225 <groupId>org.apache.maven.plugins</groupId>
226 <artifactId>maven-compiler-plugin</artifactId>
227 <version>3.8.1</version>
229 <annotationProcessorPaths>
231 <groupId>org.projectlombok</groupId>
232 <artifactId>lombok</artifactId>
233 <version>1.18.20</version>
236 <groupId>org.mapstruct</groupId>
237 <artifactId>mapstruct-processor</artifactId>
238 <version>${mapstruct.version}</version>
240 </annotationProcessorPaths>
244 <groupId>org.springframework.boot</groupId>
245 <artifactId>spring-boot-maven-plugin</artifactId>
246 <version>2.3.3.RELEASE</version>
250 <goal>build-info</goal>
251 <goal>repackage</goal>
257 <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
258 visit https://github.com/groovy/GMavenPlus/wiki -->
259 <groupId>org.codehaus.gmavenplus</groupId>
260 <artifactId>gmavenplus-plugin</artifactId>
261 <version>1.12.1</version>
266 <goal>compileTests</goal>
272 <groupId>org.apache.maven.plugins</groupId>
273 <artifactId>maven-checkstyle-plugin</artifactId>
276 <id>onap-license</id>
280 <phase>process-sources</phase>
282 <configLocation>onap-checkstyle/check-license.xml</configLocation>
283 <includeResources>false</includeResources>
284 <includeTestSourceDirectory>true</includeTestSourceDirectory>
285 <includeTestResources>false</includeTestResources>
287 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
289 <consoleOutput>false</consoleOutput>
290 <violationSeverity>warning</violationSeverity>
291 <failOnViolation>true</failOnViolation>
295 <id>onap-java-style</id>
299 <phase>process-sources</phase>
301 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
303 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
305 <includeResources>true</includeResources>
306 <includeTestSourceDirectory>true</includeTestSourceDirectory>
307 <includeTestResources>true</includeTestResources>
308 <consoleOutput>false</consoleOutput>
309 <violationSeverity>warning</violationSeverity>
310 <failOnViolation>true</failOnViolation>
314 <id>cps-java-style</id>
318 <phase>process-sources</phase>
320 <configLocation>cps-java-style.xml</configLocation>
322 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
324 <includeResources>true</includeResources>
325 <includeTestSourceDirectory>true</includeTestSourceDirectory>
326 <includeTestResources>true</includeTestResources>
327 <consoleOutput>true</consoleOutput>
328 <violationSeverity>warning</violationSeverity>
329 <failOnViolation>true</failOnViolation>
335 <groupId>org.onap.oparent</groupId>
336 <artifactId>checkstyle</artifactId>
337 <version>3.2.0</version>
340 <groupId>org.onap.cps</groupId>
341 <artifactId>checkstyle</artifactId>
342 <version>${cps.version}</version>
347 <groupId>com.github.spotbugs</groupId>
348 <artifactId>spotbugs-maven-plugin</artifactId>
349 <version>4.1.3</version>
352 <groupId>com.github.spotbugs</groupId>
353 <artifactId>spotbugs</artifactId>
354 <version>4.2.0</version>
357 <groupId>org.onap.cps</groupId>
358 <artifactId>spotbugs</artifactId>
359 <version>${cps.version}</version>
362 <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
363 <groupId>org.slf4j</groupId>
364 <artifactId>slf4j-simple</artifactId>
365 <version>1.8.0-beta4</version>
371 <groupId>jp.skypencil.findbugs.slf4j</groupId>
372 <artifactId>bug-pattern</artifactId>
373 <version>1.5.0</version>
377 Enables analysis which takes more memory but finds more bugs.
378 If you run out of memory, changes the value of the effort element
382 <addSourceDirs>true</addSourceDirs>
383 <!-- Reports all bugs (other values are medium and max) -->
384 <threshold>Low</threshold>
385 <!-- Build doesn't fail if problems are found -->
386 <failOnError>true</failOnError>
387 <!-- References the excluded rules -->
388 <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
389 <!-- Produces XML report -->
390 <xmlOutput>true</xmlOutput>
391 <!-- Configures the directory in which the XML report is created -->
392 <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
396 Ensures that SpotBugs inspects source code when project is compiled.
399 <id>analyze-compile</id>
400 <phase>compile</phase>
408 <groupId>org.apache.maven.plugins</groupId>
409 <artifactId>maven-surefire-plugin</artifactId>
411 <!--suppress UnresolvedMavenProperty -->
412 <argLine>${surefireArgLine}</argLine>
413 <useFile>false</useFile>
415 <include>**/*Spec.java</include>
416 <include>**/*Test.java</include>
418 <environmentVariables>
420 Disable privileged container usage to cleanup the test containers;
421 these are removed automatically on jvm termination;
422 see https://www.testcontainers.org/features/configuration/#disabling-ryuk
424 <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
425 </environmentVariables>
429 <groupId>org.jacoco</groupId>
430 <artifactId>jacoco-maven-plugin</artifactId>
433 <id>coverage-prepare-agent</id>
435 <goal>prepare-agent</goal>
439 <id>coverage-check</id>
445 <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude>
447 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
450 <element>BUNDLE</element>
453 <counter>INSTRUCTION</counter>
454 <value>COVEREDRATIO</value>
455 <minimum>${minimum-coverage}</minimum>
463 <id>coverage-report</id>
468 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
474 <groupId>io.swagger.codegen.v3</groupId>
475 <artifactId>swagger-codegen-maven-plugin</artifactId>
476 <version>3.0.27</version>
480 <goal>generate</goal>
483 <inputSpec>${project.basedir}/openapi/swagger/openapi.yml</inputSpec>
484 <invokerPackage>org.onap.cps.temporal.controller.rest</invokerPackage>
485 <modelPackage>org.onap.cps.temporal.controller.rest.model</modelPackage>
486 <apiPackage>org.onap.cps.temporal.controller.rest</apiPackage>
487 <language>spring</language>
488 <generateSupportingFiles>false</generateSupportingFiles>
490 <sourceFolder>src/gen/java</sourceFolder>
491 <dateLibrary>java11</dateLibrary>
492 <interfaceOnly>true</interfaceOnly>
493 <useTags>true</useTags>
504 <groupId>org.apache.maven.plugins</groupId>
505 <artifactId>maven-surefire-plugin</artifactId>
506 <version>3.0.0-M5</version>
509 <groupId>com.google.cloud.tools</groupId>
510 <artifactId>jib-maven-plugin</artifactId>
511 <version>3.0.0</version>
514 <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
517 <image>${image.base}</image>
523 <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
528 <phase>package</phase>
531 <goal>dockerBuild</goal>
535 <phase>deploy</phase>
536 <id>buildAndPush</id>
549 <id>nordix-liquibase-repo</id>
550 <name>liquibase</name>
551 <url>https://artifactory.nordix.org/artifactory/liquibase</url>
561 <groupId>com.google.cloud.tools</groupId>
562 <artifactId>jib-maven-plugin</artifactId>