A1PMS - Add API Docs
[nonrtric/plt/a1policymanagementservice.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
7 * Copyright (C) 2023-2024: OpenInfra Foundation Europe
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.5</version>
31         <relativePath />
32     </parent>
33     <groupId>org.o-ran-sc.nonrtric.plt</groupId>
34     <artifactId>a1policymanagementservice</artifactId>
35     <version>2.8.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         <software.amazon.awssdk.version>2.19.17</software.amazon.awssdk.version>
52         <json.version>20231013</json.version>
53         <commons-io.version>2.14.0</commons-io.version>
54         <guava.version>32.0.1-jre</guava.version>
55         <surefire-maven-plugin.version>3.0.0-M8</surefire-maven-plugin.version>
56         <surefire-report-plugin.version>3.0.0-M8</surefire-report-plugin.version>
57         <maven-compiler-plugin.version>3.10.0</maven-compiler-plugin.version>
58         <docker-maven-plugin>0.43.0</docker-maven-plugin>
59         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
60         <jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
61         <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
62     </properties>
63     <dependencies>
64         <dependency>
65             <groupId>javax.validation</groupId>
66             <artifactId>validation-api</artifactId>
67             <version>2.0.1.Final</version>
68         </dependency>
69         <dependency>
70             <groupId>javax.annotation</groupId>
71             <artifactId>javax.annotation-api</artifactId>
72             <version>1.3.2</version>
73         </dependency>
74         <dependency>
75             <groupId>io.swagger.core.v3</groupId>
76             <artifactId>swagger-annotations</artifactId>
77             <version>2.2.15</version>
78         </dependency>
79         <dependency>
80             <groupId>org.openapitools</groupId>
81             <artifactId>jackson-databind-nullable</artifactId>
82             <version>0.2.4</version>
83         </dependency>
84         <dependency>
85             <groupId>org.springframework.boot</groupId>
86             <artifactId>spring-boot</artifactId>
87         </dependency>
88         <dependency>
89             <groupId>org.springframework</groupId>
90             <artifactId>spring-context</artifactId>
91         </dependency>
92         <dependency>
93             <groupId>org.springframework.boot</groupId>
94             <artifactId>spring-boot-autoconfigure</artifactId>
95         </dependency>
96         <dependency>
97             <groupId>org.springframework.boot</groupId>
98             <artifactId>spring-boot-starter-webflux</artifactId>
99         </dependency>
100         <dependency>
101             <groupId>org.aspectj</groupId>
102             <artifactId>aspectjweaver</artifactId>
103         </dependency>
104         <dependency>
105             <groupId>org.apache.tomcat.embed</groupId>
106             <artifactId>tomcat-embed-core</artifactId>
107         </dependency>
108         <dependency>
109             <groupId>com.google.guava</groupId>
110             <artifactId>guava</artifactId>
111             <version>${guava.version}</version>
112         </dependency>
113         <dependency>
114             <groupId>com.google.code.gson</groupId>
115             <artifactId>gson</artifactId>
116             <version>${gson.version}</version>
117         </dependency>
118         <dependency>
119             <groupId>org.json</groupId>
120             <artifactId>json</artifactId>
121             <version>${json.version}</version>
122         </dependency>
123         <dependency>
124             <groupId>org.projectlombok</groupId>
125             <artifactId>lombok</artifactId>
126             <scope>provided</scope>
127         </dependency>
128         <!-- Actuator dependencies -->
129         <dependency>
130             <groupId>org.springframework.boot</groupId>
131             <artifactId>spring-boot-starter-actuator</artifactId>
132             <scope>runtime</scope>
133         </dependency>
134         <dependency>
135             <groupId>io.micrometer</groupId>
136             <artifactId>micrometer-registry-prometheus</artifactId>
137         </dependency>
138         <dependency>
139             <groupId>org.springframework.boot</groupId>
140             <artifactId>spring-boot-starter-aop</artifactId>
141         </dependency>
142         <dependency>
143             <groupId>software.amazon.awssdk</groupId>
144             <artifactId>s3</artifactId>
145             <version>${software.amazon.awssdk.version}</version>
146         </dependency>
147         <!-- For development help -->
148         <dependency>
149             <groupId>org.springframework.boot</groupId>
150             <artifactId>spring-boot-devtools</artifactId>
151             <optional>true</optional>
152             <scope>runtime</scope>
153         </dependency>
154         <dependency>
155             <groupId>org.springframework.boot</groupId>
156             <artifactId>spring-boot-configuration-processor</artifactId>
157             <optional>true</optional>
158             <scope>runtime</scope>
159         </dependency>
160         <dependency>
161             <groupId>org.springframework.boot</groupId>
162             <artifactId>spring-boot-starter-test</artifactId>
163             <scope>test</scope>
164         </dependency>
165         <dependency>
166             <groupId>org.awaitility</groupId>
167             <artifactId>awaitility</artifactId>
168             <scope>test</scope>
169         </dependency>
170         <dependency>
171             <groupId>io.projectreactor</groupId>
172             <artifactId>reactor-test</artifactId>
173             <scope>test</scope>
174         </dependency>
175         <dependency>
176             <groupId>org.junit.jupiter</groupId>
177             <artifactId>junit-jupiter-engine</artifactId>
178             <scope>test</scope>
179         </dependency>
180         <dependency>
181             <groupId>org.mockito</groupId>
182             <artifactId>mockito-junit-jupiter</artifactId>
183             <scope>test</scope>
184         </dependency>
185         <dependency>
186             <groupId>org.mockito</groupId>
187             <artifactId>mockito-core</artifactId>
188             <scope>test</scope>
189         </dependency>
190         <dependency>
191             <groupId>com.squareup.okhttp3</groupId>
192             <artifactId>mockwebserver</artifactId>
193             <scope>test</scope>
194         </dependency>
195         <dependency>
196             <groupId>commons-io</groupId>
197             <artifactId>commons-io</artifactId>
198             <version>${commons-io.version}</version>
199             <scope>test</scope>
200         </dependency>
201         <dependency>
202             <groupId>com.github.erosb</groupId>
203             <artifactId>everit-json-schema</artifactId>
204             <version>1.14.0</version>
205         </dependency>
206     </dependencies>
207     <build>
208         <plugins>
209             <plugin>
210                 <groupId>org.springframework.boot</groupId>
211                 <artifactId>spring-boot-maven-plugin</artifactId>
212             </plugin>
213             <plugin>
214                 <groupId>org.apache.maven.plugins</groupId>
215                 <artifactId>maven-surefire-plugin</artifactId>
216                 <version>${surefire-maven-plugin.version}</version>
217                 <configuration>
218                     <skipTests>false</skipTests>
219                 </configuration>
220             </plugin>
221             <plugin>
222                 <artifactId>maven-failsafe-plugin</artifactId>
223             </plugin>
224             <plugin>
225                 <groupId>org.codehaus.mojo</groupId>
226                 <artifactId>build-helper-maven-plugin</artifactId>
227                 <executions>
228                     <execution>
229                         <id>add-additional-source-dirs</id>
230                         <phase>generate-sources</phase>
231                         <goals>
232                             <goal>add-source</goal>
233                         </goals>
234                         <configuration>
235                             <sources>
236                                 <source>${project.build.directory}/generated-sources/annotations/</source>
237                                 <source>${project.basedir}/add-src/main/java</source>
238                                 <source>${project.basedir}/add-src/main/resources</source>
239                             </sources>
240                         </configuration>
241                     </execution>
242                     <execution>
243                         <id>add-additional-testsource-dirs</id>
244                         <phase>generate-sources</phase>
245                         <goals>
246                             <goal>add-test-source</goal>
247                         </goals>
248                         <configuration>
249                             <sources>
250                                 <source>${project.basedir}/add-src/test/java</source>
251                                 <source>${project.basedir}/add-src/test/resources</source>
252                             </sources>
253                         </configuration>
254                     </execution>
255                 </executions>
256             </plugin>
257             <plugin>
258                 <groupId>org.jacoco</groupId>
259                 <artifactId>jacoco-maven-plugin</artifactId>
260                 <version>${jacoco-maven-plugin.version}</version>
261                 <executions>
262                     <execution>
263                         <id>default-prepare-agent</id>
264                         <goals>
265                             <goal>prepare-agent</goal>
266                         </goals>
267                     </execution>
268                     <execution>
269                         <id>default-report</id>
270                         <phase>prepare-package</phase>
271                         <goals>
272                             <goal>report</goal>
273                         </goals>
274                     </execution>
275                 </executions>
276             </plugin>
277             <plugin>
278                 <groupId>io.swagger.codegen.v3</groupId>
279                 <artifactId>swagger-codegen-maven-plugin</artifactId>
280                 <version>3.0.46</version>
281                 <executions>
282                     <execution>
283                         <id>generate-openapi-json</id>
284                         <phase>prepare-package</phase>
285                         <goals>
286                             <goal>generate</goal>
287                         </goals>
288                         <configuration>
289                             <inputSpec>${project.basedir}/api/pms-api.yaml</inputSpec>
290                             <language>openapi</language>
291                             <output>${project.basedir}/api</output>
292                             <configOptions>
293                                 <outputFile>pms-api.json</outputFile>
294                             </configOptions>
295                         </configuration>
296                     </execution>
297                 </executions>
298             </plugin>
299             <plugin>
300                 <groupId>org.openapitools</groupId>
301                 <artifactId>openapi-generator-maven-plugin</artifactId>
302                 <version>6.6.0</version>
303                 <executions>
304                     <execution>
305                         <id>generate-openapi-policy-api</id>
306                         <phase>generate-sources</phase>
307                         <goals>
308                             <goal>generate</goal>
309                         </goals>
310                         <configuration>
311                             <generatorName>spring</generatorName>
312                             <inputSpec>${project.basedir}/api/pms-api.yaml</inputSpec>
313                             <library>spring-boot</library>
314                             <invokerPackage>org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2</invokerPackage>
315                             <apiPackage>org.onap.ccsdk.oran.a1policymanagementservice.controllers.api.v2</apiPackage>
316                             <modelPackage>org.onap.ccsdk.oran.a1policymanagementservice.models.v2</modelPackage>
317                             <generateApiTests>false</generateApiTests>
318                             <generateModelTests>false</generateModelTests>
319                             <generateSupportingFiles>false</generateSupportingFiles>
320                             <skipValidateSpec>false</skipValidateSpec>
321                             <configOptions>
322                                 <interfaceOnly>true</interfaceOnly>
323                                 <useTags>true</useTags>
324                                 <reactive>true</reactive>
325                                 <dateLibrary>java8</dateLibrary>
326                                 <java8>true</java8>
327                                 <unhandledException>true</unhandledException>
328                                 <openApiNullable>false</openApiNullable>
329                                 <skipDefaultInterface>true</skipDefaultInterface>
330                             </configOptions>
331                         </configuration>
332                     </execution>
333                     <execution>
334                         <id>generate-openapi-html</id>
335                         <phase>prepare-package</phase>
336                         <goals>
337                             <goal>generate</goal>
338                         </goals>
339                         <configuration>
340                             <inputSpec>${project.basedir}/api/pms-api.json</inputSpec>
341                             <generatorName>html2</generatorName>
342                             <output>${project.basedir}/api/pms-api</output>
343                             <skipOperationExample>false</skipOperationExample>
344                             <strictSpec>false</strictSpec>
345                             <configOptions>
346                                 <appDescription>The O-RAN Non-RT RIC A1 Policy Management Service
347                                     provides a REST API for managing O-RAN A1 Policies.</appDescription>
348                                 <appName>ONAP CCSDK A1 Policy Management Service</appName>
349                                 <infoUrl>https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP</infoUrl>
350                                 <licenseInfo>Copyright (C) 2020-2023 Nordix Foundation. Licensed
351                                     under the Apache License, and Copyright (C) 2024 OpenInfra
352                                     Foundation Europe. All rights reserved.</licenseInfo>
353                                 <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
354                             </configOptions>
355                         </configuration>
356                     </execution>
357                 </executions>
358             </plugin>
359             <plugin>
360                 <artifactId>maven-resources-plugin</artifactId>
361                 <executions>
362                     <execution>
363                         <id>copy-resource-configuration-files</id>
364                         <phase>initialize</phase>
365                         <goals>
366                             <goal>copy-resources</goal>
367                         </goals>
368                         <configuration>
369                             <overwrite>true</overwrite>
370                             <verbose>true</verbose>
371                             <outputDirectory>${project.basedir}/config</outputDirectory>
372                             <resources>
373                                 <resource>
374                                     <directory>${project.basedir}/onap/oran/a1-policy-management/config</directory>
375                                 </resource>
376                             </resources>
377                         </configuration>
378                     </execution>
379                     <execution>
380                         <id>copy-resource-openapi-files-fromsubmodule</id>
381                         <phase>initialize</phase>
382                         <goals>
383                             <goal>copy-resources</goal>
384                         </goals>
385                         <configuration>
386                             <verbose>true</verbose>
387                             <overwrite>true</overwrite>
388                             <outputDirectory>${project.basedir}/api</outputDirectory>
389                             <resources>
390                                 <resource>
391                                     <directory>${project.basedir}/onap/oran/a1-policy-management/api</directory>
392                                     <includes>
393                                         <include>pms-api.json</include>
394                                         <include>pms-api.yaml</include>
395                                     </includes>
396                                     </resource>
397                             </resources>
398                         </configuration>
399                     </execution>
400                     <execution>
401                         <id>copy-resource-doc-openapi</id>
402                         <phase>package</phase>
403                         <goals>
404                             <goal>copy-resources</goal>
405                         </goals>
406                         <configuration>
407                             <outputDirectory>${project.basedir}/docs/offeredapis/swagger</outputDirectory>
408                             <overwrite>true</overwrite>
409                             <verbose>true</verbose>
410                             <resources>
411                                 <resource>
412                                     <directory>${project.basedir}/api</directory>
413                                     <includes>
414                                         <include>pms-api.json</include>
415                                         <include>pms-api.yaml</include>
416                                     </includes>
417                                 </resource>
418                             </resources>
419                         </configuration>
420                     </execution>
421                     <execution>
422                         <id>copy-resource-openapi-html</id>
423                         <phase>package</phase>
424                         <goals>
425                             <goal>copy-resources</goal>
426                         </goals>
427                         <configuration>
428                             <verbose>true</verbose>
429                             <outputDirectory>
430                                 ${project.basedir}/docs/offeredapis/openapitoolgen/offeredapis/pms-api</outputDirectory>
431                             <resources>
432                                 <resource>
433                                     <directory>${project.basedir}/api/pms-api</directory>
434                                     <includes>
435                                         <include>pms-api.html</include>
436                                     </includes>
437                                 </resource>
438                             </resources>
439                         </configuration>
440                     </execution>
441                 </executions>
442             </plugin>
443             <plugin>
444                 <groupId>io.fabric8</groupId>
445                 <artifactId>docker-maven-plugin</artifactId>
446                 <version>${docker-maven-plugin}</version>
447                 <inherited>false</inherited>
448                 <executions>
449                     <execution>
450                         <id>generate-a1policymanagementservice-image</id>
451                         <phase>package</phase>
452                         <goals>
453                             <goal>build</goal>
454                         </goals>
455                         <configuration>
456                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
457                             <images>
458                                 <image>
459                                     <name>
460                                         o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version}</name>
461                                     <build>
462                                         <cleanup>try</cleanup>
463                                         <contextDir>${basedir}</contextDir>
464                                         <dockerFile>Dockerfile</dockerFile>
465                                         <filter>false</filter>
466                                         <args>
467                                             <JAR>${project.build.finalName}.jar</JAR>
468                                         </args>
469                                         <tags>
470                                             <tag>${project.version}</tag>
471                                         </tags>
472                                     </build>
473                                 </image>
474                             </images>
475                         </configuration>
476                     </execution>
477                     <execution>
478                         <id>push-a1policymanagementservice-image</id>
479                         <goals>
480                             <goal>build</goal>
481                             <goal>push</goal>
482                         </goals>
483                         <configuration>
484                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
485                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
486                             <images>
487                                 <image>
488                                     <name>
489                                         o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version}</name>
490                                     <build>
491                                         <contextDir>${basedir}</contextDir>
492                                         <dockerFile>Dockerfile</dockerFile>
493                                         <filter>false</filter>
494                                         <args>
495                                             <JAR>${project.build.finalName}.jar</JAR>
496                                         </args>
497                                         <tags>
498                                             <tag>${project.version}</tag>
499                                             <tag>latest</tag>
500                                         </tags>
501                                     </build>
502                                 </image>
503                             </images>
504                         </configuration>
505                     </execution>
506                 </executions>
507             </plugin>
508             <!-- support sonar in multi-module project -->
509             <plugin>
510                 <groupId>org.sonarsource.scanner.maven</groupId>
511                 <artifactId>sonar-maven-plugin</artifactId>
512                 <version>${sonar-maven-plugin.version}</version>
513             </plugin>
514             <plugin>
515                 <groupId>org.codehaus.mojo</groupId>
516                 <artifactId>exec-maven-plugin</artifactId>
517                 <version>${exec-maven-plugin.version}</version>
518                 <executions>
519                     <execution>
520                         <id>git submodule update</id>
521                         <phase>validate</phase>
522                         <configuration>
523                             <executable>git</executable>
524                             <arguments>
525                                 <argument>submodule</argument>
526                                 <argument>update</argument>
527                                 <argument>--init</argument>
528                                 <argument>--recursive</argument>
529                             </arguments>
530                         </configuration>
531                         <goals>
532                             <goal>exec</goal>
533                         </goals>
534                     </execution>
535                 </executions>
536             </plugin>
537         </plugins>
538     </build>
539     <issueManagement>
540         <system>JIRA</system>
541         <url>https://jira.o-ran-sc.org/</url>
542     </issueManagement>
543     <reporting>
544         <plugins>
545             <plugin>
546                 <groupId>org.apache.maven.plugins</groupId>
547                 <artifactId>maven-surefire-report-plugin</artifactId>
548                 <version>${surefire-report-plugin.version}</version>
549             </plugin>
550         </plugins>
551     </reporting>
552 </project>