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