~ ============LICENSE_START=======================================================
~ ONAP : ccsdk oran
~ ================================================================================
- ~ Copyright (C) 2020 Nordix Foundation. All rights reserved.
+ ~ Copyright (C) 2020-2023 Nordix Foundation. All rights reserved.
+ ~ Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
~ ================================================================================
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>spring-boot-26-starter-parent</artifactId>
- <version>2.5.3</version>
+ <artifactId>spring-boot-31-starter-parent</artifactId>
+ <version>2.6.1</version>
<relativePath/>
</parent>
<groupId>org.onap.ccsdk.oran</groupId>
<artifactId>a1-policy-management-service</artifactId>
- <version>1.5.0-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
<name>ccsdk-oran :: ${project.artifactId}</name>
<properties>
- <java.version.source>11</java.version.source>
- <java.version.target>11</java.version.target>
- <springfox.version>3.0.0</springfox.version>
+ <java.version.source>17</java.version.source>
+ <java.version.target>17</java.version.target>
<gson.version>2.10.1</gson.version>
- <json.version>20220924</json.version>
- <formatter-maven-plugin.version>2.13.0</formatter-maven-plugin.version>
- <spotless-maven-plugin.version>2.5.0</spotless-maven-plugin.version>
- <commons-io.version>2.11.0</commons-io.version>
- <guava.version>31.0.1-jre</guava.version>
- <snakeyaml.version>1.32</snakeyaml.version><!-- overrides version included via spring-boot-starter to address CVE-2022-38750 CVE-2022-38752 CVE-2022-25857. Remove later if possible -->
+ <json.version>20231013</json.version>
+ <formatter-maven-plugin.version>2.22.0</formatter-maven-plugin.version>
+ <spotless-maven-plugin.version>2.35.0</spotless-maven-plugin.version>
+ <commons-io.version>2.14.0</commons-io.version>
+ <guava.version>32.0.1-jre</guava.version>
+ <springdoc.version>2.0.2</springdoc.version>
<docker-maven-plugin>0.30.0</docker-maven-plugin>
- <surefire-maven-plugin.version>3.0.0-M5</surefire-maven-plugin.version>
+ <surefire-maven-plugin.version>3.0.0-M8</surefire-maven-plugin.version>
<surefire-report-plugin.version>3.0.0-M8</surefire-report-plugin.version>
<jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
- <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
- <software.amazon.awssdk.version>2.19.17</software.amazon.awssdk.version>
+ <software.amazon.awssdk.version>2.20.12</software.amazon.awssdk.version>
<allowskiptests>false</allowskiptests>
</properties>
<dependencies>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot</artifactId>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>2.0.1.Final</version>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <version>1.3.2</version>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
+ <groupId>io.swagger.core.v3</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>2.2.15</version>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-autoconfigure</artifactId>
+ <groupId>org.openapitools</groupId>
+ <artifactId>jackson-databind-nullable</artifactId>
+ <version>0.2.4</version>
</dependency>
<dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
+ <!-- Temporary until version 2 is included by the parent spring-boot-starter-parent -->
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-webflux</artifactId>
+ <artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-webflux</artifactId>
+ <artifactId>spring-context</artifactId>
</dependency>
<dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-spring-web</artifactId>
- <version>${springfox.version}</version>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-spi</artifactId>
- <version>${springfox.version}</version>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-core</artifactId>
- <version>${springfox.version}</version>
+ <!-- May be possible to remove this later when ccsdk parent bom stabilizes -->
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>s3</artifactId>
<version>${software.amazon.awssdk.version}</version>
</dependency>
- <!--REQUIRED TO GENERATE DOCUMENTATION -->
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger2</artifactId>
- <version>${springfox.version}</version>
- </dependency>
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger-ui</artifactId>
- <version>${springfox.version}</version>
- <scope>runtime</scope>
- </dependency>
<!-- For development help -->
<dependency>
<groupId>org.springframework.boot</groupId>
<optional>true</optional>
<scope>runtime</scope>
</dependency>
- <!-- TEST -->
- <dependency>
- <groupId>org.springdoc</groupId>
- <artifactId>springdoc-openapi-ui</artifactId>
- <version>1.6.6</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-test</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
+ <version>2.1.1</version>
<executions>
<execution>
<phase>validate</phase>
<java>
<removeUnusedImports/>
<importOrder>
- <order>com,java,javax,org</order>
+ <order>com,io,java,lombok,javax,org,reactor</order>
</importOrder>
</java>
</configuration>
<configuration>
<skipTests>${allowskiptests}</skipTests>
<statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
- <disable>false</disable>
- <version>3.0</version>
<usePhrasedFileName>false</usePhrasedFileName>
<usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName>
<usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName>
<usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName>
</statelessTestsetReporter>
<consoleOutputReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5ConsoleOutputReporter">
- <disable>false</disable>
- <encoding>UTF-8</encoding>
<usePhrasedFileName>false</usePhrasedFileName>
</consoleOutputReporter>
<statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoReporter">
- <disable>false</disable>
<usePhrasedFileName>false</usePhrasedFileName>
<usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning>
<usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary>
</statelessTestsetInfoReporter>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-failsafe-plugin</artifactId>
- </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>io.swagger.codegen.v3</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <version>3.0.46</version>
+ <executions>
+ <execution>
+ <id>generate-openapi-json</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${project.basedir}/api/pms-api.yaml</inputSpec>
+ <language>openapi</language>
+ <output>${project.basedir}/api</output>
+ <configOptions>
+ <outputFile>pms-api.json</outputFile>
+ </configOptions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
- <version>6.0.0</version>
+ <version>6.6.0</version>
<executions>
<execution>
<id>generate-openapi-html</id>
<skipOperationExample>false</skipOperationExample>
<strictSpec>false</strictSpec>
<configOptions>
- <appDescription>The O-RAN Non-RT RIC Policy Management Service provides a REST API for managing O-RAN A1 Policies.</appDescription>
+ <appDescription>The O-RAN Non-RT RIC Policy Management Service
+ provides a REST API for managing O-RAN A1 Policies.</appDescription>
<appName>ONAP CCSDK A1 Policy Management Service</appName>
<infoUrl>https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP</infoUrl>
- <licenseInfo>Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License.</licenseInfo>
+ <licenseInfo>Copyright (C) 2020-2023 Nordix Foundation. Licensed
+ under the Apache License, and Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.</licenseInfo>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
</configOptions>
</configuration>
</execution>
<execution>
- <id>generate-openapi-yaml</id>
- <phase>prepare-package</phase>
+ <id>generate-policy-api</id>
+ <phase>generate-sources </phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
- <inputSpec>${project.basedir}/api/pms-api.json</inputSpec>
- <generatorName>openapi-yaml</generatorName>
- <verbose>false</verbose>
- <output>${project.basedir}/api</output>
+ <inputSpec>${project.basedir}/api/pms-api.yaml</inputSpec>
+ <invokerPackage>${project.groupId}.a1policymanagementservice.controllers.v2</invokerPackage>
+ <apiPackage>${project.groupId}.a1policymanagementservice.controllers.api.v2</apiPackage>
+ <modelPackage>${project.groupId}.a1policymanagementservice.models.v2</modelPackage>
+ <generateApiTests>false</generateApiTests>
+ <generateModelTests>false</generateModelTests>
+ <generatorName>spring</generatorName>
+ <generateSupportingFiles>false</generateSupportingFiles>
+ <skipValidateSpec>false</skipValidateSpec>
+ <library>spring-boot</library>
<configOptions>
- <outputFile>pms-api.yaml</outputFile>
+ <sourceFolder>src/gen/java</sourceFolder>
+ <interfaceOnly>true</interfaceOnly>
+ <useTags>true</useTags>
+ <reactive>true</reactive>
+ <dateLibrary>java8</dateLibrary>
+ <java8>true</java8>
+ <unhandledException>true</unhandledException>
+ <openApiNullable>false</openApiNullable>
+ <skipDefaultInterface>true</skipDefaultInterface>
+ </configOptions>
+ </configuration>
+ </execution>
+ <execution>
+ <id>generate-policy-api-v3</id>
+ <phase>generate-sources </phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${project.basedir}/api/pms-api-v3.yaml</inputSpec>
+ <invokerPackage>${project.groupId}.a1policymanagementservice.controllers.v3</invokerPackage>
+ <apiPackage>${project.groupId}.a1policymanagementservice.controllers.api.v3</apiPackage>
+ <modelPackage>${project.groupId}.a1policymanagementservice.models.v3</modelPackage>
+ <generateApiTests>false</generateApiTests>
+ <generateModelTests>false</generateModelTests>
+ <generatorName>spring</generatorName>
+ <generateSupportingFiles>false</generateSupportingFiles>
+ <skipValidateSpec>false</skipValidateSpec>
+ <library>spring-boot</library>
+ <configOptions>
+ <sourceFolder>src/gen/java</sourceFolder>
+ <interfaceOnly>true</interfaceOnly>
+ <useTags>true</useTags>
+ <reactive>true</reactive>
+ <dateLibrary>java8</dateLibrary>
+ <java8>true</java8>
+ <unhandledException>true</unhandledException>
+ <openApiNullable>false</openApiNullable>
+ <skipDefaultInterface>true</skipDefaultInterface>
</configOptions>
</configuration>
</execution>
</goals>
<configuration>
<outputDirectory>${project.basedir}/../docs/offeredapis/swagger</outputDirectory>
- <verbose>true</verbose>
+ <overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/api</directory>
</goals>
<configuration>
<verbose>true</verbose>
- <outputDirectory>${project.basedir}/../docs/offeredapis/openapitoolgen/offeredapis/pms-api</outputDirectory>
+ <outputDirectory>
+ ${project.basedir}/../docs/offeredapis/openapitoolgen/offeredapis/pms-api</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/api/pms-api</directory>
<configuration>
<images>
<image>
- <name>onap/ccsdk-oran-a1policymanagementservice:${project.version}</name>
+ <name>
+ onap/ccsdk-oran-a1policymanagementservice:${project.version}</name>
<build>
<cleanup>try</cleanup>
<contextDir>${basedir}</contextDir>
<configuration>
<images>
<image>
- <name>onap/ccsdk-oran-a1policymanagementservice:${project.version}</name>
+ <name>
+ onap/ccsdk-oran-a1policymanagementservice:${project.version}</name>
<build>
<contextDir>${basedir}</contextDir>
<dockerFile>Dockerfile</dockerFile>