Remove unnecessary version properties
[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   ============LICENSE_END=========================================================
19 -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24
25     <parent>
26         <groupId>org.onap.oparent</groupId>
27         <artifactId>oparent</artifactId>
28         <version>3.2.0</version>
29         <relativePath/>
30     </parent>
31
32     <groupId>org.onap.cps</groupId>
33     <artifactId>cps-temporal</artifactId>
34     <version>0.0.1-SNAPSHOT</version>
35     <name>cps-temporal</name>
36     <description>CPS Temporal Service</description>
37
38     <properties>
39         <app>org.onap.cps.temporal.Application</app>
40         <docker.repository.pull>nexus3.onap.org:10001/</docker.repository.pull>
41         <docker.repository.push>nexus3.onap.org:10003/</docker.repository.push>
42         <image.base>${docker.repository.pull}onap/integration-java11:8.0.0</image.base>
43         <image.name>${docker.repository.push}onap/cps-temporal</image.name>
44         <java.version>11</java.version>
45         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
46         <minimum-coverage>0.8</minimum-coverage>
47         <!-- Application dependencies versions -->
48         <cps.version>1.0.1</cps.version>
49         <mapstruct.version>1.4.2.Final</mapstruct.version>
50     </properties>
51
52     <dependencyManagement>
53         <dependencies>
54             <dependency>
55                 <groupId>org.springframework.boot</groupId>
56                 <artifactId>spring-boot-dependencies</artifactId>
57                 <version>2.5.0</version>
58                 <type>pom</type>
59                 <scope>import</scope>
60             </dependency>
61             <dependency>
62                 <groupId>org.spockframework</groupId>
63                 <artifactId>spock-bom</artifactId>
64                 <version>2.0-M4-groovy-3.0</version>
65                 <type>pom</type>
66                 <scope>import</scope>
67             </dependency>
68         </dependencies>
69     </dependencyManagement>
70
71     <dependencies>
72         <dependency>
73             <groupId>org.springframework.boot</groupId>
74             <artifactId>spring-boot-starter</artifactId>
75         </dependency>
76         <dependency>
77             <groupId>org.springframework.boot</groupId>
78             <artifactId>spring-boot-starter-web</artifactId>
79         </dependency>
80         <dependency>
81             <groupId>org.springframework.boot</groupId>
82             <artifactId>spring-boot-starter-data-jpa</artifactId>
83         </dependency>
84         <dependency>
85             <groupId>com.vladmihalcea</groupId>
86             <artifactId>hibernate-types-52</artifactId>
87             <version>2.10.0</version>
88         </dependency>
89         <dependency>
90             <groupId>org.liquibase</groupId>
91             <artifactId>liquibase-core</artifactId>
92             <version>4.3.2</version>
93         </dependency>
94         <dependency>
95             <groupId>org.projectlombok</groupId>
96             <artifactId>lombok</artifactId>
97         </dependency>
98         <dependency>
99             <groupId>org.springframework.boot</groupId>
100             <artifactId>spring-boot-starter-validation</artifactId>
101         </dependency>
102         <dependency>
103             <groupId>org.mapstruct</groupId>
104             <artifactId>mapstruct</artifactId>
105             <version>${mapstruct.version}</version>
106         </dependency>
107         <dependency>
108             <groupId>org.springframework.kafka</groupId>
109             <artifactId>spring-kafka</artifactId>
110         </dependency>
111         <dependency>
112             <groupId>org.onap.cps</groupId>
113             <artifactId>cps-events</artifactId>
114             <version>1.1.0-SNAPSHOT</version>
115         </dependency>
116         <!-- Runtime dependencies-->
117         <dependency>
118             <groupId>org.postgresql</groupId>
119             <artifactId>postgresql</artifactId>
120             <scope>runtime</scope>
121         </dependency>
122         <!-- Test dependencies-->
123         <dependency>
124             <groupId>org.codehaus.groovy</groupId>
125             <artifactId>groovy</artifactId>
126             <version>3.0.7</version>
127         </dependency>
128         <dependency>
129             <groupId>org.springframework.boot</groupId>
130             <artifactId>spring-boot-starter-test</artifactId>
131             <scope>test</scope>
132             <exclusions>
133                 <exclusion>
134                     <groupId>org.junit.vintage</groupId>
135                     <artifactId>junit-vintage-engine</artifactId>
136                 </exclusion>
137             </exclusions>
138         </dependency>
139         <dependency>
140             <groupId>org.spockframework</groupId>
141             <artifactId>spock-core</artifactId>
142             <scope>test</scope>
143         </dependency>
144         <dependency>
145             <groupId>org.spockframework</groupId>
146             <artifactId>spock-spring</artifactId>
147             <scope>test</scope>
148         </dependency>
149         <dependency>
150             <groupId>org.testcontainers</groupId>
151             <artifactId>junit-jupiter</artifactId>
152             <version>1.15.2</version>
153             <scope>test</scope>
154         </dependency>
155         <dependency>
156             <groupId>org.testcontainers</groupId>
157             <artifactId>postgresql</artifactId>
158             <version>1.15.2</version>
159             <scope>test</scope>
160         </dependency>
161         <dependency>
162             <groupId>org.testcontainers</groupId>
163             <artifactId>kafka</artifactId>
164             <version>1.15.3</version>
165             <scope>test</scope>
166         </dependency>
167         <dependency>
168             <groupId>org.springframework.kafka</groupId>
169             <artifactId>spring-kafka-test</artifactId>
170             <scope>test</scope>
171         </dependency>
172         <dependency>
173             <groupId>com.tngtech.archunit</groupId>
174             <artifactId>archunit-junit5</artifactId>
175             <version>0.18.0</version>
176             <scope>test</scope>
177         </dependency>
178     </dependencies>
179
180     <build>
181         <plugins>
182             <plugin>
183                 <groupId>org.apache.maven.plugins</groupId>
184                 <artifactId>maven-compiler-plugin</artifactId>
185                 <version>3.8.1</version>
186                 <configuration>
187                     <annotationProcessorPaths>
188                         <path>
189                             <groupId>org.projectlombok</groupId>
190                             <artifactId>lombok</artifactId>
191                             <version>1.18.20</version>
192                         </path>
193                         <path>
194                             <groupId>org.mapstruct</groupId>
195                             <artifactId>mapstruct-processor</artifactId>
196                             <version>${mapstruct.version}</version>
197                         </path>
198                     </annotationProcessorPaths>
199                 </configuration>
200             </plugin>
201             <plugin>
202                 <groupId>org.springframework.boot</groupId>
203                 <artifactId>spring-boot-maven-plugin</artifactId>
204                 <version>2.3.3.RELEASE</version>
205             </plugin>
206             <plugin>
207                 <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
208                 visit https://github.com/groovy/GMavenPlus/wiki -->
209                 <groupId>org.codehaus.gmavenplus</groupId>
210                 <artifactId>gmavenplus-plugin</artifactId>
211                 <version>1.12.1</version>
212                 <executions>
213                     <execution>
214                         <goals>
215                             <goal>compile</goal>
216                             <goal>compileTests</goal>
217                         </goals>
218                     </execution>
219                 </executions>
220             </plugin>
221             <plugin>
222                 <groupId>org.apache.maven.plugins</groupId>
223                 <artifactId>maven-checkstyle-plugin</artifactId>
224                 <executions>
225                     <execution>
226                         <id>onap-license</id>
227                         <goals>
228                             <goal>check</goal>
229                         </goals>
230                         <phase>process-sources</phase>
231                         <configuration>
232                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
233                             <includeResources>false</includeResources>
234                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
235                             <includeTestResources>false</includeTestResources>
236                             <sourceDirectories>
237                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
238                             </sourceDirectories>
239                             <consoleOutput>false</consoleOutput>
240                             <violationSeverity>warning</violationSeverity>
241                             <failOnViolation>true</failOnViolation>
242                         </configuration>
243                     </execution>
244                     <execution>
245                         <id>onap-java-style</id>
246                         <goals>
247                             <goal>check</goal>
248                         </goals>
249                         <phase>process-sources</phase>
250                         <configuration>
251                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
252                             <sourceDirectories>
253                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
254                             </sourceDirectories>
255                             <includeResources>true</includeResources>
256                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
257                             <includeTestResources>true</includeTestResources>
258                             <consoleOutput>false</consoleOutput>
259                             <violationSeverity>warning</violationSeverity>
260                             <failOnViolation>true</failOnViolation>
261                         </configuration>
262                     </execution>
263                     <execution>
264                         <id>cps-java-style</id>
265                         <goals>
266                             <goal>check</goal>
267                         </goals>
268                         <phase>process-sources</phase>
269                         <configuration>
270                             <configLocation>cps-java-style.xml</configLocation>
271                             <sourceDirectories>
272                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
273                             </sourceDirectories>
274                             <includeResources>true</includeResources>
275                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
276                             <includeTestResources>true</includeTestResources>
277                             <consoleOutput>true</consoleOutput>
278                             <violationSeverity>warning</violationSeverity>
279                             <failOnViolation>true</failOnViolation>
280                         </configuration>
281                     </execution>
282                 </executions>
283                 <dependencies>
284                     <dependency>
285                         <groupId>org.onap.oparent</groupId>
286                         <artifactId>checkstyle</artifactId>
287                         <version>3.2.0</version>
288                     </dependency>
289                     <dependency>
290                         <groupId>org.onap.cps</groupId>
291                         <artifactId>checkstyle</artifactId>
292                         <version>${cps.version}</version>
293                     </dependency>
294                 </dependencies>
295             </plugin>
296             <plugin>
297                 <groupId>com.github.spotbugs</groupId>
298                 <artifactId>spotbugs-maven-plugin</artifactId>
299                 <version>4.1.3</version>
300                 <dependencies>
301                     <dependency>
302                         <groupId>com.github.spotbugs</groupId>
303                         <artifactId>spotbugs</artifactId>
304                         <version>4.2.0</version>
305                     </dependency>
306                     <dependency>
307                         <groupId>org.onap.cps</groupId>
308                         <artifactId>spotbugs</artifactId>
309                         <version>${cps.version}</version>
310                     </dependency>
311                     <dependency>
312                         <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
313                         <groupId>org.slf4j</groupId>
314                         <artifactId>slf4j-simple</artifactId>
315                         <version>1.8.0-beta4</version>
316                     </dependency>
317                 </dependencies>
318                 <configuration>
319                     <plugins>
320                         <plugin>
321                             <groupId>jp.skypencil.findbugs.slf4j</groupId>
322                             <artifactId>bug-pattern</artifactId>
323                             <version>1.5.0</version>
324                         </plugin>
325                     </plugins>
326                     <!--
327                       Enables analysis which takes more memory but finds more bugs.
328                       If you run out of memory, changes the value of the effort element
329                       to 'Low'.
330                     -->
331                     <effort>Max</effort>
332                     <!-- Reports all bugs (other values are medium and max) -->
333                     <threshold>Low</threshold>
334                     <!-- Build doesn't fail if problems are found -->
335                     <failOnError>true</failOnError>
336                     <!-- References the excluded rules -->
337                     <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
338                     <!-- Produces XML report -->
339                     <xmlOutput>true</xmlOutput>
340                     <!-- Configures the directory in which the XML report is created -->
341                     <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
342                 </configuration>
343                 <executions>
344                     <!--
345                       Ensures that SpotBugs inspects source code when project is compiled.
346                     -->
347                     <execution>
348                         <id>analyze-compile</id>
349                         <phase>compile</phase>
350                         <goals>
351                             <goal>check</goal>
352                         </goals>
353                     </execution>
354                 </executions>
355             </plugin>
356             <plugin>
357                 <groupId>org.apache.maven.plugins</groupId>
358                 <artifactId>maven-surefire-plugin</artifactId>
359                 <configuration>
360                     <!--suppress UnresolvedMavenProperty -->
361                     <argLine>${surefireArgLine}</argLine>
362                     <useFile>false</useFile>
363                     <includes>
364                         <include>**/*Spec.java</include>
365                         <include>**/*Test.java</include>
366                     </includes>
367                     <environmentVariables>
368                         <!--
369                             Disable privileged container usage to cleanup the test containers;
370                             these are removed automatically on jvm termination;
371                             see https://www.testcontainers.org/features/configuration/#disabling-ryuk
372                         -->
373                         <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
374                     </environmentVariables>
375                 </configuration>
376             </plugin>
377             <plugin>
378                 <groupId>org.jacoco</groupId>
379                 <artifactId>jacoco-maven-plugin</artifactId>
380                 <executions>
381                     <execution>
382                         <id>coverage-prepare-agent</id>
383                         <goals>
384                             <goal>prepare-agent</goal>
385                         </goals>
386                     </execution>
387                     <execution>
388                         <id>coverage-check</id>
389                         <goals>
390                             <goal>check</goal>
391                         </goals>
392                         <configuration>
393                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
394                             <rules>
395                                 <rule>
396                                     <element>BUNDLE</element>
397                                     <limits>
398                                         <limit>
399                                             <counter>INSTRUCTION</counter>
400                                             <value>COVEREDRATIO</value>
401                                             <minimum>${minimum-coverage}</minimum>
402                                         </limit>
403                                     </limits>
404                                 </rule>
405                             </rules>
406                         </configuration>
407                     </execution>
408                     <execution>
409                         <id>coverage-report</id>
410                         <goals>
411                             <goal>report</goal>
412                         </goals>
413                         <configuration>
414                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
415                         </configuration>
416                     </execution>
417                 </executions>
418             </plugin>
419         </plugins>
420
421        <pluginManagement>
422             <plugins>
423                 <plugin>
424                     <groupId>com.google.cloud.tools</groupId>
425                     <artifactId>jib-maven-plugin</artifactId>
426                     <version>3.0.0</version>
427                     <configuration>
428                         <container>
429                             <mainClass>${app}</mainClass>
430                             <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
431                         </container>
432                         <from>
433                             <image>${image.base}</image>
434                         </from>
435                         <to>
436                             <tags>
437                                 <tag>latest</tag>
438                             </tags>
439                             <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
440                         </to>
441                     </configuration>
442                     <executions>
443                         <execution>
444                             <phase>package</phase>
445                             <id>build</id>
446                             <goals>
447                                 <goal>dockerBuild</goal>
448                             </goals>
449                         </execution>
450                         <execution>
451                             <phase>deploy</phase>
452                             <id>buildAndPush</id>
453                             <goals>
454                                 <goal>build</goal>
455                             </goals>
456                         </execution>
457                     </executions>
458                 </plugin>
459             </plugins>
460         </pluginManagement>
461     </build>
462
463     <profiles>
464         <profile>
465             <id>cps-temporal-docker</id>
466             <build>
467                 <plugins>
468                     <plugin>
469                         <groupId>com.google.cloud.tools</groupId>
470                         <artifactId>jib-maven-plugin</artifactId>
471                     </plugin>
472                 </plugins>
473             </build>
474         </profile>
475     </profiles>
476 </project>