cps-temporal upgrade log4j to 2.17.1
[cps/cps-temporal.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
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
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.1.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>2.1.0-SNAPSHOT</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.5.5</version>
59                 <type>pom</type>
60                 <scope>import</scope>
61             </dependency>
62             <dependency>
63                 <groupId>org.spockframework</groupId>
64                 <artifactId>spock-bom</artifactId>
65                 <version>2.0-M4-groovy-3.0</version>
66                 <type>pom</type>
67                 <scope>import</scope>
68             </dependency>
69             <dependency>
70                 <groupId>org.testcontainers</groupId>
71                 <artifactId>testcontainers-bom</artifactId>
72                 <version>1.15.3</version>
73                 <type>pom</type>
74                 <scope>import</scope>
75             </dependency>
76             <dependency>
77                 <groupId>org.apache.logging.log4j</groupId>
78                 <artifactId>log4j-api</artifactId>
79                 <version>2.17.1</version>
80             </dependency>
81             <dependency>
82                 <groupId>org.apache.logging.log4j</groupId>
83                 <artifactId>log4j-to-slf4j</artifactId>
84                 <version>2.17.1</version>
85             </dependency>
86         </dependencies>
87     </dependencyManagement>
88
89     <dependencies>
90         <dependency>
91             <groupId>org.springframework.boot</groupId>
92             <artifactId>spring-boot-starter</artifactId>
93         </dependency>
94         <dependency>
95             <groupId>org.springframework.boot</groupId>
96             <artifactId>spring-boot-starter-web</artifactId>
97         </dependency>
98         <dependency>
99             <groupId>org.springframework.boot</groupId>
100             <artifactId>spring-boot-starter-data-jpa</artifactId>
101         </dependency>
102         <dependency>
103             <groupId>org.springframework.boot</groupId>
104             <artifactId>spring-boot-starter-security</artifactId>
105         </dependency>
106         <dependency>
107             <groupId>org.springframework.boot</groupId>
108             <artifactId>spring-boot-starter-actuator</artifactId>
109         </dependency>
110         <dependency>
111             <groupId>io.micrometer</groupId>
112             <artifactId>micrometer-registry-prometheus</artifactId>
113         </dependency>
114         <dependency>
115             <groupId>com.vladmihalcea</groupId>
116             <artifactId>hibernate-types-52</artifactId>
117             <version>2.10.0</version>
118         </dependency>
119         <dependency>
120             <groupId>org.liquibase</groupId>
121             <artifactId>liquibase-core</artifactId>
122             <version>4.4.2-nordix</version>
123         </dependency>
124         <dependency>
125             <groupId>org.projectlombok</groupId>
126             <artifactId>lombok</artifactId>
127         </dependency>
128         <dependency>
129             <groupId>org.springframework.boot</groupId>
130             <artifactId>spring-boot-starter-validation</artifactId>
131         </dependency>
132         <dependency>
133             <groupId>org.springframework.boot</groupId>
134             <artifactId>spring-boot-starter-hateoas</artifactId>
135         </dependency>
136         <dependency>
137             <groupId>org.mapstruct</groupId>
138             <artifactId>mapstruct</artifactId>
139             <version>${mapstruct.version}</version>
140         </dependency>
141         <dependency>
142             <groupId>org.springframework.kafka</groupId>
143             <artifactId>spring-kafka</artifactId>
144         </dependency>
145         <dependency>
146             <groupId>org.onap.cps</groupId>
147             <artifactId>cps-events</artifactId>
148             <version>${cps.version}</version>
149         </dependency>
150         <dependency>
151             <groupId>org.springdoc</groupId>
152             <artifactId>springdoc-openapi-ui</artifactId>
153             <version>1.5.9</version>
154         </dependency>
155         <!-- Runtime dependencies-->
156         <dependency>
157             <groupId>org.postgresql</groupId>
158             <artifactId>postgresql</artifactId>
159             <scope>runtime</scope>
160         </dependency>
161         <!-- Test dependencies-->
162         <dependency>
163             <groupId>org.codehaus.groovy</groupId>
164             <artifactId>groovy</artifactId>
165             <version>3.0.7</version>
166         </dependency>
167         <dependency>
168             <groupId>org.springframework.boot</groupId>
169             <artifactId>spring-boot-starter-test</artifactId>
170             <scope>test</scope>
171             <exclusions>
172                 <exclusion>
173                     <groupId>org.junit.vintage</groupId>
174                     <artifactId>junit-vintage-engine</artifactId>
175                 </exclusion>
176             </exclusions>
177         </dependency>
178         <dependency>
179             <groupId>org.springframework.security</groupId>
180             <artifactId>spring-security-test</artifactId>
181             <scope>test</scope>
182         </dependency>
183         <dependency>
184             <groupId>org.spockframework</groupId>
185             <artifactId>spock-core</artifactId>
186             <scope>test</scope>
187         </dependency>
188         <dependency>
189             <groupId>org.spockframework</groupId>
190             <artifactId>spock-spring</artifactId>
191             <scope>test</scope>
192         </dependency>
193         <dependency>
194             <groupId>org.testcontainers</groupId>
195             <artifactId>spock</artifactId>
196             <scope>test</scope>
197         </dependency>
198         <dependency>
199             <groupId>org.testcontainers</groupId>
200             <artifactId>postgresql</artifactId>
201             <scope>test</scope>
202         </dependency>
203         <dependency>
204             <groupId>org.testcontainers</groupId>
205             <artifactId>kafka</artifactId>
206             <scope>test</scope>
207         </dependency>
208         <dependency>
209             <groupId>org.springframework.kafka</groupId>
210             <artifactId>spring-kafka-test</artifactId>
211             <scope>test</scope>
212         </dependency>
213         <dependency>
214             <groupId>com.tngtech.archunit</groupId>
215             <artifactId>archunit-junit5</artifactId>
216             <version>0.18.0</version>
217             <scope>test</scope>
218         </dependency>
219     </dependencies>
220
221     <build>
222         <resources>
223             <resource>
224                 <directory>openapi</directory>
225                 <targetPath>static</targetPath>
226                 <filtering>true</filtering>
227             </resource>
228             <resource>
229                 <directory>src/main/resources</directory>
230                 <filtering>true</filtering>
231             </resource>
232         </resources>
233         <plugins>
234             <plugin>
235                 <groupId>org.apache.maven.plugins</groupId>
236                 <artifactId>maven-compiler-plugin</artifactId>
237                 <version>3.8.1</version>
238                 <configuration>
239                     <annotationProcessorPaths>
240                         <path>
241                             <groupId>org.projectlombok</groupId>
242                             <artifactId>lombok</artifactId>
243                             <version>1.18.20</version>
244                         </path>
245                         <path>
246                             <groupId>org.mapstruct</groupId>
247                             <artifactId>mapstruct-processor</artifactId>
248                             <version>${mapstruct.version}</version>
249                         </path>
250                     </annotationProcessorPaths>
251                 </configuration>
252             </plugin>
253             <plugin>
254                 <groupId>org.springframework.boot</groupId>
255                 <artifactId>spring-boot-maven-plugin</artifactId>
256                 <version>2.3.3.RELEASE</version>
257                 <executions>
258                     <execution>
259                         <goals>
260                             <goal>build-info</goal>
261                             <goal>repackage</goal>
262                         </goals>
263                     </execution>
264                 </executions>
265             </plugin>
266             <plugin>
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>
272                 <executions>
273                     <execution>
274                         <goals>
275                             <goal>compile</goal>
276                             <goal>compileTests</goal>
277                         </goals>
278                     </execution>
279                 </executions>
280             </plugin>
281             <plugin>
282                 <groupId>org.apache.maven.plugins</groupId>
283                 <artifactId>maven-checkstyle-plugin</artifactId>
284                 <executions>
285                     <execution>
286                         <id>onap-license</id>
287                         <goals>
288                             <goal>check</goal>
289                         </goals>
290                         <phase>process-sources</phase>
291                         <configuration>
292                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
293                             <includeResources>false</includeResources>
294                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
295                             <includeTestResources>false</includeTestResources>
296                             <sourceDirectories>
297                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
298                             </sourceDirectories>
299                             <consoleOutput>false</consoleOutput>
300                             <violationSeverity>warning</violationSeverity>
301                             <failOnViolation>true</failOnViolation>
302                         </configuration>
303                     </execution>
304                     <execution>
305                         <id>onap-java-style</id>
306                         <goals>
307                             <goal>check</goal>
308                         </goals>
309                         <phase>process-sources</phase>
310                         <configuration>
311                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
312                             <sourceDirectories>
313                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
314                             </sourceDirectories>
315                             <includeResources>true</includeResources>
316                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
317                             <includeTestResources>true</includeTestResources>
318                             <consoleOutput>false</consoleOutput>
319                             <violationSeverity>warning</violationSeverity>
320                             <failOnViolation>true</failOnViolation>
321                         </configuration>
322                     </execution>
323                     <execution>
324                         <id>cps-java-style</id>
325                         <goals>
326                             <goal>check</goal>
327                         </goals>
328                         <phase>process-sources</phase>
329                         <configuration>
330                             <configLocation>cps-java-style.xml</configLocation>
331                             <sourceDirectories>
332                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
333                             </sourceDirectories>
334                             <includeResources>true</includeResources>
335                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
336                             <includeTestResources>true</includeTestResources>
337                             <consoleOutput>true</consoleOutput>
338                             <violationSeverity>warning</violationSeverity>
339                             <failOnViolation>true</failOnViolation>
340                         </configuration>
341                     </execution>
342                 </executions>
343                 <dependencies>
344                     <dependency>
345                         <groupId>org.onap.oparent</groupId>
346                         <artifactId>checkstyle</artifactId>
347                         <version>3.2.0</version>
348                     </dependency>
349                     <dependency>
350                         <groupId>org.onap.cps</groupId>
351                         <artifactId>checkstyle</artifactId>
352                         <version>${cps.version}</version>
353                     </dependency>
354                 </dependencies>
355             </plugin>
356             <plugin>
357                 <groupId>com.github.spotbugs</groupId>
358                 <artifactId>spotbugs-maven-plugin</artifactId>
359                 <version>4.1.3</version>
360                 <dependencies>
361                     <dependency>
362                         <groupId>com.github.spotbugs</groupId>
363                         <artifactId>spotbugs</artifactId>
364                         <version>4.2.0</version>
365                     </dependency>
366                     <dependency>
367                         <groupId>org.onap.cps</groupId>
368                         <artifactId>spotbugs</artifactId>
369                         <version>${cps.version}</version>
370                     </dependency>
371                     <dependency>
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>
376                     </dependency>
377                 </dependencies>
378                 <configuration>
379                     <plugins>
380                         <plugin>
381                             <groupId>jp.skypencil.findbugs.slf4j</groupId>
382                             <artifactId>bug-pattern</artifactId>
383                             <version>1.5.0</version>
384                         </plugin>
385                     </plugins>
386                     <!--
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
389                       to 'Low'.
390                     -->
391                     <effort>Max</effort>
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>
403                 </configuration>
404                 <executions>
405                     <!--
406                       Ensures that SpotBugs inspects source code when project is compiled.
407                     -->
408                     <execution>
409                         <id>analyze-compile</id>
410                         <phase>compile</phase>
411                         <goals>
412                             <goal>check</goal>
413                         </goals>
414                     </execution>
415                 </executions>
416             </plugin>
417             <plugin>
418                 <groupId>org.apache.maven.plugins</groupId>
419                 <artifactId>maven-surefire-plugin</artifactId>
420                 <configuration>
421                     <!--suppress UnresolvedMavenProperty -->
422                     <argLine>${surefireArgLine}</argLine>
423                     <useFile>false</useFile>
424                     <includes>
425                         <include>**/*Spec.java</include>
426                         <include>**/*Test.java</include>
427                     </includes>
428                     <environmentVariables>
429                         <!--
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
433                         -->
434                         <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
435                     </environmentVariables>
436                 </configuration>
437             </plugin>
438             <plugin>
439                 <groupId>org.jacoco</groupId>
440                 <artifactId>jacoco-maven-plugin</artifactId>
441                 <executions>
442                     <execution>
443                         <id>coverage-prepare-agent</id>
444                         <goals>
445                             <goal>prepare-agent</goal>
446                         </goals>
447                     </execution>
448                     <execution>
449                         <id>coverage-check</id>
450                         <goals>
451                             <goal>check</goal>
452                         </goals>
453                         <configuration>
454                             <excludes>
455                                 <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude>
456                             </excludes>
457                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
458                             <rules>
459                                 <rule>
460                                     <element>BUNDLE</element>
461                                     <limits>
462                                         <limit>
463                                             <counter>INSTRUCTION</counter>
464                                             <value>COVEREDRATIO</value>
465                                             <minimum>${minimum-coverage}</minimum>
466                                         </limit>
467                                     </limits>
468                                 </rule>
469                             </rules>
470                         </configuration>
471                     </execution>
472                     <execution>
473                         <id>coverage-report</id>
474                         <goals>
475                             <goal>report</goal>
476                         </goals>
477                         <configuration>
478                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
479                         </configuration>
480                     </execution>
481                 </executions>
482             </plugin>
483             <plugin>
484                 <groupId>io.swagger.codegen.v3</groupId>
485                 <artifactId>swagger-codegen-maven-plugin</artifactId>
486                 <version>3.0.27</version>
487                 <executions>
488                     <execution>
489                         <goals>
490                             <goal>generate</goal>
491                         </goals>
492                         <configuration>
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>
499                             <configOptions>
500                                 <sourceFolder>src/gen/java</sourceFolder>
501                                 <dateLibrary>java11</dateLibrary>
502                                 <interfaceOnly>true</interfaceOnly>
503                                 <useTags>true</useTags>
504                             </configOptions>
505                         </configuration>
506                     </execution>
507                 </executions>
508             </plugin>
509         </plugins>
510
511        <pluginManagement>
512             <plugins>
513                 <plugin>
514                     <groupId>org.apache.maven.plugins</groupId>
515                     <artifactId>maven-surefire-plugin</artifactId>
516                     <version>3.0.0-M5</version>
517                 </plugin>
518                 <plugin>
519                     <groupId>com.google.cloud.tools</groupId>
520                     <artifactId>jib-maven-plugin</artifactId>
521                     <version>3.0.0</version>
522                     <configuration>
523                         <container>
524                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
525                         </container>
526                         <from>
527                             <image>${image.base}</image>
528                         </from>
529                         <to>
530                             <tags>
531                                 <tag>latest</tag>
532                             </tags>
533                             <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
534                         </to>
535                     </configuration>
536                     <executions>
537                         <execution>
538                             <phase>package</phase>
539                             <id>build</id>
540                             <goals>
541                                 <goal>dockerBuild</goal>
542                             </goals>
543                         </execution>
544                         <execution>
545                             <phase>deploy</phase>
546                             <id>buildAndPush</id>
547                             <goals>
548                                 <goal>build</goal>
549                             </goals>
550                         </execution>
551                     </executions>
552                 </plugin>
553             </plugins>
554         </pluginManagement>
555     </build>
556
557     <repositories>
558         <repository>
559             <id>nordix-liquibase-repo</id>
560             <name>liquibase</name>
561             <url>https://artifactory.nordix.org/artifactory/liquibase</url>
562         </repository>
563     </repositories>
564
565     <profiles>
566         <profile>
567             <id>docker</id>
568             <build>
569                 <plugins>
570                     <plugin>
571                         <groupId>com.google.cloud.tools</groupId>
572                         <artifactId>jib-maven-plugin</artifactId>
573                     </plugin>
574                 </plugins>
575             </build>
576         </profile>
577     </profiles>
578 </project>