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