Some tidying in the pom files
[nonrtric.git] / a1-policy-management-service / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ========================LICENSE_START=================================
4 * O-RAN-SC
5 * %%
6 * Copyright (C) 2019 Nordix Foundation
7 * %%
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ========================LICENSE_END===================================
20 -->
21 <project
22     xmlns="http://maven.apache.org/POM/4.0.0"
23     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     <parent>
27         <groupId>org.springframework.boot</groupId>
28         <artifactId>spring-boot-starter-parent</artifactId>
29         <version>2.5.3</version>
30         <relativePath />
31     </parent>
32     <groupId>org.o-ran-sc.nonrtric</groupId>
33     <artifactId>a1-policy-management-service</artifactId>
34     <version>2.4.0-SNAPSHOT</version>
35     <licenses>
36         <license>
37             <name>The Apache Software License, Version 2.0</name>
38             <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
39         </license>
40     </licenses>
41     <repositories>
42         <repository>
43             <id>onap-releases</id>
44             <name>onap-releases</name>
45             <url>https://nexus.onap.org/content/repositories/releases/</url>
46         </repository>
47     </repositories>
48     <properties>
49         <java.version>11</java.version>
50         <springfox.version>3.0.0</springfox.version>
51         <immutable.version>2.8.2</immutable.version>
52         <sdk.version>1.1.6</sdk.version>
53         <swagger.version>2.1.6</swagger.version>
54         <json.version>20190722</json.version>
55         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
56         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
57         <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
58         <docker-maven-plugin>0.30.0</docker-maven-plugin>
59         <version.dmaap>1.1.11</version.dmaap>
60         <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
61         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
62         <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
63         <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
64     </properties>
65     <dependencies>
66         <dependency>
67             <groupId>com.google.guava</groupId>
68             <artifactId>guava</artifactId>
69             <version>30.0-jre</version>
70         </dependency>
71         <dependency>
72             <groupId>org.springdoc</groupId>
73             <artifactId>springdoc-openapi-ui</artifactId>
74             <version>1.5.2</version>
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-thymeleaf</artifactId>
83         </dependency>
84         <dependency>
85             <groupId>org.springframework.boot</groupId>
86             <artifactId>spring-boot-starter-webflux</artifactId>
87         </dependency>
88         <dependency>
89             <groupId>org.springframework.boot</groupId>
90             <artifactId>spring-boot-starter-aop</artifactId>
91         </dependency>
92         <dependency>
93             <groupId>org.springframework.boot</groupId>
94             <artifactId>spring-boot-devtools</artifactId>
95             <optional>true</optional>
96         </dependency>
97         <dependency>
98             <groupId>org.springframework</groupId>
99             <artifactId>spring-webflux</artifactId>
100         </dependency>
101         <dependency>
102             <groupId>io.swagger.core.v3</groupId>
103             <artifactId>swagger-jaxrs2</artifactId>
104             <version>${swagger.version}</version>
105         </dependency>
106         <dependency>
107             <groupId>io.swagger.core.v3</groupId>
108             <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
109             <version>${swagger.version}</version>
110         </dependency>
111         <dependency>
112             <groupId>javax.xml.bind</groupId>
113             <artifactId>jaxb-api</artifactId>
114         </dependency>
115         <dependency>
116             <groupId>org.immutables</groupId>
117             <artifactId>value</artifactId>
118             <version>${immutable.version}</version>
119             <scope>provided</scope>
120         </dependency>
121         <dependency>
122             <groupId>org.immutables</groupId>
123             <artifactId>gson</artifactId>
124             <version>${immutable.version}</version>
125         </dependency>
126         <dependency>
127             <groupId>org.json</groupId>
128             <artifactId>json</artifactId>
129             <version>${json.version}</version>
130         </dependency>
131         <dependency>
132             <groupId>org.springframework.boot</groupId>
133             <artifactId>spring-boot-configuration-processor</artifactId>
134             <optional>true</optional>
135         </dependency>
136         <dependency>
137             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
138             <artifactId>cbs-client</artifactId>
139             <version>${sdk.version}</version>
140         </dependency>
141         <dependency>
142             <groupId>org.projectlombok</groupId>
143             <artifactId>lombok</artifactId>
144             <scope>provided</scope>
145         </dependency>
146         <dependency>
147             <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
148             <artifactId>dmaapClient</artifactId>
149             <version>${version.dmaap}</version>
150         </dependency>
151         <dependency>
152             <groupId>javax.ws.rs</groupId>
153             <artifactId>javax.ws.rs-api</artifactId>
154             <version>${javax.ws.rs-api.version}</version>
155         </dependency>
156         <dependency>
157             <groupId>org.glassfish.jersey.inject</groupId>
158             <artifactId>jersey-hk2</artifactId>
159         </dependency>
160         <!-- Actuator dependencies -->
161         <dependency>
162             <groupId>org.springframework.boot</groupId>
163             <artifactId>spring-boot-starter-actuator</artifactId>
164         </dependency>
165         <!--REQUIRED TO GENERATE DOCUMENTATION -->
166         <dependency>
167             <groupId>io.springfox</groupId>
168             <artifactId>springfox-swagger2</artifactId>
169             <version>${springfox.version}</version>
170         </dependency>
171         <dependency>
172             <groupId>io.springfox</groupId>
173             <artifactId>springfox-swagger-ui</artifactId>
174             <version>${springfox.version}</version>
175         </dependency>
176         <!-- TEST -->
177         <dependency>
178             <groupId>org.springframework.boot</groupId>
179             <artifactId>spring-boot-starter-test</artifactId>
180             <scope>test</scope>
181         </dependency>
182         <dependency>
183             <groupId>org.awaitility</groupId>
184             <artifactId>awaitility</artifactId>
185             <scope>test</scope>
186         </dependency>
187         <dependency>
188             <groupId>io.projectreactor</groupId>
189             <artifactId>reactor-test</artifactId>
190             <scope>test</scope>
191         </dependency>
192         <dependency>
193             <groupId>org.junit.jupiter</groupId>
194             <artifactId>junit-jupiter-engine</artifactId>
195             <scope>test</scope>
196         </dependency>
197         <dependency>
198             <groupId>org.mockito</groupId>
199             <artifactId>mockito-junit-jupiter</artifactId>
200             <scope>test</scope>
201         </dependency>
202         <dependency>
203             <groupId>org.mockito</groupId>
204             <artifactId>mockito-core</artifactId>
205             <scope>test</scope>
206         </dependency>
207         <dependency>
208             <groupId>com.squareup.okhttp3</groupId>
209             <artifactId>mockwebserver</artifactId>
210             <scope>test</scope>
211         </dependency>
212         <!-- https://mvnrepository.com/artifact/com.github.erosb/everit-json-schema -->
213         <dependency>
214             <groupId>com.github.erosb</groupId>
215             <artifactId>everit-json-schema</artifactId>
216             <version>1.13.0</version>
217         </dependency>
218     </dependencies>
219     <build>
220         <plugins>
221             <plugin>
222                 <groupId>org.springframework.boot</groupId>
223                 <artifactId>spring-boot-maven-plugin</artifactId>
224             </plugin>
225             <plugin>
226                 <groupId>net.revelc.code.formatter</groupId>
227                 <artifactId>formatter-maven-plugin</artifactId>
228                 <version>${formatter-maven-plugin.version}</version>
229                 <configuration>
230                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
231                 </configuration>
232                 <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format
233                                         spotless:apply process-sources -->
234             </plugin>
235             <plugin>
236                 <groupId>com.diffplug.spotless</groupId>
237                 <artifactId>spotless-maven-plugin</artifactId>
238                 <version>${spotless-maven-plugin.version}</version>
239                 <configuration>
240                     <java>
241                         <removeUnusedImports />
242                         <importOrder>
243                             <order>com,java,javax,org</order>
244                         </importOrder>
245                     </java>
246                 </configuration>
247                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use
248                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate
249                                         source files -->
250             </plugin>
251             <plugin>
252                 <groupId>org.apache.maven.plugins</groupId>
253                 <artifactId>maven-surefire-plugin</artifactId>
254                 <configuration>
255                     <skipTests>false</skipTests>
256                 </configuration>
257             </plugin>
258             <plugin>
259                 <artifactId>maven-failsafe-plugin</artifactId>
260             </plugin>
261             <plugin>
262                 <groupId>org.codehaus.mojo</groupId>
263                 <artifactId>build-helper-maven-plugin</artifactId>
264                 <executions>
265                     <execution>
266                         <id>add-source</id>
267                         <phase>generate-sources</phase>
268                         <goals>
269                             <goal>add-source</goal>
270                         </goals>
271                         <configuration>
272                             <sources>
273                                 <source>${project.build.directory}/generated-sources/annotations/</source>
274                             </sources>
275                         </configuration>
276                     </execution>
277                 </executions>
278             </plugin>
279             <plugin>
280                 <groupId>org.jacoco</groupId>
281                 <artifactId>jacoco-maven-plugin</artifactId>
282                 <version>${jacoco-maven-plugin.version}</version>
283                 <executions>
284                     <execution>
285                         <id>default-prepare-agent</id>
286                         <goals>
287                             <goal>prepare-agent</goal>
288                         </goals>
289                     </execution>
290                     <execution>
291                         <id>default-report</id>
292                         <phase>prepare-package</phase>
293                         <goals>
294                             <goal>report</goal>
295                         </goals>
296                     </execution>
297                 </executions>
298             </plugin>
299             <plugin>
300                 <groupId>io.fabric8</groupId>
301                 <artifactId>docker-maven-plugin</artifactId>
302                 <version>${docker-maven-plugin}</version>
303                 <inherited>false</inherited>
304                 <executions>
305                     <execution>
306                         <id>generate-a1-policy-management-service-image</id>
307                         <phase>package</phase>
308                         <goals>
309                             <goal>build</goal>
310                         </goals>
311                         <configuration>
312                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
313                             <images>
314                                 <image>
315                                     <name>o-ran-sc/nonrtric-a1-policy-management-service:${project.version}</name>
316                                     <build>
317                                         <cleanup>try</cleanup>
318                                         <contextDir>${basedir}</contextDir>
319                                         <dockerFile>Dockerfile</dockerFile>
320                                         <args>
321                                             <JAR>${project.build.finalName}.jar</JAR>
322                                         </args>
323                                         <tags>
324                                             <tag>${project.version}</tag>
325                                         </tags>
326                                     </build>
327                                 </image>
328                             </images>
329                         </configuration>
330                     </execution>
331                     <execution>
332                         <id>push-a1-policy-management-service-image</id>
333                         <goals>
334                             <goal>build</goal>
335                             <goal>push</goal>
336                         </goals>
337                         <configuration>
338                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
339                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
340                             <images>
341                                 <image>
342                                     <name>o-ran-sc/nonrtric-a1-policy-management-service:${project.version}</name>
343                                     <build>
344                                         <contextDir>${basedir}</contextDir>
345                                         <dockerFile>Dockerfile</dockerFile>
346                                         <args>
347                                             <JAR>${project.build.finalName}.jar</JAR>
348                                         </args>
349                                         <tags>
350                                             <tag>${project.version}</tag>
351                                             <tag>latest</tag>
352                                         </tags>
353                                     </build>
354                                 </image>
355                             </images>
356                         </configuration>
357                     </execution>
358                 </executions>
359             </plugin>
360             <!-- support sonar in multi-module project -->
361             <plugin>
362                 <groupId>org.sonarsource.scanner.maven</groupId>
363                 <artifactId>sonar-maven-plugin</artifactId>
364                 <version>${sonar-maven-plugin.version}</version>
365             </plugin>
366             <plugin>
367                 <groupId>org.codehaus.mojo</groupId>
368                 <artifactId>exec-maven-plugin</artifactId>
369                 <version>${exec-maven-plugin.version}</version>
370                 <executions>
371                     <execution>
372                         <id>git submodule update</id>
373                         <phase>initialize</phase>
374                         <configuration>
375                             <executable>git</executable>
376                             <arguments>
377                                 <argument>submodule</argument>
378                                 <argument>update</argument>
379                                 <argument>--init</argument>
380                                 <argument>--recursive</argument>
381                             </arguments>
382                         </configuration>
383                         <goals>
384                             <goal>exec</goal>
385                         </goals>
386                     </execution>
387                     <execution>
388                         <id>copy configuration</id>
389                         <phase>initialize</phase>
390                         <configuration>
391                             <executable>cp</executable>
392                             <arguments>
393                                 <argument>-r</argument>
394                                 <argument>../onap/oran/a1-policy-management/config</argument>
395                                 <argument>.</argument>
396                             </arguments>
397                         </configuration>
398                         <goals>
399                             <goal>exec</goal>
400                         </goals>
401                     </execution>
402                 </executions>
403             </plugin>
404         </plugins>
405     </build>
406     <issueManagement>
407         <system>JIRA</system>
408         <url>https://jira.o-ran-sc.org/</url>
409     </issueManagement>
410 </project>