message router publisher changes

resolve message router publisher namespace issues

Resolve issues loading message-router in odlsli container

Change-Id: Ib36bced43129c735c61d5ff7bb0cf29362bb7779
Issue-ID: CCSDK-1186
Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com>
diff --git a/message-router/publisher/api/src/main/java/org/onap/ccsdk/messagerouter/publisher/api/PublisherApi.java b/message-router/publisher/api/src/main/java/org/onap/ccsdk/messagerouter/publisher/api/PublisherApi.java
deleted file mode 100755
index 6d4bddc..0000000
--- a/message-router/publisher/api/src/main/java/org/onap/ccsdk/messagerouter/publisher/api/PublisherApi.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.onap.ccsdk.messagerouter.publisher.api;

-

-public interface PublisherApi {

-	public Boolean publish(String topic, String body);

-}

diff --git a/message-router/publisher/api/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/api/PublisherApi.java b/message-router/publisher/api/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/api/PublisherApi.java
new file mode 100755
index 0000000..3551e04
--- /dev/null
+++ b/message-router/publisher/api/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/api/PublisherApi.java
@@ -0,0 +1,5 @@
+package org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api;

+

+public interface PublisherApi {

+	public Boolean publish(String topic, String body);

+}

diff --git a/message-router/publisher/features/ccsdk-messagerouter-publisher/pom.xml b/message-router/publisher/features/ccsdk-messagerouter-publisher/pom.xml
new file mode 100755
index 0000000..939fb7a
--- /dev/null
+++ b/message-router/publisher/features/ccsdk-messagerouter-publisher/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.parent</groupId>
+		<artifactId>single-feature-parent</artifactId>
+		<version>1.2.2-SNAPSHOT</version>
+	</parent>
+
+	<groupId>org.onap.ccsdk.sli.adaptors.messagerouter</groupId>
+	<artifactId>ccsdk-messagerouter-publisher</artifactId>
+	<version>0.4.2-SNAPSHOT</version>
+	<packaging>feature</packaging>
+	
+	<dependencies>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>publisher.api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>publisher.provider</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+
+
+</project>
diff --git a/message-router/publisher/features/features-messagerouter-publisher/pom.xml b/message-router/publisher/features/features-messagerouter-publisher/pom.xml
new file mode 100755
index 0000000..eae1467
--- /dev/null
+++ b/message-router/publisher/features/features-messagerouter-publisher/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.parent</groupId>
+        <artifactId>feature-repo-parent</artifactId>
+        <version>1.2.2-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.ccsdk.sli.adaptors.messagerouter</groupId>
+    <artifactId>features-messagerouter-publisher</artifactId>
+    <version>0.4.2-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>ccsdk-sli-adaptors :: messagerouter :: ${project.artifactId}</name>
+
+    <properties>
+        <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ccsdk-messagerouter-publisher</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/message-router/publisher/features/pom.xml b/message-router/publisher/features/pom.xml
old mode 100755
new mode 100644
index 7b1c7be..45e1f5d
--- a/message-router/publisher/features/pom.xml
+++ b/message-router/publisher/features/pom.xml
@@ -1,58 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- ============LICENSE_START=======================================================
+    ONAP : APPC ================================================================================
+    Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. ================================================================================
+    Copyright (C) 2017 Amdocs =============================================================================
+    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. ECOMP is
+    a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END========================================================= -->
 <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>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>odlparent-lite</artifactId>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <version>1.2.2-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+    <groupId>org.onap.ccsdk.sli.adaptors.messagerouter</groupId>
+    <artifactId>publisher.features</artifactId>
+    <version>0.4.2-SNAPSHOT</version>
+    <name>ccsdk-sli-adaptors :: messagerouter :: ${project.artifactId}</name>
 
-	<parent>
-		<groupId>org.onap.ccsdk.sli.adaptors.messagerouter</groupId>
-		<artifactId>publisher.aggregate</artifactId>
-		<version>0.4.2-SNAPSHOT</version>
-	</parent>
+    <packaging>pom</packaging>
 
-	<artifactId>publisher.features</artifactId>
-	<packaging>pom</packaging>
-
-	<build>
-		<resources>
-			<resource>
-				<directory>src/main/feature</directory>
-				<filtering>true</filtering>
-				<targetPath>${project.build.directory}/feature</targetPath>
-			</resource>
-		</resources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-resources-plugin</artifactId>
-				<executions>
-					<execution>
-						<goals>
-							<goal>resources</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>attach-artifacts</id>
-						<phase>package</phase>
-						<goals>
-							<goal>attach-artifact</goal>
-						</goals>
-						<configuration>
-							<artifacts>
-								<artifact>
-									<file>target/feature/feature.xml</file>
-									<type>xml</type>
-							        <classifier>features</classifier>						
-								</artifact>
-							</artifacts>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
+    <modules>
+        <module>ccsdk-messagerouter-publisher</module>
+        <module>features-messagerouter-publisher</module>
+    </modules>
 </project>
diff --git a/message-router/publisher/installer/pom.xml b/message-router/publisher/installer/pom.xml
index c2c1481..8a8dc41 100644
--- a/message-router/publisher/installer/pom.xml
+++ b/message-router/publisher/installer/pom.xml
@@ -23,7 +23,7 @@
 	<dependencies>
 		<dependency>
 			<groupId>${project.groupId}</groupId>
-			<artifactId>publisher.features</artifactId>
+			<artifactId>ccsdk-messagerouter-publisher</artifactId>
 			<version>${project.version}</version>
 			<type>xml</type>
 			<classifier>features</classifier>
diff --git a/message-router/publisher/provider/src/main/java/org/onap/ccsdk/messagerouter/publisher/provider/impl/PublisherApiImpl.java b/message-router/publisher/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/provider/impl/PublisherApiImpl.java
similarity index 96%
rename from message-router/publisher/provider/src/main/java/org/onap/ccsdk/messagerouter/publisher/provider/impl/PublisherApiImpl.java
rename to message-router/publisher/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/provider/impl/PublisherApiImpl.java
index 3e8ab33..d88dc66 100755
--- a/message-router/publisher/provider/src/main/java/org/onap/ccsdk/messagerouter/publisher/provider/impl/PublisherApiImpl.java
+++ b/message-router/publisher/provider/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/provider/impl/PublisherApiImpl.java
@@ -1,4 +1,4 @@
-package org.onap.ccsdk.messagerouter.publisher.provider.impl;

+package org.onap.ccsdk.sli.adaptors.messagerouter.publisher.provider.impl;

 

 import java.io.BufferedReader;

 import java.io.DataOutputStream;

@@ -10,7 +10,7 @@
 import java.net.URL;

 import java.util.Base64;

 

-import org.onap.ccsdk.messagerouter.publisher.api.PublisherApi;

+import org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api.PublisherApi;

 import org.slf4j.Logger;

 import org.slf4j.LoggerFactory;

 

diff --git a/message-router/publisher/provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/message-router/publisher/provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index da25fd2..4702a62 100755
--- a/message-router/publisher/provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/message-router/publisher/provider/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -3,12 +3,12 @@
 	xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0">
 
 	<bean id="publisher"
-		class="org.onap.ccsdk.messagerouter.publisher.provider.impl.PublisherApiImpl">
+		class="org.onap.ccsdk.sli.adaptors.messagerouter.publisher.provider.impl.PublisherApiImpl">
 		<cm:managed-properties
-			persistent-id="org.onap.ccsdk.messagerouter.publisher.provider"
+			persistent-id="org.onap.ccsdk.sli.adaptors.messagerouter.publisher.provider"
 			update-strategy="container-managed" />
 	</bean>
 
-	<service ref="publisher" interface="org.onap.ccsdk.messagerouter.publisher.api.PublisherApi" />
+	<service ref="publisher" interface="org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api.PublisherApi" />
 
 </blueprint>
\ No newline at end of file
diff --git a/message-router/publisher/sample.client/src/main/java/org/onap/ccsdk/messagerouter/publisher/client/impl/ClientImpl.java b/message-router/publisher/sample.client/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImpl.java
similarity index 83%
rename from message-router/publisher/sample.client/src/main/java/org/onap/ccsdk/messagerouter/publisher/client/impl/ClientImpl.java
rename to message-router/publisher/sample.client/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImpl.java
index dbf49fe..25fc87e 100755
--- a/message-router/publisher/sample.client/src/main/java/org/onap/ccsdk/messagerouter/publisher/client/impl/ClientImpl.java
+++ b/message-router/publisher/sample.client/src/main/java/org/onap/ccsdk/sli/adaptors/messagerouter/publisher/client/impl/ClientImpl.java
@@ -1,6 +1,6 @@
-package org.onap.ccsdk.messagerouter.publisher.client.impl;

+package org.onap.ccsdk.sli.adaptors.messagerouter.publisher.client.impl;

 

-import org.onap.ccsdk.messagerouter.publisher.api.PublisherApi;

+import org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api.PublisherApi;

 import org.slf4j.Logger;

 import org.slf4j.LoggerFactory;

 

diff --git a/message-router/publisher/sample.client/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/message-router/publisher/sample.client/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index c44a68a..c2e981d 100755
--- a/message-router/publisher/sample.client/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/message-router/publisher/sample.client/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -3,14 +3,14 @@
 	xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0">
 
 	<bean id="client"
-		class="org.onap.ccsdk.messagerouter.publisher.client.impl.ClientImpl"
+		class="org.onap.ccsdk.sli.adaptors.messagerouter.publisher.client.impl.ClientImpl"
 		init-method="init">
 		<property name="publisher" ref="publisher" />
 		<cm:managed-properties
-			persistent-id="org.onap.ccsdk.messagerouter.publisher.client"
+			persistent-id="org.onap.ccsdk.sli.adaptors.messagerouter.publisher.client"
 			update-strategy="container-managed" />
 	</bean>
 
-	<reference id="publisher" interface="org.onap.ccsdk.messagerouter.publisher.api.PublisherApi" />
+	<reference id="publisher" interface="org.onap.ccsdk.sli.adaptors.messagerouter.publisher.api.PublisherApi" />
 
 </blueprint>
\ No newline at end of file