Migrate from java 8 to java 11 02/111502/1
authorBogumil Zebek <bogumil.zebek@nokia.com>
Fri, 21 Aug 2020 06:37:36 +0000 (08:37 +0200)
committerZebek Bogumil <bogumil.zebek@nokia.com>
Fri, 21 Aug 2020 06:37:36 +0000 (08:37 +0200)
- update Dockerfile
- update documentation

Issue-ID: VNFSDK-632
Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com>
Change-Id: Ibdd8a17de96e58bc86ed79b8a7e8fa4f3fa2919d

README.md
pom.xml
vnfmarket-be/deployment/docker/docker-refrepo/pom.xml
vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
vnfmarket-be/pom.xml
vnfmarket-be/vnf-sdk-marketplace/pom.xml

index efe41b8..2f1d9b1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -40,3 +40,34 @@ Docker image building
 ```
     mvn clean package -Pdocker -Dpush.docker.image=false
 ```
+
+Run refrepo locally
+======================
+```
+    docker run --name refrepo -p 8702:8702 nexus3.onap.org:10003/onap/vnfsdk/refrepo:latest
+```
+
+Refrepo container - important folders
+=====================================
+To browse folder you must enter to the refrepo container, so first run docker container locally (see above section) then execute
+```
+    docker exec -it refrepo bash
+```
+
+In the running container you will find a few important folders:
+- /service/logs - it contains vnfmarket application logs
+- /opt/vtp/logs - it contains oclip logs
+- /opt/vtp/lib - it contains oclip dependencies, such as: validation-csar-XXX.jar file
+
+Verify validation logic 
+=============================
+If you want to verify validation logic (validation-csar project), first you need to build validation-csar project,
+next remove existing validation-csar.jar from /opt/vpt/lib folder in the container 
+and then copy the new validation-csar jar file into the /opt/vpt/lib folder in the container and restart this container.
+
+```
+    1. docker exec -it refrepo bash
+    2. Inside the container: rm /opt/vtp/lib/ validation-csar-XXX.jar
+    3. docker cp validation-csar.jar refrepo:/opt/vtp/lib
+    4. docker restart refrepo
+```
diff --git a/pom.xml b/pom.xml
index f7a82ac..c24e2d5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -3,6 +3,7 @@
 
     Copyright (C) 2018, Huawei Technologies, Ltd.
     Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+    Copyright (C) 2020 Nokia
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -31,8 +32,9 @@
     <version>1.5.1-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>vnfsdk-refrepo</name>
-       
+
        <properties>
+        <java.version>11</java.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <sonar.language>java</sonar.language>
         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
     </properties>
 
-    <modules>     
+    <modules>
         <module>vnfmarket-be</module>
     </modules>
-       
+
        <build>
         <plugins>
             <plugin>
@@ -82,5 +84,5 @@
             </properties>
         </profile>
     </profiles>
-       
+
 </project>
index 23274d4..745b6fa 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
     Copyright 2017 Huawei Technologies Co., Ltd.
+    Copyright 2020 Nokia
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
                                 </resource>
                             </resources>
                         </configuration>
-
+                        <dependencies>
+                            <dependency>
+                                <groupId>javax.activation</groupId>
+                                <artifactId>javax.activation-api</artifactId>
+                                <version>${javax.activation-api.version}</version>
+                            </dependency>
+                            <dependency>
+                                <groupId>javax.xml.bind</groupId>
+                                <artifactId>jaxb-api</artifactId>
+                                <version>${jaxb-api.version}</version>
+                            </dependency>
+                        </dependencies>
                         <executions>
                             <execution>
                                 <id>build-image</id>
index 65812d6..f238897 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright 2020 Huawei Technologies Co., Ltd.
+# Copyright 2020 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ WORKDIR /service
 
 
 
-ENV JAVA_VERSION_MAJOR=8 \
+ENV JAVA_VERSION_MAJOR=11 \
     JAVA_VERSION_MINOR=111 \
     JAVA_HOME=/usr/lib/jvm/default-jvm \
     PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/
@@ -44,11 +45,11 @@ RUN add-apt-repository ppa:openjdk-r/ppa -y && \
     # upgrade OS
     apt-get -y dist-upgrade && \
     # Make info file about this build
-    printf "Build of java:openjdk-8-jre-headless, date: %s\n"  `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /service/java && \
+    printf "Build of java:openjdk-11-jre-headless, date: %s\n"  `date -u +"%Y-%m-%dT%H:%M:%SZ"` > /service/java && \
     # install application
-    apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
+    apt-get install -y --no-install-recommends openjdk-11-jre-headless && \
     # fix default setting
-    ln -s java-8-openjdk-amd64  /usr/lib/jvm/default-jvm && \
+    ln -s java-11-openjdk-amd64  /usr/lib/jvm/default-jvm && \
     # remove apt cache from image
     apt-get clean all
 
index 240a9d6..47b1cb3 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   Copyright 2016-2018 Huawei Technologies Co., Ltd.
+  Copyright 2020 Nokia
+
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
+
       http://www.apache.org/licenses/LICENSE-2.0
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        <scm>
         <tag>HEAD</tag>
     </scm>
-      <modules>
+
+    <properties>
+        <javax.activation-api.version>1.2.0</javax.activation-api.version>
+        <jaxb-api.version>2.3.1</jaxb-api.version>
+    </properties>
+
+    <modules>
           <module>vnf-sdk-marketplace</module>
           <module>deployment</module>
     </modules>
index 41139fb..d1bd5af 100644 (file)
 
 
     <dependencies>
-          <dependency>
-             <groupId>javax.xml.bind</groupId>
-             <artifactId>jaxb-api</artifactId>
-             <version>2.3.1</version>
-          </dependency>
     <!--  oclip -->
           <dependency>
             <groupId>org.onap.cli</groupId>
@@ -189,6 +184,16 @@ due to Security Issues:- CVE-2019-10241,CVE-2019-10247,CVE-2019-10246
             <artifactId>mybatis</artifactId>
             <version>3.2.7</version>
         </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>javax.activation-api</artifactId>
+            <version>${javax.activation-api.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>${jaxb-api.version}</version>
+        </dependency>
         <!-- UT -->
         <dependency>
             <groupId>junit</groupId>