<?xml version="1.0" encoding="UTF-8"?>\r
<!--\r
- ~ Copyright 2017 ZTE Corporation.\r
+ ~ Copyright 2017-2020 ZTE Corporation.\r
~\r
~ Licensed under the Apache License, Version 2.0 (the "License");\r
~ you may not use this file except in compliance with the License.\r
<parent>\r
<groupId>org.onap.oparent</groupId>\r
<artifactId>oparent</artifactId>\r
- <version>2.1.0</version>\r
+ <version>3.0.0</version>\r
</parent>\r
\r
<groupId>org.onap.holmes.rule-management</groupId>\r
</modules>\r
\r
<properties>\r
+ <packagename>onap-holmes-rulemgt</packagename>\r
+ <finalName>${project.artifactId}-${project.version}</finalName>\r
+\r
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\r
- <maven.test.skip>false</maven.test.skip>\r
<maven.test.failure.ignore>false</maven.test.failure.ignore>\r
- <finalName>${project.artifactId}-${project.version}</finalName>\r
+\r
<release.dir>${basedir}/target</release.dir>\r
<bundle.name>${project.artifactId}-${project.version}</bundle.name>\r
- <pkgzip.dir>${basedir}/../release/pkgzip</pkgzip.dir>\r
- <excludesFile>**/*$*</excludesFile>\r
- <nexusproxy>https://nexus.open-o.org/content</nexusproxy>\r
- <powermock.version>1.6.5</powermock.version>\r
\r
-\r
- <stringtemplate.version>3.2.1</stringtemplate.version>\r
- <dropwizard.version>1.3.9</dropwizard.version>\r
- <reflections.version>0.9.9</reflections.version>\r
- <swagger.version>1.5.3</swagger.version>\r
- <lombok.version>1.16.8</lombok.version>\r
- <jersey.version>2.22.2</jersey.version>\r
- <jaxrs.consumer.version>5.0</jaxrs.consumer.version>\r
+ <powermock.version>2.0.7</powermock.version>\r
+ <dropwizard.version>2.0.9</dropwizard.version>\r
+ <jersey.version>2.30.1</jersey.version>\r
+ <jacoco.version>0.8.5</jacoco.version>\r
<slf4j.version>1.7.25</slf4j.version>\r
- <postgres.jdbc.driver.version>42.2.5</postgres.jdbc.driver.version>\r
-\r
\r
- <packagename>onap-holmes-rulemgt</packagename>\r
<linux64id>linux64</linux64id>\r
- <win64id>win64</win64id>\r
<linux64outputdir>target/assembly/${linux64id}</linux64outputdir>\r
- <win64outputdir>target/assembly/${win64id}</win64outputdir>\r
<version.output>target/version</version.output>\r
\r
- <jacoco.version>0.8.5</jacoco.version>\r
<sonar.coverage.jacoco.xmlReportPaths>\r
${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml\r
</sonar.coverage.jacoco.xmlReportPaths>\r
</properties>\r
- <dependencyManagement>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.onap.msb.java-sdk</groupId>\r
- <artifactId>msb-java-sdk</artifactId>\r
- <version>1.1.1</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.reflections</groupId>\r
- <artifactId>reflections</artifactId>\r
- <version>${reflections.version}</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.easymock</groupId>\r
- <artifactId>easymock</artifactId>\r
- <version>3.0</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>org.onap.holmes.common</groupId>\r
- <artifactId>holmes-actions</artifactId>\r
- <version>1.2.13</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>io.dropwizard</groupId>\r
- <artifactId>dropwizard-core</artifactId>\r
- <version>${dropwizard.version}</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>io.dropwizard</groupId>\r
- <artifactId>dropwizard-db</artifactId>\r
- <version>${dropwizard.version}</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>io.dropwizard</groupId>\r
- <artifactId>dropwizard-jdbi</artifactId>\r
- <version>${dropwizard.version}</version>\r
- </dependency>\r
- <dependency>\r
- <groupId>io.swagger</groupId>\r
- <artifactId>swagger-jersey2-jaxrs</artifactId>\r
- <version>${swagger.version}</version>\r
- <scope>provided</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.projectlombok</groupId>\r
- <artifactId>lombok</artifactId>\r
- <version>${lombok.version}</version>\r
- </dependency>\r
-\r
-\r
- <dependency>\r
- <groupId>org.slf4j</groupId>\r
- <artifactId>slf4j-api</artifactId>\r
- <version>${slf4j.version}</version>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.postgresql</groupId>\r
- <artifactId>postgresql</artifactId>\r
- <version>${postgres.jdbc.driver.version}</version>\r
- </dependency>\r
-\r
-\r
- <dependency>\r
- <groupId>org.antlr</groupId>\r
- <artifactId>stringtemplate</artifactId>\r
- <version>${stringtemplate.version}</version>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>junit</groupId>\r
- <artifactId>junit</artifactId>\r
- <version>4.8.2</version>\r
- <scope>test</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.hamcrest</groupId>\r
- <artifactId>hamcrest-core</artifactId>\r
- <version>1.3</version>\r
- <scope>test</scope>\r
- </dependency>\r
-\r
- <dependency>\r
- <groupId>org.powermock</groupId>\r
- <artifactId>powermock-module-junit4</artifactId>\r
- <version>1.6.5</version>\r
- <scope>test</scope>\r
- </dependency>\r
\r
- </dependencies>\r
- </dependencyManagement>\r
+ <dependencies>\r
+ <dependency>\r
+ <groupId>ch.qos.logback</groupId>\r
+ <artifactId>logback-classic</artifactId>\r
+ <version>1.2.3</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.onap.msb.java-sdk</groupId>\r
+ <artifactId>msb-java-sdk</artifactId>\r
+ <version>1.1.1</version>\r
+ <exclusions>\r
+ <exclusion>\r
+ <groupId>ch.qos.logback</groupId>\r
+ <artifactId>logback-classic</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>com.fasterxml.jackson.core</groupId>\r
+ <artifactId>jackson-databind</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>com.fasterxml.jackson.core</groupId>\r
+ <artifactId>jackson-core</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>com.squareup.okhttp3</groupId>\r
+ <artifactId>okhttp</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>org.eclipse.jetty</groupId>\r
+ <artifactId>jetty-server</artifactId>\r
+ </exclusion>\r
+ </exclusions>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.reflections</groupId>\r
+ <artifactId>reflections</artifactId>\r
+ <version>0.9.9</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.onap.holmes.common</groupId>\r
+ <artifactId>holmes-actions</artifactId>\r
+ <version>1.2.13</version>\r
+ <exclusions>\r
+ <exclusion>\r
+ <groupId>org.glassfish.jersey.containers</groupId>\r
+ <artifactId>jersey-container-servlet-core</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>io.swagger</groupId>\r
+ <artifactId>swagger-jersey2-jaxrs</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>org.slf4j</groupId>\r
+ <artifactId>slf4j-api</artifactId>\r
+ </exclusion>\r
+ </exclusions>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.easymock</groupId>\r
+ <artifactId>easymock</artifactId>\r
+ <version>4.2</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>io.dropwizard</groupId>\r
+ <artifactId>dropwizard-core</artifactId>\r
+ <version>${dropwizard.version}</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>io.dropwizard</groupId>\r
+ <artifactId>dropwizard-db</artifactId>\r
+ <version>${dropwizard.version}</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>io.dropwizard</groupId>\r
+ <artifactId>dropwizard-jdbi</artifactId>\r
+ <version>2.0.0-rc9</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.antlr</groupId>\r
+ <artifactId>stringtemplate</artifactId>\r
+ <version>3.2.1</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>com.squareup.okhttp3</groupId>\r
+ <artifactId>okhttp</artifactId>\r
+ <version>3.14.1</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.projectlombok</groupId>\r
+ <artifactId>lombok</artifactId>\r
+ <version>1.18.4</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.postgresql</groupId>\r
+ <artifactId>postgresql</artifactId>\r
+ <version>42.2.5</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>junit</groupId>\r
+ <artifactId>junit</artifactId>\r
+ <version>4.8.2</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.hamcrest</groupId>\r
+ <artifactId>hamcrest-core</artifactId>\r
+ <version>1.3</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.powermock</groupId>\r
+ <artifactId>powermock-module-junit4</artifactId>\r
+ <version>${powermock.version}</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.slf4j</groupId>\r
+ <artifactId>slf4j-api</artifactId>\r
+ <version>${slf4j.version}</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>io.swagger</groupId>\r
+ <artifactId>swagger-jersey2-jaxrs</artifactId>\r
+ <version>1.5.3</version>\r
+ <exclusions>\r
+ <exclusion>\r
+ <groupId>com.fasterxml.jackson.core</groupId>\r
+ <artifactId>jackson-databind</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>com.fasterxml.jackson.core</groupId>\r
+ <artifactId>jackson-core</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>com.fasterxml.jackson.dataformat</groupId>\r
+ <artifactId>jackson-dataformat-xml</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>javax.validation</groupId>\r
+ <artifactId>validation-api</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>org.glassfish.jersey.containers</groupId>\r
+ <artifactId>jersey-container-servlet-core</artifactId>\r
+ </exclusion>\r
+ </exclusions>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.powermock</groupId>\r
+ <artifactId>powermock-api-easymock</artifactId>\r
+ <version>${powermock.version}</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.mockito</groupId>\r
+ <artifactId>mockito-core</artifactId>\r
+ <version>2.18.0</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.powermock</groupId>\r
+ <artifactId>powermock-core</artifactId>\r
+ <version>${powermock.version}</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.powermock</groupId>\r
+ <artifactId>powermock-module-junit4-rule</artifactId>\r
+ <version>${powermock.version}</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.powermock</groupId>\r
+ <artifactId>powermock-api-mockito2</artifactId>\r
+ <version>${powermock.version}</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.javassist</groupId>\r
+ <artifactId>javassist</artifactId>\r
+ <version>3.24.1-GA</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.powermock</groupId>\r
+ <artifactId>powermock-classloading-xstream</artifactId>\r
+ <version>${powermock.version}</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>io.reactivex.rxjava2</groupId>\r
+ <artifactId>rxjava</artifactId>\r
+ <version>2.1.5</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.hamcrest</groupId>\r
+ <artifactId>hamcrest-library</artifactId>\r
+ <version>1.3</version>\r
+ <scope>test</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>com.googlecode.json-simple</groupId>\r
+ <artifactId>json-simple</artifactId>\r
+ <version>1.1.1</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>net.sf.json-lib</groupId>\r
+ <artifactId>json-lib</artifactId>\r
+ <version>2.4</version>\r
+ <classifier>jdk15</classifier>\r
+ <exclusions>\r
+ <exclusion>\r
+ <groupId>commons-collections</groupId>\r
+ <artifactId>commons-collections</artifactId>\r
+ </exclusion>\r
+ <exclusion>\r
+ <groupId>commons-beanutils</groupId>\r
+ <artifactId>commons-beanutils</artifactId>\r
+ </exclusion>\r
+ </exclusions>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>commons-collections</groupId>\r
+ <artifactId>commons-collections</artifactId>\r
+ <version>3.2.2</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>com.alibaba</groupId>\r
+ <artifactId>fastjson</artifactId>\r
+ <version>1.2.49</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.glassfish.jersey.core</groupId>\r
+ <artifactId>jersey-server</artifactId>\r
+ <version>${jersey.version}</version>\r
+ <exclusions>\r
+ <exclusion>\r
+ <groupId>javax.validation</groupId>\r
+ <artifactId>validation-api</artifactId>\r
+ </exclusion>\r
+ </exclusions>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.glassfish.jersey.core</groupId>\r
+ <artifactId>jersey-client</artifactId>\r
+ <version>${jersey.version}</version>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.glassfish.jersey.core</groupId>\r
+ <artifactId>jersey-common</artifactId>\r
+ <version>${jersey.version}</version>\r
+ </dependency>\r
+ </dependencies>\r
\r
<build>\r
<plugins>\r
<?xml version="1.0"?>
<!--
- Copyright 2018 ZTE Corporation.
+ Copyright 2018-2020 ZTE Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
limitations under the License.
-->
+
<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/maven-v4_0_0.xsd">
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
- <version>1.6</version>
+ <version>1.10.0</version>
<executions>
<execution>
<id>install node and npm</id>
</goals>
<phase>generate-resources</phase>
<configuration>
+ <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
<arguments>install</arguments>
</configuration>
</execution>
<!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2017-2020 ZTE Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<fileSet>
<directory>target/assembly/linux64</directory>
<outputDirectory></outputDirectory>
+ <excludes>
+ <exclude>
+ lib/holmes-rulemgt-frontend-*.tar.gz
+ </exclude>
+ </excludes>
</fileSet>
</fileSets>
</assembly>
<?xml version="1.0"?>
<!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2017-2020 ZTE Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
limitations under the License.
-->
+
<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">
<build.number>${maven.build.timestamp}</build.number>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.holmes.rule-management</groupId>
+ <artifactId>holmes-rulemgt</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.holmes.rule-management</groupId>
+ <artifactId>holmes-rulemgt-frontend</artifactId>
+ <version>${project.version}</version>
+ <type>tar.gz</type>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
- <artifactId>maven-resources-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>copy-resources-${linux64id}</id>
+ <id>copy-dependencies</id>
<phase>process-resources</phase>
<goals>
- <goal>copy-resources</goal>
+ <goal>copy-dependencies</goal>
</goals>
- <configuration>
- <outputDirectory>${linux64outputdir}</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/assembly/</directory>
- <filtering>false</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>**/*.bat</exclude>
- <exclude>Dockerfile</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>../rulemgt/src/main/resources</directory>
- <filtering>false</filtering>
- </resource>
- </resources>
- <overwrite>true</overwrite>
- </configuration>
</execution>
+ </executions>
+ <configuration>
+ <outputDirectory>${linux64outputdir}/lib</outputDirectory>
+ <includeScope>runtime</includeScope>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
<execution>
- <id>copy-resources-${win64id}</id>
+ <id>copy-resources-${linux64id}</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
- <outputDirectory>${win64outputdir}</outputDirectory>
+ <outputDirectory>${linux64outputdir}</outputDirectory>
<resources>
<resource>
<directory>src/main/assembly/</directory>
<include>**/*</include>
</includes>
<excludes>
- <exclude>**/*.sh</exclude>
- <exclude>Dockerfile</exclude>
+ <exclude>**/*.bat</exclude>
</excludes>
</resource>
<resource>
<phase>prepare-package</phase>
<configuration>
<artifactItems>
- <artifactItem>
- <groupId>org.onap.holmes.rule-management</groupId>
- <artifactId>holmes-rulemgt</artifactId>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${linux64outputdir}</outputDirectory>
- <destFileName>holmes-rulemgt.jar</destFileName>
- </artifactItem>
- <artifactItem>
- <groupId>org.onap.holmes.rule-management</groupId>
- <artifactId>holmes-rulemgt-frontend</artifactId>
- <type>tar.gz</type>
- <overWrite>true</overWrite>
- <outputDirectory>target/version</outputDirectory>
- <destFileName>holmes-rulemgt-frontend-${project.version}.tar.gz</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- <execution>
- <id>copy-artifacts-${win64id}</id>
- <goals>
- <goal>copy</goal>
- </goals>
- <phase>prepare-package</phase>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.holmes.rule-management</groupId>
- <artifactId>holmes-rulemgt</artifactId>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>${win64outputdir}</outputDirectory>
- <destFileName>holmes-rulemgt.jar</destFileName>
- </artifactItem>
<artifactItem>
<groupId>org.onap.holmes.rule-management</groupId>
<artifactId>holmes-rulemgt-frontend</artifactId>
<goal>attached</goal>
</goals>
</execution>
- <execution>
- <id>win64</id>
- <configuration>
- <descriptors>
- <descriptor>win64-assembly.xml</descriptor>
- </descriptors>
- <appendAssemblyId>true</appendAssemblyId>
- <outputDirectory>target/version</outputDirectory>
- </configuration>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
</build>
</profile>
</profiles>
-
- <dependencies>
- <dependency>
- <groupId>org.onap.holmes.rule-management</groupId>
- <artifactId>holmes-rulemgt</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.onap.holmes.rule-management</groupId>
- <artifactId>holmes-rulemgt-frontend</artifactId>
- <version>${project.version}</version>
- <type>tar.gz</type>
- </dependency>
- </dependencies>
</project>
MAINTAINER "Guangrong Fu" <fu.guangrong@zte.com.cn>
+# 9101 - service port
+# 9104 - GUI port
+# 9201 - debugging port
EXPOSE 9101 9104 9201
ENV HOSTNAME=holmes-rule-mgmt \
LANG=C.UTF-8 \
- JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk \
- PATH=$PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin \
- JAVA_ALPINE_VERSION=8.242.08-r0 \
+ JAVA_HOME=/usr/lib/jvm/java-11-openjdk \
+ PATH=$PATH:/usr/lib/jvm/java-11-openjdk/jre/bin:/usr/lib/jvm/java-11-openjdk/bin \
+ JAVA_ALPINE_VERSION=11.0.5_p10-r0 \
PG_VERSION=12.2-r0
#add the backend package to the docker image
ADD holmes-rulemgt-frontend-*.tar.gz /usr/local/openresty/nginx/html/
ADD nginx-https.conf /usr/local/openresty/nginx/conf
ADD nginx-http.conf /usr/local/openresty/nginx/conf
-ADD holmes-frontend.key /etc/ssl/private
-ADD holmes-frontend-selfsigned.crt /etc/ssl/certs
-ADD dhparam.pem /etc/ssl/certs
+ADD holmes-frontend.key /etc/ssl/private/
+ADD holmes-frontend-selfsigned.crt /etc/ssl/public/
+ADD dhparam.pem /etc/ssl/public/
-#install java-1.8-openjdk
+#install java-11-openjdk
# add a simple script that can auto-detect the appropriate JAVA_HOME value
# based on whether the JDK or only the JRE is installed
&& set -x \
&& apk upgrade \
&& apk update \
- && apk add --no-cache openjdk8="$JAVA_ALPINE_VERSION" \
+ && apk add --no-cache openjdk11="$JAVA_ALPINE_VERSION" \
&& [ "$JAVA_HOME" = "$(docker-java-home)" ] \
#install neccessary tools
&& apk add --no-cache curl \
#add the frontend pacakge to the docker images
&& rm /etc/nginx/conf.d/default.conf \
&& chmod -R 777 /usr/local/openresty/nginx/ \
+ && chmod -R 755 /etc/ssl/public \
#switch the user to holmes
&& addgroup -S holmes && adduser -S -G holmes holmes \
&& chmod -R a+rw /home/holmes/ \
#!/bin/sh
#
-# Copyright 2017 ZTE Corporation.
+# Copyright 2017-2020 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
echo @JAVA_OPTS@ $JAVA_OPTS
-class_path="$main_path/:$main_path/holmes-rulemgt.jar"
+class_path="$main_path/lib/*"
echo @class_path@ $class_path
if [ -z ${JDBC_USERNAME} ]; then
root html;
}
- ssl_certificate /etc/ssl/certs/holmes-frontend-selfsigned.crt;
+ ssl_certificate /etc/ssl/public/holmes-frontend-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/holmes-frontend.key;
- ssl_dhparam /etc/ssl/certs/dhparam.pem;
+ ssl_dhparam /etc/ssl/public/dhparam.pem;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
- ~ Copyright 2017 ZTE Corporation.
+ ~ Copyright 2017-2020 ZTE Corporation.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
<jetty.version>9.4.18.v20190429</jetty.version>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>5.4.2.Final</version>
- </dependency>
- <dependency>
- <groupId>org.onap.msb.java-sdk</groupId>
- <artifactId>msb-java-sdk</artifactId>
- <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>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.reflections</groupId>
- <artifactId>reflections</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.holmes.common</groupId>
- <artifactId>holmes-actions</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.glassfish.jersey.containers</groupId>
- <artifactId>jersey-container-servlet-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jersey2-jaxrs</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-db</artifactId>
- </dependency>
- <dependency>
- <groupId>org.antlr</groupId>
- <artifactId>stringtemplate</artifactId>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-core</artifactId>
- <exclusions>
- <exclusion>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>3.14.1</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-jdbi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jersey2-jaxrs</artifactId>
- <exclusions>
- <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.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- </exclusion>
- </exclusions>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-easymock</artifactId>
- <version>1.6.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.7.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-rule</artifactId>
- <version>1.6.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-classloading-xstream</artifactId>
- <version>1.6.5</version>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- </exclusions>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.4.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>3.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.20.0-GA</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.6</version>
- </dependency>
- <dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>net.sf.json-lib</groupId>
- <artifactId>json-lib</artifactId>
- <version>2.4</version>
- <classifier>jdk15</classifier>
- <exclusions>
- <exclusion>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.2</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>1.2.49</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-server</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-client</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.core</groupId>
- <artifactId>jersey-common</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.containers</groupId>
- <artifactId>jersey-container-servlet-core</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- </dependencies>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<target>1.8</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <configuration>
- <createDependencyReducedPom>true</createDependencyReducedPom>
- <filters>
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.DSA</exclude>
- <exclude>META-INF/*.RSA</exclude>
- </excludes>
- </filter>
- </filters>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.onap.holmes.rulemgt.RuleActiveApp</mainClass>
- </transformer>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
<resources>
<resource>
package org.onap.holmes.rulemgt;
import io.dropwizard.setup.Environment;
-import lombok.extern.slf4j.Slf4j;
import org.onap.holmes.common.config.MicroServiceConfig;
import org.onap.holmes.common.dropwizard.ioc.bundle.IOCApplication;
import org.onap.holmes.common.exception.CorrelationException;
import org.onap.holmes.rulemgt.resources.RuleMgtResources;
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 javax.servlet.DispatcherType;
import java.util.EnumSet;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
-@Slf4j
public class RuleActiveApp extends IOCApplication<RuleAppConfig> {
+ private Logger log = LoggerFactory.getLogger(RuleActiveApp.class);
+
public static void main(String[] args) throws Exception {
new RuleActiveApp().run(args);
}
- @Override
- public String getName() {
- return "Holmes Rule Management ActiveApp APP ";
- }
-
@Override
public void run(RuleAppConfig configuration, Environment environment) throws Exception {
super.run(configuration, environment);
if (field.getName().contains("jacoco")) {\r
continue;\r
}\r
- PropertyDescriptor pd = new PropertyDescriptor(field.getName(),\r
+ PropertyDescriptor pd = new PropertyDescriptor((String)field.getName(),\r
clazz);\r
Method getMethod = pd.getReadMethod();\r
Object o = getMethod.invoke(ruleQueryCondition);\r
}
public List<String> getInstanceList() throws Exception {
- String response;
- HttpGet httpGet = new HttpGet(url);
- try (CloseableHttpClient httpClient = HttpsUtils.getConditionalHttpsClient(HttpsUtils.DEFUALT_TIMEOUT)) {
- HttpResponse httpResponse = HttpsUtils.get(httpGet, new HashMap<>(), httpClient);
- response = HttpsUtils.extractResponseEntity(httpResponse);
- } catch (Exception e) {
- throw e;
- } finally {
- httpGet.releaseConnection();
+ String response;
+ HttpGet httpGet = new HttpGet(url);
+ try (CloseableHttpClient httpClient = HttpsUtils.getConditionalHttpsClient(HttpsUtils.DEFUALT_TIMEOUT)) {
+ HttpResponse httpResponse = HttpsUtils.get(httpGet, new HashMap<>(), httpClient);
+ response = HttpsUtils.extractResponseEntity(httpResponse);
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ httpGet.releaseConnection();
- }
- ServiceEntity service = GsonUtil.jsonToBean(response, ServiceEntity.class);
- List<ServiceNode4Query> nodesList = service.getNodes();
- List<String> ipList = new ArrayList<>();
- for (ServiceNode4Query node : nodesList) {
- ipList.add(node.getIp());
- }
- return ipList;
+ }
+ ServiceEntity service = GsonUtil.jsonToBean(response, ServiceEntity.class);
+ List<ServiceNode4Query> nodesList = service.getNodes();
+ List<String> ipList = new ArrayList<>();
+ for (ServiceNode4Query node : nodesList) {
+ ipList.add(node.getIp());
+ }
+ return ipList;
}
/**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2017-2020 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.holmes.rulemgt;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.IsEqual.equalTo;
-
-import org.junit.Test;
-
public class RuleActiveAppTest {
- @Test
- public void getName() throws Exception {
- RuleActiveApp app = new RuleActiveApp();
- assertThat(app.getName(), equalTo("Holmes Rule Management ActiveApp APP "));
- }
-
public static void main(String[] args) throws Exception {
String filePath = "E:\\Codes\\ONAP\\holmes\\rule-management\\rulemgt-standalone\\src\\main\\assembly\\conf\\rulemgt.yml";
new RuleActiveApp().run(new String[]{"server", filePath});
/**\r
- * Copyright 2017 ZTE Corporation.\r
+ * Copyright 2017-2020 ZTE Corporation.\r
*\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
\r
package org.onap.holmes.rulemgt.db;\r
\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.hamcrest.Matchers.is;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Properties;\r
import org.easymock.EasyMock;\r
import org.junit.Before;\r
import org.junit.Rule;\r
import org.junit.Test;\r
import org.junit.rules.ExpectedException;\r
+import org.junit.runner.RunWith;\r
import org.onap.holmes.common.api.entity.CorrelationRule;\r
import org.onap.holmes.common.exception.CorrelationException;\r
import org.onap.holmes.common.utils.DbDaoUtil;\r
import org.onap.holmes.rulemgt.bean.request.RuleQueryCondition;\r
import org.powermock.api.easymock.PowerMock;\r
-import org.powermock.modules.junit4.rule.PowerMockRule;\r
+import org.powermock.core.classloader.annotations.PrepareForTest;\r
+import org.powermock.modules.junit4.PowerMockRunner;\r
import org.powermock.reflect.Whitebox;\r
import org.skife.jdbi.v2.Handle;\r
import org.skife.jdbi.v2.Query;\r
\r
+import java.util.*;\r
\r
+import static org.hamcrest.MatcherAssert.assertThat;\r
+import static org.hamcrest.Matchers.is;\r
+\r
+@RunWith(PowerMockRunner.class)\r
+@PrepareForTest({DbDaoUtil.class, Handle.class, Query.class})\r
public class CorrelationRuleQueryDaoTest {\r
\r
@Rule\r
public ExpectedException thrown = ExpectedException.none();\r
\r
- @Rule\r
- public PowerMockRule powerMockRule = new PowerMockRule();\r
private DbDaoUtil dbDaoUtil;\r
\r
private Handle handle;\r
/**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2017-2020 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.powermock.api.easymock.PowerMock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
-import org.powermock.modules.junit4.rule.PowerMockRule;
import java.util.ArrayList;
import java.util.Calendar;
import static org.onap.holmes.rulemgt.send.RuleAllocator.ENABLE;
+@RunWith(PowerMockRunner.class)
@PrepareForTest({ServiceLocator.class, RuleMgtWrapper.class, RuleQueryWrapper.class, EngineWrapper.class,
EngineInsQueryTool.class, DbDaoUtil.class, ServiceLocatorHolder.class})
public class RuleAllocatorTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
- @Rule
- public PowerMockRule rule = new PowerMockRule();
-
private RuleMgtWrapper ruleMgtWrapperMock;
private RuleQueryWrapper ruleQueryWrapperMock;
private EngineWrapper engineWrapperMock;
\r
package org.onap.holmes.rulemgt.wrapper;\r
\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.hamcrest.Matchers.equalTo;\r
-import static org.hamcrest.Matchers.is;\r
\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.List;\r
import org.easymock.EasyMock;\r
import org.junit.Before;\r
import org.junit.Rule;\r
import org.junit.Test;\r
import org.junit.rules.ExpectedException;\r
-import org.onap.holmes.rulemgt.bean.request.CorrelationCheckRule4Engine;\r
-import org.onap.holmes.rulemgt.db.CorrelationRuleDao;\r
import org.onap.holmes.common.api.entity.CorrelationRule;\r
import org.onap.holmes.common.exception.CorrelationException;\r
import org.onap.holmes.common.utils.DbDaoUtil;\r
-import org.onap.holmes.rulemgt.bean.request.CorrelationDeployRule4Engine;\r
-import org.onap.holmes.rulemgt.bean.request.RuleCreateRequest;\r
-import org.onap.holmes.rulemgt.bean.request.RuleDeleteRequest;\r
-import org.onap.holmes.rulemgt.bean.request.RuleQueryCondition;\r
-import org.onap.holmes.rulemgt.bean.request.RuleUpdateRequest;\r
+import org.onap.holmes.rulemgt.bean.request.*;\r
import org.onap.holmes.rulemgt.bean.response.RuleAddAndUpdateResponse;\r
import org.onap.holmes.rulemgt.bean.response.RuleQueryListResponse;\r
import org.onap.holmes.rulemgt.bolt.enginebolt.EngineWrapper;\r
+import org.onap.holmes.rulemgt.db.CorrelationRuleDao;\r
import org.onap.holmes.rulemgt.db.CorrelationRuleQueryDao;\r
import org.onap.holmes.rulemgt.send.Ip4AddingRule;\r
import org.powermock.api.easymock.PowerMock;\r
import org.powermock.modules.junit4.rule.PowerMockRule;\r
import org.powermock.reflect.Whitebox;\r
\r
+import java.util.ArrayList;\r
+import java.util.Date;\r
+import java.util.List;\r
+\r
+import static org.hamcrest.MatcherAssert.assertThat;\r
+import static org.hamcrest.Matchers.equalTo;\r
+import static org.hamcrest.Matchers.is;\r
+\r
public class RuleMgtWrapperTest {\r
\r
@Rule\r