diff options
16 files changed, 35 insertions, 64 deletions
diff --git a/intentanalysis/pom.xml b/intentanalysis/pom.xml index c30e931..6851e49 100644 --- a/intentanalysis/pom.xml +++ b/intentanalysis/pom.xml @@ -32,7 +32,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <java.version>11</java.version> + <java.version>17</java.version> <sonar.language>java</sonar.language> <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> @@ -48,15 +48,15 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-framework-bom</artifactId> - <version>5.3.13</version> + <version>6.0.12</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <!-- Import dependency management from Spring Boot --> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>2.5.2</version> + <artifactId>spring-boot-dependencies</artifactId> + <version>3.0.11</version> <type>pom</type> <scope>import</scope> </dependency> @@ -78,13 +78,12 @@ <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> - <version>1.2.11</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> - <version>1.18.24</version> + <version>1.18.30</version> </dependency> <!-- swagger --> @@ -101,28 +100,27 @@ <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> - <version>2.2.0</version> + <version>3.0.1</version> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.5.1</version> + <version>42.6.0</version> <scope>runtime</scope> </dependency> <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>2.1</version> + <groupId>jakarta.ws.rs</groupId> + <artifactId>jakarta.ws.rs-api</artifactId> + <version>3.1.0</version> </dependency> <dependency> <groupId>org.eclipse.persistence</groupId> - <artifactId>javax.persistence</artifactId> - <version>2.1.0</version> + <artifactId>jakarta.persistence</artifactId> + <version>2.2.3</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.13</version> <scope>test</scope> </dependency> <dependency> @@ -150,18 +148,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.jmockit</groupId> - <artifactId>jmockit</artifactId> - <version>1.19</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jmockit</groupId> - <artifactId>jmockit-coverage</artifactId> - <version>1.19</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>4.4.0</version> @@ -169,7 +155,7 @@ <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> - <version>2.0.206</version> + <version>2.2.220</version> <scope>test</scope> </dependency> <dependency> @@ -198,11 +184,6 @@ <version>2.6</version> </dependency> <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.10</version> - </dependency> - <dependency> <groupId>com.mikesamuel</groupId> <artifactId>json-sanitizer</artifactId> <version>1.2.2</version> @@ -242,7 +223,7 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> - <version>1.5.3.RELEASE</version> + <version>3.0.11</version> <configuration> <executable>true</executable> </configuration> @@ -257,16 +238,16 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.3</version> + <version>3.11.0</version> <configuration> - <source>1.8</source> - <target>1.8</target> + <source>17</source> + <target>17</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.19</version> + <version>2.22.2</version> <configuration> <testFailureIgnore>true</testFailureIgnore> <includes> diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java index 3487b4b..04416cc 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java @@ -41,7 +41,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/CLLAssuranceIntentManagementFunction.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/CLLAssuranceIntentManagementFunction.java index 6135195..4d010eb 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/CLLAssuranceIntentManagementFunction.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllassuranceIntentmgt/CLLAssuranceIntentManagementFunction.java @@ -34,7 +34,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.LocalDateTime; import java.util.concurrent.FutureTask; diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/clldeliveryIntentmgt/CLLDeliveryIntentManagementFunction.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/clldeliveryIntentmgt/CLLDeliveryIntentManagementFunction.java index 6286e60..81e2bf7 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/clldeliveryIntentmgt/CLLDeliveryIntentManagementFunction.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/clldeliveryIntentmgt/CLLDeliveryIntentManagementFunction.java @@ -34,7 +34,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.time.LocalDateTime; import java.util.concurrent.FutureTask; diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IMFRegInfoController.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IMFRegInfoController.java index 73c3cb1..4d80c15 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IMFRegInfoController.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IMFRegInfoController.java @@ -25,7 +25,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; @RestController diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/FormatIntentInputManagementFunction.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/FormatIntentInputManagementFunction.java index de30c3d..440b511 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/FormatIntentInputManagementFunction.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/FormatIntentInputManagementFunction.java @@ -35,7 +35,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; @Slf4j diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentManagementFunction.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentManagementFunction.java index c3c152a..22b6f21 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentManagementFunction.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentManagementFunction.java @@ -35,7 +35,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java index c922095..b623f42 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java @@ -31,7 +31,7 @@ import retrofit2.Retrofit; import retrofit2.converter.jackson.JacksonConverterFactory; import javax.net.ssl.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.BufferedReader; import java.io.IOException; import java.security.SecureRandom; diff --git a/intentanalysis/src/main/resources/application.yaml b/intentanalysis/src/main/resources/application.yaml index fca8205..29adf13 100644 --- a/intentanalysis/src/main/resources/application.yaml +++ b/intentanalysis/src/main/resources/application.yaml @@ -3,6 +3,8 @@ server: servlet: context-path: /api/usecaseui-intent-analysis/v1 spring: + main: + allow-circular-references: true datasource: url: jdbc:postgresql://${POSTGRES_IP:127.0.0.1}:${POSTGRES_PORT:5432}/${POSTGRES_DB_NAME} username: ${POSTGRES_USERNAME} diff --git a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/IntentAnalysisApplicationTests.java b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/IntentAnalysisApplicationTests.java index 965ec6d..a725be5 100644 --- a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/IntentAnalysisApplicationTests.java +++ b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/IntentAnalysisApplicationTests.java @@ -15,10 +15,10 @@ package org.onap.usecaseui.intentanalysis; import java.io.IOException; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.mybatis.spring.annotation.MapperScan; import org.onap.usecaseui.intentanalysis.util.SpringContextUtil; import org.springframework.boot.SpringApplication; diff --git a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java index 2f9cf20..4786ee9 100644 --- a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java +++ b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java @@ -21,7 +21,6 @@ import static org.mockito.Mockito.when; import java.io.IOException; -import mockit.MockUp; import okhttp3.MediaType; import okhttp3.ResponseBody; import org.junit.Assert; @@ -60,8 +59,6 @@ public class PolicyServiceTest { private PolicyAPICall policyAPICall; - private MockUp mockup; - @Test public void testCreateAndDeployCLLPolicySuccess() throws IOException { mockUpPolicyApiCall(0); diff --git a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/so/SOServiceTest.java b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/so/SOServiceTest.java index 727c47f..a14a1c1 100644 --- a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/so/SOServiceTest.java +++ b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/so/SOServiceTest.java @@ -22,22 +22,14 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.*; - -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import java.io.IOException; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import okhttp3.ResponseBody; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import mockit.Mock; -import org.mockito.junit.MockitoJUnitRunner; import org.onap.usecaseui.intentanalysis.IntentAnalysisApplicationTests; import org.onap.usecaseui.intentanalysis.adapters.aai.apicall.AAIAPICall; -import org.onap.usecaseui.intentanalysis.adapters.policy.apicall.PolicyAPICall; import org.onap.usecaseui.intentanalysis.adapters.so.apicall.SOAPICall; import org.onap.usecaseui.intentanalysis.adapters.so.impl.SOServiceImpl; import org.onap.usecaseui.intentanalysis.bean.models.CCVPNInstance; @@ -45,8 +37,6 @@ import org.onap.usecaseui.intentanalysis.util.TestCall; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; -import retrofit2.Response; -import org.mockito.MockitoAnnotations; @SpringBootTest(classes = IntentAnalysisApplicationTests.class) @RunWith(SpringRunner.class) diff --git a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/util/RestFulServicesTest.java b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/util/RestFulServicesTest.java index b19e9a1..605bf6f 100644 --- a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/util/RestFulServicesTest.java +++ b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/util/RestFulServicesTest.java @@ -15,7 +15,7 @@ package org.onap.usecaseui.intentanalysis.util; import java.io.IOException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import okhttp3.RequestBody; import org.junit.Assert; diff --git a/intentanalysis/src/test/resources/application.yaml b/intentanalysis/src/test/resources/application.yaml index 6cbba91..641ac82 100644 --- a/intentanalysis/src/test/resources/application.yaml +++ b/intentanalysis/src/test/resources/application.yaml @@ -31,6 +31,7 @@ spring: driver-class-name: org.h2.Driver main: allow-bean-definition-overriding: true + allow-circular-references: true sql: init: schema-locations: classpath:intentdb-test-init.sql diff --git a/standalone/pom.xml b/standalone/pom.xml index 211f70b..5422410 100644 --- a/standalone/pom.xml +++ b/standalone/pom.xml @@ -33,7 +33,7 @@ <intent.version>13.0.0</intent.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <java.version>1.8</java.version> + <java.version>17</java.version> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> <linux64outputdir>target/assembly/linux64</linux64outputdir> <dockeroutput>target/version/${intent.version}</dockeroutput> diff --git a/standalone/src/main/assembly/Dockerfile b/standalone/src/main/assembly/Dockerfile index 3fcdf93..ee0b715 100644 --- a/standalone/src/main/assembly/Dockerfile +++ b/standalone/src/main/assembly/Dockerfile @@ -1,4 +1,4 @@ -FROM nexus3.onap.org:10001/onap/integration-java11:9.0.0 +FROM nexus3.onap.org:10001/onap/integration-java17:12.0.0 USER root |