<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>
<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>
-FROM onap/integration-java11:7.0.0
+FROM onap/integration-java17:12.0.0
MAINTAINER "Guangrong Fu" <fu.guangrong@zte.com.cn>
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/ \
-#!/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.
-#!/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.
-#!/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.
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;
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;
<?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>
/**
- * 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.
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;
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
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>info</level>
+ <level>INFO</level>
</filter>
</appender>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>info</level>
+ <level>INFO</level>
</filter>
</appender>
<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>
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;
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