diff --git a/pom.xml b/pom.xml
index 266a8c0..4edcd0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,6 +28,12 @@
     <artifactId>pm-mapper</artifactId>
     <version>1.0-SNAPSHOT</version>
 
+    <parent>
+        <groupId>org.onap.oparent</groupId>
+        <artifactId>oparent</artifactId>
+        <version>1.2.0</version>
+    </parent>
+
     <properties>
         <!-- Dependency Versions -->
         <lombok.version>1.18.4</lombok.version>
@@ -45,8 +51,15 @@
         <!-- Plugin Versions -->
         <shade.plugin.version>3.2.0</shade.plugin.version>
         <jacoco.version>0.8.2</jacoco.version>
-        <!-- Plugin Settings -->
+        <dockerfile.version>1.4.10</dockerfile.version>
         <surefire.version>2.22.0</surefire.version>
+        <!-- Plugin Settings -->
+        <sonar.language>java</sonar.language>
+        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+        <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+        <sonar.jacoco.reportPaths>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPaths>
+        <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+        <sonar.projectVersion>${project.version}</sonar.projectVersion>
         <compiler.target.version>1.8</compiler.target.version>
         <compiler.source.version>1.8</compiler.source.version>
         <shade.main>org.onap.dcaegen2.services.pmmapper.App</shade.main>
@@ -127,16 +140,29 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <version>${dockerfile.version}</version>
+                <configuration>
+                    <repository>${docker.push.registry}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <dockerfile>${project.build.outputDirectory}/Dockerfile</dockerfile>
+                    <buildArgs>
+                        <JAR>${project.build.finalName}-jar-with-dependencies.jar</JAR>
+                    </buildArgs>
+                </configuration>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>${surefire.version}</version>
+                <configuration combine.self="override"/>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
                 <version>${surefire.version}</version>
             </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
@@ -148,6 +174,7 @@
                         </goals>
                         <configuration>
                             <shadedArtifactAttached>true</shadedArtifactAttached>
+                            <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
                             <transformers>
                                 <transformer implementation="${shade.transformer}">
                                     <mainClass>${shade.main}</mainClass>
@@ -161,8 +188,8 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>8</source>
-                    <target>8</target>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
                 </configuration>
             </plugin>
             <plugin>
diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile
new file mode 100644
index 0000000..e48427c
--- /dev/null
+++ b/src/main/resources/Dockerfile
@@ -0,0 +1,23 @@
+#
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+FROM openjdk:8-jre
+ENTRYPOINT ["/usr/bin/java", "-jar", "/opt/pm-mapper.jar"]
+ARG JAR
+ADD target/${JAR} /opt/pm-mapper.jar
diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriberTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriberTest.java
index 8f73c91..25fb8ae 100644
--- a/src/test/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriberTest.java
+++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriberTest.java
@@ -17,37 +17,9 @@
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.dcaegen2.services.pmmapper.datarouter;
 
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.jupiter.api.Assertions;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.onap.dcaegen2.services.pmmapper.config.BusControllerConfig;
-import org.onap.dcaegen2.services.pmmapper.exceptions.TooManyTriesException;
-import org.onap.dcaegen2.services.pmmapper.model.Event;
-import org.onap.dcaegen2.services.pmmapper.model.EventMetadata;
-import io.undertow.io.Receiver;
-import io.undertow.io.Sender;
-import io.undertow.server.HttpServerExchange;
-import io.undertow.util.StatusCodes;
-
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyInt;
@@ -58,6 +30,32 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import io.undertow.io.Receiver;
+import io.undertow.io.Sender;
+import io.undertow.server.HttpServerExchange;
+import io.undertow.util.StatusCodes;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.onap.dcaegen2.services.pmmapper.config.BusControllerConfig;
+import org.onap.dcaegen2.services.pmmapper.exceptions.TooManyTriesException;
+import org.onap.dcaegen2.services.pmmapper.model.Event;
+import org.onap.dcaegen2.services.pmmapper.model.EventMetadata;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
 
 
 @RunWith(PowerMockRunner.class)
@@ -79,22 +77,22 @@
     public void testStartTooManyTriesWithResponse() throws IOException {
         PowerMockito.mockStatic(Thread.class);
 
-        URL subURL = mock(URL.class);
+        URL subEndpoint = mock(URL.class);
         BusControllerConfig config = new BusControllerConfig();
-        config.setDataRouterSubscribeEndpoint(subURL);
+        config.setDataRouterSubscribeEndpoint(subEndpoint);
         HttpURLConnection huc = mock(HttpURLConnection.class, RETURNS_DEEP_STUBS);
-        when(subURL.openConnection()).thenReturn(huc);
+        when(subEndpoint.openConnection()).thenReturn(huc);
         when(huc.getResponseCode()).thenReturn(300);
         Assertions.assertThrows(TooManyTriesException.class, () -> objUnderTest.start(config));
     }
 
     @Test
     public void testStartImmediateSuccess() throws IOException, TooManyTriesException, InterruptedException {
-        URL subURL = mock(URL.class);
+        URL subEndpoint = mock(URL.class);
         BusControllerConfig config = new BusControllerConfig();
-        config.setDataRouterSubscribeEndpoint(subURL);
+        config.setDataRouterSubscribeEndpoint(subEndpoint);
         HttpURLConnection huc = mock(HttpURLConnection.class, RETURNS_DEEP_STUBS);
-        when(subURL.openConnection()).thenReturn(huc);
+        when(subEndpoint.openConnection()).thenReturn(huc);
         when(huc.getResponseCode()).thenReturn(200);
         objUnderTest.start(config);
         verify(huc, times(1)).getResponseCode();
@@ -104,11 +102,11 @@
     public void testStartDelayedSuccess() throws IOException, TooManyTriesException, InterruptedException {
         PowerMockito.mockStatic(Thread.class);
 
-        URL subURL = mock(URL.class);
+        URL subEndpoint = mock(URL.class);
         BusControllerConfig config = new BusControllerConfig();
-        config.setDataRouterSubscribeEndpoint(subURL);
+        config.setDataRouterSubscribeEndpoint(subEndpoint);
         HttpURLConnection huc = mock(HttpURLConnection.class, RETURNS_DEEP_STUBS);
-        when(subURL.openConnection()).thenReturn(huc);
+        when(subEndpoint.openConnection()).thenReturn(huc);
         doAnswer(new Answer() {
             boolean forceRetry = true;
 
@@ -129,11 +127,11 @@
     public void testStartReadTimeout() throws IOException {
         PowerMockito.mockStatic(Thread.class);
 
-        URL subURL = mock(URL.class);
+        URL subEndpoint = mock(URL.class);
         BusControllerConfig config = new BusControllerConfig();
-        config.setDataRouterSubscribeEndpoint(subURL);
+        config.setDataRouterSubscribeEndpoint(subEndpoint);
         HttpURLConnection huc = mock(HttpURLConnection.class, RETURNS_DEEP_STUBS);
-        when(subURL.openConnection()).thenReturn(huc);
+        when(subEndpoint.openConnection()).thenReturn(huc);
         doThrow(new IOException()).when(huc).getResponseCode();
         Assertions.assertThrows(TooManyTriesException.class, () -> objUnderTest.start(config));
     }
@@ -160,13 +158,13 @@
         verify(eventReceiver, times(0)).receive(any());
     }
 
-
-
     @Test
     public void testRequestInboundInvalidMetadata() throws Exception {
         HttpServerExchange httpServerExchange = mock(HttpServerExchange.class, RETURNS_DEEP_STUBS);
-        JsonObject metadata = new JsonParser().parse(new String(Files.readAllBytes(Paths.get("src/test/resources/invalid_metadata.json")))).getAsJsonObject();
-        when(httpServerExchange.getRequestHeaders().get(any(String.class)).get(anyInt())).thenReturn(metadata.toString());
+        JsonObject metadata = new JsonParser().parse(new String(Files
+                .readAllBytes(Paths.get("src/test/resources/invalid_metadata.json")))).getAsJsonObject();
+        when(httpServerExchange.getRequestHeaders().get(any(String.class)).get(anyInt()))
+                .thenReturn(metadata.toString());
         when(httpServerExchange.setStatusCode(anyInt())).thenReturn(httpServerExchange);
         objUnderTest.handleRequest(httpServerExchange);
         verify(httpServerExchange, times(1)).setStatusCode(StatusCodes.BAD_REQUEST);
@@ -175,7 +173,7 @@
     }
 
     @Test
-    public void testRequestInboundNoMetadata() throws Exception{
+    public void testRequestInboundNoMetadata() throws Exception {
         HttpServerExchange httpServerExchange = mock(HttpServerExchange.class, RETURNS_DEEP_STUBS);
         Receiver receiver = mock(Receiver.class);
         when(httpServerExchange.getRequestReceiver()).thenReturn(receiver);
@@ -203,10 +201,10 @@
         Receiver receiver = mock(Receiver.class);
         when(httpServerExchange.getRequestReceiver()).thenReturn(receiver);
         String testString = "MESSAGE BODY";
-        JsonObject metadata = new JsonParser().parse(new String(Files.readAllBytes(Paths.get("src/test/resources/valid_metadata.json")))).getAsJsonObject();
-        EventMetadata metadataObj = new GsonBuilder().create().fromJson(metadata, EventMetadata.class);
-
-        when(httpServerExchange.getRequestHeaders().get(any(String.class)).get(anyInt())).thenReturn(metadata.toString());
+        JsonObject metadata = new JsonParser().parse(
+                new String(Files.readAllBytes(Paths.get("src/test/resources/valid_metadata.json")))).getAsJsonObject();
+        when(httpServerExchange.getRequestHeaders().get(any(String.class)).get(anyInt()))
+                .thenReturn(metadata.toString());
         doAnswer((Answer<Void>) invocationOnMock -> {
             Receiver.FullStringCallback callback = invocationOnMock.getArgument(0);
             callback.handle(httpServerExchange, testString);
@@ -220,6 +218,9 @@
         }).when(httpServerExchange).dispatch(any(Runnable.class));
 
         objUnderTest.handleRequest(httpServerExchange);
-        verify(eventReceiver, times(1)).receive(new Event(httpServerExchange, testString, metadataObj));
+        verify(eventReceiver, times(1))
+                .receive(new Event(httpServerExchange, testString,
+                        new GsonBuilder().create()
+                                .fromJson(metadata, EventMetadata.class)));
     }
 }
