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