Upgrade Liquibase to Version 4.14.0
[cps/cps-temporal.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   Copyright (c) 2021-2022 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
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
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.
18
19  SPDX-License-Identifier: Apache-2.0
20   ============LICENSE_END=========================================================
21 -->
22
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>
26
27     <parent>
28         <groupId>org.onap.oparent</groupId>
29         <artifactId>oparent</artifactId>
30         <version>3.2.0</version>
31         <relativePath/>
32     </parent>
33
34     <groupId>org.onap.cps</groupId>
35     <artifactId>cps-temporal</artifactId>
36     <version>1.2.0-SNAPSHOT</version>
37     <name>cps-temporal</name>
38     <description>CPS Temporal Service</description>
39
40     <properties>
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>3.0.0</cps.version>
50         <mapstruct.version>1.4.2.Final</mapstruct.version>
51     </properties>
52
53     <dependencyManagement>
54         <dependencies>
55             <dependency>
56                 <groupId>org.springframework.boot</groupId>
57                 <artifactId>spring-boot-dependencies</artifactId>
58                 <version>2.6.9</version>
59                 <type>pom</type>
60                 <scope>import</scope>
61             </dependency>
62             <dependency>
63                 <groupId>org.springframework.cloud</groupId>
64                 <artifactId>spring-cloud-starter-sleuth</artifactId>
65                 <version>3.1.3</version>
66             </dependency>
67             <dependency>
68                 <groupId>org.spockframework</groupId>
69                 <artifactId>spock-bom</artifactId>
70                 <version>2.0-M4-groovy-3.0</version>
71                 <type>pom</type>
72                 <scope>import</scope>
73             </dependency>
74             <dependency>
75                 <groupId>org.testcontainers</groupId>
76                 <artifactId>testcontainers-bom</artifactId>
77                 <version>1.15.3</version>
78                 <type>pom</type>
79                 <scope>import</scope>
80             </dependency>
81             <dependency>
82                 <groupId>net.logstash.logback</groupId>
83                 <artifactId>logstash-logback-encoder</artifactId>
84                 <version>7.0.1</version>
85             </dependency>
86             <dependency>
87                 <groupId>org.codehaus.janino</groupId>
88                 <artifactId>janino</artifactId>
89                 <version>3.1.7</version>
90             </dependency>
91             <dependency>
92                 <groupId>com.vladmihalcea</groupId>
93                 <artifactId>hibernate-types-52</artifactId>
94                 <version>2.10.0</version>
95             </dependency>
96         </dependencies>
97     </dependencyManagement>
98
99     <dependencies>
100         <dependency>
101             <groupId>org.springframework.boot</groupId>
102             <artifactId>spring-boot-starter</artifactId>
103         </dependency>
104         <dependency>
105             <groupId>org.springframework.boot</groupId>
106             <artifactId>spring-boot-starter-web</artifactId>
107         </dependency>
108         <dependency>
109             <groupId>org.springframework.boot</groupId>
110             <artifactId>spring-boot-starter-data-jpa</artifactId>
111         </dependency>
112         <dependency>
113             <groupId>org.springframework.boot</groupId>
114             <artifactId>spring-boot-starter-security</artifactId>
115         </dependency>
116         <dependency>
117             <groupId>org.springframework.boot</groupId>
118             <artifactId>spring-boot-starter-actuator</artifactId>
119         </dependency>
120         <dependency>
121             <groupId>io.micrometer</groupId>
122             <artifactId>micrometer-registry-prometheus</artifactId>
123         </dependency>
124         <dependency>
125             <groupId>com.vladmihalcea</groupId>
126             <artifactId>hibernate-types-52</artifactId>
127         </dependency>
128         <dependency>
129             <groupId>org.liquibase</groupId>
130             <artifactId>liquibase-core</artifactId>
131             <version>4.14.0</version>
132         </dependency>
133         <dependency>
134             <groupId>org.projectlombok</groupId>
135             <artifactId>lombok</artifactId>
136         </dependency>
137         <dependency>
138             <groupId>org.springframework.boot</groupId>
139             <artifactId>spring-boot-starter-validation</artifactId>
140         </dependency>
141         <dependency>
142             <groupId>org.springframework.boot</groupId>
143             <artifactId>spring-boot-starter-hateoas</artifactId>
144         </dependency>
145         <dependency>
146             <groupId>org.mapstruct</groupId>
147             <artifactId>mapstruct</artifactId>
148             <version>${mapstruct.version}</version>
149         </dependency>
150         <dependency>
151             <groupId>org.springframework.kafka</groupId>
152             <artifactId>spring-kafka</artifactId>
153         </dependency>
154         <dependency>
155             <groupId>org.onap.cps</groupId>
156             <artifactId>cps-events</artifactId>
157             <version>${cps.version}</version>
158         </dependency>
159         <dependency>
160             <groupId>org.springdoc</groupId>
161             <artifactId>springdoc-openapi-ui</artifactId>
162             <version>1.5.9</version>
163         </dependency>
164         <!-- Runtime dependencies-->
165         <dependency>
166             <groupId>org.postgresql</groupId>
167             <artifactId>postgresql</artifactId>
168             <scope>runtime</scope>
169         </dependency>
170         <!-- Test dependencies-->
171         <dependency>
172             <groupId>org.codehaus.groovy</groupId>
173             <artifactId>groovy</artifactId>
174             <version>3.0.7</version>
175         </dependency>
176         <dependency>
177             <groupId>org.springframework.boot</groupId>
178             <artifactId>spring-boot-starter-test</artifactId>
179             <scope>test</scope>
180             <exclusions>
181                 <exclusion>
182                     <groupId>org.junit.vintage</groupId>
183                     <artifactId>junit-vintage-engine</artifactId>
184                 </exclusion>
185             </exclusions>
186         </dependency>
187         <dependency>
188             <groupId>org.springframework.security</groupId>
189             <artifactId>spring-security-test</artifactId>
190             <scope>test</scope>
191         </dependency>
192         <dependency>
193             <groupId>org.spockframework</groupId>
194             <artifactId>spock-core</artifactId>
195             <scope>test</scope>
196         </dependency>
197         <dependency>
198             <groupId>org.spockframework</groupId>
199             <artifactId>spock-spring</artifactId>
200             <scope>test</scope>
201         </dependency>
202         <dependency>
203             <groupId>org.testcontainers</groupId>
204             <artifactId>spock</artifactId>
205             <scope>test</scope>
206         </dependency>
207         <dependency>
208             <groupId>org.testcontainers</groupId>
209             <artifactId>postgresql</artifactId>
210             <scope>test</scope>
211         </dependency>
212         <dependency>
213             <groupId>org.testcontainers</groupId>
214             <artifactId>kafka</artifactId>
215             <scope>test</scope>
216         </dependency>
217         <dependency>
218             <groupId>org.springframework.kafka</groupId>
219             <artifactId>spring-kafka-test</artifactId>
220             <scope>test</scope>
221         </dependency>
222         <dependency>
223             <groupId>com.tngtech.archunit</groupId>
224             <artifactId>archunit-junit5</artifactId>
225             <version>0.18.0</version>
226             <scope>test</scope>
227         </dependency>
228         <dependency>
229             <groupId>org.springframework.cloud</groupId>
230             <artifactId>spring-cloud-starter-sleuth</artifactId>
231         </dependency>
232         <dependency>
233             <groupId>net.logstash.logback</groupId>
234             <artifactId>logstash-logback-encoder</artifactId>
235         </dependency>
236         <dependency>
237             <groupId>org.codehaus.janino</groupId>
238             <artifactId>janino</artifactId>
239         </dependency>
240     </dependencies>
241
242     <build>
243         <resources>
244             <resource>
245                 <directory>openapi</directory>
246                 <targetPath>static</targetPath>
247                 <filtering>true</filtering>
248             </resource>
249             <resource>
250                 <directory>src/main/resources</directory>
251                 <filtering>true</filtering>
252             </resource>
253         </resources>
254         <plugins>
255             <plugin>
256                 <groupId>org.apache.maven.plugins</groupId>
257                 <artifactId>maven-compiler-plugin</artifactId>
258                 <version>3.8.1</version>
259                 <configuration>
260                     <annotationProcessorPaths>
261                         <path>
262                             <groupId>org.projectlombok</groupId>
263                             <artifactId>lombok</artifactId>
264                             <version>1.18.20</version>
265                         </path>
266                         <path>
267                             <groupId>org.mapstruct</groupId>
268                             <artifactId>mapstruct-processor</artifactId>
269                             <version>${mapstruct.version}</version>
270                         </path>
271                     </annotationProcessorPaths>
272                 </configuration>
273             </plugin>
274             <plugin>
275                 <groupId>org.springframework.boot</groupId>
276                 <artifactId>spring-boot-maven-plugin</artifactId>
277                 <version>2.6.4</version>
278                 <executions>
279                     <execution>
280                         <goals>
281                             <goal>build-info</goal>
282                             <goal>repackage</goal>
283                         </goals>
284                     </execution>
285                 </executions>
286             </plugin>
287             <plugin>
288                 <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
289                 visit https://github.com/groovy/GMavenPlus/wiki -->
290                 <groupId>org.codehaus.gmavenplus</groupId>
291                 <artifactId>gmavenplus-plugin</artifactId>
292                 <version>1.12.1</version>
293                 <executions>
294                     <execution>
295                         <goals>
296                             <goal>compile</goal>
297                             <goal>compileTests</goal>
298                         </goals>
299                     </execution>
300                 </executions>
301             </plugin>
302             <plugin>
303                 <groupId>org.apache.maven.plugins</groupId>
304                 <artifactId>maven-checkstyle-plugin</artifactId>
305                 <executions>
306                     <execution>
307                         <id>onap-license</id>
308                         <goals>
309                             <goal>check</goal>
310                         </goals>
311                         <phase>process-sources</phase>
312                         <configuration>
313                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
314                             <includeResources>false</includeResources>
315                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
316                             <includeTestResources>false</includeTestResources>
317                             <sourceDirectories>
318                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
319                             </sourceDirectories>
320                             <consoleOutput>false</consoleOutput>
321                             <violationSeverity>warning</violationSeverity>
322                             <failOnViolation>true</failOnViolation>
323                         </configuration>
324                     </execution>
325                     <execution>
326                         <id>onap-java-style</id>
327                         <goals>
328                             <goal>check</goal>
329                         </goals>
330                         <phase>process-sources</phase>
331                         <configuration>
332                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
333                             <sourceDirectories>
334                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
335                             </sourceDirectories>
336                             <includeResources>true</includeResources>
337                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
338                             <includeTestResources>true</includeTestResources>
339                             <consoleOutput>false</consoleOutput>
340                             <violationSeverity>warning</violationSeverity>
341                             <failOnViolation>true</failOnViolation>
342                         </configuration>
343                     </execution>
344                     <execution>
345                         <id>cps-java-style</id>
346                         <goals>
347                             <goal>check</goal>
348                         </goals>
349                         <phase>process-sources</phase>
350                         <configuration>
351                             <configLocation>cps-java-style.xml</configLocation>
352                             <sourceDirectories>
353                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
354                             </sourceDirectories>
355                             <includeResources>true</includeResources>
356                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
357                             <includeTestResources>true</includeTestResources>
358                             <consoleOutput>true</consoleOutput>
359                             <violationSeverity>warning</violationSeverity>
360                             <failOnViolation>true</failOnViolation>
361                         </configuration>
362                     </execution>
363                 </executions>
364                 <dependencies>
365                     <dependency>
366                         <groupId>org.onap.oparent</groupId>
367                         <artifactId>checkstyle</artifactId>
368                         <version>3.2.0</version>
369                     </dependency>
370                     <dependency>
371                         <groupId>org.onap.cps</groupId>
372                         <artifactId>checkstyle</artifactId>
373                         <version>${cps.version}</version>
374                     </dependency>
375                 </dependencies>
376             </plugin>
377             <plugin>
378                 <groupId>com.github.spotbugs</groupId>
379                 <artifactId>spotbugs-maven-plugin</artifactId>
380                 <version>4.1.3</version>
381                 <dependencies>
382                     <dependency>
383                         <groupId>com.github.spotbugs</groupId>
384                         <artifactId>spotbugs</artifactId>
385                         <version>4.2.0</version>
386                     </dependency>
387                     <dependency>
388                         <groupId>org.onap.cps</groupId>
389                         <artifactId>spotbugs</artifactId>
390                         <version>${cps.version}</version>
391                     </dependency>
392                     <dependency>
393                         <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
394                         <groupId>org.slf4j</groupId>
395                         <artifactId>slf4j-simple</artifactId>
396                         <version>1.8.0-beta4</version>
397                     </dependency>
398                 </dependencies>
399                 <configuration>
400                     <plugins>
401                         <plugin>
402                             <groupId>jp.skypencil.findbugs.slf4j</groupId>
403                             <artifactId>bug-pattern</artifactId>
404                             <version>1.5.0</version>
405                         </plugin>
406                     </plugins>
407                     <!--
408                       Enables analysis which takes more memory but finds more bugs.
409                       If you run out of memory, changes the value of the effort element
410                       to 'Low'.
411                     -->
412                     <effort>Max</effort>
413                     <addSourceDirs>true</addSourceDirs>
414                     <!-- Reports all bugs (other values are medium and max) -->
415                     <threshold>Low</threshold>
416                     <!-- Build doesn't fail if problems are found -->
417                     <failOnError>true</failOnError>
418                     <!-- References the excluded rules -->
419                     <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
420                     <!-- Produces XML report -->
421                     <xmlOutput>true</xmlOutput>
422                     <!-- Configures the directory in which the XML report is created -->
423                     <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
424                 </configuration>
425                 <executions>
426                     <!--
427                       Ensures that SpotBugs inspects source code when project is compiled.
428                     -->
429                     <execution>
430                         <id>analyze-compile</id>
431                         <phase>compile</phase>
432                         <goals>
433                             <goal>check</goal>
434                         </goals>
435                     </execution>
436                 </executions>
437             </plugin>
438             <plugin>
439                 <groupId>org.apache.maven.plugins</groupId>
440                 <artifactId>maven-surefire-plugin</artifactId>
441                 <configuration>
442                     <!--suppress UnresolvedMavenProperty -->
443                     <argLine>${surefireArgLine}</argLine>
444                     <useFile>false</useFile>
445                     <includes>
446                         <include>**/*Spec.java</include>
447                         <include>**/*Test.java</include>
448                     </includes>
449                     <environmentVariables>
450                         <!--
451                             Disable privileged container usage to cleanup the test containers;
452                             these are removed automatically on jvm termination;
453                             see https://www.testcontainers.org/features/configuration/#disabling-ryuk
454                         -->
455                         <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
456                     </environmentVariables>
457                 </configuration>
458             </plugin>
459             <plugin>
460                 <groupId>org.jacoco</groupId>
461                 <artifactId>jacoco-maven-plugin</artifactId>
462                 <executions>
463                     <execution>
464                         <id>coverage-prepare-agent</id>
465                         <goals>
466                             <goal>prepare-agent</goal>
467                         </goals>
468                     </execution>
469                     <execution>
470                         <id>coverage-check</id>
471                         <goals>
472                             <goal>check</goal>
473                         </goals>
474                         <configuration>
475                             <excludes>
476                                 <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude>
477                             </excludes>
478                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
479                             <rules>
480                                 <rule>
481                                     <element>BUNDLE</element>
482                                     <limits>
483                                         <limit>
484                                             <counter>INSTRUCTION</counter>
485                                             <value>COVEREDRATIO</value>
486                                             <minimum>${minimum-coverage}</minimum>
487                                         </limit>
488                                     </limits>
489                                 </rule>
490                             </rules>
491                         </configuration>
492                     </execution>
493                     <execution>
494                         <id>coverage-report</id>
495                         <goals>
496                             <goal>report</goal>
497                         </goals>
498                         <configuration>
499                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
500                         </configuration>
501                     </execution>
502                 </executions>
503             </plugin>
504             <plugin>
505                 <groupId>io.swagger.codegen.v3</groupId>
506                 <artifactId>swagger-codegen-maven-plugin</artifactId>
507                 <version>3.0.27</version>
508                 <executions>
509                     <execution>
510                         <goals>
511                             <goal>generate</goal>
512                         </goals>
513                         <configuration>
514                             <inputSpec>${project.basedir}/openapi/swagger/openapi.yml</inputSpec>
515                             <invokerPackage>org.onap.cps.temporal.controller.rest</invokerPackage>
516                             <modelPackage>org.onap.cps.temporal.controller.rest.model</modelPackage>
517                             <apiPackage>org.onap.cps.temporal.controller.rest</apiPackage>
518                             <language>spring</language>
519                             <generateSupportingFiles>false</generateSupportingFiles>
520                             <configOptions>
521                                 <sourceFolder>src/gen/java</sourceFolder>
522                                 <dateLibrary>java11</dateLibrary>
523                                 <interfaceOnly>true</interfaceOnly>
524                                 <useTags>true</useTags>
525                             </configOptions>
526                         </configuration>
527                     </execution>
528                 </executions>
529             </plugin>
530         </plugins>
531
532        <pluginManagement>
533             <plugins>
534                 <plugin>
535                     <groupId>org.apache.maven.plugins</groupId>
536                     <artifactId>maven-surefire-plugin</artifactId>
537                     <version>3.0.0-M5</version>
538                 </plugin>
539                 <plugin>
540                     <groupId>com.google.cloud.tools</groupId>
541                     <artifactId>jib-maven-plugin</artifactId>
542                     <version>3.0.0</version>
543                     <configuration>
544                         <container>
545                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
546                         </container>
547                         <from>
548                             <image>${image.base}</image>
549                         </from>
550                         <to>
551                             <tags>
552                                 <tag>latest</tag>
553                             </tags>
554                             <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
555                         </to>
556                     </configuration>
557                     <executions>
558                         <execution>
559                             <phase>package</phase>
560                             <id>build</id>
561                             <goals>
562                                 <goal>dockerBuild</goal>
563                             </goals>
564                         </execution>
565                         <execution>
566                             <phase>deploy</phase>
567                             <id>buildAndPush</id>
568                             <goals>
569                                 <goal>build</goal>
570                             </goals>
571                         </execution>
572                     </executions>
573                 </plugin>
574             </plugins>
575         </pluginManagement>
576     </build>
577
578     <profiles>
579         <profile>
580             <id>docker</id>
581             <build>
582                 <plugins>
583                     <plugin>
584                         <groupId>com.google.cloud.tools</groupId>
585                         <artifactId>jib-maven-plugin</artifactId>
586                     </plugin>
587                 </plugins>
588             </build>
589         </profile>
590     </profiles>
591 </project>