9c1dd4476fa28fd646cbde22efa644ae0666836c
[nonrtric.git] / dmaap-adaptor-java / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ========================LICENSE_START=================================
4 * O-RAN-SC
5 * %%
6 * Copyright (C) 2021 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>dmaap-adaptor</artifactId>
34     <version>1.1.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         <swagger.version>2.1.6</swagger.version>
53         <json.version>20190722</json.version>
54         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
55         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
56         <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>
57         <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
58         <docker-maven-plugin>0.30.0</docker-maven-plugin>
59         <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
60         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
61         <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
62         <exec.skip>true</exec.skip>
63     </properties>
64     <dependencies>
65         <dependency>
66             <groupId>org.springdoc</groupId>
67             <artifactId>springdoc-openapi-ui</artifactId>
68             <version>1.5.4</version>
69         </dependency>
70         <dependency>
71             <groupId>org.springframework.boot</groupId>
72             <artifactId>spring-boot-starter-web</artifactId>
73         </dependency>
74         <dependency>
75             <groupId>org.springframework.boot</groupId>
76             <artifactId>spring-boot-starter-thymeleaf</artifactId>
77         </dependency>
78         <dependency>
79             <groupId>org.springframework.boot</groupId>
80             <artifactId>spring-boot-starter-webflux</artifactId>
81         </dependency>
82         <dependency>
83             <groupId>org.springframework</groupId>
84             <artifactId>spring-webflux</artifactId>
85         </dependency>
86         <dependency>
87             <groupId>io.swagger.core.v3</groupId>
88             <artifactId>swagger-jaxrs2</artifactId>
89             <version>${swagger.version}</version>
90         </dependency>
91         <dependency>
92             <groupId>io.swagger.core.v3</groupId>
93             <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
94             <version>${swagger.version}</version>
95         </dependency>
96      
97         <dependency>
98             <groupId>org.immutables</groupId>
99             <artifactId>value</artifactId>
100             <version>${immutable.version}</version>
101             <scope>provided</scope>
102         </dependency>
103         <dependency>
104             <groupId>org.immutables</groupId>
105             <artifactId>gson</artifactId>
106             <version>${immutable.version}</version>
107         </dependency>
108         <dependency>
109             <groupId>org.json</groupId>
110             <artifactId>json</artifactId>
111             <version>${json.version}</version>
112         </dependency>
113         <dependency>
114             <groupId>org.projectlombok</groupId>
115             <artifactId>lombok</artifactId>
116             <scope>provided</scope>
117         </dependency>
118         <!-- Actuator dependencies -->
119         <dependency>
120             <groupId>org.springframework.boot</groupId>
121             <artifactId>spring-boot-starter-actuator</artifactId>
122         </dependency>
123         <!--REQUIRED TO GENERATE DOCUMENTATION -->
124         <dependency>
125             <groupId>io.springfox</groupId>
126             <artifactId>springfox-swagger2</artifactId>
127             <version>${springfox.version}</version>
128         </dependency>
129         <dependency>
130             <groupId>io.springfox</groupId>
131             <artifactId>springfox-swagger-ui</artifactId>
132             <version>${springfox.version}</version>
133         </dependency>
134         <!-- For development help -->
135         <dependency>
136             <groupId>org.springframework.boot</groupId>
137             <artifactId>spring-boot-devtools</artifactId>
138             <optional>true</optional>
139         </dependency>
140         <dependency>
141             <groupId>org.springframework.boot</groupId>
142             <artifactId>spring-boot-configuration-processor</artifactId>
143             <optional>true</optional>
144         </dependency>
145         <!-- TEST -->
146         <dependency>
147             <groupId>org.springframework.boot</groupId>
148             <artifactId>spring-boot-starter-test</artifactId>
149             <scope>test</scope>
150         </dependency>
151         <dependency>
152             <groupId>org.awaitility</groupId>
153             <artifactId>awaitility</artifactId>
154             <scope>test</scope>
155         </dependency>
156         <dependency>
157             <groupId>io.projectreactor</groupId>
158             <artifactId>reactor-test</artifactId>
159             <scope>test</scope>
160         </dependency>
161         <dependency>
162             <groupId>org.junit.jupiter</groupId>
163             <artifactId>junit-jupiter-engine</artifactId>
164             <scope>test</scope>
165         </dependency>
166         <dependency>
167             <groupId>org.mockito</groupId>
168             <artifactId>mockito-junit-jupiter</artifactId>
169             <scope>test</scope>
170         </dependency>
171         <dependency>
172             <groupId>org.mockito</groupId>
173             <artifactId>mockito-core</artifactId>
174             <scope>test</scope>
175         </dependency>
176         <dependency>
177             <groupId>com.squareup.okhttp3</groupId>
178             <artifactId>mockwebserver</artifactId>
179             <scope>test</scope>
180         </dependency>
181         <dependency>
182             <groupId>io.projectreactor.kafka</groupId>
183             <artifactId>reactor-kafka</artifactId>
184             <version>1.3.7</version>
185         </dependency>
186         <dependency>
187             <groupId>com.google.guava</groupId>
188             <artifactId>guava</artifactId>
189             <version>31.0.1-jre</version>
190         </dependency>
191     </dependencies>
192     <build>
193         <plugins>
194             <plugin>
195                 <groupId>org.springframework.boot</groupId>
196                 <artifactId>spring-boot-maven-plugin</artifactId>
197             </plugin>
198             <plugin>
199                 <groupId>net.revelc.code.formatter</groupId>
200                 <artifactId>formatter-maven-plugin</artifactId>
201                 <version>${formatter-maven-plugin.version}</version>
202                 <configuration>
203                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
204                 </configuration>
205                 <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format
206                                         spotless:apply process-sources -->
207             </plugin>
208             <plugin>
209                 <groupId>com.diffplug.spotless</groupId>
210                 <artifactId>spotless-maven-plugin</artifactId>
211                 <version>${spotless-maven-plugin.version}</version>
212                 <configuration>
213                     <java>
214                         <removeUnusedImports />
215                         <importOrder>
216                             <order>com,java,javax,org</order>
217                         </importOrder>
218                     </java>
219                 </configuration>
220                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use
221                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate
222                                         source files -->
223             </plugin>
224             <plugin>
225                 <groupId>org.apache.maven.plugins</groupId>
226                 <artifactId>maven-surefire-plugin</artifactId>
227                 <configuration>
228                     <skipTests>false</skipTests>
229                 </configuration>
230             </plugin>
231             <plugin>
232                 <artifactId>maven-failsafe-plugin</artifactId>
233             </plugin>
234             <plugin>
235                 <groupId>org.codehaus.mojo</groupId>
236                 <artifactId>build-helper-maven-plugin</artifactId>
237                 <executions>
238                     <execution>
239                         <id>add-source</id>
240                         <phase>generate-sources</phase>
241                         <goals>
242                             <goal>add-source</goal>
243                         </goals>
244                         <configuration>
245                             <sources>
246                                 <source>${project.build.directory}/generated-sources/annotations/</source>
247                             </sources>
248                         </configuration>
249                     </execution>
250                 </executions>
251             </plugin>
252             <plugin>
253                 <groupId>org.jacoco</groupId>
254                 <artifactId>jacoco-maven-plugin</artifactId>
255                 <version>${jacoco-maven-plugin.version}</version>
256                 <executions>
257                     <execution>
258                         <id>default-prepare-agent</id>
259                         <goals>
260                             <goal>prepare-agent</goal>
261                         </goals>
262                     </execution>
263                     <execution>
264                         <id>default-report</id>
265                         <phase>prepare-package</phase>
266                         <goals>
267                             <goal>report</goal>
268                         </goals>
269                     </execution>
270                 </executions>
271             </plugin>
272             <plugin>
273                 <groupId>io.swagger.codegen.v3</groupId>
274                 <artifactId>swagger-codegen-maven-plugin</artifactId>
275                 <version>${swagger-codegen-maven-plugin.version}</version>
276                 <executions>
277                     <execution>
278                         <phase>test</phase>
279                         <goals>
280                             <goal>generate</goal>
281                         </goals>
282                         <configuration>
283                             <inputSpec>${project.basedir}/api/api.json</inputSpec>
284                             <language>openapi-yaml</language>
285                             <output>${project.basedir}/api</output>
286                             <configOptions>
287                                 <outputFile>api.yaml</outputFile>
288                             </configOptions>
289                         </configuration>
290                     </execution>
291                 </executions>
292             </plugin>
293             <plugin>
294                 <groupId>io.fabric8</groupId>
295                 <artifactId>docker-maven-plugin</artifactId>
296                 <version>${docker-maven-plugin}</version>
297                 <inherited>false</inherited>
298                 <executions>
299                     <execution>
300                         <id>generate-dmaap-adaptor-image</id>
301                         <phase>package</phase>
302                         <goals>
303                             <goal>build</goal>
304                         </goals>
305                         <configuration>
306                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
307                             <images>
308                                 <image>
309                                     <name>o-ran-sc/nonrtric-dmaap-adaptor:${project.version}</name>
310                                     <build>
311                                         <cleanup>try</cleanup>
312                                         <contextDir>${basedir}</contextDir>
313                                         <dockerFile>Dockerfile</dockerFile>
314                                         <args>
315                                             <JAR>${project.build.finalName}.jar</JAR>
316                                         </args>
317                                         <tags>
318                                             <tag>${project.version}</tag>
319                                         </tags>
320                                     </build>
321                                 </image>
322                             </images>
323                         </configuration>
324                     </execution>
325                     <execution>
326                         <id>push-dmaap-adaptor-image</id>
327                         <goals>
328                             <goal>build</goal>
329                             <goal>push</goal>
330                         </goals>
331                         <configuration>
332                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
333                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
334                             <images>
335                                 <image>
336                                     <name>o-ran-sc/nonrtric-dmaap-adaptor:${project.version}</name>
337                                     <build>
338                                         <contextDir>${basedir}</contextDir>
339                                         <dockerFile>Dockerfile</dockerFile>
340                                         <args>
341                                             <JAR>${project.build.finalName}.jar</JAR>
342                                         </args>
343                                         <tags>
344                                             <tag>${project.version}</tag>
345                                             <tag>latest</tag>
346                                         </tags>
347                                     </build>
348                                 </image>
349                             </images>
350                         </configuration>
351                     </execution>
352                 </executions>
353             </plugin>
354             <!-- support sonar in multi-module project -->
355             <plugin>
356                 <groupId>org.sonarsource.scanner.maven</groupId>
357                 <artifactId>sonar-maven-plugin</artifactId>
358                 <version>${sonar-maven-plugin.version}</version>
359             </plugin>
360         </plugins>
361     </build>
362     <issueManagement>
363         <system>JIRA</system>
364         <url>https://jira.o-ran-sc.org/</url>
365     </issueManagement>
366 </project>