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