summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2023-10-30 18:20:49 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2023-10-30 20:01:03 +0800
commit4656c4f34b7eef4c91ecaddee5efc48644a3333b (patch)
tree799b49f651e5a9a8a233e49e5341b0525a6022f1
parent3bf7c480269528b81886b6d240f70e173ddde6e8 (diff)
Updated Direct Dependencies and Removed oparent
Issue-ID: HOLMES-633 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn> Change-Id: Id61086b6eac746cd7752eeb8b2f60474bda6d024
-rw-r--r--pom.xml66
-rw-r--r--rulemgt-standalone/pom.xml3
-rw-r--r--rulemgt-standalone/src/main/assembly/Dockerfile17
-rw-r--r--rulemgt-standalone/src/main/assembly/bin/initDB.sh4
-rw-r--r--rulemgt-standalone/src/main/assembly/bin/run.sh5
-rw-r--r--rulemgt-standalone/src/main/assembly/bin/stop.sh4
-rw-r--r--rulemgt-standalone/src/main/assembly/nginx-http.conf2
-rw-r--r--rulemgt-standalone/src/main/assembly/nginx-https.conf2
-rw-r--r--rulemgt/pom.xml24
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java8
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/resources/RuleMgtResources.java2
-rw-r--r--rulemgt/src/main/resources/logback-spring.xml10
-rw-r--r--rulemgt/src/test/java/org/onap/holmes/rulemgt/InitializerTest.java4
-rw-r--r--rulemgt/src/test/java/org/onap/holmes/rulemgt/resources/RuleMgtResourcesTest.java2
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 @@
<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>
@@ -45,16 +40,24 @@
<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>
@@ -95,48 +98,9 @@
<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>
@@ -154,6 +118,12 @@
<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>
<version>4.10.0</version>
@@ -161,7 +131,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
- <version>1.18.4</version>
+ <version>1.18.28</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
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 @@
<execution>
<id>linux64</id>
<configuration>
+ <tarLongFileMode>gnu</tarLongFileMode>
<descriptors>
<descriptor>linux64-assembly.xml</descriptor>
</descriptors>
@@ -184,7 +185,7 @@
</configuration>
<phase>package</phase>
<goals>
- <goal>attached</goal>
+ <goal>single</goal>
</goals>
</execution>
</executions>
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" <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/ \
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 @@
<?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.
@@ -41,11 +41,25 @@
<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>
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
index fc3e798..f97e24f 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/Initializer.java
@@ -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;
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/resources/RuleMgtResources.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/resources/RuleMgtResources.java
index 2c9a462..045a21e 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/resources/RuleMgtResources.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/resources/RuleMgtResources.java
@@ -36,7 +36,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
@Slf4j
@RestController
diff --git a/rulemgt/src/main/resources/logback-spring.xml b/rulemgt/src/main/resources/logback-spring.xml
index db95b38..a0782ec 100644
--- a/rulemgt/src/main/resources/logback-spring.xml
+++ b/rulemgt/src/main/resources/logback-spring.xml
@@ -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>
diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/InitializerTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/InitializerTest.java
index 0687731..6f024eb 100644
--- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/InitializerTest.java
+++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/InitializerTest.java
@@ -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;
diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/resources/RuleMgtResourcesTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/resources/RuleMgtResourcesTest.java
index 7cc0def..2ecbb7a 100644
--- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/resources/RuleMgtResourcesTest.java
+++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/resources/RuleMgtResourcesTest.java
@@ -36,7 +36,7 @@ import org.powermock.api.easymock.PowerMock;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
@RunWith(PowerMockRunner.class)
public class RuleMgtResourcesTest {