From 4d1b2cd24f060b1a4849f411a09a04346f22dc06 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Sat, 21 Sep 2024 21:41:29 +0200 Subject: Migrate JAXB to jakarta - change javax.* JAXB packages to jakarta.* - bump snapshot version to 1.15.0-SNAPSHOT Issue-ID: AAI-4005 Change-Id: I304328d2b8d2b943919f741f63b8842ac2ee126b Signed-off-by: Fiete Ostkamp --- aai-resources/pom.xml | 20 ++++++++------------ .../org/onap/aai/service/AuthorizationService.java | 4 ++-- .../src/main/resources/application.properties | 2 +- .../org/onap/aai/rest/ModelDistributionTest.java | 8 ++++---- pom.xml | 7 ++++--- version.properties | 4 ++-- 6 files changed, 21 insertions(+), 24 deletions(-) diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml index 83c6c92..0679e26 100644 --- a/aai-resources/pom.xml +++ b/aai-resources/pom.xml @@ -28,7 +28,7 @@ org.onap.aai.resources resources - 1.14.7-SNAPSHOT + 1.15.0-SNAPSHOT 11 @@ -73,7 +73,7 @@ v12 v12 v29 - v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29 + v10,v11,v12,v13,v14,v15,v23,v29 /aai ${project.basedir}/src/main/resources/application.properties @@ -186,7 +186,7 @@ onap v12 - v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29 + v10,v11,v12,v13,v14,v15,v16,v23,v29 ${project.basedir}/src/main/resources/application.properties @@ -330,16 +330,12 @@ 2.1 - javax.xml.bind - jaxb-api + jakarta.xml.bind + jakarta.xml.bind-api - com.sun.xml.bind - jaxb-impl - - - com.sun.xml.bind - jaxb-core + org.glassfish.jaxb + jaxb-runtime @@ -738,7 +734,7 @@ org.projectlombok lombok - 1.18.30 + 1.18.34 provided diff --git a/aai-resources/src/main/java/org/onap/aai/service/AuthorizationService.java b/aai-resources/src/main/java/org/onap/aai/service/AuthorizationService.java index 31dd953..0c219a7 100644 --- a/aai-resources/src/main/java/org/onap/aai/service/AuthorizationService.java +++ b/aai-resources/src/main/java/org/onap/aai/service/AuthorizationService.java @@ -23,7 +23,7 @@ package org.onap.aai.service; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.nio.file.Files; -import java.nio.file.Paths; +import java.nio.file.Path; import java.util.Base64; import java.util.HashMap; import java.util.Map; @@ -54,7 +54,7 @@ public class AuthorizationService { String basicAuthFile = getBasicAuthFilePath(); - try (Stream stream = Files.lines(Paths.get(basicAuthFile))) { + try (Stream stream = Files.lines(Path.of(basicAuthFile))) { stream.filter(line -> !line.startsWith("#")).forEach(str -> { byte[] bytes = null; diff --git a/aai-resources/src/main/resources/application.properties b/aai-resources/src/main/resources/application.properties index 6487dee..f4eccca 100644 --- a/aai-resources/src/main/resources/application.properties +++ b/aai-resources/src/main/resources/application.properties @@ -81,7 +81,7 @@ schema.ingest.file=${server.local.startpath}/application.properties schema.uri.base.path=/aai # Lists all of the versions in the schema -schema.version.list=v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29 +schema.version.list=v10,v11,v12,v13,v14,v15,v23,v29 # Specifies from which version should the depth parameter to default to zero schema.version.depth.start=v10 # Specifies from which version should the related link be displayed in response payload diff --git a/aai-resources/src/test/java/org/onap/aai/rest/ModelDistributionTest.java b/aai-resources/src/test/java/org/onap/aai/rest/ModelDistributionTest.java index 2177dac..1ba8652 100644 --- a/aai-resources/src/test/java/org/onap/aai/rest/ModelDistributionTest.java +++ b/aai-resources/src/test/java/org/onap/aai/rest/ModelDistributionTest.java @@ -23,7 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import java.nio.file.Files; -import java.nio.file.Paths; +import java.nio.file.Path; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.MethodOrderer; @@ -73,7 +73,7 @@ public class ModelDistributionTest { .expectStatus() .isNotFound(); - String modelPayload = new String(Files.readAllBytes(Paths.get(MODEL_FILE))); + String modelPayload = new String(Files.readAllBytes(Path.of(MODEL_FILE))); webClient.put() .uri(uri) .accept(MediaType.APPLICATION_XML) @@ -126,7 +126,7 @@ public class ModelDistributionTest { .expectStatus() .isNotFound(); - String modelPayload = new String(Files.readAllBytes(Paths.get(MODEL_FILE))); + String modelPayload = new String(Files.readAllBytes(Path.of(MODEL_FILE))); webClient.put() .uri(modelUri) .accept(MediaType.APPLICATION_XML) @@ -148,7 +148,7 @@ public class ModelDistributionTest { ModelVersion modelVersion = objectMapper.readValue(modelVersionResponse, ModelVersion.class); assertNull(modelVersion.getModelElements()); - String updatePayload = new String(Files.readAllBytes(Paths.get(UPDATE_MODEL_FILE))) + String updatePayload = new String(Files.readAllBytes(Path.of(UPDATE_MODEL_FILE))) .replace("resourceVersion", modelVersion.getResourceVersion()); webClient.put() .uri(modelVersionUri) diff --git a/pom.xml b/pom.xml index a333065..f1ac750 100644 --- a/pom.xml +++ b/pom.xml @@ -26,17 +26,18 @@ org.onap.aai.aai-common aai-parent - 1.14.7 + 1.15.0-SNAPSHOT org.onap.aai.resources resources - 1.14.7-SNAPSHOT + 1.15.0-SNAPSHOT aai-resources pom aai-resources + 11 ${project.version} - 1.14.7 + 1.15.0-SNAPSHOT 1.12.5 diff --git a/version.properties b/version.properties index e8f490e..039d36d 100644 --- a/version.properties +++ b/version.properties @@ -4,8 +4,8 @@ # because they are used in Jenkins, whose plug-in doesn't support major_version=1 -minor_version=14 -patch_version=7 +minor_version=15 +patch_version=0 base_version=${major_version}.${minor_version}.${patch_version} -- cgit 1.2.3-korg