CI: Migrate Sonar Scan job to GHA
[nonrtric/plt/informationcoordinatorservice.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ========================LICENSE_START=================================
4 * O-RAN-SC
5 * %%
6 * Copyright (C) 2019-2023 Nordix Foundation. All rights reserved.
7 * Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
8 * %%
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ========================LICENSE_END===================================
21 -->
22 <project
23     xmlns="http://maven.apache.org/POM/4.0.0"
24     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
26     <modelVersion>4.0.0</modelVersion>
27     <parent>
28         <groupId>org.springframework.boot</groupId>
29         <artifactId>spring-boot-starter-parent</artifactId>
30         <version>3.2.0</version>
31         <relativePath />
32     </parent>
33     <groupId>org.o-ran-sc.nonrtric.plt</groupId>
34     <artifactId>informationcoordinatorservice</artifactId>
35     <version>1.7.0-SNAPSHOT</version>
36     <licenses>
37         <license>
38             <name>The Apache Software License, Version 2.0</name>
39             <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
40         </license>
41     </licenses>
42     <repositories>
43         <repository>
44             <id>onap-releases</id>
45             <name>onap-releases</name>
46             <url>https://nexus.onap.org/content/repositories/releases/</url>
47         </repository>
48     </repositories>
49     <properties>
50         <java.version>17</java.version>
51         <gson.version>2.9.0</gson.version>
52         <json.version>20230227 </json.version>
53         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
54         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>
55         <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>
56         <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
57         <docker-maven-plugin>0.30.0</docker-maven-plugin>
58         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
59         <jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
60         <springdoc.version>2.0.2</springdoc.version>
61         <springdoc.openapi-ui.version>1.6.14</springdoc.openapi-ui.version>
62         <exec.skip>true</exec.skip>
63     </properties>
64     <dependencies>
65         <dependency>
66             <groupId>org.springdoc</groupId>
67             <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
68             <version>${springdoc.version}</version>
69         </dependency>
70         <dependency>
71             <groupId>org.springdoc</groupId>
72             <artifactId>springdoc-openapi-ui</artifactId>
73             <version>${springdoc.openapi-ui.version}</version>
74         </dependency>
75         <dependency>
76             <groupId>org.springframework.boot</groupId>
77             <artifactId>spring-boot-starter-web</artifactId>
78         </dependency>
79         <dependency>
80             <groupId>org.springframework.boot</groupId>
81             <artifactId>spring-boot-starter-thymeleaf</artifactId>
82         </dependency>
83         <dependency>
84             <groupId>org.springframework.boot</groupId>
85             <artifactId>spring-boot-starter-webflux</artifactId>
86         </dependency>
87         <dependency>
88             <groupId>org.springframework</groupId>
89             <artifactId>spring-webflux</artifactId>
90         </dependency>
91         <dependency>
92             <groupId>com.google.code.gson</groupId>
93             <artifactId>gson</artifactId>
94             <version>${gson.version}</version>
95         </dependency>
96         <dependency>
97             <groupId>org.json</groupId>
98             <artifactId>json</artifactId>
99             <version>${json.version}</version>
100         </dependency>
101         <!-- https://mvnrepository.com/artifact/com.github.erosb/everit-json-schema -->
102         <dependency>
103             <groupId>com.github.erosb</groupId>
104             <artifactId>everit-json-schema</artifactId>
105             <version>1.12.1</version>
106         </dependency>
107         <!-- Actuator dependencies -->
108         <dependency>
109             <groupId>org.springframework.boot</groupId>
110             <artifactId>spring-boot-starter-actuator</artifactId>
111         </dependency>
112         <!-- For development help -->
113         <dependency>
114             <groupId>org.springframework.boot</groupId>
115             <artifactId>spring-boot-devtools</artifactId>
116             <optional>true</optional>
117         </dependency>
118         <dependency>
119             <groupId>org.springframework.boot</groupId>
120             <artifactId>spring-boot-configuration-processor</artifactId>
121             <optional>true</optional>
122         </dependency>
123         <dependency>
124             <groupId>software.amazon.awssdk</groupId>
125             <artifactId>s3</artifactId>
126             <version>2.17.292</version>
127         </dependency>
128         <dependency>
129             <groupId>org.projectlombok</groupId>
130             <artifactId>lombok</artifactId>
131             <scope>provided</scope>
132         </dependency>
133         <!-- TEST -->
134         <dependency>
135             <groupId>org.springframework.boot</groupId>
136             <artifactId>spring-boot-starter-test</artifactId>
137             <scope>test</scope>
138         </dependency>
139         <dependency>
140             <groupId>org.awaitility</groupId>
141             <artifactId>awaitility</artifactId>
142             <scope>test</scope>
143         </dependency>
144         <dependency>
145             <groupId>io.projectreactor</groupId>
146             <artifactId>reactor-test</artifactId>
147             <scope>test</scope>
148         </dependency>
149         <dependency>
150             <groupId>org.junit.jupiter</groupId>
151             <artifactId>junit-jupiter-engine</artifactId>
152             <scope>test</scope>
153         </dependency>
154         <dependency>
155             <groupId>org.mockito</groupId>
156             <artifactId>mockito-junit-jupiter</artifactId>
157             <scope>test</scope>
158         </dependency>
159         <dependency>
160             <groupId>org.mockito</groupId>
161             <artifactId>mockito-core</artifactId>
162             <scope>test</scope>
163         </dependency>
164         <dependency>
165             <groupId>com.squareup.okhttp3</groupId>
166             <artifactId>mockwebserver</artifactId>
167             <scope>test</scope>
168         </dependency>
169     </dependencies>
170     <build>
171         <plugins>
172             <plugin>
173                 <groupId>org.springframework.boot</groupId>
174                 <artifactId>spring-boot-maven-plugin</artifactId>
175             </plugin>
176             <plugin>
177                 <groupId>net.revelc.code.formatter</groupId>
178                 <artifactId>formatter-maven-plugin</artifactId>
179                 <version>${formatter-maven-plugin.version}</version>
180                 <configuration>
181                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
182                 </configuration>
183                 <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format
184                                         spotless:apply process-sources -->
185             </plugin>
186             <plugin>
187                 <groupId>com.diffplug.spotless</groupId>
188                 <artifactId>spotless-maven-plugin</artifactId>
189                 <version>${spotless-maven-plugin.version}</version>
190                 <configuration>
191                     <java>
192                         <removeUnusedImports />
193                         <importOrder>
194                             <order>com,java,org</order>
195                         </importOrder>
196                     </java>
197                 </configuration>
198                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use
199                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate
200                                         source files -->
201             </plugin>
202             <plugin>
203                 <groupId>org.apache.maven.plugins</groupId>
204                 <artifactId>maven-surefire-plugin</artifactId>
205                 <configuration>
206                     <skipTests>false</skipTests>
207                 </configuration>
208             </plugin>
209             <plugin>
210                 <artifactId>maven-failsafe-plugin</artifactId>
211             </plugin>
212             <plugin>
213                 <groupId>org.codehaus.mojo</groupId>
214                 <artifactId>build-helper-maven-plugin</artifactId>
215                 <executions>
216                     <execution>
217                         <id>add-source</id>
218                         <phase>generate-sources</phase>
219                         <goals>
220                             <goal>add-source</goal>
221                         </goals>
222                         <configuration>
223                             <sources>
224                                 <source>${project.build.directory}/generated-sources/annotations/</source>
225                             </sources>
226                         </configuration>
227                     </execution>
228                 </executions>
229             </plugin>
230             <plugin>
231                 <groupId>org.jacoco</groupId>
232                 <artifactId>jacoco-maven-plugin</artifactId>
233                 <version>${jacoco-maven-plugin.version}</version>
234                 <executions>
235                     <execution>
236                         <id>default-prepare-agent</id>
237                         <goals>
238                             <goal>prepare-agent</goal>
239                         </goals>
240                     </execution>
241                     <execution>
242                         <id>default-report</id>
243                         <phase>prepare-package</phase>
244                         <goals>
245                             <goal>report</goal>
246                         </goals>
247                     </execution>
248                 </executions>
249             </plugin>
250             <plugin>
251                 <groupId>io.swagger.codegen.v3</groupId>
252                 <artifactId>swagger-codegen-maven-plugin</artifactId>
253                 <version>${swagger-codegen-maven-plugin.version}</version>
254                 <executions>
255                     <execution>
256                         <phase>test</phase>
257                         <goals>
258                             <goal>generate</goal>
259                         </goals>
260                         <configuration>
261                             <inputSpec>${project.basedir}/api/ics-api.json</inputSpec>
262                             <language>openapi-yaml</language>
263                             <output>${project.basedir}/api</output>
264                             <configOptions>
265                                 <outputFile>ics-api.yaml</outputFile>
266                             </configOptions>
267                         </configuration>
268                     </execution>
269                 </executions>
270             </plugin>
271             <plugin>
272                 <groupId>io.fabric8</groupId>
273                 <artifactId>docker-maven-plugin</artifactId>
274                 <version>${docker-maven-plugin}</version>
275                 <inherited>false</inherited>
276                 <executions>
277                     <execution>
278                         <id>generate-nonrtric-plt-informationcoordinatorservice-image</id>
279                         <phase>package</phase>
280                         <goals>
281                             <goal>build</goal>
282                         </goals>
283                         <configuration>
284                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
285                             <images>
286                                 <image>
287                                     <name>
288                                         o-ran-sc/nonrtric-plt-informationcoordinatorservice:${project.version}</name>
289                                     <build>
290                                         <cleanup>try</cleanup>
291                                         <contextDir>${basedir}</contextDir>
292                                         <dockerFile>Dockerfile</dockerFile>
293                                         <args>
294                                             <JAR>${project.build.finalName}.jar</JAR>
295                                         </args>
296                                         <tags>
297                                             <tag>${project.version}</tag>
298                                         </tags>
299                                     </build>
300                                 </image>
301                             </images>
302                         </configuration>
303                     </execution>
304                     <execution>
305                         <id>push-nonrtric-plt-informationcoordinatorservice-image</id>
306                         <goals>
307                             <goal>build</goal>
308                             <goal>push</goal>
309                         </goals>
310                         <configuration>
311                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
312                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
313                             <images>
314                                 <image>
315                                     <name>
316                                         o-ran-sc/nonrtric-plt-informationcoordinatorservice:${project.version}</name>
317                                     <build>
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                                             <tag>latest</tag>
326                                         </tags>
327                                     </build>
328                                 </image>
329                             </images>
330                         </configuration>
331                     </execution>
332                 </executions>
333             </plugin>
334         </plugins>
335     </build>
336     <issueManagement>
337         <system>JIRA</system>
338         <url>https://jira.o-ran-sc.org/</url>
339     </issueManagement>
340 </project>