aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>2020-08-13 15:12:27 +0530
committermukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>2020-08-13 15:12:27 +0530
commit51cdc697d7384bb33c3c11e377943681c8e4de0e (patch)
tree948d63abde18758f76db28ac0a779b1835cda6df
parent0b025460c8dc133fe0b73d8c6b7c571d0a35d743 (diff)
Upgrade java version from 8 to 11
Issue-ID: SO-3082 Signed-off-by: mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com> Change-Id: I54965e03c0674be799d78be9ede1ac2dd7dc131a
-rw-r--r--adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters2
-rw-r--r--common/src/test/java/org/onap/so/client/HttpClientTest.java8
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image2
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-nssmf-adapter2
-rw-r--r--pom.xml17
-rw-r--r--so-monitoring/pom.xml4
-rw-r--r--so-monitoring/so-monitoring-handler/pom.xml2
-rw-r--r--so-simulator/src/main/docker/Dockerfile2
8 files changed, 22 insertions, 17 deletions
diff --git a/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters b/adapters/mso-openstack-adapters/Deployment/Dockerfile.adapters
index 4d3e36ed9c..2c04ea221f 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
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..db57688dc1 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 adoptopenjdk/openjdk11:jre-11.0.8_10-alpine
ARG http_proxy
ARG https_proxy
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-nssmf-adapter b/packages/docker/src/main/docker/docker-files/Dockerfile.so-nssmf-adapter
index ef82da4a12..19368fb597 100644
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-nssmf-adapter
+++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-nssmf-adapter
@@ -12,7 +12,7 @@ RUN mkdir -p /app/config
RUN mkdir -p /app/certificates
RUN mkdir -p /app/logs
RUN mkdir -p /app/ca-certificates
-RUN apk update && apk add apache2-utils -y
+RUN apk update && apk add apache2-utils
COPY maven/app.jar /app
COPY configs/logging/logback-spring.xml /app
diff --git a/pom.xml b/pom.xml
index 45f60783b3..2341f772af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.language>java</sonar.language>
+ <java.version>11</java.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<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>
@@ -242,6 +243,10 @@
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
+ <forceJavacCompilerUse>true</forceJavacCompilerUse>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ <release>${java.version}</release>
</configuration>
</plugin>
<plugin>
@@ -916,7 +921,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
- <version>1.23</version>
+ <version>1.26</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
@@ -1005,8 +1010,8 @@
<version>3.8.0</version>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
- <source>1.8</source>
- <target>1.8</target>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
</configuration>
</plugin>
</plugins>
@@ -1028,9 +1033,9 @@
<version>3.8.0</version>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
- <source>11</source>
- <target>11</target>
- <release>11</release>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ <release>${java.version}</release>
</configuration>
</plugin>
</plugins>
diff --git a/so-monitoring/pom.xml b/so-monitoring/pom.xml
index f2448ab2b2..e93de40262 100644
--- a/so-monitoring/pom.xml
+++ b/so-monitoring/pom.xml
@@ -34,8 +34,8 @@
<name>${project.artifactId}</name>
<properties>
- <java.version>1.8</java.version>
- <version.java.compiler>1.8</version.java.compiler>
+ <java.version>11</java.version>
+ <version.java.compiler>11</version.java.compiler>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
diff --git a/so-monitoring/so-monitoring-handler/pom.xml b/so-monitoring/so-monitoring-handler/pom.xml
index f591a079e3..626f9f7352 100644
--- a/so-monitoring/so-monitoring-handler/pom.xml
+++ b/so-monitoring/so-monitoring-handler/pom.xml
@@ -79,7 +79,7 @@
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
- <version>2.5.1</version>
+ <version>3.4.1</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/so-simulator/src/main/docker/Dockerfile b/so-simulator/src/main/docker/Dockerfile
index 8fa8dc75e9..2fab854f34 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