From 258be88cb2a098dc526ec294b44b2859a6a845b7 Mon Sep 17 00:00:00 2001 From: arun chapagain Date: Thu, 6 Aug 2020 15:44:12 +0530 Subject: changes for java 11 upgradation Issue-ID: SO-3082 Signed-off-by: arun chapagain Change-Id: Icb14f1a29d06d828307f0acc23d4414fecbbfaa3 --- adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters | 4 ++-- common/src/test/java/org/onap/so/client/HttpClientTest.java | 8 ++++---- .../docker/src/main/docker/docker-files/Dockerfile.so-base-image | 2 +- pom.xml | 7 ++++--- so-monitoring/pom.xml | 4 ++-- so-monitoring/so-monitoring-handler/pom.xml | 2 +- so-monitoring/so-monitoring-ui/pom.xml | 2 +- so-simulator/src/main/docker/Dockerfile | 4 ++-- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters b/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters index 4d3e36ed9c..8bc2ea6f83 100644 --- a/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters +++ b/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters @@ -1,4 +1,4 @@ -FROM openjdk:8-jdk-alpine +FROM onap/integration-java11:7.0.0 MAINTAINER mc4615@att.com EXPOSE 8080 ENV APP_HOME /home/$USER_NAME/app @@ -37,4 +37,4 @@ ENTRYPOINT ["java","-jar","-Dspring.profiles.active=dev","mso-openstack-adapters # OR for interactive mode (-it), run the following command # docker run -it --net=mso_network -p 8080:8080 --name mchan mercechan/msoadapters # COMMANDS ######## -######### README ######### \ No newline at end of file +######### README ######### diff --git a/common/src/test/java/org/onap/so/client/HttpClientTest.java b/common/src/test/java/org/onap/so/client/HttpClientTest.java index a01e2bb812..e9e8fe7853 100644 --- a/common/src/test/java/org/onap/so/client/HttpClientTest.java +++ b/common/src/test/java/org/onap/so/client/HttpClientTest.java @@ -40,7 +40,7 @@ public class HttpClientTest { private final HttpClientFactory httpClientFactory = new HttpClientFactory(); @Rule - public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicHttpsPort()); + public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort().dynamicHttpsPort()); @Test public void testPost_success() throws MalformedURLException { @@ -48,7 +48,7 @@ public class HttpClientTest { wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post")) .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(""))); - URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post"); + URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post"); HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN); client.addBasicAuthHeader( @@ -67,7 +67,7 @@ public class HttpClientTest { wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post")) .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(""))); - URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post"); + URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post"); HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN); client.addAdditionalHeader("Accept", "application/json"); @@ -85,7 +85,7 @@ public class HttpClientTest { wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post")) .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(""))); - URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post"); + URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post"); HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN); client.addBasicAuthHeader("", "12345"); diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image index e3eb954e1e..bf4a2fe01f 100644 --- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image @@ -1,4 +1,4 @@ -FROM docker.io/openjdk:8-jdk-alpine +FROM docker.io/onap/integration-java11:7.0.0 ARG http_proxy ARG https_proxy diff --git a/pom.xml b/pom.xml index 68559c99c4..fbb5beeabc 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ UTF-8 UTF-8 java + 11 jacoco ${project.build.directory}/surefire-reports ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml @@ -329,7 +330,7 @@ 4.20 mso-${project.version} - 1.8 + ${java.version} @@ -1004,8 +1005,8 @@ 3.8.0 true - 1.8 - 1.8 + ${java.version} + ${java.version} diff --git a/so-monitoring/pom.xml b/so-monitoring/pom.xml index 206a0f2851..a86ffb2fd0 100644 --- a/so-monitoring/pom.xml +++ b/so-monitoring/pom.xml @@ -34,8 +34,8 @@ ${project.artifactId} - 1.8 - 1.8 + 11 + 11 UTF-8 UTF-8 diff --git a/so-monitoring/so-monitoring-handler/pom.xml b/so-monitoring/so-monitoring-handler/pom.xml index 68f8c89608..f3dabc3f95 100644 --- a/so-monitoring/so-monitoring-handler/pom.xml +++ b/so-monitoring/so-monitoring-handler/pom.xml @@ -79,7 +79,7 @@ nl.jqno.equalsverifier equalsverifier - 2.5.1 + 3.4.1 test diff --git a/so-monitoring/so-monitoring-ui/pom.xml b/so-monitoring/so-monitoring-ui/pom.xml index 6488c7d7df..0ef608a23a 100644 --- a/so-monitoring/so-monitoring-ui/pom.xml +++ b/so-monitoring/so-monitoring-ui/pom.xml @@ -49,7 +49,7 @@ generate-resources - v10.8.0 + v10.15.3 v1.7.0 diff --git a/so-simulator/src/main/docker/Dockerfile b/so-simulator/src/main/docker/Dockerfile index 8fa8dc75e9..a64ec39f8a 100644 --- a/so-simulator/src/main/docker/Dockerfile +++ b/so-simulator/src/main/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/openjdk:8-jdk-alpine +FROM docker.io/openjdk:11-jre-slim #Create User so RUN addgroup -g 1000 so && adduser -S -u 1000 -G so so @@ -21,4 +21,4 @@ RUN chown -R so:so /app USER so -ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app/app.jar"] \ No newline at end of file +ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app/app.jar"] -- cgit 1.2.3-korg