summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--prh-aai-client/src/main/java/services/config/AAIHttpClientConfiguration.java5
-rw-r--r--prh-aai-client/src/test/java/services/service/utils/HTTPConfiguration.java2
-rw-r--r--prh-app-server/config/application.yaml30
-rw-r--r--prh-app-server/docker/Dockerfile15
-rw-r--r--prh-app-server/pom.xml48
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java (renamed from prh-aai-client/src/main/java/services/config/AAIConfig.java)8
-rw-r--r--prh-app-server/src/main/resources/application.yaml2
-rw-r--r--prh-dmaap-client/pom.xml5
8 files changed, 83 insertions, 32 deletions
diff --git a/prh-aai-client/src/main/java/services/config/AAIHttpClientConfiguration.java b/prh-aai-client/src/main/java/services/config/AAIHttpClientConfiguration.java
index 4c50966b..d5a9281c 100644
--- a/prh-aai-client/src/main/java/services/config/AAIHttpClientConfiguration.java
+++ b/prh-aai-client/src/main/java/services/config/AAIHttpClientConfiguration.java
@@ -21,13 +21,14 @@
package services.config;
+import java.io.Serializable;
import org.immutables.value.Value;
import org.springframework.stereotype.Component;
@Component
@Value.Immutable(prehash = true)
@Value.Style(stagedBuilder = true)
-public abstract class AAIHttpClientConfiguration implements AAIConfig {
+public abstract class AAIHttpClientConfiguration implements Serializable {
private static final long serialVersionUID = 1L;
@@ -47,6 +48,6 @@ public abstract class AAIHttpClientConfiguration implements AAIConfig {
public abstract String aaiUserPassword();
@Value.Parameter
- public abstract boolean aaiIgnoreSSLCertificateErrors();
+ public abstract Boolean aaiIgnoreSSLCertificateErrors();
}
diff --git a/prh-aai-client/src/test/java/services/service/utils/HTTPConfiguration.java b/prh-aai-client/src/test/java/services/service/utils/HTTPConfiguration.java
index fb7b204a..82f656d9 100644
--- a/prh-aai-client/src/test/java/services/service/utils/HTTPConfiguration.java
+++ b/prh-aai-client/src/test/java/services/service/utils/HTTPConfiguration.java
@@ -56,7 +56,7 @@ public class HTTPConfiguration extends AAIHttpClientConfiguration {
}
@Override
- public boolean aaiIgnoreSSLCertificateErrors() {
+ public Boolean aaiIgnoreSSLCertificateErrors() {
return true;
}
} \ No newline at end of file
diff --git a/prh-app-server/config/application.yaml b/prh-app-server/config/application.yaml
new file mode 100644
index 00000000..efdaa9cf
--- /dev/null
+++ b/prh-app-server/config/application.yaml
@@ -0,0 +1,30 @@
+server:
+ port: 8100
+app:
+ AAIHttpClientConfiguration:
+ aaiHost: "localhost"
+ aaiHostPortNumber: 8080
+ aaiProtocol: "http"
+ aaiUserName: "admin"
+ aaiUserPassword: "admin"
+ aaiIgnoreSSLCertificateErrors: true
+# dmaap-consumer-configuration:
+# dmmaphost-name: "localhost"
+# dmmapport-number: 2222
+# dmmaptopic-name: "temp"
+# dmmapprotocol: "http"
+# dmmapuserName: "admin"
+# dmmapuserPassword: "admin"
+# dmmapcontentType: "application/json"
+# consumerId: "1"
+# consumerGroup: "other"
+# timeoutMS: 1000
+# message-limit: 1000
+# dmaap-producer-configuration:
+# dmmaphostName: "localhost"
+# dmmapportNumber: 2223
+# dmmaptopicName: "temp"
+# dmmapprotocol: "http"
+# dmmapuserName: "admin"
+# dmmapuserPassword: "admin"
+# dmmapcontentType: "application/json"
diff --git a/prh-app-server/docker/Dockerfile b/prh-app-server/docker/Dockerfile
deleted file mode 100644
index 0f71760a..00000000
--- a/prh-app-server/docker/Dockerfile
+++ /dev/null
@@ -1,15 +0,0 @@
-#This image is sample template only.
-FROM azul/zulu-openjdk:8u152
-
-MAINTAINER Przemysław Wąsala "przemyslaw.wasala@nokia.com"
-
-ADD /target/prh-app-server.jar /opt/app/Prh/
-WORKDIR /opt/app/Prh
-
-ENV HOME /opt/app/Prh
-ENV JAVA_HOME /usr
-#RUN apt-get update && apt-get install -y curl vim
-
-EXPOSE 8100
-
-RUN [ "java", "-jar", "prh-app-server.jar" ] \ No newline at end of file
diff --git a/prh-app-server/pom.xml b/prh-app-server/pom.xml
index 8d07fdd6..7da9ac16 100644
--- a/prh-app-server/pom.xml
+++ b/prh-app-server/pom.xml
@@ -33,8 +33,7 @@
<packaging>jar</packaging>
<properties>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
- <onap.nexus.dockerregistry.daily>${env.MVN_DOCKERREGISTRY_DAILY}
- </onap.nexus.dockerregistry.daily>
+ <project.fatJar.finalName>prh-app-server</project.fatJar.finalName>
</properties>
<build>
<plugins>
@@ -53,7 +52,7 @@
</execution>
</executions>
<configuration>
- <finalName>prh-app-server</finalName>
+ <finalName>${project.fatJar.finalName}</finalName>
<mainClass>org.onap.dcaegen2.services.prh.MainApp</mainClass>
</configuration>
</plugin>
@@ -62,25 +61,50 @@
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
<configuration>
<imageName>
${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId}
</imageName>
- <dockerDirectory>docker</dockerDirectory>
+ <baseImage>openjdk:8-jre-alpine</baseImage>
+ <entryPoint>["java", "-jar", "/opt/${project.fatJar.finalName}.jar"]</entryPoint>
<resources>
<resource>
- <targetPath>/</targetPath>
+ <targetPath>/opt</targetPath>
<directory>${project.build.directory}</directory>
- <include>${project.build.finalName}.jar</include>
+ <include>${project.fatJar.finalName}.jar</include>
</resource>
</resources>
+ <exposes>
+ <expose>8100</expose>
+ </exposes>
<imageTags>
- <imageTag>${project.version}-${maven.build.timestamp}</imageTag>
+ <imageTag>${project.version}-SNAPSHOT-${maven.build.timestamp}Z</imageTag>
+ <imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<serverId>${onap.nexus.dockerregistry.daily}</serverId>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</version>
+ <extensions>true</extensions>
+ <configuration>
+ <serverId>ecomp-staging</serverId>
+ <nexusUrl>${nexusproxy}</nexusUrl>
+ <stagingProfileId>176c31dfe190a</stagingProfileId>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
@@ -159,6 +183,16 @@
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.onap.dcaegen2.services.prh</groupId>
+ <artifactId>prh-aai-client</artifactId>
+ <version>${parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.dcaegen2.services.prh</groupId>
+ <artifactId>prh-dmaap-client</artifactId>
+ <version>${parent.version}</version>
+ </dependency>
</dependencies>
<dependencyManagement>
diff --git a/prh-aai-client/src/main/java/services/config/AAIConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java
index ed327fa2..67d1c370 100644
--- a/prh-aai-client/src/main/java/services/config/AAIConfig.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java
@@ -17,13 +17,11 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package services.config;
-
-import java.io.Serializable;
+package org.onap.dcaegen2.services.prh.config;
/**
- * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18
+ * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/3/18
*/
-interface AAIConfig extends Serializable {
+public class ApplicationProperties {
}
diff --git a/prh-app-server/src/main/resources/application.yaml b/prh-app-server/src/main/resources/application.yaml
deleted file mode 100644
index 4d372c26..00000000
--- a/prh-app-server/src/main/resources/application.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-server:
- port: 8100 \ No newline at end of file
diff --git a/prh-dmaap-client/pom.xml b/prh-dmaap-client/pom.xml
index 8754b0af..fbb05cfb 100644
--- a/prh-dmaap-client/pom.xml
+++ b/prh-dmaap-client/pom.xml
@@ -81,5 +81,10 @@
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>4.3.3.RELEASE</version>
+ </dependency>
</dependencies>
</project> \ No newline at end of file