Updated Direct Dependencies and Removed oparent 56/136356/3
authorGuangrong Fu <fu.guangrong@zte.com.cn>
Mon, 30 Oct 2023 10:20:49 +0000 (18:20 +0800)
committerGuangrong Fu <fu.guangrong@zte.com.cn>
Mon, 30 Oct 2023 12:01:03 +0000 (20:01 +0800)
Issue-ID: HOLMES-633
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Change-Id: Id61086b6eac746cd7752eeb8b2f60474bda6d024

14 files changed:
pom.xml
rulemgt-standalone/pom.xml
rulemgt-standalone/src/main/assembly/Dockerfile
rulemgt-standalone/src/main/assembly/bin/initDB.sh
rulemgt-standalone/src/main/assembly/bin/run.sh
rulemgt-standalone/src/main/assembly/bin/stop.sh
rulemgt-standalone/src/main/assembly/nginx-http.conf
rulemgt-standalone/src/main/assembly/nginx-https.conf
rulemgt/pom.xml
rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
rulemgt/src/main/java/org/onap/holmes/rulemgt/resources/RuleMgtResources.java
rulemgt/src/main/resources/logback-spring.xml
rulemgt/src/test/java/org/onap/holmes/rulemgt/InitializerTest.java
rulemgt/src/test/java/org/onap/holmes/rulemgt/resources/RuleMgtResourcesTest.java

diff --git a/pom.xml b/pom.xml
index 87df7c3..f7a7dd9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.onap.oparent</groupId>
-        <artifactId>oparent</artifactId>
-        <version>3.0.0</version>
-    </parent>
 
     <groupId>org.onap.holmes.rule-management</groupId>
     <artifactId>holmes-rulemgt-parent</artifactId>
         <bundle.name>${project.artifactId}-${project.version}</bundle.name>
 
         <jersey.version>3.0.5</jersey.version>
-        <springboot.version>2.7.2</springboot.version>
+        <springboot.version>3.1.4</springboot.version>
         <jetty.version>9.4.18.v20190429</jetty.version>
         <powermock.version>2.0.9</powermock.version>
         <jdbi.version>3.19.0</jdbi.version>
-        <slf4j.version>1.7.25</slf4j.version>
+        <slf4j.version>2.0.9</slf4j.version>
         <jakarta.ws.rs.version>3.1.0</jakarta.ws.rs.version>
 
         <linux64id>linux64</linux64id>
         <linux64outputdir>target/assembly/${linux64id}</linux64outputdir>
         <version.output>target/version</version.output>
+
+        <jacoco.version>0.8.5</jacoco.version>
+        <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
+        <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+        <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
+        <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
+        <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
     </properties>
 
     <dependencyManagement>
             <artifactId>jdbi3-sqlobject</artifactId>
             <version>${jdbi.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.onap.msb.java-sdk</groupId>
-            <artifactId>msb-java-sdk</artifactId>
-            <version>1.2.5</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>ch.qos.logback</groupId>
-                    <artifactId>logback-classic</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-databind</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.squareup.okhttp3</groupId>
-                    <artifactId>okhttp</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.eclipse.jetty</groupId>
-                    <artifactId>jetty-server</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.checkerframework</groupId>
-                    <artifactId>checker-qual</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.squareup.retrofit2</groupId>
-                    <artifactId>retrofit</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpclient</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
         <dependency>
             <groupId>org.onap.holmes.common</groupId>
             <artifactId>holmes-actions</artifactId>
-            <version>1.4.5</version>
+            <version>1.4.7</version>
             <exclusions>
                 <exclusion>
                     <groupId>io.swagger</groupId>
             <artifactId>jakarta.ws.rs-api</artifactId>
             <version>${jakarta.ws.rs.version}</version>
         </dependency>
+        <dependency>
+            <groupId>jakarta.servlet</groupId>
+            <artifactId>jakarta.servlet-api</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>com.squareup.okhttp3</groupId>
             <artifactId>okhttp</artifactId>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>1.18.4</version>
+            <version>1.18.28</version>
         </dependency>
         <dependency>
             <groupId>org.postgresql</groupId>
index e80c175..bcabe2f 100644 (file)
                     <execution>
                         <id>linux64</id>
                         <configuration>
+                            <tarLongFileMode>gnu</tarLongFileMode>
                             <descriptors>
                                 <descriptor>linux64-assembly.xml</descriptor>
                             </descriptors>
                         </configuration>
                         <phase>package</phase>
                         <goals>
-                            <goal>attached</goal>
+                            <goal>single</goal>
                         </goals>
                     </execution>
                 </executions>
index 198d0ef..b03daa0 100644 (file)
@@ -1,4 +1,4 @@
-FROM onap/integration-java11:7.0.0
+FROM onap/integration-java17:12.0.0
 
 MAINTAINER "Guangrong Fu" <fu.guangrong@zte.com.cn>
 
@@ -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/ \
index c43f3e9..cb9dde9 100644 (file)
@@ -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.
index 03e00a6..18a3c9a 100644 (file)
@@ -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.
index ade940d..106ef23 100644 (file)
@@ -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.
index 6c49c87..0b0224d 100644 (file)
@@ -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;
index dafb571..2a9e493 100644 (file)
@@ -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;
index 29bf27c..6ecfe81 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ 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.
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.0</version>
+                <version>3.8.1</version>
                 <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                    <release>11</release>
+                    <source>17</source>
+                    <target>17</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>3.1.2</version>
+                <configuration>
+                    <argLine>
+                        --add-opens=java.base/java.lang=ALL-UNNAMED
+                        --add-opens=java.base/java.net=ALL-UNNAMED
+                        --add-opens=java.base/java.util=ALL-UNNAMED
+                        --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
+                        --add-opens=java.base/java.util.stream=ALL-UNNAMED
+                        --add-opens=java.base/java.io=ALL-UNNAMED
+                        --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
+                    </argLine>
                 </configuration>
             </plugin>
             <plugin>
index fc3e798..f97e24f 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright 2017-2022 ZTE Corporation.
+ * Copyright 2017-2023 ZTE Corporation.
  * <p>
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,10 +18,10 @@ package org.onap.holmes.rulemgt;
 
 import org.onap.holmes.common.config.MicroServiceConfig;
 import org.onap.holmes.common.exception.CorrelationException;
+import org.onap.holmes.common.msb.MsbRegister;
+import org.onap.holmes.common.msb.entity.MicroServiceInfo;
+import org.onap.holmes.common.msb.entity.Node;
 import org.onap.holmes.common.utils.CommonUtils;
-import org.onap.holmes.common.utils.MsbRegister;
-import org.onap.msb.sdk.discovery.entity.MicroServiceInfo;
-import org.onap.msb.sdk.discovery.entity.Node;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
index 2c9a462..045a21e 100644 (file)
@@ -36,7 +36,7 @@ import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;\r
 import org.springframework.web.bind.annotation.*;\r
 \r
-import javax.servlet.http.HttpServletRequest;\r
+import jakarta.servlet.http.HttpServletRequest;\r
 \r
 @Slf4j\r
 @RestController\r
index db95b38..a0782ec 100644 (file)
@@ -9,7 +9,7 @@
             <charset>UTF-8</charset>
         </encoder>
         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>info</level>
+            <level>INFO</level>
         </filter>
     </appender>
 
@@ -27,7 +27,7 @@
             <charset>UTF-8</charset>
         </encoder>
         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>info</level>
+            <level>INFO</level>
         </filter>
     </appender>
 
@@ -45,9 +45,9 @@
             <charset>UTF-8</charset>
         </encoder>
         <filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <level>error</level>
-            <onMatch>accept</onMatch>
-            <onMismatch>deny</onMismatch>
+            <level>ERROR</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
         </filter>
     </appender>
 
index 0687731..6f024eb 100644 (file)
@@ -18,8 +18,8 @@ import org.easymock.EasyMock;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onap.holmes.common.config.MicroServiceConfig;
-import org.onap.holmes.common.utils.MsbRegister;
-import org.onap.msb.sdk.discovery.entity.MicroServiceInfo;
+import org.onap.holmes.common.msb.MsbRegister;
+import org.onap.holmes.common.msb.entity.MicroServiceInfo;
 import org.powermock.api.easymock.PowerMock;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
index 7cc0def..2ecbb7a 100644 (file)
@@ -36,7 +36,7 @@ import org.powermock.api.easymock.PowerMock;
 import org.powermock.modules.junit4.PowerMockRunner;\r
 import org.powermock.reflect.Whitebox;\r
 \r
-import javax.servlet.http.HttpServletRequest;\r
+import jakarta.servlet.http.HttpServletRequest;\r
 \r
 @RunWith(PowerMockRunner.class)\r
 public class RuleMgtResourcesTest {\r