Fix: Split codec package into api module to fix maven build failure

Change-Id: I5f57163f329ab21bb362dcf2bef54a3a6664ce10
diff --git a/apps/mappingmanagement/api/BUCK b/apps/mappingmanagement/api/BUCK
index 57e84f4..223b9a9 100644
--- a/apps/mappingmanagement/api/BUCK
+++ b/apps/mappingmanagement/api/BUCK
@@ -5,6 +5,9 @@
 
 TEST_DEPS = [
     '//lib:TEST_ADAPTERS',
+    '//utils/osgi:onlab-osgi-tests',
+    '//web/api:onos-rest-tests',
+    '//incubator/api:onos-incubator-api-tests',
 ]
 
 osgi_jar_with_tests (
diff --git a/apps/mappingmanagement/api/pom.xml b/apps/mappingmanagement/api/pom.xml
index a0e10c2..147b5eb 100644
--- a/apps/mappingmanagement/api/pom.xml
+++ b/apps/mappingmanagement/api/pom.xml
@@ -54,5 +54,43 @@
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-client</artifactId>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-common</artifactId>
+            <scope>test</scope>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-rest</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <type>jar</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-rest</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.test-framework</groupId>
+            <artifactId>jersey-test-framework-core</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/MappingCodecRegistrator.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/MappingCodecRegistrator.java
similarity index 82%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/MappingCodecRegistrator.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/MappingCodecRegistrator.java
index 89f82d9..d4d91d2 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/MappingCodecRegistrator.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/MappingCodecRegistrator.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web;
+package org.onosproject.mapping;
 
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -21,18 +21,15 @@
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.onosproject.codec.CodecService;
-import org.onosproject.mapping.MappingKey;
-import org.onosproject.mapping.MappingTreatment;
-import org.onosproject.mapping.MappingValue;
 import org.onosproject.mapping.actions.MappingAction;
 import org.onosproject.mapping.addresses.MappingAddress;
 import org.onosproject.mapping.instructions.MappingInstruction;
-import org.onosproject.mapping.web.codec.MappingActionCodec;
-import org.onosproject.mapping.web.codec.MappingAddressCodec;
-import org.onosproject.mapping.web.codec.MappingInstructionCodec;
-import org.onosproject.mapping.web.codec.MappingKeyCodec;
-import org.onosproject.mapping.web.codec.MappingTreatmentCodec;
-import org.onosproject.mapping.web.codec.MappingValueCodec;
+import org.onosproject.mapping.codec.MappingActionCodec;
+import org.onosproject.mapping.codec.MappingAddressCodec;
+import org.onosproject.mapping.codec.MappingInstructionCodec;
+import org.onosproject.mapping.codec.MappingKeyCodec;
+import org.onosproject.mapping.codec.MappingTreatmentCodec;
+import org.onosproject.mapping.codec.MappingValueCodec;
 import org.slf4j.Logger;
 
 import static org.slf4j.LoggerFactory.getLogger;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingActionCodecHelper.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingActionCodecHelper.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingActionCodecHelper.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingActionCodecHelper.java
index 64c58fb..d0c1065 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingActionCodecHelper.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingActionCodecHelper.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.mapping.actions.MappingAction;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingAddressCodecHelper.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingAddressCodecHelper.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingAddressCodecHelper.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingAddressCodecHelper.java
index aa0e644..32eb130 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingAddressCodecHelper.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingAddressCodecHelper.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.collect.Maps;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingInstructionCodecHelper.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingInstructionCodecHelper.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingInstructionCodecHelper.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingInstructionCodecHelper.java
index 9519439..1b94692 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/DecodeMappingInstructionCodecHelper.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/DecodeMappingInstructionCodecHelper.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingActionCodecHelper.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingActionCodecHelper.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingActionCodecHelper.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingActionCodecHelper.java
index 370de80..7c42544 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingActionCodecHelper.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingActionCodecHelper.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingAddressCodecHelper.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingAddressCodecHelper.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingAddressCodecHelper.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingAddressCodecHelper.java
index c3636fd..8847bca 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingAddressCodecHelper.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingAddressCodecHelper.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingInstructionCodecHelper.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingInstructionCodecHelper.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingInstructionCodecHelper.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingInstructionCodecHelper.java
index 1ef89d1..53343a6 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/EncodeMappingInstructionCodecHelper.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/EncodeMappingInstructionCodecHelper.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingActionCodec.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingActionCodec.java
similarity index 97%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingActionCodec.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingActionCodec.java
index 0ffd088..511f862 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingActionCodec.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingActionCodec.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingAddressCodec.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingAddressCodec.java
similarity index 97%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingAddressCodec.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingAddressCodec.java
index 0c6d7d9..7b756b6 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingAddressCodec.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingAddressCodec.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingInstructionCodec.java
similarity index 97%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingInstructionCodec.java
index 96b4a7c..c881269 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingInstructionCodec.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingKeyCodec.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingKeyCodec.java
similarity index 97%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingKeyCodec.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingKeyCodec.java
index 93dd106..1b24545 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingKeyCodec.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingKeyCodec.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingTreatmentCodec.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingTreatmentCodec.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingTreatmentCodec.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingTreatmentCodec.java
index 10ed6d7..6fd37ff 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingTreatmentCodec.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingTreatmentCodec.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ArrayNode;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingValueCodec.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingValueCodec.java
similarity index 98%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingValueCodec.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingValueCodec.java
index a354a8a..d97635b 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingValueCodec.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/MappingValueCodec.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ArrayNode;
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/package-info.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/package-info.java
similarity index 94%
rename from apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/package-info.java
rename to apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/package-info.java
index 9ab4bf5..68b4778 100644
--- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/package-info.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/codec/package-info.java
@@ -17,4 +17,4 @@
  * Implementations of the codec broker and
  * built-in entity JSON codecs for mapping address.
  */
-package org.onosproject.mapping.web.codec;
\ No newline at end of file
+package org.onosproject.mapping.codec;
\ No newline at end of file
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingActionCodecTest.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingActionCodecTest.java
similarity index 95%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingActionCodecTest.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingActionCodecTest.java
index 9627413..555b67d 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingActionCodecTest.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingActionCodecTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -29,7 +29,7 @@
 import org.onosproject.mapping.actions.DropMappingAction;
 import org.onosproject.mapping.actions.ForwardMappingAction;
 import org.onosproject.mapping.actions.NativeForwardMappingAction;
-import org.onosproject.mapping.web.MappingCodecRegistrator;
+import org.onosproject.mapping.MappingCodecRegistrator;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -37,7 +37,7 @@
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
-import static org.onosproject.mapping.web.codec.MappingActionJsonMatcher.matchesAction;
+import static org.onosproject.mapping.codec.MappingActionJsonMatcher.matchesAction;
 
 /**
  * Unit tests for MappingActionCodec.
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingActionJsonMatcher.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingActionJsonMatcher.java
similarity index 98%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingActionJsonMatcher.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingActionJsonMatcher.java
index 94ba91e..3cef35a 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingActionJsonMatcher.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingActionJsonMatcher.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import org.hamcrest.Description;
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingAddressCodecTest.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingAddressCodecTest.java
similarity index 95%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingAddressCodecTest.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingAddressCodecTest.java
index 11e2d9b..bf114bb 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingAddressCodecTest.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingAddressCodecTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -27,7 +27,7 @@
 import org.onosproject.codec.impl.CodecManager;
 import org.onosproject.mapping.addresses.MappingAddress;
 import org.onosproject.mapping.addresses.MappingAddresses;
-import org.onosproject.mapping.web.MappingCodecRegistrator;
+import org.onosproject.mapping.MappingCodecRegistrator;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -35,7 +35,7 @@
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
-import static org.onosproject.mapping.web.codec.MappingAddressJsonMatcher.matchesMappingAddress;
+import static org.onosproject.mapping.codec.MappingAddressJsonMatcher.matchesMappingAddress;
 
 /**
  * Unit tests for MappingAddressCodec.
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingAddressJsonMatcher.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingAddressJsonMatcher.java
similarity index 98%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingAddressJsonMatcher.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingAddressJsonMatcher.java
index 40f157c..abef57d 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingAddressJsonMatcher.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingAddressJsonMatcher.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import org.hamcrest.Description;
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingCodecContextAdapter.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingCodecContextAdapter.java
similarity index 96%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingCodecContextAdapter.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingCodecContextAdapter.java
index 69f88f5..24e141e 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingCodecContextAdapter.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingCodecContextAdapter.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.onosproject.codec.CodecContext;
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingInstructionCodecTest.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingInstructionCodecTest.java
similarity index 96%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingInstructionCodecTest.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingInstructionCodecTest.java
index 9fc13aa..35cdbb6 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingInstructionCodecTest.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingInstructionCodecTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -27,7 +27,7 @@
 import org.onosproject.mapping.instructions.MappingInstructions;
 import org.onosproject.mapping.instructions.MulticastMappingInstruction;
 import org.onosproject.mapping.instructions.UnicastMappingInstruction;
-import org.onosproject.mapping.web.MappingCodecRegistrator;
+import org.onosproject.mapping.MappingCodecRegistrator;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -35,7 +35,7 @@
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
-import static org.onosproject.mapping.web.codec.MappingInstructionJsonMatcher.matchesInstruction;
+import static org.onosproject.mapping.codec.MappingInstructionJsonMatcher.matchesInstruction;
 
 /**
  * Unit tests for MappingInstructionCodec.
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingInstructionJsonMatcher.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingInstructionJsonMatcher.java
similarity index 99%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingInstructionJsonMatcher.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingInstructionJsonMatcher.java
index c1d0cce..9644ce6 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingInstructionJsonMatcher.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingInstructionJsonMatcher.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import org.hamcrest.Description;
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingKeyCodecTest.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingKeyCodecTest.java
similarity index 97%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingKeyCodecTest.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingKeyCodecTest.java
index f71e0b1..25d6ff4 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingKeyCodecTest.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingKeyCodecTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -30,7 +30,7 @@
 import org.onosproject.mapping.MappingKey;
 import org.onosproject.mapping.addresses.MappingAddress;
 import org.onosproject.mapping.addresses.MappingAddresses;
-import org.onosproject.mapping.web.MappingCodecRegistrator;
+import org.onosproject.mapping.MappingCodecRegistrator;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingTreatmentCodecTest.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingTreatmentCodecTest.java
similarity index 98%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingTreatmentCodecTest.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingTreatmentCodecTest.java
index 23817e1..f66b18d 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingTreatmentCodecTest.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingTreatmentCodecTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -32,7 +32,7 @@
 import org.onosproject.mapping.addresses.MappingAddresses;
 import org.onosproject.mapping.instructions.MappingInstruction;
 import org.onosproject.mapping.instructions.MappingInstructions;
-import org.onosproject.mapping.web.MappingCodecRegistrator;
+import org.onosproject.mapping.MappingCodecRegistrator;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingValueCodecTest.java b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingValueCodecTest.java
similarity index 98%
rename from apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingValueCodecTest.java
rename to apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingValueCodecTest.java
index 6f6a824..22fa13a 100644
--- a/apps/mappingmanagement/web/src/test/java/org/onosproject/mapping/web/codec/MappingValueCodecTest.java
+++ b/apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/codec/MappingValueCodecTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.mapping.web.codec;
+package org.onosproject.mapping.codec;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -36,7 +36,7 @@
 import org.onosproject.mapping.addresses.MappingAddresses;
 import org.onosproject.mapping.instructions.MappingInstruction;
 import org.onosproject.mapping.instructions.MappingInstructions;
-import org.onosproject.mapping.web.MappingCodecRegistrator;
+import org.onosproject.mapping.MappingCodecRegistrator;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingAction.json b/apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingAction.json
similarity index 100%
rename from apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingAction.json
rename to apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingAction.json
diff --git a/apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingAddress.json b/apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingAddress.json
similarity index 100%
rename from apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingAddress.json
rename to apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingAddress.json
diff --git a/apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingInstruction.json b/apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingInstruction.json
similarity index 100%
rename from apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingInstruction.json
rename to apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingInstruction.json
diff --git a/apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingKey.json b/apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingKey.json
similarity index 100%
rename from apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingKey.json
rename to apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingKey.json
diff --git a/apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingTreatment.json b/apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingTreatment.json
similarity index 100%
rename from apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingTreatment.json
rename to apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingTreatment.json
diff --git a/apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingValue.json b/apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingValue.json
similarity index 100%
rename from apps/mappingmanagement/web/src/test/resources/org/onosproject/mapping/web/codec/MappingValue.json
rename to apps/mappingmanagement/api/src/test/resources/org/onosproject/mapping/codec/MappingValue.json