From 4656c4f34b7eef4c91ecaddee5efc48644a3333b Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Mon, 30 Oct 2023 18:20:49 +0800 Subject: Updated Direct Dependencies and Removed oparent Issue-ID: HOLMES-633 Signed-off-by: Guangrong Fu Change-Id: Id61086b6eac746cd7752eeb8b2f60474bda6d024 --- pom.xml | 66 ++++++---------------- rulemgt-standalone/pom.xml | 3 +- rulemgt-standalone/src/main/assembly/Dockerfile | 17 +++--- rulemgt-standalone/src/main/assembly/bin/initDB.sh | 4 +- rulemgt-standalone/src/main/assembly/bin/run.sh | 5 +- rulemgt-standalone/src/main/assembly/bin/stop.sh | 4 +- .../src/main/assembly/nginx-http.conf | 2 +- .../src/main/assembly/nginx-https.conf | 2 +- rulemgt/pom.xml | 24 ++++++-- .../java/org/onap/holmes/rulemgt/Initializer.java | 8 +-- .../holmes/rulemgt/resources/RuleMgtResources.java | 2 +- rulemgt/src/main/resources/logback-spring.xml | 10 ++-- .../org/onap/holmes/rulemgt/InitializerTest.java | 4 +- .../rulemgt/resources/RuleMgtResourcesTest.java | 2 +- 14 files changed, 68 insertions(+), 85 deletions(-) diff --git a/pom.xml b/pom.xml index 87df7c3..f7a7dd9 100644 --- a/pom.xml +++ b/pom.xml @@ -17,11 +17,6 @@ 4.0.0 - - org.onap.oparent - oparent - 3.0.0 - org.onap.holmes.rule-management holmes-rulemgt-parent @@ -45,16 +40,24 @@ ${project.artifactId}-${project.version} 3.0.5 - 2.7.2 + 3.1.4 9.4.18.v20190429 2.0.9 3.19.0 - 1.7.25 + 2.0.9 3.1.0 linux64 target/assembly/${linux64id} target/version + + 0.8.5 + 3.2 + jacoco + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + ${basedir}/src/main/resources/swagger.properties + ${basedir}/src/main/resources/swagger.json @@ -94,49 +97,10 @@ jdbi3-sqlobject ${jdbi.version} - - org.onap.msb.java-sdk - msb-java-sdk - 1.2.5 - - - ch.qos.logback - logback-classic - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-core - - - com.squareup.okhttp3 - okhttp - - - org.eclipse.jetty - jetty-server - - - org.checkerframework - checker-qual - - - com.squareup.retrofit2 - retrofit - - - org.apache.httpcomponents - httpclient - - - org.onap.holmes.common holmes-actions - 1.4.5 + 1.4.7 io.swagger @@ -153,6 +117,12 @@ jakarta.ws.rs-api ${jakarta.ws.rs.version} + + jakarta.servlet + jakarta.servlet-api + 6.0.0 + provided + com.squareup.okhttp3 okhttp @@ -161,7 +131,7 @@ org.projectlombok lombok - 1.18.4 + 1.18.28 org.postgresql diff --git a/rulemgt-standalone/pom.xml b/rulemgt-standalone/pom.xml index e80c175..bcabe2f 100644 --- a/rulemgt-standalone/pom.xml +++ b/rulemgt-standalone/pom.xml @@ -176,6 +176,7 @@ linux64 + gnu linux64-assembly.xml @@ -184,7 +185,7 @@ package - attached + single diff --git a/rulemgt-standalone/src/main/assembly/Dockerfile b/rulemgt-standalone/src/main/assembly/Dockerfile index 198d0ef..b03daa0 100644 --- a/rulemgt-standalone/src/main/assembly/Dockerfile +++ b/rulemgt-standalone/src/main/assembly/Dockerfile @@ -1,4 +1,4 @@ -FROM onap/integration-java11:7.0.0 +FROM onap/integration-java17:12.0.0 MAINTAINER "Guangrong Fu" @@ -10,24 +10,23 @@ USER root EXPOSE 9101 9104 9201 ENV HOSTNAME=holmes-rule-mgmt \ - LANG=C.UTF-8 + LANG=C.UTF-8 \ + PG_VERSION=12.2-r0 -RUN apt-get upgrade \ - && apt-get update \ - && apt-get install -y curl postgresql-client-11 nginx +RUN apk update \ + && apk add --no-cache curl postgresql-client nginx \ + && mkdir -p /opt/onap ADD holmes-rulemgt-standalone-*-linux64.tar.gz /opt/onap/ -ADD holmes-rulemgt-frontend-*.tar.gz /usr/share/nginx/html/ +ADD holmes-rulemgt-frontend-*.tar.gz /var/lib/nginx/html/ ADD nginx-https.conf /etc/nginx/conf.d/ ADD nginx-http.conf /etc/nginx/conf.d/ ADD holmes-frontend.key /etc/ssl/private/ ADD holmes-frontend-selfsigned.crt /etc/ssl/certs/ ADD dhparam.pem /etc/ssl/certs/ -RUN mkdir -p /usr/share/nginx/logs \ - && chmod -R 777 /usr/share/nginx/ \ - && chmod -R 777 /var/lib/nginx/ \ +RUN chmod -R 777 /var/lib/nginx/ \ && chmod -R 755 /etc/ssl/private/ \ && chmod -R 755 /etc/ssl/certs/ \ && chmod -R 777 /etc/nginx/conf.d/ \ diff --git a/rulemgt-standalone/src/main/assembly/bin/initDB.sh b/rulemgt-standalone/src/main/assembly/bin/initDB.sh index c43f3e9..cb9dde9 100644 --- a/rulemgt-standalone/src/main/assembly/bin/initDB.sh +++ b/rulemgt-standalone/src/main/assembly/bin/initDB.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # -# Copyright 2017-2021 ZTE Corporation. +# Copyright 2017-2023 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/rulemgt-standalone/src/main/assembly/bin/run.sh b/rulemgt-standalone/src/main/assembly/bin/run.sh index 03e00a6..18a3c9a 100644 --- a/rulemgt-standalone/src/main/assembly/bin/run.sh +++ b/rulemgt-standalone/src/main/assembly/bin/run.sh @@ -1,7 +1,6 @@ -#!/usr/bin/env bash - +#!/usr/bin/env sh # -# Copyright 2017-2022 ZTE Corporation. +# Copyright 2017-2023 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/rulemgt-standalone/src/main/assembly/bin/stop.sh b/rulemgt-standalone/src/main/assembly/bin/stop.sh index ade940d..106ef23 100644 --- a/rulemgt-standalone/src/main/assembly/bin/stop.sh +++ b/rulemgt-standalone/src/main/assembly/bin/stop.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # -# Copyright 2017-2021 ZTE Corporation. +# Copyright 2017-2023 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/rulemgt-standalone/src/main/assembly/nginx-http.conf b/rulemgt-standalone/src/main/assembly/nginx-http.conf index 6c49c87..0b0224d 100644 --- a/rulemgt-standalone/src/main/assembly/nginx-http.conf +++ b/rulemgt-standalone/src/main/assembly/nginx-http.conf @@ -32,7 +32,7 @@ http { server_name _; location / { - root /usr/share/nginx/html; + root /var/lib/nginx/html; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; diff --git a/rulemgt-standalone/src/main/assembly/nginx-https.conf b/rulemgt-standalone/src/main/assembly/nginx-https.conf index dafb571..2a9e493 100644 --- a/rulemgt-standalone/src/main/assembly/nginx-https.conf +++ b/rulemgt-standalone/src/main/assembly/nginx-https.conf @@ -36,7 +36,7 @@ http { server_name _; location / { - root /usr/share/nginx/html; + root /var/lib/nginx/html; proxy_set_header Host $proxy_host; proxy_set_header X-Real-IP $remote_addr; diff --git a/rulemgt/pom.xml b/rulemgt/pom.xml index 29bf27c..6ecfe81 100644 --- a/rulemgt/pom.xml +++ b/rulemgt/pom.xml @@ -1,6 +1,6 @@