Spring boot 3.1 upgrade changes 29/141629/6
authorMithun Menon <mithun.menon@t-systems.com>
Thu, 28 Aug 2025 18:30:26 +0000 (20:30 +0200)
committermithun.menon@t-systems.com <mithun.menon@t-systems.com>
Mon, 1 Sep 2025 09:38:09 +0000 (11:38 +0200)
- Updating spring boot from 2.7 to 3.1 for schema service
- Speed up build process
Issue-ID: AAI-4200
Change-Id: I8d1c232595e6766bfef7b5c533a037d3fac42bf6
Signed-off-by: mithun.menon@t-systems.com <mithun.menon@t-systems.com>
82 files changed:
aai-annotations/pom.xml
aai-queries/pom.xml
aai-queries/src/main/java/org/onap/aai/queries/GremlinServerSingleton.java
aai-queries/src/test/java/org/onap/aai/queries/AAISetup.java
aai-queries/src/test/java/org/onap/aai/queries/GetCustomQueryConfigTest.java
aai-queries/src/test/java/org/onap/aai/queries/GremlinServerSingletonTest.java
aai-schema-gen/pom.xml
aai-schema-gen/src/main/java/org/onap/aai/schemagen/AutoGenerateHtml.java
aai-schema-gen/src/main/java/org/onap/aai/schemagen/GenerateXsd.java
aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/HTMLfromOXM.java
aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXM.java
aai-schema-gen/src/main/java/org/onap/aai/schemagen/genxsd/YAMLfromOXM.java
aai-schema-gen/src/main/java/org/onap/aai/schemagen/swagger/GenerateSwagger.java
aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/HTMLfromOXMTest.java
aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java
aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/XSDElementTest.java
aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java
aai-schema-gen/src/test/java/org/onap/aai/schemagen/swagger/GenerateSwaggerTest.java
aai-schema-service/pom.xml
aai-schema-service/src/main/docker/aai.sh
aai-schema-service/src/main/java/org/onap/aai/schemaservice/SchemaServiceApp.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/config/ErrorHandler.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/edges/EdgeResource.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/edges/EdgeService.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/healthcheck/EchoResource.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/post/InvalidResponseStatus.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/post/ResponseHeaderManipulation.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/post/ResponseTransactionLogging.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/pre/HeaderValidation.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/pre/HttpHeaderInterceptor.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/pre/OneWaySslAuthorization.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/pre/RequestHeaderManipulation.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/interceptors/pre/RequestTransactionLogging.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/nodeschema/NodeIngestor.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/nodeschema/NodeSchemaChecksumResource.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/nodeschema/NodeSchemaResource.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/nodeschema/NodeSchemaService.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/nodeschema/SchemaVersions.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/query/QueryResource.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/query/QueryService.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/service/AuthorizationService.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/versions/VersionResource.java
aai-schema-service/src/main/java/org/onap/aai/schemaservice/web/JerseyConfiguration.java
aai-schema-service/src/main/resources/application.properties
aai-schema-service/src/test/java/org/onap/aai/schemaservice/SchemaServiceTestConfiguration.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/edges/EdgeResourceTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/healthcheck/EchoResourceTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/interceptors/post/InvalidResponseStatusTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/interceptors/post/ResponseHeaderManipulationTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/interceptors/pre/HeaderValidationTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/interceptors/pre/HttpHeaderInterceptorTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/interceptors/pre/OneWaySslAuthorizationTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/interceptors/pre/RequestTransactionLoggingTest.java
aai-schema-service/src/test/java/org/onap/aai/schemaservice/nodeschema/NodeSchemaResourceTest.java
aai-schema/pom.xml
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v10.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v11.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v12.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v13.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v14.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v15.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v16.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v17.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v18.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v19.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v20.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v21.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v22.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v23.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v24.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v25.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v26.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v27.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v28.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v29.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v30.xsd
aai-schema/src/main/resources/onap/aai_schema/aai_schema_v9.xsd
aai-schema/src/main/xjb/bindings-onap.xjb
aai-schema/src/test/java/org/onap/aai/schema/ValidateEdgeRulesTest.java
aai-schema/src/test/java/org/onap/aai/schema/ValidateOXMTest.java
pom.xml
version.properties

index 0b39c09..3da35f2 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.schema-service</groupId>
         <artifactId>schema-service</artifactId>
-        <version>1.13.0-SNAPSHOT</version>
+        <version>1.13.1-SNAPSHOT</version>
     </parent>
     <artifactId>aai-annotations</artifactId>
     <name>aai-annotations</name>
index 1672764..f492574 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.schema-service</groupId>
         <artifactId>schema-service</artifactId>
-        <version>1.13.0-SNAPSHOT</version>
+        <version>1.13.1-SNAPSHOT</version>
     </parent>
     <artifactId>aai-queries</artifactId>
     <name>aai-queries</name>
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>java-hamcrest</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-junit</artifactId>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <version>2.3.0</version>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
         </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents.client5</groupId>
+      <artifactId>httpclient5</artifactId>
+    </dependency>
         <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <artifactId>eclipselink</artifactId>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>1.18.30</version>
+            <version>1.18.38</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>
index 725ca80..3c1b36c 100644 (file)
@@ -23,9 +23,8 @@ package org.onap.aai.queries;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Timer;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
 
 import org.onap.aai.logging.LogFormatTools;
 import org.onap.aai.util.AAIConstants;
@@ -60,7 +59,7 @@ public class GremlinServerSingleton {
         try {
             String filepath =
                 storedQueriesLocation + AAIConstants.AAI_FILESEP + "stored-queries.json";
-            Path path = Paths.get(filepath);
+            Path path = Path.of(filepath);
             String customQueryConfigJson = new String(Files.readAllBytes(path));
 
             queryConfig = new GetCustomQueryConfig(customQueryConfigJson);
index f0d81a0..daf380e 100644 (file)
@@ -96,7 +96,7 @@ public abstract class AAISetup {
 
         InputStream inputStream = getClass().getClassLoader().getResourceAsStream(filename);
 
-        String message = String.format("Unable to find the %s in src/test/resources", filename);
+        String message = "Unable to find the %s in src/test/resources".formatted(filename);
         assertNotNull(inputStream, message);
 
         String resource = IOUtils.toString(inputStream, Charset.defaultCharset());
index 77e8db1..148eb43 100644 (file)
@@ -43,10 +43,30 @@ public class GetCustomQueryConfigTest {
         System.setProperty("AJSC_HOME", ".");
         System.setProperty("BUNDLECONFIG_DIR", "src/main/resources");
 
-        configJson = "{\n\t\"stored-queries\": [{\n"
-            + "\t\t\"queryName1\": {\n\t\t\t\"query\": {\n\t\t\t\t\"required-properties\": [\"prop1\", \"prop2\"],\n\t\t\t\t\"optional-properties\": [\"prop3\", \"prop4\"]\n\t\t\t},\n\t\t\t\"stored-query\": \"out('blah').has('something','foo')\"\n\t\t}\n\t}, {\n"
-            + "\t\t\"queryName2\": {\n\t\t\t\"query\": {\n\t\t\t\t\"optional-properties\": [\"prop5\"]\n\t\t\t},\n\t\t\t\"stored-query\": \"out('bar').has('stuff','baz')\"\n\t\t}\n\t}, {\n"
-            + "\t\t\"queryName3\": {\n\t\t\t\"stored-query\": \"out('bar1').has('stuff','baz1')\"\n\t\t}\n\t}]\n}";
+        configJson = """
+            {
+               "stored-queries": [{
+                       "queryName1": {
+                               "query": {
+                                       "required-properties": ["prop1", "prop2"],
+                                       "optional-properties": ["prop3", "prop4"]
+                               },
+                               "stored-query": "out('blah').has('something','foo')"
+                       }
+               }, {
+                       "queryName2": {
+                               "query": {
+                                       "optional-properties": ["prop5"]
+                               },
+                               "stored-query": "out('bar').has('stuff','baz')"
+                       }
+               }, {
+                       "queryName3": {
+                               "stored-query": "out('bar1').has('stuff','baz1')"
+                       }
+               }]
+            }\
+            """;
 
         getCustomQueryConfig = new GetCustomQueryConfig(configJson);
 
@@ -109,17 +129,19 @@ public class GetCustomQueryConfigTest {
 
     @Test
     public void testQueryWithNullProperties() {
-        String queryWithNullPropsJson = "{\n"
-            + "\"stored-queries\": [{\n"
-            + "\t\"queryName1\": {\n"
-            + "\t\t\"query\": {\n"
-            + "\t\t\t\"required-properties\": null,\n"
-            + "\t\t\t\"optional-properties\": null\n"
-            + "\t\t},\n"
-            + "\t\t\"stored-query\": \"out('blah').has('something','foo')\"\n"
-            + "\t}\n"
-            + "}]\n"
-            + "}";
+        String queryWithNullPropsJson = """
+            {
+            "stored-queries": [{
+               "queryName1": {
+                       "query": {
+                               "required-properties": null,
+                               "optional-properties": null
+                       },
+                       "stored-query": "out('blah').has('something','foo')"
+               }
+            }]
+            }\
+            """;
 
         GetCustomQueryConfig getCustomQueryConfig = new GetCustomQueryConfig(queryWithNullPropsJson);
         CustomQueryConfig cqc = getCustomQueryConfig.getStoredQuery("queryName1");
@@ -131,16 +153,18 @@ public class GetCustomQueryConfigTest {
 
     @Test
     public void testQueryWithMissingProperties() {
-        String queryWithMissingPropsJson = "{\n"
-            + "\"stored-queries\": [{\n"
-            + "\t\"queryName1\": {\n"
-            + "\t\t\"query\": {\n"
-            + "\t\t\t\"required-properties\": []\n"
-            + "\t\t},\n"
-            + "\t\t\"stored-query\": \"out('blah').has('something','foo')\"\n"
-            + "\t}\n"
-            + "}]\n"
-            + "}";
+        String queryWithMissingPropsJson = """
+            {
+            "stored-queries": [{
+               "queryName1": {
+                       "query": {
+                               "required-properties": []
+                       },
+                       "stored-query": "out('blah').has('something','foo')"
+               }
+            }]
+            }\
+            """;
 
         GetCustomQueryConfig getCustomQueryConfig = new GetCustomQueryConfig(queryWithMissingPropsJson);
         CustomQueryConfig cqc = getCustomQueryConfig.getStoredQuery("queryName1");
@@ -152,17 +176,19 @@ public class GetCustomQueryConfigTest {
 
     @Test
     public void testQueryWithNullRequiredProperties() {
-        String queryWithNullPropsJson = "{\n"
-            + "\"stored-queries\": [{\n"
-            + "\t\"queryName1\": {\n"
-            + "\t\t\"query\": {\n"
-            + "\t\t\t\"required-properties\": null,\n"  // Null for required properties
-            + "\t\t\t\"optional-properties\": [\"prop3\"]\n"
-            + "\t\t},\n"
-            + "\t\t\"stored-query\": \"out('blah').has('something','foo')\"\n"
-            + "\t}\n"
-            + "}]\n"
-            + "}";
+        String queryWithNullPropsJson = """
+            {
+            "stored-queries": [{
+               "queryName1": {
+                       "query": {
+                               "required-properties": null,
+                               "optional-properties": ["prop3"]
+                       },
+                       "stored-query": "out('blah').has('something','foo')"
+               }
+            }]
+            }\
+            """;
 
         GetCustomQueryConfig getCustomQueryConfig = new GetCustomQueryConfig(queryWithNullPropsJson);
         CustomQueryConfig cqc = getCustomQueryConfig.getStoredQuery("queryName1");
@@ -174,17 +200,19 @@ public class GetCustomQueryConfigTest {
 
     @Test
     public void testQueryWithNullOptionalProperties() {
-        String queryWithNullPropsJson = "{\n"
-            + "\"stored-queries\": [{\n"
-            + "\t\"queryName1\": {\n"
-            + "\t\t\"query\": {\n"
-            + "\t\t\t\"required-properties\": [\"prop1\"],\n"
-            + "\t\t\t\"optional-properties\": null  // Null for optional properties\n"
-            + "\t\t},\n"
-            + "\t\t\"stored-query\": \"out('blah').has('something','foo')\"\n"
-            + "\t}\n"
-            + "}]\n"
-            + "}";
+        String queryWithNullPropsJson = """
+            {
+            "stored-queries": [{
+               "queryName1": {
+                       "query": {
+                               "required-properties": ["prop1"],
+                               "optional-properties": null  // Null for optional properties
+                       },
+                       "stored-query": "out('blah').has('something','foo')"
+               }
+            }]
+            }\
+            """;
 
         GetCustomQueryConfig getCustomQueryConfig = new GetCustomQueryConfig(queryWithNullPropsJson);
         CustomQueryConfig cqc = getCustomQueryConfig.getStoredQuery("queryName1");
index 97f65d2..6465122 100644 (file)
@@ -22,7 +22,6 @@ package org.onap.aai.queries;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.mockito.Mockito;
 
 import java.io.FileWriter;
 import java.io.IOException;
index d4c6736..0fa3bbd 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.schema-service</groupId>
         <artifactId>schema-service</artifactId>
-        <version>1.13.0-SNAPSHOT</version>
+        <version>1.13.1-SNAPSHOT</version>
     </parent>
     <artifactId>aai-schema-gen</artifactId>
     <name>aai-schema-gen</name>
@@ -48,7 +48,8 @@
         <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
         <schema.version.edge.label.start>v12</schema.version.edge.label.start>
         <schema.version.api.default>v30</schema.version.api.default>
-        <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
+        <schema.version.list>
+            v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
 
         <!-- End of Default ONAP Schema Properties -->
     </properties>
@@ -68,7 +69,8 @@
                 <schema.version.edge.label.start>v12</schema.version.edge.label.start>
                 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
                 <schema.version.api.default>v30</schema.version.api.default>
-                <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
+                <schema.version.list>
+                    v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
                 <gendoc.version>v16</gendoc.version>
             </properties>
         </profile>
                                         </systemProperty>
                                         <systemProperty>
                                             <key>yamlresponses_url</key>
-                                            <value>https://wiki.web.att.com/pages/viewpage.action?pageId=607391054
+                                            <value>
+                                                https://wiki.web.att.com/pages/viewpage.action?pageId=607391054
                                             </value>
                                         </systemProperty>
                                         <systemProperty>
                                     <goal>java</goal>
                                 </goals>
                                 <configuration>
-                                    <!-- skip true is a workaround to avoid overriding the schema that
+                                    <!-- skip true is a workaround to avoid overriding the schema
+                                    that
                                          is defined in aai-schema/src/main/resources/onap/aai_schema
                                          with the output of the GenerateXsd class.
                                          This is done to avoid adjusting the aai-schema/.../onap/oxm
                                         </systemProperty>
                                         <systemProperty>
                                             <key>yamlresponses_url</key>
-                                            <value>https://wiki.web.att.com/pages/viewpage.action?pageId=607391054
+                                            <value>
+                                                https://wiki.web.att.com/pages/viewpage.action?pageId=607391054
                                             </value>
                                         </systemProperty>
                                         <systemProperty>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <version>1.2</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.client5</groupId>
+            <artifactId>httpclient5</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>1.18.30</version>
+            <version>1.18.38</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>
         </pluginRepository>
     </pluginRepositories>
     <!-- End of ONAP Specific Repositories -->
-</project>
+</project>
\ No newline at end of file
index 13fd317..8e7aeb7 100644 (file)
@@ -38,6 +38,8 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeansException;
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 
+import ch.qos.logback.classic.LoggerContext;
+
 public class AutoGenerateHtml {
 
     private static Logger logger = LoggerFactory.getLogger(AutoGenerateHtml.class);
@@ -81,6 +83,10 @@ public class AutoGenerateHtml {
             }
         } catch (BeansException e) {
             logger.warn("Unable to initialize AnnotationConfigApplicationContext ", e);
+        } finally {
+            // This non-daemon delays build process until the JVM exit. Stopping gracefully to speed up build process
+            LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
+            context.stop();
         }
 
         System.setProperty(AAI_GENERATE_VERSION, savedProperty);
index b69f036..bc9e8a2 100644 (file)
@@ -27,7 +27,6 @@ import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -44,6 +43,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeansException;
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 import org.w3c.dom.NodeList;
+import ch.qos.logback.classic.LoggerContext;
 
 public class GenerateXsd {
 
@@ -287,7 +287,7 @@ public class GenerateXsd {
                     }
                     try {
                         Charset charset = StandardCharsets.UTF_8;
-                        Path path = Paths.get(nodesfileName);
+                        Path path = Path.of(nodesfileName);
                         nodesBW = Files.newBufferedWriter(path, charset);
                         nodesBW.write(nodesContent);
                     } catch (IOException e) {
@@ -309,7 +309,7 @@ public class GenerateXsd {
                 BufferedWriter bw = null;
                 try {
                     Charset charset = StandardCharsets.UTF_8;
-                    Path path = Paths.get(outfileName);
+                    Path path = Path.of(outfileName);
                     bw = Files.newBufferedWriter(path, charset);
                     bw.write(fileContent);
                 } catch (IOException e) {
@@ -323,6 +323,10 @@ public class GenerateXsd {
             }
         } catch (BeansException e) {
             logger.warn("Unable to initialize AnnotationConfigApplicationContext ", e);
+        } finally {
+            // This non-daemon delays build process until the JVM exit. Stopping gracefully to speed up build process
+            LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
+            context.stop();
         }
 
     }
index 5779e6d..799807e 100644 (file)
@@ -84,9 +84,9 @@ public class HTMLfromOXM extends OxmFileProcessor {
             .append(namespace).append(".aai.inventory/").append(v.toString())
             .append("\" xmlns:tns=\"http://").append(namespace).append(".aai.inventory/")
             .append(v.toString()).append("\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"")
-            .append(LINE_SEPARATOR).append("xmlns:jaxb=\"http://java.sun.com/xml/ns/jaxb\"")
-            .append(LINE_SEPARATOR).append("    jaxb:version=\"2.1\"").append(LINE_SEPARATOR)
-            .append("    xmlns:annox=\"http://annox.dev.java.net\"").append(LINE_SEPARATOR)
+            .append(LINE_SEPARATOR).append("xmlns:jaxb=\"https://jakarta.ee/xml/ns/jaxb\"")
+            .append(LINE_SEPARATOR).append("    jaxb:version=\"3.0\"").append(LINE_SEPARATOR)
+            .append("    xmlns:annox=\"urn:jaxb.jvnet.org:annox\"").append(LINE_SEPARATOR)
             .append("    jaxb:extensionBindingPrefixes=\"annox\">").append(DOUBLE_LINE_SEPARATOR);
         return sb.toString();
     }
index f4d15b2..8ace00f 100644 (file)
@@ -30,7 +30,6 @@ import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
@@ -685,7 +684,7 @@ public class NodesYAMLfromOXM extends OxmFileProcessor {
         } catch (IOException e) {
             logger.error("Exception creating output file " + outfileName, e);
         }
-        Path path = Paths.get(outfileName);
+        Path path = Path.of(outfileName);
         Charset charset = StandardCharsets.UTF_8;
         try (BufferedWriter bw = Files.newBufferedWriter(path, charset)) {
             bw.write(fileContent);
index 71baa9c..bd6e836 100644 (file)
@@ -30,7 +30,6 @@ import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
@@ -754,7 +753,7 @@ public class YAMLfromOXM extends OxmFileProcessor {
         }
         try {
             Charset charset = StandardCharsets.UTF_8;
-            Path path = Paths.get(outfileName);
+            Path path = Path.of(outfileName);
             try (BufferedWriter bw = Files.newBufferedWriter(path, charset)) {
                 bw.write(fileContent);
             }
index 9b2fa2c..ab82d90 100644 (file)
@@ -172,9 +172,9 @@ public class GenerateSwagger {
                     int startIndex = line.indexOf("https://");
                     int endIndex = line.lastIndexOf("/");
                     hyperLink = line.substring(startIndex, endIndex);
-                    return String.format("<a href=\"%s\">%s</a><br/>", hyperLink, line);
+                    return "<a href=\"%s\">%s</a><br/>".formatted(hyperLink, line);
                 }
-                return String.format("%s<br/>", line);
+                return "%s<br/>".formatted(line);
             })
 
                 .collect(Collectors.joining(LINE_SEPARATOR));
@@ -488,17 +488,17 @@ public class GenerateSwagger {
                 String headerId = line.toLowerCase().replaceAll("\\s", "-");
 
                 if (line.contains("Related Nodes")) {
-                    return String.format("<h6 id=\"%s\">%s</h6>%s<ul>", headerId, line,
+                    return "<h6 id=\"%s\">%s</h6>%s<ul>".formatted(headerId, line,
                         LINE_SEPARATOR);
                 } else {
-                    return String.format("<h6 id=\"%s\">%s</h6>", headerId, line);
+                    return "<h6 id=\"%s\">%s</h6>".formatted(headerId, line);
                 }
             } else if (line.startsWith("-")) {
                 line = line.replaceFirst("-", "");
                 line = line.trim();
-                return String.format("<li>%s</li>", line);
+                return "<li>%s</li>".formatted(line);
             } else {
-                return String.format("<p>%s</p>", line);
+                return "<p>%s</p>".formatted(line);
             }
         }).collect(Collectors.joining(LINE_SEPARATOR));
 
index 5302b39..96544b8 100644 (file)
@@ -35,7 +35,6 @@ import java.io.IOException;
 import java.nio.charset.Charset;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
@@ -159,7 +158,7 @@ public class HTMLfromOXMTest {
         XMLfile.createNewFile();
         BufferedWriter bw = null;
         Charset charset = Charset.forName("UTF-8");
-        Path path = Paths.get(outfileName);
+        Path path = Path.of(outfileName);
         bw = Files.newBufferedWriter(path, charset);
         bw.write(testXML);
         bw.close();
@@ -227,11 +226,11 @@ public class HTMLfromOXMTest {
             + LINE_SEPARATOR);
         sb.append(
             "<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://org.onap.aai.inventory/v11\" xmlns:tns=\"http://org.onap.aai.inventory/v11\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\""
-                + LINE_SEPARATOR + "xmlns:jaxb=\"http://java.sun.com/xml/ns/jaxb\""
+                + LINE_SEPARATOR + "xmlns:jaxb=\"https://jakarta.ee/xml/ns/jaxb\""
                 + LINE_SEPARATOR);
-        sb.append("    jaxb:version=\"2.1\"" + LINE_SEPARATOR);
+        sb.append("    jaxb:version=\"3.0\"" + LINE_SEPARATOR);
         sb.append(
-            "    xmlns:annox=\"http://annox.dev.java.net\"" + LINE_SEPARATOR);
+            "    xmlns:annox=\"urn:jaxb.jvnet.org:annox\"" + LINE_SEPARATOR);
         sb.append("    jaxb:extensionBindingPrefixes=\"annox\">"
             + OxmFileProcessor.DOUBLE_LINE_SEPARATOR);
         return sb.toString();
index da01cf0..c4d676f 100644 (file)
@@ -49,7 +49,6 @@ import java.lang.reflect.Method;
 import java.nio.charset.Charset;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -143,7 +142,7 @@ public class NodesYAMLfromOXMTest {
         XMLfile.createNewFile();
         BufferedWriter bw = null;
         Charset charset = Charset.forName("UTF-8");
-        Path path = Paths.get(outfileName);
+        Path path = Path.of(outfileName);
         bw = Files.newBufferedWriter(path, charset);
         bw.write(testXML);
         bw.close();
@@ -549,15 +548,17 @@ public class NodesYAMLfromOXMTest {
 
         String result = (String) getDictionaryMethod.invoke(nodesYamlFromOxm, resource);
 
-        String expectedResult = "  business:\n"
-            + "    description: |\n"
-            + "      dictionary of business\n"
-            + "    type: object\n"
-            + "    properties:\n"
-            + "      business:\n"
-            + "        type: array\n"
-            + "        items:\n"
-            + "          $ref: \"#/definitions/business-dict\"\n";
+        String expectedResult = """
+              business:
+                description: |
+                  dictionary of business
+                type: object
+                properties:
+                  business:
+                    type: array
+                    items:
+                      $ref: "#/definitions/business-dict"
+            """;
 
         // Verify that the result matches the expected output
         assertThat(result, is(expectedResult));
index c4710e5..1df61e6 100644 (file)
@@ -1434,11 +1434,13 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: global-customer-id\n"
-            + "          in: query\n"
-            + "          description: Customer ID description\n"
-            + "          required: false\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: global-customer-id
+                      in: query
+                      description: Customer ID description
+                      required: false
+                      type: string
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1454,10 +1456,12 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: global-customer-id\n"
-            + "          in: query\n"
-            + "          required: false\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: global-customer-id
+                      in: query
+                      required: false
+                      type: string
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1473,10 +1477,12 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: global-customer-id\n"
-            + "          in: query\n"
-            + "          required: false\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: global-customer-id
+                      in: query
+                      required: false
+                      type: string
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1492,12 +1498,14 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: customer-id\n"
-            + "          in: query\n"
-            + "          description: Customer ID\n"
-            + "          required: false\n"
-            + "          type: integer\n"
-            + "          format: int64\n";
+        String expectedYAML = """
+                    - name: customer-id
+                      in: query
+                      description: Customer ID
+                      required: false
+                      type: integer
+                      format: int64
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1513,12 +1521,14 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: order-id\n"
-            + "          in: query\n"
-            + "          description: Order ID\n"
-            + "          required: false\n"
-            + "          type: integer\n"
-            + "          format: int32\n";
+        String expectedYAML = """
+                    - name: order-id
+                      in: query
+                      description: Order ID
+                      required: false
+                      type: integer
+                      format: int32
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1534,12 +1544,14 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: price\n"
-            + "          in: query\n"
-            + "          description: Price of the product\n"
-            + "          required: false\n"
-            + "          type: number\n"
-            + "          format: float\n";
+        String expectedYAML = """
+                    - name: price
+                      in: query
+                      description: Price of the product
+                      required: false
+                      type: number
+                      format: float
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1555,12 +1567,14 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: amount\n"
-            + "          in: query\n"
-            + "          description: Amount in dollars\n"
-            + "          required: false\n"
-            + "          type: number\n"
-            + "          format: double\n";
+        String expectedYAML = """
+                    - name: amount
+                      in: query
+                      description: Amount in dollars
+                      required: false
+                      type: number
+                      format: double
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1576,11 +1590,13 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: active\n"
-            + "          in: query\n"
-            + "          description: Active status of user\n"
-            + "          required: false\n"
-            + "          type: boolean\n";
+        String expectedYAML = """
+                    - name: active
+                      in: query
+                      description: Active status of user
+                      required: false
+                      type: boolean
+            """;
 
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
@@ -1597,10 +1613,12 @@ public class XSDElementTest {
 
         XSDElement xsdElement = new XSDElement(element);
 
-        String expectedYAML = "        - name: some-id\n"
-            + "          in: query\n"
-            + "          description: Some ID\n"
-            + "          required: false\n";
+        String expectedYAML = """
+                    - name: some-id
+                      in: query
+                      description: Some ID
+                      required: false
+            """;
         String result = xsdElement.getQueryParamYAML();
         assertEquals(expectedYAML, result);
     }
@@ -1617,11 +1635,13 @@ public class XSDElementTest {
         String elementDescription = "Inventory";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: Inventory\n"
-            + "          in: path\n"
-            + "          description: Inventory\n"
-            + "          required: true\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: Inventory
+                      in: path
+                      description: Inventory
+                      required: true
+                      type: string
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1638,10 +1658,12 @@ public class XSDElementTest {
         String elementDescription = "";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: Inventory\n"
-            + "          in: path\n"
-            + "          required: true\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: Inventory
+                      in: path
+                      required: true
+                      type: string
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1659,11 +1681,13 @@ public class XSDElementTest {
         String overrideName = "CustomInventory";
         String result = xsdElement.getPathParamYAML(elementDescription, overrideName);
 
-        String expectedYAML = "        - name: CustomInventory\n"
-            + "          in: path\n"
-            + "          description: Inventory\n"
-            + "          required: true\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: CustomInventory
+                      in: path
+                      description: Inventory
+                      required: true
+                      type: string
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1680,12 +1704,14 @@ public class XSDElementTest {
         String elementDescription = "Customer ID";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: customer-id\n"
-            + "          in: path\n"
-            + "          description: Customer ID\n"
-            + "          required: true\n"
-            + "          type: integer\n"
-            + "          format: int64\n";
+        String expectedYAML = """
+                    - name: customer-id
+                      in: path
+                      description: Customer ID
+                      required: true
+                      type: integer
+                      format: int64
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1702,12 +1728,14 @@ public class XSDElementTest {
         String elementDescription = "Order ID";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: order-id\n"
-            + "          in: path\n"
-            + "          description: Order ID\n"
-            + "          required: true\n"
-            + "          type: integer\n"
-            + "          format: int32\n";
+        String expectedYAML = """
+                    - name: order-id
+                      in: path
+                      description: Order ID
+                      required: true
+                      type: integer
+                      format: int32
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1724,12 +1752,14 @@ public class XSDElementTest {
         String elementDescription = "Price of the product";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: price\n"
-            + "          in: path\n"
-            + "          description: Price of the product\n"
-            + "          required: true\n"
-            + "          type: number\n"
-            + "          format: float\n";
+        String expectedYAML = """
+                    - name: price
+                      in: path
+                      description: Price of the product
+                      required: true
+                      type: number
+                      format: float
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1746,12 +1776,14 @@ public class XSDElementTest {
         String elementDescription = "Amount in dollars";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: amount\n"
-            + "          in: path\n"
-            + "          description: Amount in dollars\n"
-            + "          required: true\n"
-            + "          type: number\n"
-            + "          format: double\n";
+        String expectedYAML = """
+                    - name: amount
+                      in: path
+                      description: Amount in dollars
+                      required: true
+                      type: number
+                      format: double
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1768,11 +1800,13 @@ public class XSDElementTest {
         String elementDescription = "Active status of user";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: active\n"
-            + "          in: path\n"
-            + "          description: Active status of user\n"
-            + "          required: true\n"
-            + "          type: boolean\n";
+        String expectedYAML = """
+                    - name: active
+                      in: path
+                      description: Active status of user
+                      required: true
+                      type: boolean
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1789,11 +1823,13 @@ public class XSDElementTest {
         String elementDescription = "Inventory ID";
         String result = xsdElement.getPathParamYAML(elementDescription, null);
 
-        String expectedYAML = "        - name: inventory-id\n"
-            + "          in: path\n"
-            + "          description: Inventory ID\n"
-            + "          required: true\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name: inventory-id
+                      in: path
+                      description: Inventory ID
+                      required: true
+                      type: string
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -1811,11 +1847,13 @@ public class XSDElementTest {
         String overrideName = "";
         String result = xsdElement.getPathParamYAML(elementDescription, overrideName);
 
-        String expectedYAML = "        - name: \n"
-            + "          in: path\n"
-            + "          description: Inventory ID\n"
-            + "          required: true\n"
-            + "          type: string\n";
+        String expectedYAML = """
+                    - name:\s
+                      in: path
+                      description: Inventory ID
+                      required: true
+                      type: string
+            """;
         assertEquals(expectedYAML, result);
     }
 
@@ -1992,8 +2030,10 @@ public class XSDElementTest {
 
         String result = xsdelement.getTypePropertyYAML(false);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: string\n";
+        String expectedYAML = """
+                  property-name:
+                    type: string
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -2012,9 +2052,11 @@ public class XSDElementTest {
 
         String result = xsdelement.getTypePropertyYAML(false);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: integer\n"
-            + "        format: int64\n";
+        String expectedYAML = """
+                  property-name:
+                    type: integer
+                    format: int64
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -2033,9 +2075,11 @@ public class XSDElementTest {
 
         String result = xsdelement.getTypePropertyYAML(false);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: integer\n"
-            + "        format: int32\n";
+        String expectedYAML = """
+                  property-name:
+                    type: integer
+                    format: int32
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -2054,9 +2098,11 @@ public class XSDElementTest {
 
         String result = xsdelement.getTypePropertyYAML(false);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: number\n"
-            + "        format: float\n";
+        String expectedYAML = """
+                  property-name:
+                    type: number
+                    format: float
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -2075,9 +2121,11 @@ public class XSDElementTest {
 
         String result = xsdelement.getTypePropertyYAML(false);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: number\n"
-            + "        format: double\n";
+        String expectedYAML = """
+                  property-name:
+                    type: number
+                    format: double
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -2096,8 +2144,10 @@ public class XSDElementTest {
 
         String result = xsdelement.getTypePropertyYAML(false);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: boolean\n";
+        String expectedYAML = """
+                  property-name:
+                    type: boolean
+            """;
 
         assertEquals(expectedYAML, result);
     }
@@ -2117,11 +2167,13 @@ public class XSDElementTest {
         // Call the method with isDslStartNode set to true
         String result = xsdelement.getTypePropertyYAML(true);
 
-        String expectedYAML = "      property-name:\n"
-            + "        type: string\n"
-            + "        description: |\n"
-            + "          \n"
-            + "          *This property can be used as a filter to find the start node for a dsl query\n";
+        String expectedYAML = """
+                  property-name:
+                    type: string
+                    description: |
+                     \s
+                      *This property can be used as a filter to find the start node for a dsl query
+            """;
 
         assertEquals(expectedYAML, result);
     }
index eb21fbc..ab5af41 100644 (file)
@@ -54,7 +54,6 @@ import java.lang.reflect.Method;
 import java.nio.charset.Charset;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -179,7 +178,7 @@ public class YAMLfromOXMTest {
         XMLfile.createNewFile();
         BufferedWriter bw = null;
         Charset charset = Charset.forName("UTF-8");
-        Path path = Paths.get(outfileName);
+        Path path = Path.of(outfileName);
         bw = Files.newBufferedWriter(path, charset);
         bw.write(testXML);
         bw.close();
@@ -883,29 +882,46 @@ public class YAMLfromOXMTest {
         sb.append("{\n" + "  \"rules\": [\n");
         sb.append("    {\n");
         sb.append("      \"from\": \"service-subscription\",\n");
-        sb.append("      \"to\": \"customer\",\n"
-            + "      \"label\": \"org.onap.relationships.inventory.BelongsTo\",\n"
-            + "      \"direction\": \"OUT\",\n" + "      \"multiplicity\": \"MANY2ONE\",\n"
-            + "      \"contains-other-v\": \"!${direction}\",\n"
-            + "      \"delete-other-v\": \"!${direction}\",\n"
-            + "      \"prevent-delete\": \"NONE\",\n" + "      \"default\": \"true\",\n"
-            + "      \"description\":\"\"\n");
+        sb.append("""
+                  "to": "customer",
+                  "label": "org.onap.relationships.inventory.BelongsTo",
+                  "direction": "OUT",
+                  "multiplicity": "MANY2ONE",
+                  "contains-other-v": "!${direction}",
+                  "delete-other-v": "!${direction}",
+                  "prevent-delete": "NONE",
+                  "default": "true",
+                  "description":""
+            """);
         sb.append("    },\n");
-        sb.append("    {\n" + "      \"from\": \"service-instance\",\n"
-            + "      \"to\": \"service-subscription\",\n"
-            + "      \"label\": \"org.onap.relationships.inventory.BelongsTo\",\n"
-            + "      \"direction\": \"OUT\",\n" + "      \"multiplicity\": \"MANY2ONE\",\n"
-            + "      \"contains-other-v\": \"!${direction}\",\n"
-            + "      \"delete-other-v\": \"!${direction}\",\n"
-            + "      \"prevent-delete\": \"NONE\",\n" + "      \"default\": \"true\",\n"
-            + "      \"description\":\"\"\n" + "    },\n");
-        sb.append("    {\n" + "      \"from\": \"service-subscription\",\n"
-            + "      \"to\": \"tenant\",\n"
-            + "      \"label\": \"org.onap.relationships.inventory.Uses\",\n"
-            + "      \"direction\": \"OUT\",\n" + "      \"multiplicity\": \"MANY2MANY\",\n"
-            + "      \"contains-other-v\": \"NONE\",\n" + "      \"delete-other-v\": \"NONE\",\n"
-            + "      \"prevent-delete\": \"NONE\",\n" + "      \"default\": \"true\",\n"
-            + "      \"description\":\"\"\n" + "    }");
+        sb.append("""
+                {
+                  "from": "service-instance",
+                  "to": "service-subscription",
+                  "label": "org.onap.relationships.inventory.BelongsTo",
+                  "direction": "OUT",
+                  "multiplicity": "MANY2ONE",
+                  "contains-other-v": "!${direction}",
+                  "delete-other-v": "!${direction}",
+                  "prevent-delete": "NONE",
+                  "default": "true",
+                  "description":""
+                },
+            """);
+        sb.append("""
+                {
+                  "from": "service-subscription",
+                  "to": "tenant",
+                  "label": "org.onap.relationships.inventory.Uses",
+                  "direction": "OUT",
+                  "multiplicity": "MANY2MANY",
+                  "contains-other-v": "NONE",
+                  "delete-other-v": "NONE",
+                  "prevent-delete": "NONE",
+                  "default": "true",
+                  "description":""
+                }\
+            """);
         sb.append("  ]\n" + "}\n");
         return sb.toString();
     }
index aef6174..92bcb34 100644 (file)
@@ -26,7 +26,6 @@ import org.onap.aai.setup.SchemaVersion;
 import java.util.*;
 import static org.junit.jupiter.api.Assertions.*;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
 public class GenerateSwaggerTest {
 
index 498f85c..add572f 100644 (file)
     ============LICENSE_END=========================================================
 
 -->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.aai.schema-service</groupId>
         <artifactId>schema-service</artifactId>
-        <version>1.13.0-SNAPSHOT</version>
+        <version>1.13.1-SNAPSHOT</version>
     </parent>
     <groupId>org.onap.aai.schema-service</groupId>
     <artifactId>aai-schema-service</artifactId>
     <properties>
-        <java.version>1.8</java.version>
+        <java.version>17</java.version>
         <start-class>org.onap.aai.schemaservice.SchemaServiceApp</start-class>
 
         <docker.fabric.version>0.40.2</docker.fabric.version>
         <docker.push.registry>localhost:5000</docker.push.registry>
         <aai.docker.version>1.0.0</aai.docker.version>
 
-        <logback.version>1.2.13</logback.version>
+        <logback.version>1.4.14</logback.version>
 
         <!--
              Location where assembly of our scripts, resources and main jar will be held
                 Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
         -->
-        <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
+        <aai.build.directory>
+            ${project.build.directory}/${project.artifactId}-${project.version}-build/
         </aai.build.directory>
         <aai.docker.namespace>onap</aai.docker.namespace>
 
         <!-- Start of Default ONAP Schema Properties -->
         <schema.source.name>onap</schema.source.name>
         <schema.configuration.location>N/A</schema.configuration.location>
-        <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm
+        <schema.nodes.location>
+            ${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm
         </schema.nodes.location>
-        <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules
+        <schema.edges.location>
+            ${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules
         </schema.edges.location>
         <schema.version.depth.start>v10</schema.version.depth.start>
         <schema.version.related.link.start>v10</schema.version.related.link.start>
         <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
         <schema.version.edge.label.start>v12</schema.version.edge.label.start>
         <schema.version.api.default>v30</schema.version.api.default>
-        <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
+        <schema.version.list>
+            v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
         <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
         <!-- End of Default ONAP Schema Properties -->
 
         <!-- Swagger version for open api json creation -->
-           <swagger.version>2.2.35</swagger.version>
+        <swagger.version>2.2.35</swagger.version>
     </properties>
     <profiles>
         <!-- Docker profile to be used for building docker image and pushing to nexus -->
                             <apiVersion>1.23</apiVersion>
                             <images>
                                 <image>
-                                    <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
+                                    <name>
+                                        ${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
                                     <build>
                                         <filter>@</filter>
                                         <tags>
             <properties>
                 <schema.source.name>onap</schema.source.name>
                 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
-                <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
+                <schema.version.list>
+                    v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30</schema.version.list>
             </properties>
         </profile>
         <!-- End of ONAP Profile -->
             <artifactId>guava</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.fasterxml.jackson.jaxrs</groupId>
-            <artifactId>jackson-jaxrs-json-provider</artifactId>
+            <groupId>com.fasterxml.jackson.jakarta.rs</groupId>
+            <artifactId>jackson-jakarta-rs-json-provider</artifactId>
         </dependency>
         <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <version>2.3.0</version>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-jetty</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-jersey</artifactId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-aop</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onap.aai.aai-common</groupId>
             <artifactId>aai-core</artifactId>
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-sleuth</artifactId>
+            <groupId>io.micrometer</groupId>
+            <artifactId>micrometer-tracing-bridge-otel</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-sleuth-zipkin</artifactId>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-otlp</artifactId>
         </dependency>
         <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus</artifactId>
         </dependency>
         <dependency>
-                       <groupId>org.projectlombok</groupId>
-                       <artifactId>lombok</artifactId>
-                       <version>1.18.34</version>
-                       <scope>provided</scope>
-               </dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.38</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.reflections</groupId>
             <artifactId>reflections</artifactId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
+            <!-- Excluded to remove warning -->
+              <exclusions>
+                <exclusion>
+                <groupId>com.vaadin.external.google</groupId>
+                <artifactId>android-json</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
         </dependency>
         <dependency>
             <groupId>io.swagger.core.v3</groupId>
-            <artifactId>swagger-jaxrs2</artifactId>
-           <version>${swagger.version}</version>
+            <artifactId>swagger-jaxrs2-jakarta</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.client5</groupId>
+            <artifactId>httpclient5</artifactId>
         </dependency>
     </dependencies>
     <build>
                             <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
                             <resources>
                                 <resource>
-                                    <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
+                                    <directory>
+                                        ${project.basedir}/../aai-queries/src/main/resources/schema</directory>
                                     <includes>
                                         <include>**/query/**/*.json</include>
                                     </includes>
                             <goal>copy-resources</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
+                            <outputDirectory>
+                                ${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
                             <resources>
                                 <resource>
                                     <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
                             <goal>copy-resources</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
+                            <outputDirectory>
+                                ${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
                             <resources>
                                 <resource>
-                                    <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
+                                    <directory>
+                                        ${project.basedir}/../aai-queries/src/main/resources/schema</directory>
                                     <includes>
                                         <include>**/query/**/*.json</include>
                                     </includes>
             </plugin>
             <plugin>
                 <groupId>io.swagger.core.v3</groupId>
-                <artifactId>swagger-maven-plugin</artifactId>
-                       <version>${swagger.version}</version>
+                <artifactId>swagger-maven-plugin-jakarta</artifactId>
+                <version>${swagger.version}</version>
                 <executions>
                     <execution>
                         <id>generate-openapi</id>
             </plugin>
         </plugins>
     </reporting>
-</project>
+</project>
\ No newline at end of file
index 49c2906..3489d0a 100644 (file)
@@ -25,7 +25,7 @@
 # jre-alpine image has $JAVA_HOME set and added to $PATH
 # ubuntu image requires to set $JAVA_HOME and add java to $PATH manually
 if [ -z $JAVA_HOME ] && [ $(grep -i "ID=ubuntu" /etc/os-release | wc -w) -eq 1 ] ; then
-    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-`dpkg --print-architecture | awk -F- '{ print $NF }'`
+    export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-`dpkg --print-architecture | awk -F- '{ print $NF }'`
     export PATH=$PATH:${JAVA_HOME}/jre/bin:${JAVA_HOME}/bin
 fi
 
index 74f7095..63e9181 100644 (file)
@@ -20,8 +20,8 @@
 
 package org.onap.aai.schemaservice;
 
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
+import jakarta.annotation.PostConstruct;
+import jakarta.annotation.PreDestroy;
 
 import org.onap.aai.aailog.logs.AaiDebugLog;
 import org.onap.aai.exceptions.AAIException;
index f81ca52..15573e3 100644 (file)
@@ -24,11 +24,11 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.MediaType;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.ws.rs.core.MediaType;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.logging.ErrorLogHelper;
@@ -94,7 +94,7 @@ public class ErrorHandler extends OncePerRequestFilter {
             filterChain.doFilter(httpServletRequest, httpServletResponse);
         } catch (ServletException ex) {
             Throwable e = ex.getRootCause();
-            if (e instanceof AAIException) {
+            if (e instanceof AAIException aaiException) {
                 List<MediaType> mediaTypeList = new ArrayList<>();
                 String acceptHeader = httpServletRequest.getHeader("Accept");
                 if (acceptHeader == null) {
@@ -104,7 +104,6 @@ public class ErrorHandler extends OncePerRequestFilter {
                 }
 
                 ArrayList<String> templateVars = new ArrayList<>();
-                AAIException aaiException = (AAIException) e;
                 String message = ErrorLogHelper.getRESTAPIErrorResponse(mediaTypeList, aaiException,
                     templateVars);
                 ErrorObject object = ErrorLogHelper.getErrorObject(aaiException.getCode());
index 79aba4c..7f9a0a1 100644 (file)
@@ -31,14 +31,14 @@ import lombok.RequiredArgsConstructor;
 
 import java.util.Optional;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.restcore.HttpMethod;
@@ -88,7 +88,7 @@ public class EdgeResource extends RESTAPI {
 
             Optional<EdgeRules> edgeRulesOptional = edgeService.findRules(version);
 
-            if (!edgeRulesOptional.isPresent()) {
+            if (edgeRulesOptional.isEmpty()) {
                 throw new AAIException("AAI_3001");
             }
 
index af8d6f0..75b50ca 100644 (file)
@@ -30,12 +30,11 @@ import java.io.FileReader;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
 
 import org.onap.aai.schemaservice.nodeschema.SchemaVersion;
 import org.onap.aai.schemaservice.nodeschema.SchemaVersions;
@@ -75,7 +74,7 @@ public class EdgeService {
             LOGGER.debug("For the version {} looking for edge rules in folder {}", schemaVersion,
                 edgeRuleVersionPath);
 
-            try (Stream<Path> pathStream = Files.walk(Paths.get(edgeRuleVersionPath))) {
+            try (Stream<Path> pathStream = Files.walk(Path.of(edgeRuleVersionPath))) {
 
                 List<Path> jsonFiles =
                     pathStream.filter((path) -> path.toString().endsWith(".json"))
index 9c702e4..e3d5ac3 100644 (file)
@@ -23,12 +23,12 @@ package org.onap.aai.schemaservice.healthcheck;
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.*;
-import javax.ws.rs.core.Response.Status;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.*;
+import jakarta.ws.rs.core.Response.Status;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.logging.ErrorLogHelper;
index 5a09615..2ff80a3 100644 (file)
@@ -24,11 +24,11 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.annotation.Priority;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
-import javax.ws.rs.core.MediaType;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.core.MediaType;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.logging.ErrorLogHelper;
index 170ac40..87069af 100644 (file)
@@ -22,11 +22,11 @@ package org.onap.aai.schemaservice.interceptors.post;
 
 import java.io.IOException;
 
-import javax.annotation.Priority;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
-import javax.ws.rs.core.MediaType;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.core.MediaType;
 
 import org.onap.aai.schemaservice.interceptors.AAIContainerFilter;
 import org.onap.aai.schemaservice.interceptors.AAIHeaderProperties;
index f89440a..b65a2e2 100644 (file)
@@ -26,12 +26,12 @@ import java.io.IOException;
 import java.util.Objects;
 import java.util.Optional;
 
-import javax.annotation.Priority;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
+import jakarta.annotation.Priority;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.ws.rs.HttpMethod;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
 
 import org.onap.aai.logging.ErrorLogHelper;
 import org.onap.aai.schemaservice.interceptors.AAIContainerFilter;
index 3b22ff0..adcedc3 100644 (file)
@@ -25,12 +25,12 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 
-import javax.annotation.Priority;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.logging.ErrorLogHelper;
index 2830456..bf7248f 100644 (file)
@@ -22,11 +22,11 @@ package org.onap.aai.schemaservice.interceptors.pre;
 
 import java.io.IOException;
 
-import javax.annotation.Priority;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.HttpMethod;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
 
 import org.onap.aai.schemaservice.interceptors.AAIContainerFilter;
 import org.onap.aai.schemaservice.interceptors.AAIHeaderProperties;
index 32bf3d8..cef5bab 100644 (file)
@@ -25,12 +25,12 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 
-import javax.annotation.Priority;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.logging.ErrorLogHelper;
index 996ae68..fea4a9b 100644 (file)
@@ -24,11 +24,11 @@ import java.util.Collections;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.annotation.Priority;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
-import javax.ws.rs.core.MultivaluedMap;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
+import jakarta.ws.rs.core.MultivaluedMap;
 
 import org.onap.aai.schemaservice.interceptors.AAIContainerFilter;
 import org.onap.aai.schemaservice.interceptors.AAIHeaderProperties;
index 0820a68..9d54805 100644 (file)
@@ -28,12 +28,12 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.UUID;
 
-import javax.annotation.Priority;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.PreMatching;
-import javax.ws.rs.core.MediaType;
+import jakarta.annotation.Priority;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.PreMatching;
+import jakarta.ws.rs.core.MediaType;
 
 import org.glassfish.jersey.message.internal.ReaderWriter;
 import org.glassfish.jersey.server.ContainerException;
index 6245479..a542820 100644 (file)
@@ -44,7 +44,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import javax.xml.XMLConstants;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
index f644bef..8424de9 100644 (file)
@@ -26,13 +26,13 @@ import java.util.stream.Collectors;
 import java.util.zip.CRC32;
 import java.util.zip.Checksum;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 
 import org.springframework.web.bind.annotation.RestController;
 
index ccb46cd..bf6a2ff 100644 (file)
@@ -22,14 +22,14 @@ package org.onap.aai.schemaservice.nodeschema;
 
 import java.util.Optional;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.restcore.HttpMethod;
@@ -85,7 +85,7 @@ public class NodeSchemaResource extends RESTAPI {
                 throw new AAIException("AAI_3018", version);
             }
 
-            if (!optionalSchema.isPresent()) {
+            if (optionalSchema.isEmpty()) {
                 throw new AAIException("AAI_3001");
             }
 
index 1098989..457f0fc 100644 (file)
@@ -27,7 +27,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
 
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
 import javax.xml.transform.*;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
index a8dc5dd..4bb41b3 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.aai.schemaservice.nodeschema;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
 
 import org.onap.aai.schemaservice.nodeschema.validation.AAISchemaValidationException;
 import org.springframework.beans.factory.annotation.Value;
index 086fae9..0e73e33 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.onap.aai.schemaservice.query;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
 
 import org.springframework.web.bind.annotation.RestController;
 
index a3c8b5a..5adc4aa 100644 (file)
@@ -24,10 +24,10 @@ import java.io.File;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
-import java.nio.file.Paths;
+import java.nio.file.Path;
 import java.util.stream.Stream;
 
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -55,7 +55,7 @@ public class QueryService {
 
         StringBuilder contentBuilder = new StringBuilder();
 
-        try (Stream<String> stream = Files.lines(Paths.get(fileName), StandardCharsets.UTF_8)) {
+        try (Stream<String> stream = Files.lines(Path.of(fileName), StandardCharsets.UTF_8)) {
             stream.forEach(s -> contentBuilder.append(s));
         }
 
index 808cde8..97fdfe5 100644 (file)
@@ -23,13 +23,13 @@ package org.onap.aai.schemaservice.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;
 import java.util.stream.Stream;
 
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
 
 import org.eclipse.jetty.util.security.Password;
 import org.onap.aai.schemaservice.Profiles;
@@ -54,7 +54,7 @@ public class AuthorizationService {
 
         String basicAuthFile = getBasicAuthFilePath();
 
-        try (Stream<String> stream = Files.lines(Paths.get(basicAuthFile))) {
+        try (Stream<String> stream = Files.lines(Path.of(basicAuthFile))) {
             stream.filter(line -> !line.startsWith("#")).forEach(str -> {
                 byte[] bytes = null;
 
index ee676c1..8e21ad6 100644 (file)
@@ -28,11 +28,11 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
 
 import org.springframework.web.bind.annotation.RestController;
 
index c0740f1..29a1425 100644 (file)
@@ -25,9 +25,9 @@ import java.util.Set;
 import java.util.logging.Logger;
 import java.util.stream.Collectors;
 
-import javax.annotation.Priority;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.ContainerResponseFilter;
+import jakarta.annotation.Priority;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.ContainerResponseFilter;
 
 import org.glassfish.jersey.server.ResourceConfig;
 import org.onap.aai.schemaservice.edges.EdgeResource;
index bcdc887..7d721d5 100644 (file)
@@ -7,12 +7,10 @@ spring.application.name=aai-schema-service
 spring.jersey.type=filter
 spring.main.allow-bean-definition-overriding=true
 
-spring.sleuth.enabled=false
-spring.zipkin.baseUrl=http://jaeger-collector.istio-system:9411
-spring.sleuth.trace-id128=true
-spring.sleuth.sampler.probability=1.0
-spring.sleuth.propagation.type=w3c, b3
-spring.sleuth.supports-join=false
+management.tracing.enabled=false
+management.otlp.tracing.endpoint=http://jaeger-collector.istio-system:4318/v1/traces
+management.tracing.sampling.probability=1.0
+management.tracing.propagation.type=w3c, b3
 
 server.servlet.context-path=${schema.uri.base.path}
 
@@ -26,6 +24,8 @@ spring.autoconfigure.exclude=\
 jetty.threadPool.maxThreads=500
 #The minimum number of threads always kept alive
 jetty.threadPool.minThreads=10
+# Logging pattern containing traceId and spanId; no longer provided through Sleuth by default
+logging.pattern.level="%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]"
 #The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
 server.tomcat.max-idle-time=60000
 
index b562e5d..b56be40 100644 (file)
@@ -23,10 +23,14 @@ package org.onap.aai.schemaservice;
 import java.io.IOException;
 
 import javax.net.ssl.SSLContext;
-
-import org.apache.http.client.HttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
+import org.apache.hc.client5.http.io.HttpClientConnectionManager;
+import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
+import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
+import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
+import org.apache.hc.core5.ssl.SSLContexts;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,8 +48,7 @@ import org.springframework.web.client.RestTemplate;
 @TestConfiguration
 public class SchemaServiceTestConfiguration {
 
-    private static final Logger logger =
-        LoggerFactory.getLogger(SchemaServiceTestConfiguration.class);
+    private static final Logger logger = LoggerFactory.getLogger(SchemaServiceTestConfiguration.class);
 
     @Autowired
     private Environment env;
@@ -60,15 +63,25 @@ public class SchemaServiceTestConfiguration {
         RestTemplate restTemplate = null;
 
         if (env.acceptsProfiles(Profiles.of("one-way-ssl", "two-way-ssl"))) {
-            SSLContext sslContext = SSLContextBuilder.create().build();
+            NoopHostnameVerifier noopHostnameVerifier = NoopHostnameVerifier.INSTANCE;
+
+            SSLContext sslContext = SSLContexts.createDefault();
+
+            SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create()
+                    .setSslContext(sslContext)
+                    .setHostnameVerifier(noopHostnameVerifier)
+                    .build();
+
+            HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
+                    .setSSLSocketFactory(sslSocketFactory)
+                    .build();
 
-            HttpClient client = HttpClients.custom()
-                .setSSLContext(sslContext)
-                .setSSLHostnameVerifier((s, sslSession) -> true)
-                .build();
+            CloseableHttpClient client = HttpClients.custom()
+                    .setConnectionManager(connectionManager)
+                    .build();
 
             restTemplate = builder
-                .requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
+                    .requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
         } else {
             restTemplate = builder.build();
         }
index 475fbf1..62a072c 100644 (file)
@@ -29,9 +29,9 @@ import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.schemaservice.nodeschema.SchemaVersion;
 import org.onap.aai.schemaservice.nodeschema.SchemaVersions;
 
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Optional;
index 20b6a49..ca4eefc 100644 (file)
@@ -25,10 +25,10 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.onap.aai.exceptions.AAIException;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 import java.util.List;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
index 7810fe8..8b32b29 100644 (file)
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
 import java.io.IOException;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
index 9238254..cf8e6fc 100644 (file)
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedMap;
 import java.io.IOException;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
index 684fdc1..d1f0776 100644 (file)
@@ -33,10 +33,10 @@ import org.onap.aai.restcore.MediaType;
 import org.onap.aai.schemaservice.interceptors.AAIHeaderProperties;
 import org.onap.logging.filter.base.Constants;
 import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.core.MultivaluedHashMap;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.core.MultivaluedHashMap;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
index 4570443..c3fc28a 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.onap.aai.schemaservice.interceptors.AAIHeaderProperties;
-import javax.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestContext;
 import java.io.IOException;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.Mockito.*;
index 9696e69..615194d 100644 (file)
@@ -28,10 +28,10 @@ import org.mockito.junit.jupiter.MockitoExtension;
 import org.mockito.junit.jupiter.MockitoSettings;
 import org.mockito.quality.Strictness;
 import org.onap.aai.schemaservice.service.AuthorizationService;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.Arrays;
index 0c701cd..fa8c0eb 100644 (file)
@@ -26,10 +26,10 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.onap.aai.schemaservice.interceptors.AAIHeaderProperties;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.UriInfo;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
index fbce64d..c55a267 100644 (file)
@@ -25,9 +25,9 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
 import java.util.List;
 import java.util.Optional;
 
index 0a2e041..edbe92b 100644 (file)
 
 -->
 <project
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.aai.schema-service</groupId>
         <artifactId>schema-service</artifactId>
-        <version>1.13.0-SNAPSHOT</version>
+        <version>1.13.1-SNAPSHOT</version>
     </parent>
     <artifactId>aai-schema</artifactId>
     <name>aai-schema</name>
         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
         <!-- Start of Default ONAP Schema Properties -->
         <aai.xsd.source>src/main/resources/onap/aai_schema</aai.xsd.source>
-        <aai.bindings.source>src/main/xjb/bindings-onap.xjb</aai.bindings.source>
+        <aai.bindings.source>src/main/xjb/</aai.bindings.source>
+
         <commons.io.version>2.8.0</commons.io.version>
         <!-- End of Default ONAP Schema Properties -->
-         <jaxb2-basics.version>0.13.1</jaxb2-basics.version>
+        <jaxb-plugin.version>4.0.0</jaxb-plugin.version>
     </properties>
     <dependencies>
         <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <version>2.3.0</version>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+            <version>${jaxb-plugin.version}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.aai.schema-service</groupId>
             <artifactId>aai-annotations</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-junit</artifactId>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>junit</groupId>
-                    <artifactId>junit</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.jvnet.jaxb2_commons</groupId>
-            <artifactId>jaxb2-basics</artifactId>
-            <version>${jaxb2-basics.version}</version>
-        </dependency>
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>
             <artifactId>json-simple</artifactId>
             <artifactId>commons-io</artifactId>
             <version>${commons.io.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.jvnet.jaxb</groupId>
+            <artifactId>jaxb-plugins-tools</artifactId>
+            <version>${jaxb-plugin.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter-api</artifactId>
     </dependencies>
     <build>
         <plugins>
+            <!-- This plugin is advanced, well-documentated, currently maintained(supports JDK11, JDK17 and JDK21) and has no CVEs-->
+             <!-- https://github.com/highsource/jaxb-tools -->
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>jaxb2-maven-plugin</artifactId>
-                <version>2.5.0</version>
+                <groupId>org.jvnet.jaxb</groupId>
+                <artifactId>jaxb-maven-plugin</artifactId>
+                <version>${jaxb-plugin.version}</version>
                 <executions>
                     <execution>
                         <id>xjc</id>
                         <goals>
-                            <goal>xjc</goal>
+                            <goal>generate</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
-                            <sources>
-                                <source>${aai.xsd.source}</source>
-                            </sources>
-                            <xjbSources>
-                                <xjbSource>${aai.bindings.source}</xjbSource>
-                            </xjbSources>
-                            <xjcSourceExcludeFilters>
-                                <filter
-                                        implementation="org.codehaus.mojo.jaxb2.shared.filters.pattern.PatternFileFilter">
-                                    <patterns>
-                                        <pattern>edgetagquery\.xsd</pattern>
-                                    </patterns>
-                                </filter>
-                            </xjcSourceExcludeFilters>
+                            <generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
+                            <schemaDirectory>${aai.xsd.source}</schemaDirectory>
+                            <schemaIncludes>
+                                <include>*.xsd</include>
+                            </schemaIncludes>
+                            <bindingDirectory>${aai.bindings.source}</bindingDirectory>
+                            <bindingIncludes>
+                                <include>**/*.xjb</include>
+                            </bindingIncludes>
+                            <schemaIncludes>
+                                <include>**/*.xsd</include>
+                            </schemaIncludes>
+                            <schemaExcludes>
+                                <exclude>edgetagquery.xsd</exclude>
+                            </schemaExcludes>
                             <extension>true</extension>
-                            <arguments>
-                                <argument>-Xannotate</argument>
-                                <argument>-XtoString</argument>
-                            </arguments>
+                            <args>
+                                <arg>-Xannotate</arg>
+                                <arg>-XtoString</arg>
+                            </args>
+                            <plugins>
+                                <plugin>
+                                    <groupId>org.jvnet.jaxb</groupId>
+                                    <artifactId>jaxb-plugins</artifactId>
+                                    <version>${jaxb-plugin.version}</version>
+                                </plugin>
+                                <plugin>
+                                    <groupId>org.jvnet.jaxb</groupId>
+                                    <artifactId>jaxb-plugin-annotate</artifactId>
+                                    <version>${jaxb-plugin.version}</version>
+                                </plugin>
+                            </plugins>
                         </configuration>
                     </execution>
                 </executions>
                 <dependencies>
                     <dependency>
-                        <groupId>org.jvnet.jaxb2_commons</groupId>
-                        <artifactId>jaxb2-basics</artifactId>
-                        <version>${jaxb2-basics.version}</version>
+                        <groupId>org.glassfish.jaxb</groupId>
+                        <artifactId>jaxb-runtime</artifactId>
+                        <version>${jaxb-plugin.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.jvnet.jaxb</groupId>
+                        <artifactId>jaxb-plugins-tools</artifactId>
+                        <version>${jaxb-plugin.version}</version>
                     </dependency>
                     <dependency>
-                        <groupId>org.jvnet.jaxb2_commons</groupId>
-                        <artifactId>jaxb2-basics-annotate</artifactId>
-                        <version>1.0.2</version>
+                        <groupId>org.jvnet.jaxb</groupId>
+                        <artifactId>jaxb-plugins-runtime</artifactId>
+                        <version>${jaxb-plugin.version}</version>
                     </dependency>
                     <dependency>
                         <groupId>org.onap.aai.schema-service</groupId>
         </pluginRepository>
     </pluginRepositories>
     <!-- End of ONAP Specific Repositories -->
-</project>
+</project>
\ No newline at end of file
index 1eb1a59..d30d091 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.openecomp.aai.inventory/v10" xmlns:tns="http://org.openecomp.aai.inventory/v10" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 8b0dca8..061bb1c 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.openecomp.aai.inventory/v11" xmlns:tns="http://org.openecomp.aai.inventory/v11" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 06bc2ae..0495d68 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v12" xmlns:tns="http://org.onap.aai.inventory/v12" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 21b90e3..d5ce7b4 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v13" xmlns:tns="http://org.onap.aai.inventory/v13" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 43f281d..24357d9 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v14" xmlns:tns="http://org.onap.aai.inventory/v14" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index e731fee..4855ad6 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v15" xmlns:tns="http://org.onap.aai.inventory/v15" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 62aa7ed..a33e28a 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v16" xmlns:tns="http://org.onap.aai.inventory/v16" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index f635601..4fad94d 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v17" xmlns:tns="http://org.onap.aai.inventory/v17" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 6f6c148..73c3ea5 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v18" xmlns:tns="http://org.onap.aai.inventory/v18" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index b06c0af..5364280 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v19" xmlns:tns="http://org.onap.aai.inventory/v19" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 7dd1d8f..d856508 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v20" xmlns:tns="http://org.onap.aai.inventory/v20" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 06a62f1..a0df2d5 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v21" xmlns:tns="http://org.onap.aai.inventory/v21" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 9a9d3d3..1ca9334 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v22" xmlns:tns="http://org.onap.aai.inventory/v22" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 6671cde..6914b58 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v23" xmlns:tns="http://org.onap.aai.inventory/v23" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index f616f88..5bf0bf0 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v24" xmlns:tns="http://org.onap.aai.inventory/v24" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 8b3958a..4746860 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v25" xmlns:tns="http://org.onap.aai.inventory/v25" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 56a0ef9..675caac 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v26" xmlns:tns="http://org.onap.aai.inventory/v26" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 689ad51..23d53f9 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v27" xmlns:tns="http://org.onap.aai.inventory/v27" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 58389ac..b910cfe 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v28" xmlns:tns="http://org.onap.aai.inventory/v28" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 2932e70..c909f33 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v29" xmlns:tns="http://org.onap.aai.inventory/v29" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index e105212..5f51a91 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.onap.aai.inventory/v30" xmlns:tns="http://org.onap.aai.inventory/v30" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:complexType name="graph-node">
index 4c7aa6d..da53394 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.openecomp.aai.inventory/v9" xmlns:tns="http://org.openecomp.aai.inventory/v9" xmlns:xs="http://www.w3.org/2001/XMLSchema"
-xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-    jaxb:version="2.1"
-    xmlns:annox="http://annox.dev.java.net"
+xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
+    jaxb:version="3.0"
+    xmlns:annox="urn:jaxb.jvnet.org:annox"
     jaxb:extensionBindingPrefixes="annox">
 
   <xs:element name="inventory-item-data">
index 8d25f99..8e78d8d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <jaxb:bindings
-    version="2.1"
-    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+    version="3.0"
+    xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
     xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
     <jaxb:globalBindings>
index c09aae2..9b873d8 100644 (file)
@@ -26,7 +26,6 @@ import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -53,7 +52,7 @@ public class ValidateEdgeRulesTest {
     @Test
     public void testOnlyOneDefaultPerEdgeRuleBetweenTwoNodetypes()
         throws IOException, ParseException {
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         List<File> subDirs =
             Arrays.asList(currentRelativePath.toFile().listFiles(File::isDirectory));
         List<String> multipleDefaultsPerList = new ArrayList<>();
@@ -147,7 +146,7 @@ public class ValidateEdgeRulesTest {
             to = temp;
         }
 
-        String edgeInfo = String.format("%s%s%s[%s]%s", from,
+        String edgeInfo = "%s%s%s[%s]%s".formatted(from,
             ((direction.equals("OUT")) ? "->" : "<-"), to, label, isDefault);
 
         if ("false".equals(isDefault)) {
index 60619f1..f255de0 100644 (file)
@@ -25,7 +25,6 @@ import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.*;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -476,7 +475,7 @@ public class ValidateOXMTest {
     @Test
     public void testSchemaValidationAgainstEdgeRules() throws XPathExpressionException, IOException,
         SAXException, ParserConfigurationException, ParseException {
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         List<File> subDirs =
             Arrays.asList(currentRelativePath.toFile().listFiles(File::isDirectory));
         boolean success = true;
@@ -777,7 +776,7 @@ public class ValidateOXMTest {
     }
 
     private List<File> getFiles() {
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         return FileUtils
             .listFiles(currentRelativePath.toFile(), new RegexFileFilter(".*\\.xml"),
                 DirectoryFileFilter.DIRECTORY)
@@ -788,7 +787,7 @@ public class ValidateOXMTest {
 
     private List<File> getOxmSchemaFiles() {
 
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         return FileUtils
             .listFiles(currentRelativePath.toFile(), new RegexFileFilter(".*\\.xml"),
                 DirectoryFileFilter.DIRECTORY)
@@ -801,7 +800,7 @@ public class ValidateOXMTest {
 
     private List<File> getOnapOxmSchemaFiles() {
 
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         return FileUtils
             .listFiles(currentRelativePath.toFile(), new RegexFileFilter(".*\\.xml"),
                 DirectoryFileFilter.DIRECTORY)
@@ -812,7 +811,7 @@ public class ValidateOXMTest {
     }
 
     private List<File> getAaiSchemaOxmFiles() {
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         return FileUtils
             .listFiles(currentRelativePath.toFile(), new RegexFileFilter(".*\\.xml"),
                 DirectoryFileFilter.DIRECTORY)
@@ -822,7 +821,7 @@ public class ValidateOXMTest {
     }
 
     private List<File> getDbEdgeRulesFiles() {
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         return FileUtils
             .listFiles(currentRelativePath.toFile(), new RegexFileFilter(".*\\.json"),
                 DirectoryFileFilter.DIRECTORY)
@@ -839,7 +838,7 @@ public class ValidateOXMTest {
     private List<File> getLatestDbEdgeRulesFiles(String fileDirectory) {
         List<String> latest = new ArrayList<>();
         String currentRelativePath =
-            Paths.get("../aai-schema/src/main/resources/" + fileDirectory + "/dbedgerules")
+            Path.of("../aai-schema/src/main/resources/" + fileDirectory + "/dbedgerules")
                 .toAbsolutePath().toString();
         File[] oxms = new File(currentRelativePath).listFiles(File::isDirectory);
         Arrays.stream(oxms).map(File::getAbsolutePath).max(new Comparator<String>() {
@@ -869,7 +868,7 @@ public class ValidateOXMTest {
      */
     private List<File> getLatestFiles() {
         List<String> latest = new ArrayList<>();
-        Path currentRelativePath = Paths.get("../aai-schema/src/main/resources/").toAbsolutePath();
+        Path currentRelativePath = Path.of("../aai-schema/src/main/resources/").toAbsolutePath();
         List<File> subDirs =
             Arrays.asList(currentRelativePath.toFile().listFiles(File::isDirectory));
         for (File subDir : subDirs) {
@@ -904,7 +903,7 @@ public class ValidateOXMTest {
     private List<File> getLatestFiles(String fileDirectory) {
         List<String> latest = new ArrayList<>();
         String currentRelativePath =
-            Paths.get("../aai-schema/src/main/resources/" + fileDirectory + "/oxm").toAbsolutePath()
+            Path.of("../aai-schema/src/main/resources/" + fileDirectory + "/oxm").toAbsolutePath()
                 .toString();
         File[] oxms = new File(currentRelativePath).listFiles(File::isDirectory);
         Arrays.stream(oxms).map(File::getAbsolutePath).max(new Comparator<String>() {
diff --git a/pom.xml b/pom.xml
index 56ffff3..242a089 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
 -->
 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.15.5</version>
+        <version>1.16.1</version>
     </parent>
     <groupId>org.onap.aai.schema-service</groupId>
     <artifactId>schema-service</artifactId>
-    <version>1.13.0-SNAPSHOT</version>
+    <version>1.13.1-SNAPSHOT</version>
     <name>aai-schema-service</name>
     <packaging>pom</packaging>
     <modules>
             Ideally this can be overwritten at runtime per internal environment specific values at runtime
         -->
         <nexusproxy>https://nexus.onap.org</nexusproxy>
-        <site.path>/content/sites/site/org/onap/aai/resources/${project.artifactId}/${project.version}</site.path>
+        <site.path>
+            /content/sites/site/org/onap/aai/resources/${project.artifactId}/${project.version}</site.path>
         <release.path>/content/repositories/releases/</release.path>
         <snapshot.path>/content/repositories/snapshots/</snapshot.path>
         <!-- GMaven plugin uses this property to figure out the name of the docker tag -->
         <aai.project.version>${project.version}</aai.project.version>
         <checkstyle.skip>false</checkstyle.skip>
-        <aai.common.version>1.15.5</aai.common.version>
-        <spring-cloud.version>2021.0.9</spring-cloud.version>
+        <aai.common.version>1.16.1</aai.common.version>
+        <!-- <spring-cloud.version>2022.0.5</spring-cloud.version> -->
     </properties>
     <dependencyManagement>
         <dependencies>
             <dependency>
                 <groupId>org.eclipse.persistence</groupId>
                 <artifactId>eclipselink</artifactId>
-                <version>2.7.15</version>
+                <version>4.0.7</version>
             </dependency>
             <dependency>
                 <groupId>org.eclipse.persistence</groupId>
                 <artifactId>org.eclipse.persistence.moxy</artifactId>
-                <version>2.7.15</version>
+                <version>4.0.7</version>
             </dependency>
-            <dependency>
+            <!-- <dependency>
                 <groupId>org.springframework.cloud</groupId>
                 <artifactId>spring-cloud-dependencies</artifactId>
                 <version>${spring-cloud.version}</version>
                 <type>pom</type>
                 <scope>import</scope>
-            </dependency>
+            </dependency> -->
         </dependencies>
     </dependencyManagement>
     <build>
             <url>dav:${nexusproxy}${site.path}</url>
         </site>
     </distributionManagement>
-</project>
+</project>
\ No newline at end of file
index 3dda49f..ddff0da 100644 (file)
@@ -4,7 +4,7 @@
 # because they are used in Jenkins, whose plug-in doesn't support
 major_version=1
 minor_version=13
-patch_version=0
+patch_version=1
 
 base_version=${major_version}.${minor_version}.${patch_version}
 # Release must be completed with GIT information # in Jenkins