Retire CPS-Temporal Repo
[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-2022 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.3.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.1.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             <version>42.5.1 </version>
169             <scope>runtime</scope>
170         </dependency>
171         <!-- Test dependencies-->
172         <dependency>
173             <groupId>org.codehaus.groovy</groupId>
174             <artifactId>groovy</artifactId>
175             <version>3.0.7</version>
176         </dependency>
177         <dependency>
178             <groupId>org.springframework.boot</groupId>
179             <artifactId>spring-boot-starter-test</artifactId>
180             <scope>test</scope>
181             <exclusions>
182                 <exclusion>
183                     <groupId>org.junit.vintage</groupId>
184                     <artifactId>junit-vintage-engine</artifactId>
185                 </exclusion>
186             </exclusions>
187         </dependency>
188         <dependency>
189             <groupId>org.springframework.security</groupId>
190             <artifactId>spring-security-test</artifactId>
191             <scope>test</scope>
192         </dependency>
193         <dependency>
194             <groupId>org.spockframework</groupId>
195             <artifactId>spock-core</artifactId>
196             <scope>test</scope>
197         </dependency>
198         <dependency>
199             <groupId>org.spockframework</groupId>
200             <artifactId>spock-spring</artifactId>
201             <scope>test</scope>
202         </dependency>
203         <dependency>
204             <groupId>org.testcontainers</groupId>
205             <artifactId>spock</artifactId>
206             <scope>test</scope>
207         </dependency>
208         <dependency>
209             <groupId>org.testcontainers</groupId>
210             <artifactId>postgresql</artifactId>
211             <scope>test</scope>
212         </dependency>
213         <dependency>
214             <groupId>org.testcontainers</groupId>
215             <artifactId>kafka</artifactId>
216             <scope>test</scope>
217         </dependency>
218         <dependency>
219             <groupId>org.springframework.kafka</groupId>
220             <artifactId>spring-kafka-test</artifactId>
221             <scope>test</scope>
222         </dependency>
223         <dependency>
224             <groupId>com.tngtech.archunit</groupId>
225             <artifactId>archunit-junit5</artifactId>
226             <version>0.18.0</version>
227             <scope>test</scope>
228         </dependency>
229         <dependency>
230             <groupId>org.springframework.cloud</groupId>
231             <artifactId>spring-cloud-starter-sleuth</artifactId>
232         </dependency>
233         <dependency>
234             <groupId>net.logstash.logback</groupId>
235             <artifactId>logstash-logback-encoder</artifactId>
236         </dependency>
237         <dependency>
238             <groupId>org.codehaus.janino</groupId>
239             <artifactId>janino</artifactId>
240         </dependency>
241     </dependencies>
242
243     <build>
244         <resources>
245             <resource>
246                 <directory>openapi</directory>
247                 <targetPath>static</targetPath>
248                 <filtering>true</filtering>
249             </resource>
250             <resource>
251                 <directory>src/main/resources</directory>
252                 <filtering>true</filtering>
253             </resource>
254         </resources>
255         <plugins>
256             <plugin>
257                 <groupId>org.apache.maven.plugins</groupId>
258                 <artifactId>maven-compiler-plugin</artifactId>
259                 <version>3.8.1</version>
260                 <configuration>
261                     <annotationProcessorPaths>
262                         <path>
263                             <groupId>org.projectlombok</groupId>
264                             <artifactId>lombok</artifactId>
265                             <version>1.18.20</version>
266                         </path>
267                         <path>
268                             <groupId>org.mapstruct</groupId>
269                             <artifactId>mapstruct-processor</artifactId>
270                             <version>${mapstruct.version}</version>
271                         </path>
272                     </annotationProcessorPaths>
273                 </configuration>
274             </plugin>
275             <plugin>
276                 <groupId>org.springframework.boot</groupId>
277                 <artifactId>spring-boot-maven-plugin</artifactId>
278                 <version>2.6.4</version>
279                 <executions>
280                     <execution>
281                         <goals>
282                             <goal>build-info</goal>
283                             <goal>repackage</goal>
284                         </goals>
285                     </execution>
286                 </executions>
287             </plugin>
288             <plugin>
289                 <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
290                 visit https://github.com/groovy/GMavenPlus/wiki -->
291                 <groupId>org.codehaus.gmavenplus</groupId>
292                 <artifactId>gmavenplus-plugin</artifactId>
293                 <version>1.12.1</version>
294                 <executions>
295                     <execution>
296                         <goals>
297                             <goal>compile</goal>
298                             <goal>compileTests</goal>
299                         </goals>
300                     </execution>
301                 </executions>
302             </plugin>
303             <plugin>
304                 <groupId>org.apache.maven.plugins</groupId>
305                 <artifactId>maven-checkstyle-plugin</artifactId>
306                 <executions>
307                     <execution>
308                         <id>onap-license</id>
309                         <goals>
310                             <goal>check</goal>
311                         </goals>
312                         <phase>process-sources</phase>
313                         <configuration>
314                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
315                             <includeResources>false</includeResources>
316                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
317                             <includeTestResources>false</includeTestResources>
318                             <sourceDirectories>
319                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
320                             </sourceDirectories>
321                             <consoleOutput>false</consoleOutput>
322                             <violationSeverity>warning</violationSeverity>
323                             <failOnViolation>true</failOnViolation>
324                         </configuration>
325                     </execution>
326                     <execution>
327                         <id>onap-java-style</id>
328                         <goals>
329                             <goal>check</goal>
330                         </goals>
331                         <phase>process-sources</phase>
332                         <configuration>
333                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
334                             <sourceDirectories>
335                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
336                             </sourceDirectories>
337                             <includeResources>true</includeResources>
338                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
339                             <includeTestResources>true</includeTestResources>
340                             <consoleOutput>false</consoleOutput>
341                             <violationSeverity>warning</violationSeverity>
342                             <failOnViolation>true</failOnViolation>
343                         </configuration>
344                     </execution>
345                     <execution>
346                         <id>cps-java-style</id>
347                         <goals>
348                             <goal>check</goal>
349                         </goals>
350                         <phase>process-sources</phase>
351                         <configuration>
352                             <configLocation>cps-java-style.xml</configLocation>
353                             <sourceDirectories>
354                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
355                             </sourceDirectories>
356                             <includeResources>true</includeResources>
357                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
358                             <includeTestResources>true</includeTestResources>
359                             <consoleOutput>true</consoleOutput>
360                             <violationSeverity>warning</violationSeverity>
361                             <failOnViolation>true</failOnViolation>
362                         </configuration>
363                     </execution>
364                 </executions>
365                 <dependencies>
366                     <dependency>
367                         <groupId>org.onap.oparent</groupId>
368                         <artifactId>checkstyle</artifactId>
369                         <version>3.2.0</version>
370                     </dependency>
371                     <dependency>
372                         <groupId>org.onap.cps</groupId>
373                         <artifactId>checkstyle</artifactId>
374                         <version>${cps.version}</version>
375                     </dependency>
376                 </dependencies>
377             </plugin>
378             <plugin>
379                 <groupId>com.github.spotbugs</groupId>
380                 <artifactId>spotbugs-maven-plugin</artifactId>
381                 <version>4.1.3</version>
382                 <dependencies>
383                     <dependency>
384                         <groupId>com.github.spotbugs</groupId>
385                         <artifactId>spotbugs</artifactId>
386                         <version>4.2.0</version>
387                     </dependency>
388                     <dependency>
389                         <groupId>org.onap.cps</groupId>
390                         <artifactId>spotbugs</artifactId>
391                         <version>${cps.version}</version>
392                     </dependency>
393                     <dependency>
394                         <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
395                         <groupId>org.slf4j</groupId>
396                         <artifactId>slf4j-simple</artifactId>
397                         <version>1.8.0-beta4</version>
398                     </dependency>
399                 </dependencies>
400                 <configuration>
401                     <plugins>
402                         <plugin>
403                             <groupId>jp.skypencil.findbugs.slf4j</groupId>
404                             <artifactId>bug-pattern</artifactId>
405                             <version>1.5.0</version>
406                         </plugin>
407                     </plugins>
408                     <!--
409                       Enables analysis which takes more memory but finds more bugs.
410                       If you run out of memory, changes the value of the effort element
411                       to 'Low'.
412                     -->
413                     <effort>Max</effort>
414                     <addSourceDirs>true</addSourceDirs>
415                     <!-- Reports all bugs (other values are medium and max) -->
416                     <threshold>Low</threshold>
417                     <!-- Build doesn't fail if problems are found -->
418                     <failOnError>true</failOnError>
419                     <!-- References the excluded rules -->
420                     <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
421                     <!-- Produces XML report -->
422                     <xmlOutput>true</xmlOutput>
423                     <!-- Configures the directory in which the XML report is created -->
424                     <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
425                 </configuration>
426                 <executions>
427                     <!--
428                       Ensures that SpotBugs inspects source code when project is compiled.
429                     -->
430                     <execution>
431                         <id>analyze-compile</id>
432                         <phase>compile</phase>
433                         <goals>
434                             <goal>check</goal>
435                         </goals>
436                     </execution>
437                 </executions>
438             </plugin>
439             <plugin>
440                 <groupId>org.apache.maven.plugins</groupId>
441                 <artifactId>maven-surefire-plugin</artifactId>
442                 <configuration>
443                     <!--suppress UnresolvedMavenProperty -->
444                     <argLine>${surefireArgLine}</argLine>
445                     <useFile>false</useFile>
446                     <includes>
447                         <include>**/*Spec.java</include>
448                         <include>**/*Test.java</include>
449                     </includes>
450                     <environmentVariables>
451                         <!--
452                             Disable privileged container usage to cleanup the test containers;
453                             these are removed automatically on jvm termination;
454                             see https://www.testcontainers.org/features/configuration/#disabling-ryuk
455                         -->
456                         <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
457                     </environmentVariables>
458                 </configuration>
459             </plugin>
460             <plugin>
461                 <groupId>org.jacoco</groupId>
462                 <artifactId>jacoco-maven-plugin</artifactId>
463                 <executions>
464                     <execution>
465                         <id>coverage-prepare-agent</id>
466                         <goals>
467                             <goal>prepare-agent</goal>
468                         </goals>
469                     </execution>
470                     <execution>
471                         <id>coverage-check</id>
472                         <goals>
473                             <goal>check</goal>
474                         </goals>
475                         <configuration>
476                             <excludes>
477                                 <exclude>org/onap/cps/temporal/controller/rest/model/*</exclude>
478                             </excludes>
479                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
480                             <rules>
481                                 <rule>
482                                     <element>BUNDLE</element>
483                                     <limits>
484                                         <limit>
485                                             <counter>INSTRUCTION</counter>
486                                             <value>COVEREDRATIO</value>
487                                             <minimum>${minimum-coverage}</minimum>
488                                         </limit>
489                                     </limits>
490                                 </rule>
491                             </rules>
492                         </configuration>
493                     </execution>
494                     <execution>
495                         <id>coverage-report</id>
496                         <goals>
497                             <goal>report</goal>
498                         </goals>
499                         <configuration>
500                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
501                         </configuration>
502                     </execution>
503                 </executions>
504             </plugin>
505             <plugin>
506                 <groupId>io.swagger.codegen.v3</groupId>
507                 <artifactId>swagger-codegen-maven-plugin</artifactId>
508                 <version>3.0.27</version>
509                 <executions>
510                     <execution>
511                         <goals>
512                             <goal>generate</goal>
513                         </goals>
514                         <configuration>
515                             <inputSpec>${project.basedir}/openapi/swagger/openapi.yml</inputSpec>
516                             <invokerPackage>org.onap.cps.temporal.controller.rest</invokerPackage>
517                             <modelPackage>org.onap.cps.temporal.controller.rest.model</modelPackage>
518                             <apiPackage>org.onap.cps.temporal.controller.rest</apiPackage>
519                             <language>spring</language>
520                             <generateSupportingFiles>false</generateSupportingFiles>
521                             <configOptions>
522                                 <sourceFolder>src/gen/java</sourceFolder>
523                                 <dateLibrary>java11</dateLibrary>
524                                 <interfaceOnly>true</interfaceOnly>
525                                 <useTags>true</useTags>
526                             </configOptions>
527                         </configuration>
528                     </execution>
529                 </executions>
530             </plugin>
531         </plugins>
532
533        <pluginManagement>
534             <plugins>
535                 <plugin>
536                     <groupId>org.apache.maven.plugins</groupId>
537                     <artifactId>maven-surefire-plugin</artifactId>
538                     <version>3.0.0-M5</version>
539                 </plugin>
540                 <plugin>
541                     <groupId>com.google.cloud.tools</groupId>
542                     <artifactId>jib-maven-plugin</artifactId>
543                     <version>3.0.0</version>
544                     <configuration>
545                         <container>
546                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
547                         </container>
548                         <from>
549                             <image>${image.base}</image>
550                         </from>
551                         <to>
552                             <tags>
553                                 <tag>latest</tag>
554                             </tags>
555                             <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
556                         </to>
557                     </configuration>
558                     <executions>
559                         <execution>
560                             <phase>package</phase>
561                             <id>build</id>
562                             <goals>
563                                 <goal>dockerBuild</goal>
564                             </goals>
565                         </execution>
566                         <execution>
567                             <phase>deploy</phase>
568                             <id>buildAndPush</id>
569                             <goals>
570                                 <goal>build</goal>
571                             </goals>
572                         </execution>
573                     </executions>
574                 </plugin>
575             </plugins>
576         </pluginManagement>
577     </build>
578
579     <profiles>
580         <profile>
581             <id>docker</id>
582             <build>
583                 <plugins>
584                     <plugin>
585                         <groupId>com.google.cloud.tools</groupId>
586                         <artifactId>jib-maven-plugin</artifactId>
587                     </plugin>
588                 </plugins>
589             </build>
590         </profile>
591     </profiles>
592 </project>