Update A1-PMS to ONAP J-Release version
[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.20.12</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         <dependency>
129             <groupId>org.mapstruct</groupId>
130             <artifactId>mapstruct</artifactId>
131             <version>1.5.5.Final</version>
132         </dependency>
133         <dependency>
134             <groupId>org.mapstruct</groupId>
135             <artifactId>mapstruct-processor</artifactId>
136             <version>1.5.5.Final</version>
137         </dependency>
138         <!-- Actuator dependencies -->
139         <dependency>
140             <groupId>org.springframework.boot</groupId>
141             <artifactId>spring-boot-starter-actuator</artifactId>
142             <scope>runtime</scope>
143         </dependency>
144         <dependency>
145             <groupId>io.micrometer</groupId>
146             <artifactId>micrometer-registry-prometheus</artifactId>
147         </dependency>
148         <dependency>
149             <groupId>org.springframework.boot</groupId>
150             <artifactId>spring-boot-starter-aop</artifactId>
151         </dependency>
152         <dependency>
153             <groupId>software.amazon.awssdk</groupId>
154             <artifactId>s3</artifactId>
155             <version>${software.amazon.awssdk.version}</version>
156         </dependency>
157         <!-- For development help -->
158         <dependency>
159             <groupId>org.springframework.boot</groupId>
160             <artifactId>spring-boot-devtools</artifactId>
161             <optional>true</optional>
162             <scope>runtime</scope>
163         </dependency>
164         <dependency>
165             <groupId>org.springframework.boot</groupId>
166             <artifactId>spring-boot-configuration-processor</artifactId>
167             <optional>true</optional>
168             <scope>runtime</scope>
169         </dependency>
170         <dependency>
171             <groupId>org.springframework.boot</groupId>
172             <artifactId>spring-boot-starter-test</artifactId>
173             <scope>test</scope>
174         </dependency>
175         <dependency>
176             <groupId>org.awaitility</groupId>
177             <artifactId>awaitility</artifactId>
178             <scope>test</scope>
179         </dependency>
180         <dependency>
181             <groupId>io.projectreactor</groupId>
182             <artifactId>reactor-test</artifactId>
183             <scope>test</scope>
184         </dependency>
185         <dependency>
186             <groupId>org.junit.jupiter</groupId>
187             <artifactId>junit-jupiter-engine</artifactId>
188             <scope>test</scope>
189         </dependency>
190         <dependency>
191             <groupId>org.mockito</groupId>
192             <artifactId>mockito-junit-jupiter</artifactId>
193             <scope>test</scope>
194         </dependency>
195         <dependency>
196             <groupId>org.mockito</groupId>
197             <artifactId>mockito-core</artifactId>
198             <scope>test</scope>
199         </dependency>
200         <dependency>
201             <groupId>com.squareup.okhttp3</groupId>
202             <artifactId>mockwebserver</artifactId>
203             <scope>test</scope>
204         </dependency>
205         <dependency>
206             <groupId>commons-io</groupId>
207             <artifactId>commons-io</artifactId>
208             <version>${commons-io.version}</version>
209             <scope>test</scope>
210         </dependency>
211         <dependency>
212             <groupId>com.github.erosb</groupId>
213             <artifactId>everit-json-schema</artifactId>
214             <version>1.14.0</version>
215         </dependency>
216        <!-- For Tracing -->
217         <dependency>
218             <groupId>io.micrometer</groupId>
219             <artifactId>micrometer-tracing-bridge-otel</artifactId>
220         </dependency>
221         <dependency>
222             <groupId>io.opentelemetry</groupId>
223             <artifactId>opentelemetry-exporter-otlp</artifactId>
224         </dependency>
225         <dependency>
226             <groupId>io.opentelemetry</groupId>
227             <artifactId>opentelemetry-sdk-extension-jaeger-remote-sampler</artifactId>
228         </dependency>
229         <dependency>
230             <groupId>io.opentelemetry</groupId>
231             <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
232         </dependency>
233         <dependency>
234             <groupId>io.opentelemetry.instrumentation</groupId>
235             <artifactId>opentelemetry-spring-webflux-5.3</artifactId>
236         </dependency>
237         <dependency>
238             <groupId>io.micrometer</groupId>
239             <artifactId>context-propagation</artifactId>
240             <version>1.0.2</version>
241         </dependency>
242         <!-- For ObservationRegistryCustomizer -->
243         <dependency>
244             <groupId>org.springframework.boot</groupId>
245             <artifactId>spring-boot-actuator-autoconfigure</artifactId>
246         </dependency>
247     </dependencies>
248     <dependencyManagement>
249         <dependencies>
250             <dependency>
251                 <groupId>io.opentelemetry</groupId>
252                 <artifactId>opentelemetry-bom</artifactId>
253                 <version>1.38.0</version>
254                 <type>pom</type>
255                 <scope>import</scope>
256             </dependency>
257             <dependency>
258                 <groupId>io.opentelemetry.instrumentation</groupId>
259                 <artifactId>opentelemetry-instrumentation-bom-alpha</artifactId>
260                 <version>2.4.0-alpha</version>
261                 <type>pom</type>
262                 <scope>import</scope>
263             </dependency>
264         </dependencies>
265     </dependencyManagement>
266     <build>
267         <plugins>
268             <plugin>
269                 <groupId>org.springframework.boot</groupId>
270                 <artifactId>spring-boot-maven-plugin</artifactId>
271             </plugin>
272             <plugin>
273                 <groupId>org.apache.maven.plugins</groupId>
274                 <artifactId>maven-surefire-plugin</artifactId>
275                 <version>${surefire-maven-plugin.version}</version>
276                 <configuration>
277                     <skipTests>false</skipTests>
278                 </configuration>
279             </plugin>
280             <plugin>
281                 <artifactId>maven-failsafe-plugin</artifactId>
282             </plugin>
283             <plugin>
284                 <groupId>org.codehaus.mojo</groupId>
285                 <artifactId>build-helper-maven-plugin</artifactId>
286                 <executions>
287                     <execution>
288                         <id>add-additional-source-dirs</id>
289                         <phase>generate-sources</phase>
290                         <goals>
291                             <goal>add-source</goal>
292                         </goals>
293                         <configuration>
294                             <sources>
295                                 <source>${project.build.directory}/generated-sources/annotations/</source>
296                                 <source>${project.basedir}/add-src/main/java</source>
297                                 <source>${project.basedir}/add-src/main/resources</source>
298                             </sources>
299                         </configuration>
300                     </execution>
301                     <execution>
302                         <id>add-additional-testsource-dirs</id>
303                         <phase>generate-sources</phase>
304                         <goals>
305                             <goal>add-test-source</goal>
306                         </goals>
307                         <configuration>
308                             <sources>
309                                 <source>${project.basedir}/add-src/test/java</source>
310                                 <source>${project.basedir}/add-src/test/resources</source>
311                             </sources>
312                         </configuration>
313                     </execution>
314                 </executions>
315             </plugin>
316             <plugin>
317                 <groupId>org.jacoco</groupId>
318                 <artifactId>jacoco-maven-plugin</artifactId>
319                 <version>${jacoco-maven-plugin.version}</version>
320                 <executions>
321                     <execution>
322                         <id>default-prepare-agent</id>
323                         <goals>
324                             <goal>prepare-agent</goal>
325                         </goals>
326                     </execution>
327                     <execution>
328                         <id>default-report</id>
329                         <phase>prepare-package</phase>
330                         <goals>
331                             <goal>report</goal>
332                         </goals>
333                     </execution>
334                 </executions>
335             </plugin>
336             <plugin>
337                 <groupId>io.swagger.codegen.v3</groupId>
338                 <artifactId>swagger-codegen-maven-plugin</artifactId>
339                 <version>3.0.46</version>
340                 <executions>
341                     <execution>
342                         <id>generate-openapi-json</id>
343                         <phase>prepare-package</phase>
344                         <goals>
345                             <goal>generate</goal>
346                         </goals>
347                         <configuration>
348                             <inputSpec>${project.basedir}/api/pms-api.yaml</inputSpec>
349                             <language>openapi</language>
350                             <output>${project.basedir}/api</output>
351                             <configOptions>
352                                 <outputFile>pms-api.json</outputFile>
353                             </configOptions>
354                         </configuration>
355                     </execution>
356                 </executions>
357             </plugin>
358             <plugin>
359                 <groupId>org.openapitools</groupId>
360                 <artifactId>openapi-generator-maven-plugin</artifactId>
361                 <version>6.6.0</version>
362                 <executions>
363                     <execution>
364                         <id>generate-openapi-html</id>
365                         <phase>prepare-package</phase>
366                         <goals>
367                             <goal>generate</goal>
368                         </goals>
369                         <configuration>
370                             <inputSpec>${project.basedir}/api/pms-api.json</inputSpec>
371                             <generatorName>html2</generatorName>
372                             <output>${project.basedir}/api/pms-api</output>
373                             <skipOperationExample>false</skipOperationExample>
374                             <strictSpec>false</strictSpec>
375                             <configOptions>
376                                 <appDescription>The O-RAN Non-RT RIC A1 Policy Management Service
377                                     provides a REST API for managing O-RAN A1 Policies.</appDescription>
378                                 <appName>ONAP CCSDK A1 Policy Management Service</appName>
379                                 <infoUrl>https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP</infoUrl>
380                                 <licenseInfo>Copyright (C) 2020-2023 Nordix Foundation. Licensed
381                                     under the Apache License, and Copyright (C) 2024 OpenInfra
382                                     Foundation Europe. All rights reserved.</licenseInfo>
383                                 <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
384                             </configOptions>
385                         </configuration>
386                     </execution>
387                     <execution>
388                         <id>generate-openapi-policy-api</id>
389                         <phase>generate-sources</phase>
390                         <goals>
391                             <goal>generate</goal>
392                         </goals>
393                         <configuration>
394                             <generatorName>spring</generatorName>
395                             <inputSpec>${project.basedir}/api/pms-api.yaml</inputSpec>
396                             <library>spring-boot</library>
397                             <invokerPackage>org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2</invokerPackage>
398                             <apiPackage>org.onap.ccsdk.oran.a1policymanagementservice.controllers.api.v2</apiPackage>
399                             <modelPackage>org.onap.ccsdk.oran.a1policymanagementservice.models.v2</modelPackage>
400                             <generateApiTests>false</generateApiTests>
401                             <generateModelTests>false</generateModelTests>
402                             <generateSupportingFiles>false</generateSupportingFiles>
403                             <skipValidateSpec>false</skipValidateSpec>
404                             <configOptions>
405                                 <interfaceOnly>true</interfaceOnly>
406                                 <useTags>true</useTags>
407                                 <reactive>true</reactive>
408                                 <dateLibrary>java8</dateLibrary>
409                                 <java8>true</java8>
410                                 <unhandledException>true</unhandledException>
411                                 <openApiNullable>false</openApiNullable>
412                                 <skipDefaultInterface>true</skipDefaultInterface>
413                             </configOptions>
414                         </configuration>
415                     </execution>
416                     <execution>
417                         <id>generate-policy-api-v3</id>
418                         <phase>generate-sources </phase>
419                         <goals>
420                             <goal>generate</goal>
421                         </goals>
422                         <configuration>
423                             <inputSpec>${project.basedir}/api/pms-api-v3.yaml</inputSpec>
424                             <invokerPackage>org.onap.ccsdk.oran.a1policymanagementservice.controllers.v3</invokerPackage>
425                             <apiPackage>org.onap.ccsdk.oran.a1policymanagementservice.controllers.api.v3</apiPackage>
426                             <modelPackage>org.onap.ccsdk.oran.a1policymanagementservice.models.v3</modelPackage>
427                             <generateApiTests>false</generateApiTests>
428                             <generateModelTests>false</generateModelTests>
429                             <generatorName>spring</generatorName>
430                             <generateSupportingFiles>false</generateSupportingFiles>
431                             <skipValidateSpec>false</skipValidateSpec>
432                             <library>spring-boot</library>
433                             <configOptions>
434                                 <interfaceOnly>true</interfaceOnly>
435                                 <useTags>true</useTags>
436                                 <reactive>true</reactive>
437                                 <dateLibrary>java8</dateLibrary>
438                                 <java8>true</java8>
439                                 <unhandledException>true</unhandledException>
440                                 <openApiNullable>false</openApiNullable>
441                                 <skipDefaultInterface>true</skipDefaultInterface>
442                             </configOptions>
443                         </configuration>
444                     </execution>
445                  </executions>
446             </plugin>
447             <plugin>
448                 <artifactId>maven-resources-plugin</artifactId>
449                 <executions>
450                     <execution>
451                         <id>copy-resource-configuration-files</id>
452                         <phase>initialize</phase>
453                         <goals>
454                             <goal>copy-resources</goal>
455                         </goals>
456                         <configuration>
457                             <overwrite>true</overwrite>
458                             <verbose>true</verbose>
459                             <outputDirectory>${project.basedir}/config</outputDirectory>
460                             <resources>
461                                 <resource>
462                                     <directory>${project.basedir}/onap/oran/a1-policy-management/config</directory>
463                                 </resource>
464                             </resources>
465                         </configuration>
466                     </execution>
467                     <execution>
468                         <id>copy-resource-openapi-files-fromsubmodule</id>
469                         <phase>initialize</phase>
470                         <goals>
471                             <goal>copy-resources</goal>
472                         </goals>
473                         <configuration>
474                             <verbose>true</verbose>
475                             <overwrite>true</overwrite>
476                             <outputDirectory>${project.basedir}/api</outputDirectory>
477                             <resources>
478                                 <resource>
479                                     <directory>${project.basedir}/onap/oran/a1-policy-management/api</directory>
480                                     <includes>
481                                         <include>pms-api.json</include>
482                                         <include>pms-api.yaml</include>
483                                         <include>pms-api-v3.yaml</include>
484                                     </includes>
485                                     </resource>
486                             </resources>
487                         </configuration>
488                     </execution>
489                     <execution>
490                         <id>copy-resource-doc-openapi</id>
491                         <phase>package</phase>
492                         <goals>
493                             <goal>copy-resources</goal>
494                         </goals>
495                         <configuration>
496                             <outputDirectory>${project.basedir}/docs/offeredapis/swagger</outputDirectory>
497                             <overwrite>true</overwrite>
498                             <verbose>true</verbose>
499                             <resources>
500                                 <resource>
501                                     <directory>${project.basedir}/api</directory>
502                                     <includes>
503                                         <include>pms-api.json</include>
504                                         <include>pms-api.yaml</include>
505                                     </includes>
506                                 </resource>
507                             </resources>
508                         </configuration>
509                     </execution>
510                     <execution>
511                         <id>copy-resource-openapi-html</id>
512                         <phase>package</phase>
513                         <goals>
514                             <goal>copy-resources</goal>
515                         </goals>
516                         <configuration>
517                             <verbose>true</verbose>
518                             <outputDirectory>
519                                 ${project.basedir}/docs/offeredapis/openapitoolgen/offeredapis/pms-api</outputDirectory>
520                             <resources>
521                                 <resource>
522                                     <directory>${project.basedir}/api/pms-api</directory>
523                                     <includes>
524                                         <include>pms-api.html</include>
525                                         <include>index.html</include>
526                                     </includes>
527                                 </resource>
528                             </resources>
529                         </configuration>
530                     </execution>
531                 </executions>
532             </plugin>
533             <plugin>
534                 <groupId>io.fabric8</groupId>
535                 <artifactId>docker-maven-plugin</artifactId>
536                 <version>${docker-maven-plugin}</version>
537                 <inherited>false</inherited>
538                 <executions>
539                     <execution>
540                         <id>generate-a1policymanagementservice-image</id>
541                         <phase>package</phase>
542                         <goals>
543                             <goal>build</goal>
544                         </goals>
545                         <configuration>
546                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
547                             <images>
548                                 <image>
549                                     <name>
550                                         o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version}</name>
551                                     <build>
552                                         <cleanup>try</cleanup>
553                                         <contextDir>${basedir}</contextDir>
554                                         <dockerFile>Dockerfile</dockerFile>
555                                         <filter>false</filter>
556                                         <args>
557                                             <JAR>${project.build.finalName}.jar</JAR>
558                                         </args>
559                                         <tags>
560                                             <tag>${project.version}</tag>
561                                         </tags>
562                                     </build>
563                                 </image>
564                             </images>
565                         </configuration>
566                     </execution>
567                     <execution>
568                         <id>push-a1policymanagementservice-image</id>
569                         <goals>
570                             <goal>build</goal>
571                             <goal>push</goal>
572                         </goals>
573                         <configuration>
574                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
575                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
576                             <images>
577                                 <image>
578                                     <name>
579                                         o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version}</name>
580                                     <build>
581                                         <contextDir>${basedir}</contextDir>
582                                         <dockerFile>Dockerfile</dockerFile>
583                                         <filter>false</filter>
584                                         <args>
585                                             <JAR>${project.build.finalName}.jar</JAR>
586                                         </args>
587                                         <tags>
588                                             <tag>${project.version}</tag>
589                                             <tag>latest</tag>
590                                         </tags>
591                                     </build>
592                                 </image>
593                             </images>
594                         </configuration>
595                     </execution>
596                 </executions>
597             </plugin>
598             <!-- support sonar in multi-module project -->
599             <plugin>
600                 <groupId>org.sonarsource.scanner.maven</groupId>
601                 <artifactId>sonar-maven-plugin</artifactId>
602                 <version>${sonar-maven-plugin.version}</version>
603             </plugin>
604             <plugin>
605                 <groupId>org.codehaus.mojo</groupId>
606                 <artifactId>exec-maven-plugin</artifactId>
607                 <version>${exec-maven-plugin.version}</version>
608                 <executions>
609                     <execution>
610                         <id>git submodule update</id>
611                         <phase>validate</phase>
612                         <configuration>
613                             <executable>git</executable>
614                             <arguments>
615                                 <argument>submodule</argument>
616                                 <argument>update</argument>
617                                 <argument>--init</argument>
618                                 <argument>--recursive</argument>
619                             </arguments>
620                         </configuration>
621                         <goals>
622                             <goal>exec</goal>
623                         </goals>
624                     </execution>
625                 </executions>
626             </plugin>
627         </plugins>
628     </build>
629     <issueManagement>
630         <system>JIRA</system>
631         <url>https://jira.o-ran-sc.org/</url>
632     </issueManagement>
633     <reporting>
634         <plugins>
635             <plugin>
636                 <groupId>org.apache.maven.plugins</groupId>
637                 <artifactId>maven-surefire-report-plugin</artifactId>
638                 <version>${surefire-report-plugin.version}</version>
639             </plugin>
640         </plugins>
641     </reporting>
642 </project>