SDC Listner Docker touchup 88/85988/5
authorOleg Mitsura <oleg.mitsura@amdocs.com>
Mon, 22 Apr 2019 21:47:33 +0000 (17:47 -0400)
committerOleg Mitsura <oleg.mitsura@amdocs.com>
Tue, 23 Apr 2019 15:07:55 +0000 (11:07 -0400)
1.Reworked Dockerization of SDC Listener to follow
 application/distribution+parent style;
2.Renamed CDS-SDClistener to just SDCListener

Issue-ID: CCSDK-1145

Change-Id: I007373d3a48fb8eb7042150bdbb37fc7fec346b3
Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
35 files changed:
ms/cds-sdc-listener/application/pom.xml [deleted file]
ms/cds-sdc-listener/application/src/main/docker/Dockerfile [deleted file]
ms/cds-sdc-listener/application/src/main/docker/start.sh [deleted file]
ms/pom.xml
ms/sdclistener/application/pom.xml [new file with mode: 0644]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerApplication.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/CdsSdcListenerApplication.java with 79% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerConfiguration.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/CdsSdcListenerConfiguration.java with 96% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerNotificationCallback.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/CdsSdcListenerNotificationCallback.java with 83% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/client/SdcListenerAuthClientInterceptor.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/client/CdsSdcListenerAuthClientInterceptor.java with 93% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/client/SdcListenerClient.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/client/CdsSdcListenerClient.java with 73% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/controller/HealthCheck.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/controller/HealthCheck.java with 95% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/dto/SdcListenerDto.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/dto/CdsSdcListenerDto.java with 86% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/exceptions/SdcListenerException.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/exceptions/CdsSdcListenerException.java with 76% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcesssorHandler.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/handler/BluePrintProcesssorHandler.java with 98% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerService.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerService.java with 97% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImpl.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerServiceImpl.java with 91% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/status/DistributionStatusMessage.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/status/DistributionStatusMessage.java with 96% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/status/SdcListenerStatus.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/status/CdsSdcListenerStatus.java with 87% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/util/BuilderUtil.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/util/BuilderUtil.java with 93% similarity]
ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/util/FileUtil.java [moved from ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/cds/cdssdclistener/util/FileUtil.java with 97% similarity]
ms/sdclistener/application/src/main/resources/application.yml [moved from ms/cds-sdc-listener/application/src/main/resources/application.yml with 100% similarity]
ms/sdclistener/application/src/main/resources/logback.xml [moved from ms/cds-sdc-listener/application/src/main/resources/logback.xml with 100% similarity]
ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/SdcListenerClientTest.java [moved from ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/CdsSdcListenerClientTest.java with 77% similarity]
ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/SdcListenerConfigurationTest.java [moved from ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/CdsSdcListenerConfigurationTest.java with 87% similarity]
ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java [moved from ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/handler/BluePrintProcessorHandlerTest.java with 94% similarity]
ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java [moved from ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerServiceImplTest.java with 85% similarity]
ms/sdclistener/application/src/test/resources/service-Testsvc140.csar [moved from ms/cds-sdc-listener/application/src/test/resources/service-Testsvc140.csar with 100% similarity]
ms/sdclistener/application/src/test/resources/testcba.zip [moved from ms/cds-sdc-listener/application/src/test/resources/testcba.zip with 100% similarity]
ms/sdclistener/distribution/pom.xml [new file with mode: 0755]
ms/sdclistener/distribution/src/main/dc/docker-compose.yaml [moved from ms/cds-sdc-listener/application/src/main/docker/docker-compose.yaml with 95% similarity, mode: 0755]
ms/sdclistener/distribution/src/main/docker/Dockerfile [new file with mode: 0755]
ms/sdclistener/distribution/src/main/docker/distribution.xml [new file with mode: 0755]
ms/sdclistener/distribution/src/main/docker/startService.sh [new file with mode: 0644]
ms/sdclistener/parent/pom.xml [new file with mode: 0755]
ms/sdclistener/pom.xml [moved from ms/cds-sdc-listener/pom.xml with 53% similarity]

diff --git a/ms/cds-sdc-listener/application/pom.xml b/ms/cds-sdc-listener/application/pom.xml
deleted file mode 100644 (file)
index 3f8e1a3..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright (C) 2019 Bell Canada. All rights reserved.
-  ~
-  ~ NOTICE:  All the intellectual and technical concepts contained herein are
-  ~ proprietary to Bell Canada and are protected by trade secret or copyright law.
-  ~ Unauthorized copying of this file, via any medium is strictly prohibited.
-  -->
-<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">
-
-  <parent>
-    <groupId>org.onap.ccsdk.parent</groupId>
-    <artifactId>spring-boot-starter-parent</artifactId>
-    <version>1.2.2-SNAPSHOT</version>
-  </parent>
-
-  <groupId>org.onap.ccsdk.cds</groupId>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>cds-sdc-listener-application</artifactId>
-  <version>0.4.2-SNAPSHOT</version>
-  <name>CDS-SDC Listener Application</name>
-
-  <properties>
-    <grpc.version>1.17.1</grpc.version>
-    <protobuf.version>3.6.1</protobuf.version>
-    <image.name>onap/ccsdk-cds-sdc-listener</image.name>
-    <docker.push.phase>deploy</docker.push.phase>
-    <project.version>${parent.version}</project.version>
-    <!-- Start of Docker Related Properties -->
-    <docker.fabric.version>0.26.1</docker.fabric.version>
-    <ccsdk.project.version>${project.version}</ccsdk.project.version>
-  </properties>
-
-  <dependencies>
-    <!-- Spring boot -->
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-web</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- SDC Distribution client dependency -->
-    <dependency>
-      <groupId>org.onap.sdc.sdc-distribution-client</groupId>
-      <artifactId>sdc-distribution-client</artifactId>
-      <version>1.3.0</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jmockit</groupId>
-      <artifactId>jmockit</artifactId>
-      <version>1.19</version>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- GRPC Dependencies -->
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-netty</artifactId>
-      <version>${grpc.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-protobuf</artifactId>
-      <version>${grpc.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-stub</artifactId>
-      <version>${grpc.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <version>${protobuf.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>io.grpc</groupId>
-      <artifactId>grpc-testing</artifactId>
-      <version>${grpc.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.onap.ccsdk.cds.components</groupId>
-      <artifactId>proto-definition</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>io.projectreactor</groupId>
-      <artifactId>reactor-core</artifactId>
-      <version>3.2.6.RELEASE</version>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>repackage</id>
-            <goals>
-              <goal>repackage</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <version>1.8</version>
-        <executions>
-          <execution>
-            <id>copy</id>
-            <phase>package</phase>
-            <configuration>
-              <target>
-                <echo>ANT TASK - copying Docker files</echo>
-                <copy todir="${basedir}/target/docker-stage" overwrite="true" flatten="true">
-                  <fileset dir="${basedir}/src/main/docker">
-                    <include name="Dockerfile"/>
-                    <include name="start.sh"/>
-                  </fileset>
-                  <fileset dir="${basedir}/target">
-                    <include name="*.jar"/>
-                  </fileset>
-                  <fileset dir="${basedir}/src/main/resources/">
-                    <include name="application.yml"/>
-                  </fileset>
-                </copy>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.groovy.maven</groupId>
-        <artifactId>gmaven-plugin</artifactId>
-        <version>1.0</version>
-        <executions>
-          <execution>
-            <phase>validate</phase>
-            <goals>
-              <goal>execute</goal>
-            </goals>
-            <configuration>
-              <source>${basedir}/../../../TagVersion.groovy</source>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <profiles>
-    <profile>
-      <id>docker</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>io.fabric8</groupId>
-            <artifactId>docker-maven-plugin</artifactId>
-            <version>${docker.fabric.version}</version>
-            <inherited>false</inherited>
-            <configuration>
-              <images>
-                <image>
-                  <name>${image.name}</name>
-                  <build>
-                    <cleanup>try</cleanup>
-                    <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
-                    <tags>
-                      <tag>${project.docker.latestminortag.version}</tag>
-                      <tag>${project.docker.latestfulltag.version}</tag>
-                      <tag>${project.docker.latesttagtimestamp.version}</tag>
-                    </tags>
-                  </build>
-                </image>
-              </images>
-              <verbose>true</verbose>
-            </configuration>
-            <executions>
-              <execution>
-                <id>generate-images</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>build</goal>
-                </goals>
-              </execution>
-              <execution>
-                <id>push-images</id>
-                <phase>${docker.push.phase}</phase>
-                <goals>
-                  <goal>build</goal>
-                  <goal>push</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
-</project>
diff --git a/ms/cds-sdc-listener/application/src/main/docker/Dockerfile b/ms/cds-sdc-listener/application/src/main/docker/Dockerfile
deleted file mode 100644 (file)
index 062f657..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM openjdk:8-jdk-alpine
-
-ENV HTTP_PROXY  ${HTTP_PROXY}
-ENV HTTPS_PROXY ${HTTPS_PROXY}
-
-RUN mkdir -p /opt/app/onap/ /opt/app/onap/config
-WORKDIR  /opt/app/onap/
-COPY start.sh /opt/app/onap/
-COPY application.yml /opt/app/onap/config
-RUN chmod 751 /opt/app/onap/start.sh
-COPY cds-sdc-listener-application-0.4.2-SNAPSHOT.jar /opt/app/onap/cds-sdc-listener-distribution.jar
-EXPOSE 9000
-ENTRYPOINT /opt/app/onap/start.sh
diff --git a/ms/cds-sdc-listener/application/src/main/docker/start.sh b/ms/cds-sdc-listener/application/src/main/docker/start.sh
deleted file mode 100755 (executable)
index f24d156..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-extraArgs=$@
-java -jar /opt/app/onap/cds-sdc-listener-distribution.jar \
--Dspring.config=/opt/app/onap/config/application.yml \
--Djava.security.egd=file:/dev/./urandom \
-${extraArgs}
index d1c87c9..b97ebc0 100644 (file)
@@ -36,6 +36,6 @@
         <module>controllerblueprints</module>
         <module>blueprintsprocessor</module>
         <module>command-executor</module>
-        <module>cds-sdc-listener</module>
+        <module>sdclistener</module>
     </modules>
 </project>
diff --git a/ms/sdclistener/application/pom.xml b/ms/sdclistener/application/pom.xml
new file mode 100644 (file)
index 0000000..5513279
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (C) 2019 Bell Canada. All rights reserved.
+  ~
+  ~ NOTICE:  All the intellectual and technical concepts contained herein are
+  ~ proprietary to Bell Canada and are protected by trade secret or copyright law.
+  ~ Unauthorized copying of this file, via any medium is strictly prohibited.
+  -->
+<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.ccsdk.cds.sdclistener</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.4.2-SNAPSHOT</version>
+    <relativePath>../parent</relativePath>
+  </parent>
+
+  <artifactId>application</artifactId>
+  <packaging>jar</packaging>
+  <version>0.4.2-SNAPSHOT</version>
+  <name>SDC Listener Application</name>
+
+  <properties>
+    <protobuf.version>3.6.1</protobuf.version>
+    <project.version>${parent.version}</project.version>
+  </properties>
+
+  <dependencies>
+    <!-- Spring boot -->
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-web</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- SDC Distribution client dependency -->
+    <dependency>
+      <groupId>org.onap.sdc.sdc-distribution-client</groupId>
+      <artifactId>sdc-distribution-client</artifactId>
+      <version>1.3.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jmockit</groupId>
+      <artifactId>jmockit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- GRPC Dependencies -->
+    <dependency>
+      <groupId>io.grpc</groupId>
+      <artifactId>grpc-netty</artifactId>
+      <version>${grpc.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.grpc</groupId>
+      <artifactId>grpc-protobuf</artifactId>
+      <version>${grpc.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.grpc</groupId>
+      <artifactId>grpc-stub</artifactId>
+      <version>${grpc.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.grpc</groupId>
+      <artifactId>grpc-testing</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.ccsdk.cds.components</groupId>
+      <artifactId>proto-definition</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>io.projectreactor</groupId>
+      <artifactId>reactor-core</artifactId>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+</project>
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 
 @SpringBootApplication
-@EnableConfigurationProperties(CdsSdcListenerConfiguration.class)
-public class CdsSdcListenerApplication {
+@EnableConfigurationProperties(SdcListenerConfiguration.class)
+public class SdcListenerApplication {
     public static void main(String[] args) {
-        SpringApplication.run(CdsSdcListenerApplication.class, args);
+        SpringApplication.run(SdcListenerApplication.class, args);
     }
 }
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
 
 import java.util.List;
 import org.onap.sdc.api.consumer.IConfiguration;
@@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  * distribution client needs.
  */
 @ConfigurationProperties("listenerservice")
-public class CdsSdcListenerConfiguration implements IConfiguration {
+public class SdcListenerConfiguration implements IConfiguration {
 
     public static final String TOSCA_CSAR = "TOSCA_CSAR";
 
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
 
 import static org.onap.sdc.utils.DistributionActionResultEnum.SUCCESS;
 import java.io.File;
@@ -22,10 +22,10 @@ import java.nio.file.Paths;
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.service.ListenerService;
-import org.onap.ccsdk.cds.cdssdclistener.status.CdsSdcListenerStatus;
-import org.onap.ccsdk.cds.cdssdclistener.util.FileUtil;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.service.ListenerService;
+import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
+import org.onap.ccsdk.cds.sdclistener.util.FileUtil;
 import org.onap.sdc.api.IDistributionClient;
 import org.onap.sdc.api.consumer.INotificationCallback;
 import org.onap.sdc.api.notification.IArtifactInfo;
@@ -43,10 +43,10 @@ import org.springframework.stereotype.Component;
 @ConfigurationProperties("listenerservice")
 @Component
 @ComponentScan("org.onap.ccsdk.cds.cdssdclistener.dto")
-public class CdsSdcListenerNotificationCallback implements INotificationCallback {
+public class SdcListenerNotificationCallback implements INotificationCallback {
 
     @Autowired
-    private CdsSdcListenerDto cdsSdcListenerDto;
+    private SdcListenerDto sdcListenerDto;
 
     @Autowired
     private ListenerService listenerService;
@@ -55,20 +55,20 @@ public class CdsSdcListenerNotificationCallback implements INotificationCallback
     private String pathToStoreArchives;
 
     @Autowired
-    private CdsSdcListenerStatus listenerStatus;
+    private SdcListenerStatus listenerStatus;
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(CdsSdcListenerNotificationCallback.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(SdcListenerNotificationCallback.class);
 
     @Override
     public void activateCallback(INotificationData notificationData) {
         final String distributionId = notificationData.getDistributionID();
-        cdsSdcListenerDto.setDistributionId(distributionId);
+        sdcListenerDto.setDistributionId(distributionId);
         LOGGER.info("Received service distribution from SDC with the id {}", distributionId);
         processNotification(notificationData);
     }
 
     private void processNotification(INotificationData notificationData) {
-        final IDistributionClient distributionClient = cdsSdcListenerDto.getDistributionClient();
+        final IDistributionClient distributionClient = sdcListenerDto.getDistributionClient();
         notificationData.getServiceArtifacts()
             .forEach(artifactInfo -> downloadCsarArtifacts(artifactInfo, distributionClient));
     }
@@ -83,7 +83,7 @@ public class CdsSdcListenerNotificationCallback implements INotificationCallback
         final String url = info.getArtifactURL();
         final String id = info.getArtifactUUID();
 
-        if (Objects.equals(info.getArtifactType(), CdsSdcListenerConfiguration.TOSCA_CSAR)) {
+        if (Objects.equals(info.getArtifactType(), SdcListenerConfiguration.TOSCA_CSAR)) {
             LOGGER.info("Trying to download the artifact from : {} and UUID is {} ", url, id);
 
             // Download the artifact
@@ -92,7 +92,7 @@ public class CdsSdcListenerNotificationCallback implements INotificationCallback
             if (!Objects.equals(result.getDistributionActionResult(), SUCCESS)) {
                 String errorMessage = String.format("Failed to download the artifact from : %s due to %s ", url,
                     result.getDistributionActionResult());
-                listenerStatus.sendResponseStatusBackToSDC(cdsSdcListenerDto.getDistributionId(),
+                listenerStatus.sendResponseStatusBackToSDC(sdcListenerDto.getDistributionId(),
                     DistributionStatusEnum.COMPONENT_DONE_ERROR, errorMessage);
                 LOGGER.error(errorMessage);
             } else {
@@ -124,6 +124,6 @@ public class CdsSdcListenerNotificationCallback implements INotificationCallback
             }
         }
 
-        listenerService.saveBluePrintToCdsDatabase(cbaArchivePath, cdsSdcListenerDto.getManagedChannelForGrpc());
+        listenerService.saveBluePrintToCdsDatabase(cbaArchivePath, sdcListenerDto.getManagedChannelForGrpc());
     }
 }
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onap.ccsdk.cds.cdssdclistener.client;
+package org.onap.ccsdk.cds.sdclistener.client;
 
 import io.grpc.CallOptions;
 import io.grpc.Channel;
@@ -33,7 +33,7 @@ import org.springframework.stereotype.Component;
  */
 @ConfigurationProperties("listenerservice")
 @Component
-public class CdsSdcListenerAuthClientInterceptor implements ClientInterceptor {
+public class SdcListenerAuthClientInterceptor implements ClientInterceptor {
 
     @Value("${listenerservice.config.authHeader}")
     private String basicAuth;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener.client;
+package org.onap.ccsdk.cds.sdclistener.client;
 
 import java.util.Optional;
-import org.onap.ccsdk.cds.cdssdclistener.CdsSdcListenerConfiguration;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.CdsSdcListenerNotificationCallback;
-import org.onap.ccsdk.cds.cdssdclistener.exceptions.CdsSdcListenerException;
+import org.onap.ccsdk.cds.sdclistener.SdcListenerConfiguration;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.SdcListenerNotificationCallback;
+import org.onap.ccsdk.cds.sdclistener.exceptions.SdcListenerException;
 import org.onap.sdc.api.IDistributionClient;
 import org.onap.sdc.api.results.IDistributionClientResult;
 import org.onap.sdc.impl.DistributionClientFactory;
@@ -34,18 +34,18 @@ import org.springframework.stereotype.Component;
 
 @Component
 @ComponentScan("org.onap.ccsdk.cds.cdssdclistener.dto")
-public class CdsSdcListenerClient {
+public class SdcListenerClient {
 
-    private static Logger LOG = LoggerFactory.getLogger(CdsSdcListenerClient.class);
+    private static Logger LOG = LoggerFactory.getLogger(SdcListenerClient.class);
 
     @Autowired
-    private CdsSdcListenerConfiguration configuration;
+    private SdcListenerConfiguration configuration;
 
     @Autowired
-    private CdsSdcListenerNotificationCallback notification;
+    private SdcListenerNotificationCallback notification;
 
     @Autowired
-    private CdsSdcListenerDto listenerDto;
+    private SdcListenerDto listenerDto;
 
     private IDistributionClient distributionClient;
 
@@ -53,11 +53,11 @@ public class CdsSdcListenerClient {
      * This method initializes the SDC Distribution client.
      */
     @EventListener(ApplicationReadyEvent.class)
-    public void initSdcClient() throws CdsSdcListenerException {
+    public void initSdcClient() throws SdcListenerException {
         LOG.info("Initialize the SDC distribution client");
 
         distributionClient = Optional.of(DistributionClientFactory.createDistributionClient())
-            .orElseThrow(() -> new CdsSdcListenerException("Could not able to create SDC Distribution client"));
+            .orElseThrow(() -> new SdcListenerException("Could not able to create SDC Distribution client"));
 
         listenerDto.setManagedChannelForGrpc();
 
@@ -67,9 +67,9 @@ public class CdsSdcListenerClient {
         startSdcClientBasedOnTheResult(result);
     }
 
-    private void startSdcClientBasedOnTheResult(IDistributionClientResult result) throws CdsSdcListenerException {
+    private void startSdcClientBasedOnTheResult(IDistributionClientResult result) throws SdcListenerException {
         if (!result.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
-            throw new CdsSdcListenerException(
+            throw new SdcListenerException(
                 "SDC distribution client init failed with reason:" + result.getDistributionMessageResult());
         }
 
@@ -79,16 +79,16 @@ public class CdsSdcListenerClient {
         result = this.distributionClient.start();
 
         if (!result.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
-            throw new CdsSdcListenerException(
+            throw new SdcListenerException(
                 "Startup of the SDC distribution client failed with reason: " + result.getDistributionMessageResult());
         }
     }
 
-    private void closeSdcDistributionclient() throws CdsSdcListenerException {
+    private void closeSdcDistributionclient() throws SdcListenerException {
         LOG.info("Closing SDC distribution client");
         IDistributionClientResult status = this.distributionClient.stop();
         if (status.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
-            throw new CdsSdcListenerException(
+            throw new SdcListenerException(
                 "Failed to close the SDC distribution client due to : " + status.getDistributionMessageResult());
         }
     }
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener.dto;
+package org.onap.ccsdk.cds.sdclistener.dto;
 
 import io.grpc.ManagedChannel;
 import io.grpc.ManagedChannelBuilder;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
 import org.onap.sdc.api.IDistributionClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Component;
 
 @Component
 @ConfigurationProperties("listenerservice")
-public class CdsSdcListenerDto {
+public class SdcListenerDto {
 
     @Value("${listenerservice.config.grpcAddress}")
     private String grpcAddress;
@@ -35,7 +35,7 @@ public class CdsSdcListenerDto {
     private int grpcPort;
 
     @Autowired
-    private CdsSdcListenerAuthClientInterceptor cdsSdcListenerAuthClientInterceptor;
+    private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
 
     private IDistributionClient distributionClient;
     private ManagedChannel managedChannel;
@@ -60,7 +60,7 @@ public class CdsSdcListenerDto {
     public void setManagedChannelForGrpc() {
         managedChannel = ManagedChannelBuilder.forAddress(grpcAddress, grpcPort)
             .usePlaintext()
-            .intercept(cdsSdcListenerAuthClientInterceptor)
+            .intercept(sdcListenerAuthClientInterceptor)
             .build();
     }
 
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener.exceptions;
+package org.onap.ccsdk.cds.sdclistener.exceptions;
 
-public class CdsSdcListenerException extends Exception {
+public class SdcListenerException extends Exception {
 
     /**
      * @param message The message to dump
      */
-    public CdsSdcListenerException(final String message) {
+    public SdcListenerException(final String message) {
         super(message);
     }
 
@@ -28,7 +28,7 @@ public class CdsSdcListenerException extends Exception {
      * @param message The message to dump
      * @param cause The Throwable cause object
      */
-    public CdsSdcListenerException(final String message, final Throwable cause) {
+    public SdcListenerException(final String message, final Throwable cause) {
         super(message, cause);
     }
 }
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onap.ccsdk.cds.cdssdclistener.service;
+package org.onap.ccsdk.cds.sdclistener.service;
 
 import static java.nio.file.Files.walk;
 import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_ERROR;
@@ -33,17 +33,15 @@ import java.util.Enumeration;
 import java.util.List;
 import java.util.Optional;
 import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.apache.commons.io.FileUtils;
 import org.apache.tomcat.util.http.fileupload.IOUtils;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.handler.BluePrintProcesssorHandler;
-import org.onap.ccsdk.cds.cdssdclistener.status.CdsSdcListenerStatus;
-import org.onap.ccsdk.cds.cdssdclistener.util.FileUtil;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler;
+import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
+import org.onap.ccsdk.cds.sdclistener.util.FileUtil;
 import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
 import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput;
 import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk;
@@ -63,13 +61,13 @@ public class ListenerServiceImpl implements ListenerService {
     private BluePrintProcesssorHandler bluePrintProcesssorHandler;
 
     @Autowired
-    private CdsSdcListenerAuthClientInterceptor cdsSdcListenerAuthClientInterceptor;
+    private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
 
     @Autowired
-    private CdsSdcListenerStatus listenerStatus;
+    private SdcListenerStatus listenerStatus;
 
     @Autowired
-    private CdsSdcListenerDto cdsSdcListenerDto;
+    private SdcListenerDto sdcListenerDto;
 
     @Value("${listenerservice.config.grpcAddress}")
     private String grpcAddress;
@@ -161,7 +159,7 @@ public class ListenerServiceImpl implements ListenerService {
     }
 
     private void prepareRequestForCdsBackend(List<File> files, ManagedChannel managedChannel, String path) {
-        final String distributionId = cdsSdcListenerDto.getDistributionId();
+        final String distributionId = sdcListenerDto.getDistributionId();
 
         files.forEach(zipFile -> {
             try {
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener.status;
+package org.onap.ccsdk.cds.sdclistener.status;
 
 import static org.onap.sdc.utils.DistributionActionResultEnum.SUCCESS;
 import java.util.Objects;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.util.BuilderUtil;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.util.BuilderUtil;
 import org.onap.sdc.api.IDistributionClient;
 import org.onap.sdc.api.consumer.IFinalDistrStatusMessage;
 import org.onap.sdc.api.results.IDistributionClientResult;
-import org.onap.sdc.impl.DistributionClientImpl;
 import org.onap.sdc.utils.DistributionStatusEnum;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,16 +34,16 @@ import org.springframework.stereotype.Component;
 @Component
 @ConfigurationProperties("listenerservice")
 @ComponentScan("org.onap.ccsdk.cds.cdssdclistener.dto")
-public class CdsSdcListenerStatus {
+public class SdcListenerStatus {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(CdsSdcListenerStatus.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(SdcListenerStatus.class);
     private static final String COMPONENT_NAME = "cds";
 
     @Value("${listenerservice.config.consumerId}")
     private String consumerId;
 
     @Autowired
-    private CdsSdcListenerDto cdsSdcListenerDto;
+    private SdcListenerDto sdcListenerDto;
 
     /**
      * Send the response back to SDC.
@@ -55,7 +54,7 @@ public class CdsSdcListenerStatus {
      */
     public void sendResponseStatusBackToSDC(String distributionID, DistributionStatusEnum status, String errorReason) {
 
-        final IDistributionClient distributionClient = cdsSdcListenerDto.getDistributionClient();
+        final IDistributionClient distributionClient = sdcListenerDto.getDistributionClient();
 
         IFinalDistrStatusMessage finalDistribution = new BuilderUtil<>(new DistributionStatusMessage())
             .build(builder -> {
@@ -5,7 +5,7 @@
  * proprietary to Bell Canada and are protected by trade secret or copyright law.
  * Unauthorized copying of this file, via any medium is strictly prohibited.
  */
-package org.onap.ccsdk.cds.cdssdclistener.util;
+package org.onap.ccsdk.cds.sdclistener.util;
 
 import java.util.function.Consumer;
 
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
 
 import mockit.Expectations;
 import mockit.Injectable;
@@ -24,9 +24,9 @@ import mockit.VerificationsInOrder;
 import mockit.integration.junit4.JMockit;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerClient;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.exceptions.CdsSdcListenerException;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerClient;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.exceptions.SdcListenerException;
 import org.onap.sdc.api.IDistributionClient;
 import org.onap.sdc.api.results.IDistributionClientResult;
 import org.onap.sdc.impl.DistributionClientFactory;
@@ -34,16 +34,16 @@ import org.onap.sdc.impl.DistributionClientResultImpl;
 import org.onap.sdc.utils.DistributionActionResultEnum;
 
 @RunWith(JMockit.class)
-public class CdsSdcListenerClientTest {
+public class SdcListenerClientTest {
 
     @Tested
-    private CdsSdcListenerClient cdsSdcListenerClient;
+    private SdcListenerClient sdcListenerClient;
 
     @Test
     public void testInitCdsClientSuccesfully(@Injectable IDistributionClient distributionClient,
-        @Injectable CdsSdcListenerConfiguration configuration,
-        @Injectable CdsSdcListenerNotificationCallback notification,
-        @Injectable CdsSdcListenerDto cdsSdcListenerDto) throws CdsSdcListenerException {
+        @Injectable SdcListenerConfiguration configuration,
+        @Injectable SdcListenerNotificationCallback notification,
+        @Injectable SdcListenerDto sdcListenerDto) throws SdcListenerException {
 
          //Arrange
         new MockUp<DistributionClientFactory>() {
@@ -64,7 +64,7 @@ public class CdsSdcListenerClientTest {
         }};
 
         // Act
-        cdsSdcListenerClient.initSdcClient();
+        sdcListenerClient.initSdcClient();
 
         // Verify
         new VerificationsInOrder() {{
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
 
 import static org.junit.Assert.assertEquals;
 import org.junit.Test;
@@ -24,12 +24,12 @@ import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
 @RunWith(SpringRunner.class)
-@EnableConfigurationProperties(CdsSdcListenerConfiguration.class)
-@SpringBootTest(classes = {CdsSdcListenerConfigurationTest.class})
-public class CdsSdcListenerConfigurationTest {
+@EnableConfigurationProperties(SdcListenerConfiguration.class)
+@SpringBootTest(classes = {SdcListenerConfigurationTest.class})
+public class SdcListenerConfigurationTest {
 
     @Autowired
-    private CdsSdcListenerConfiguration listenerConfiguration;
+    private SdcListenerConfiguration listenerConfiguration;
 
     @Test
     public void testCdsSdcListenerConfiguration() {
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener.handler;
+package org.onap.ccsdk.cds.sdclistener.handler;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -31,7 +31,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
 import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
 import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput;
 import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase;
@@ -43,7 +43,7 @@ import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
 @RunWith(SpringRunner.class)
-@EnableConfigurationProperties({BluePrintProcesssorHandler.class, CdsSdcListenerAuthClientInterceptor.class})
+@EnableConfigurationProperties({BluePrintProcesssorHandler.class, SdcListenerAuthClientInterceptor.class})
 @SpringBootTest(classes = {BluePrintProcessorHandlerTest.class})
 public class BluePrintProcessorHandlerTest {
 
@@ -51,7 +51,7 @@ public class BluePrintProcessorHandlerTest {
     private BluePrintProcesssorHandler bluePrintProcesssorHandler;
 
     @Autowired
-    private CdsSdcListenerAuthClientInterceptor cdsSdcListenerAuthClientInterceptor;
+    private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
 
     @Rule
     public GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onap.ccsdk.cds.cdssdclistener.service;
+package org.onap.ccsdk.cds.sdclistener.service;
 
 import static junit.framework.TestCase.assertTrue;
 import java.io.File;
@@ -27,11 +27,11 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
-import org.onap.ccsdk.cds.cdssdclistener.CdsSdcListenerConfiguration;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.handler.BluePrintProcesssorHandler;
-import org.onap.ccsdk.cds.cdssdclistener.status.CdsSdcListenerStatus;
+import org.onap.ccsdk.cds.sdclistener.SdcListenerConfiguration;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler;
+import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
 import org.onap.sdc.api.results.IDistributionClientDownloadResult;
 import org.onap.sdc.impl.mock.DistributionClientResultStubImpl;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,9 +40,9 @@ import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
 @RunWith(SpringRunner.class)
-@EnableConfigurationProperties({CdsSdcListenerAuthClientInterceptor.class,
-    BluePrintProcesssorHandler.class, CdsSdcListenerDto.class, ListenerServiceImpl.class, CdsSdcListenerStatus.class,
-    CdsSdcListenerConfiguration.class})
+@EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class,
+    BluePrintProcesssorHandler.class, SdcListenerDto.class, ListenerServiceImpl.class, SdcListenerStatus.class,
+    SdcListenerConfiguration.class})
 @SpringBootTest(classes = {ListenerServiceImplTest.class})
 public class ListenerServiceImplTest {
 
diff --git a/ms/sdclistener/distribution/pom.xml b/ms/sdclistener/distribution/pom.xml
new file mode 100755 (executable)
index 0000000..a79a14c
--- /dev/null
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Copyright © 2019 IBM, Bell Canada.
+  ~
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+        <artifactId>parent</artifactId>
+        <version>0.4.2-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <artifactId>distribution</artifactId>
+    <packaging>pom</packaging>
+    <name>SDC Listener Distribution</name>
+    <properties>
+        <assembly.id>maven</assembly.id>
+        <name.space>org.onap.ccsdk.cds</name.space>
+        <serviceArtifactName>sdclistener</serviceArtifactName>
+        <image.name>onap/ccsdk-sdclistener</image.name>
+        <!--disabled for now to mirror #85964 https://gerrit.onap.org/r/#/c/85964/2/ms/command-executor/pom.xml-->
+        <!--<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>-->
+        <docker.push.phase>deploy</docker.push.phase>
+        <docker.verbose>true</docker.verbose>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+            <artifactId>application</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-dockerfile</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals><!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/docker</directory>
+                                    <includes>
+                                        <include>*</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>ant-test</id>
+                        <phase>package</phase>
+                        <configuration>
+                            <tasks>
+                                <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <!--build the final artifact for docker deployment -->
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <!-- <skipAssembly>${skip.assembly}</skipAssembly> -->
+                    <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                    <descriptors>
+                        <descriptor>src/main/docker/distribution.xml</descriptor>
+                    </descriptors>
+                    <tarLongFileMode>posix</tarLongFileMode>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>${assembly.id}</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>${basedir}/../../../TagVersion.groovy</source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.26.1</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+                                        <tags>
+                                            <tag>${project.docker.latestminortag.version}</tag>
+                                            <tag>${project.docker.latestfulltag.version}</tag>
+                                            <tag>${project.docker.latesttagtimestamp.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                            <verbose>true</verbose>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>push-images</id>
+                                <phase>${docker.push.phase}</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
old mode 100644 (file)
new mode 100755 (executable)
similarity index 95%
rename from ms/cds-sdc-listener/application/src/main/docker/docker-compose.yaml
rename to ms/sdclistener/distribution/src/main/dc/docker-compose.yaml
index 1e73847..1c68f6c
@@ -2,7 +2,7 @@ version: '3.3'
 
 services:
   cds-sdc-listener:
-    image: onap/cdssdclistener:latest
+    image: onap/ccsdk-sdclistener:latest
     container_name: cdssdclistener
     restart: always
     environment:
diff --git a/ms/sdclistener/distribution/src/main/docker/Dockerfile b/ms/sdclistener/distribution/src/main/docker/Dockerfile
new file mode 100755 (executable)
index 0000000..e945188
--- /dev/null
@@ -0,0 +1,16 @@
+FROM openjdk:8-jdk-alpine
+
+ENV HTTP_PROXY  ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+
+# add entrypoint
+COPY startService.sh /startService.sh
+RUN chmod 751 /startService.sh
+# add application
+COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
+RUN tar -xzf /source.tar.gz -C /tmp \
+ && cp -rf /tmp/@project.build.finalName@/opt / \
+ && rm -rf /source.tar.gz \
+ && rm -rf /tmp/@project.build.finalName@
+
+ENTRYPOINT /startService.sh
diff --git a/ms/sdclistener/distribution/src/main/docker/distribution.xml b/ms/sdclistener/distribution/src/main/docker/distribution.xml
new file mode 100755 (executable)
index 0000000..e9e8eef
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright © 2018-2019 Bell Canada.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+    <!-- create a tar.gz file containing the projects dependencies -->
+    <id>${assembly.id}</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/opt/app/onap/lib</outputDirectory>
+            <outputFileNameMapping>${artifact.groupId}-${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <excludes>
+                <exclude>org.slf4j:slf4j-simple</exclude>
+            </excludes>
+        </dependencySet>
+    </dependencySets>
+    <fileSets>
+        <fileSet>
+            <directory>${project.basedir}/../application/src/main/resources</directory>
+            <includes>
+                <include>application.properties</include>
+                <include>application.yml</include>
+                <include>logback.xml</include>
+            </includes>
+            <outputDirectory>/opt/app/onap/config</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/ms/sdclistener/distribution/src/main/docker/startService.sh b/ms/sdclistener/distribution/src/main/docker/startService.sh
new file mode 100644 (file)
index 0000000..7ad6171
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+echo "Starting SDC Listener"
+
+export APP_HOME=/opt/app/onap
+export APP_CONFIG_HOME=${APP_HOME}/config
+echo "APP Config HOME : ${APP_CONFIG_HOME}"
+
+java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \
+-Dlogging.config=${APP_CONFIG_HOME}/logback.xml \
+-Djava.security.egd=file:/dev/./urandom \
+-Dspring.config.location=${APP_CONFIG_HOME}/ \
+org.onap.ccsdk.cds.sdclistener.SdcListenerApplication
diff --git a/ms/sdclistener/parent/pom.xml b/ms/sdclistener/parent/pom.xml
new file mode 100755 (executable)
index 0000000..fabdc25
--- /dev/null
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Copyright © 2017-2018 AT&T Intellectual Property.
+  ~
+  ~  Modifications Copyright © 2018 - 2019 IBM, Bell Canada
+  ~
+  ~  Licensed under the Apache License, Version 2.0 (the "License");
+  ~  you may not use this file except in compliance with the License.
+  ~  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.cds</groupId>
+        <artifactId>sdclistener</artifactId>
+        <version>0.4.2-SNAPSHOT</version>
+    </parent>
+    <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+    <artifactId>parent</artifactId>
+    <packaging>pom</packaging>
+    <name>SDC Listener Parent</name>
+    <description>SDC Listener Parent</description>
+    <properties>
+        <spring.boot.version>2.1.3.RELEASE</spring.boot.version>
+        <spring.version>5.1.5.RELEASE</spring.version>
+        <grpc.version>1.18.0</grpc.version>
+        <protobuff.java.utils.version>3.6.1</protobuff.java.utils.version>
+        <eelf.version>1.0.0</eelf.version>
+        <sli.version>0.4.2-SNAPSHOT</sli.version>
+        <guava.version>27.0.1-jre</guava.version>
+        <onap.logger.slf4j>1.2.2</onap.logger.slf4j>
+        <powermock.version>1.7.4</powermock.version>
+        <mockk.version>1.9</mockk.version>
+        <dmaap.client.version>1.1.5</dmaap.client.version>
+        <mockkserver.version>5.5.1</mockkserver.version>
+        <sdc-distribution-client.version>1.3.0</sdc-distribution-client.version>
+        <jmockit.version>1.19</jmockit.version>
+        <reactorcore.version>3.2.6.RELEASE</reactorcore.version>
+    </properties>
+    <dependencyManagement>
+        <dependencies>
+            <!-- Spring Boot -->
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-parent</artifactId>
+                <version>${spring.boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- Common Utils Dependencies -->
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-lang3</artifactId>
+                <version>3.2.1</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+                <version>3.2.2</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>2.6</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-compress</artifactId>
+                <version>1.15</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.google.guava</groupId>
+                <artifactId>guava</artifactId>
+                <version>${guava.version}</version>
+            </dependency>
+
+            <!-- GRPC Dependencies -->
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-core</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-netty</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-protobuf</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-stub</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.protobuf</groupId>
+                <artifactId>protobuf-java</artifactId>
+                <version>${protobuff.java.utils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.components</groupId>
+                <artifactId>proto-definition</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.projectreactor</groupId>
+                <artifactId>reactor-core</artifactId>
+                <version>${reactorcore.version}</version>
+            </dependency>
+
+            <!-- Blueprint Processor Application Module Dependencies -->
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>processor-core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>db-lib</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>rest-lib</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>dmaap-lib</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>grpc-lib</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>execution-service</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>workflow-service</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>resource-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>selfservice-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+                <artifactId>application</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+
+            <!-- Controller Blueprints Application Dependency -->
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+                <artifactId>resource-dict</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+                <artifactId>blueprint-core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+                <artifactId>blueprint-scripts</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+                <artifactId>db-resources</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+                <artifactId>blueprint-validation</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <!-- Test Dependency -->
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-testing</artifactId>
+                <version>${grpc.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.jmockit</groupId>
+                <artifactId>jmockit</artifactId>
+                <version>${jmockit.version}</version>
+                <scope>test</scope>
+            </dependency>
+
+            <!-- SDC Distribution client dependency -->
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+                <artifactId>application</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.sdc.sdc-distribution-client</groupId>
+                <artifactId>sdc-distribution-client</artifactId>
+                <version>${sdc-distribution-client.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.5.1</version>
+                <configuration>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
similarity index 53%
rename from ms/cds-sdc-listener/pom.xml
rename to ms/sdclistener/pom.xml
index 6c533e1..70e8529 100644 (file)
@@ -14,8 +14,8 @@
  * See the License for the specific language governing permissions and
  * 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">
+<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.ccsdk.cds</groupId>
         <artifactId>ms</artifactId>
         <relativePath>..</relativePath>
     </parent>
 
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>cds-sdc-listener</artifactId>
-    <name>CDS-SDC Listener Root</name>
-    <description>A microservice to get the cba file from SDC and store it into database at runtime</description>
+    <artifactId>sdclistener</artifactId>
+    <name>SDC Listener Root</name>
+    <description>SDC Listener Root</description>
     <packaging>pom</packaging>
 
+    <properties>
+        <service.name>sdclistener</service.name>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+        <build.number>${maven.build.timestamp}</build.number>
+        <java.version>1.8</java.version>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+    </properties>
+
     <modules>
+        <module>parent</module>
         <module>application</module>
-        <!--  Module is not currently working
         <module>distribution</module>
-        -->
     </modules>
 
 </project>