Separating DHCP public facade and the implementation into separate modules.

Change-Id: I6eaa68924ddfb2c2fe7953a5df681bb2cc463b32
diff --git a/apps/dhcp/api/pom.xml b/apps/dhcp/api/pom.xml
new file mode 100644
index 0000000..fb5246f
--- /dev/null
+++ b/apps/dhcp/api/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2014 Open Networking Laboratory
+  ~
+  ~ 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>
+        <artifactId>onos-dhcp</artifactId>
+        <groupId>org.onosproject</groupId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-app-dhcp-api</artifactId>
+    <packaging>bundle</packaging>
+
+    <url>http://onosproject.org</url>
+
+    <description>DHCP Server application API</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-serializers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-incubator-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+
+</project>
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpService.java b/apps/dhcp/api/src/main/java/org/onosproject/dhcp/DhcpService.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpService.java
rename to apps/dhcp/api/src/main/java/org/onosproject/dhcp/DhcpService.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java b/apps/dhcp/api/src/main/java/org/onosproject/dhcp/DhcpStore.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java
rename to apps/dhcp/api/src/main/java/org/onosproject/dhcp/DhcpStore.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/IpAssignment.java b/apps/dhcp/api/src/main/java/org/onosproject/dhcp/IpAssignment.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/IpAssignment.java
rename to apps/dhcp/api/src/main/java/org/onosproject/dhcp/IpAssignment.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/package-info.java b/apps/dhcp/api/src/main/java/org/onosproject/dhcp/package-info.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/package-info.java
rename to apps/dhcp/api/src/main/java/org/onosproject/dhcp/package-info.java
diff --git a/apps/dhcp/src/test/java/org/onosproject/dhcp/IpAssignmentTest.java b/apps/dhcp/api/src/test/java/org/onosproject/dhcp/IpAssignmentTest.java
similarity index 100%
rename from apps/dhcp/src/test/java/org/onosproject/dhcp/IpAssignmentTest.java
rename to apps/dhcp/api/src/test/java/org/onosproject/dhcp/IpAssignmentTest.java
diff --git a/apps/dhcp/app/app.xml b/apps/dhcp/app/app.xml
new file mode 100644
index 0000000..bf324b1
--- /dev/null
+++ b/apps/dhcp/app/app.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ 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.
+  -->
+<app name="org.onosproject.dhcp" origin="ON.Lab" version="${project.version}"
+     featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
+     features="${project.artifactId}">
+    <description>${project.description}</description>
+    <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</artifact>
+</app>
diff --git a/apps/dhcp/app/features.xml b/apps/dhcp/app/features.xml
new file mode 100644
index 0000000..0b277de
--- /dev/null
+++ b/apps/dhcp/app/features.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  ~ Copyright 2015 Open Networking Laboratory
+  ~
+  ~ 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.
+  -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
+    <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
+    <feature name="${project.artifactId}" version="${project.version}"
+             description="${project.description}">
+        <feature>onos-api</feature>
+        <bundle>mvn:${project.groupId}/onos-app-dhcp-api/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/onos-app-dhcp/${project.version}</bundle>
+    </feature>
+</features>
diff --git a/apps/dhcp/app/pom.xml b/apps/dhcp/app/pom.xml
new file mode 100644
index 0000000..6589402
--- /dev/null
+++ b/apps/dhcp/app/pom.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2014 Open Networking Laboratory
+  ~
+  ~ 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>
+        <artifactId>onos-dhcp</artifactId>
+        <groupId>org.onosproject</groupId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-app-dhcp</artifactId>
+    <packaging>bundle</packaging>
+
+    <url>http://onosproject.org</url>
+
+    <description>DHCP Server application</description>
+
+    <properties>
+        <onos.app.name>org.onosproject.dhcp</onos.app.name>
+        <web.context>/onos/dhcp</web.context>
+        <api.version>1.0.0</api.version>
+        <api.title>DHCP Server REST API</api.title>
+        <api.description>
+            APIs for interacting with the DHCP Server application.
+        </api.description>
+        <api.package>org.onosproject.dhcp.rest</api.package>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-dhcp-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-cli</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-core-serializers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-incubator-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-rest</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-rest</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-servlet</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <_wab>src/main/webapp/</_wab>
+                        <Include-Resource>
+                            WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
+                            {maven-resources}
+                        </Include-Resource>
+                        <Bundle-SymbolicName>
+                            ${project.groupId}.${project.artifactId}
+                        </Bundle-SymbolicName>
+                        <Import-Package>
+                            org.slf4j,
+                            org.osgi.framework,
+                            javax.ws.rs,
+                            javax.ws.rs.core,
+                            com.sun.jersey.api.core,
+                            com.sun.jersey.spi.container.servlet,
+                            com.sun.jersey.server.impl.container.servlet,
+                            com.fasterxml.jackson.databind,
+                            com.fasterxml.jackson.databind.node,
+                            com.fasterxml.jackson.core,
+                            org.apache.karaf.shell.commands,
+                            org.apache.karaf.shell.console,
+                            com.google.common.*,
+                            org.onlab.packet.*,
+                            org.onlab.rest.*,
+                            org.onosproject.*,
+                            org.onlab.util.*,
+                            org.jboss.netty.util.*
+                        </Import-Package>
+                        <Web-ContextPath>${web.context}</Web-ContextPath>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpLeaseDetails.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpLeaseDetails.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpLeaseDetails.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpLeaseDetails.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpListAllMappings.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpListAllMappings.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpListAllMappings.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpListAllMappings.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpRemoveStaticMapping.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpRemoveStaticMapping.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpRemoveStaticMapping.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpRemoveStaticMapping.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpSetStaticMapping.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpSetStaticMapping.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/DhcpSetStaticMapping.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/DhcpSetStaticMapping.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/FreeIpCompleter.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/FreeIpCompleter.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/FreeIpCompleter.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/FreeIpCompleter.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/MacIdCompleter.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/MacIdCompleter.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/MacIdCompleter.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/MacIdCompleter.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/cli/package-info.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/package-info.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/cli/package-info.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/cli/package-info.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpConfig.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpConfig.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpConfig.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpConfig.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpManager.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpManager.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpManager.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpManager.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpUi.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpUi.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpUi.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpUi.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpViewMessageHandler.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpViewMessageHandler.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpViewMessageHandler.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpViewMessageHandler.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DistributedDhcpStore.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DistributedDhcpStore.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DistributedDhcpStore.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DistributedDhcpStore.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/impl/package-info.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/package-info.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/impl/package-info.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/package-info.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/rest/DHCPWebResource.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/rest/DHCPWebResource.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/rest/DHCPWebResource.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/rest/DHCPWebResource.java
diff --git a/apps/dhcp/src/main/java/org/onosproject/dhcp/rest/package-info.java b/apps/dhcp/app/src/main/java/org/onosproject/dhcp/rest/package-info.java
similarity index 100%
rename from apps/dhcp/src/main/java/org/onosproject/dhcp/rest/package-info.java
rename to apps/dhcp/app/src/main/java/org/onosproject/dhcp/rest/package-info.java
diff --git a/apps/dhcp/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/dhcp/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
similarity index 100%
rename from apps/dhcp/src/main/resources/OSGI-INF/blueprint/shell-config.xml
rename to apps/dhcp/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
diff --git a/apps/dhcp/src/main/resources/app/view/dhcp/dhcp.css b/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.css
similarity index 100%
rename from apps/dhcp/src/main/resources/app/view/dhcp/dhcp.css
rename to apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.css
diff --git a/apps/dhcp/src/main/resources/app/view/dhcp/dhcp.html b/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.html
similarity index 100%
rename from apps/dhcp/src/main/resources/app/view/dhcp/dhcp.html
rename to apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.html
diff --git a/apps/dhcp/src/main/resources/app/view/dhcp/dhcp.js b/apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.js
similarity index 100%
rename from apps/dhcp/src/main/resources/app/view/dhcp/dhcp.js
rename to apps/dhcp/app/src/main/resources/app/view/dhcp/dhcp.js
diff --git a/apps/dhcp/src/main/resources/gui/css.html b/apps/dhcp/app/src/main/resources/gui/css.html
similarity index 100%
rename from apps/dhcp/src/main/resources/gui/css.html
rename to apps/dhcp/app/src/main/resources/gui/css.html
diff --git a/apps/dhcp/src/main/resources/gui/js.html b/apps/dhcp/app/src/main/resources/gui/js.html
similarity index 100%
rename from apps/dhcp/src/main/resources/gui/js.html
rename to apps/dhcp/app/src/main/resources/gui/js.html
diff --git a/apps/dhcp/src/main/webapp/WEB-INF/web.xml b/apps/dhcp/app/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from apps/dhcp/src/main/webapp/WEB-INF/web.xml
rename to apps/dhcp/app/src/main/webapp/WEB-INF/web.xml
diff --git a/apps/dhcp/src/test/java/org/onosproject/dhcp/impl/DhcpManagerTest.java b/apps/dhcp/app/src/test/java/org/onosproject/dhcp/impl/DhcpManagerTest.java
similarity index 100%
rename from apps/dhcp/src/test/java/org/onosproject/dhcp/impl/DhcpManagerTest.java
rename to apps/dhcp/app/src/test/java/org/onosproject/dhcp/impl/DhcpManagerTest.java
diff --git a/apps/dhcp/src/test/resources/dhcp-cfg.json b/apps/dhcp/app/src/test/resources/dhcp-cfg.json
similarity index 100%
rename from apps/dhcp/src/test/resources/dhcp-cfg.json
rename to apps/dhcp/app/src/test/resources/dhcp-cfg.json
diff --git a/apps/dhcp/pom.xml b/apps/dhcp/pom.xml
index 0daa4f7..7a10776 100644
--- a/apps/dhcp/pom.xml
+++ b/apps/dhcp/pom.xml
@@ -13,149 +13,30 @@
   ~ 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">
+  -->
+<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/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <artifactId>onos-apps</artifactId>
         <groupId>org.onosproject</groupId>
+        <artifactId>onos-apps</artifactId>
         <version>1.4.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>onos-app-dhcp</artifactId>
-    <packaging>bundle</packaging>
+    <artifactId>onos-dhcp</artifactId>
+    <packaging>pom</packaging>
 
-    <url>http://onosproject.org</url>
+    <description>ONOS sample applications</description>
 
-    <description>DHCP Server application</description>
-
-    <properties>
-        <onos.app.name>org.onosproject.dhcp</onos.app.name>
-        <web.context>/onos/dhcp</web.context>
-        <api.version>1.0.0</api.version>
-        <api.title>DHCP Server REST API</api.title>
-        <api.description>
-            APIs for interacting with the DHCP Server application.
-        </api.description>
-        <api.package>org.onosproject.dhcp.rest</api.package>
-    </properties>
+    <modules>
+        <module>api</module>
+        <module>app</module>
+    </modules>
 
     <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-cli</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.karaf.shell</groupId>
-            <artifactId>org.apache.karaf.shell.console</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onlab-junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-core-serializers</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-incubator-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-api</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onos-rest</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.onosproject</groupId>
-            <artifactId>onlab-rest</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.jersey</groupId>
-            <artifactId>jersey-servlet</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-        </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <_wab>src/main/webapp/</_wab>
-                        <Include-Resource>
-                            WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
-                            {maven-resources}
-                        </Include-Resource>
-                        <Bundle-SymbolicName>
-                            ${project.groupId}.${project.artifactId}
-                        </Bundle-SymbolicName>
-                        <Import-Package>
-                            org.slf4j,
-                            org.osgi.framework,
-                            javax.ws.rs,
-                            javax.ws.rs.core,
-                            com.sun.jersey.api.core,
-                            com.sun.jersey.spi.container.servlet,
-                            com.sun.jersey.server.impl.container.servlet,
-                            com.fasterxml.jackson.databind,
-                            com.fasterxml.jackson.databind.node,
-                            com.fasterxml.jackson.core,
-                            org.apache.karaf.shell.commands,
-                            org.apache.karaf.shell.console,
-                            com.google.common.*,
-                            org.onlab.packet.*,
-                            org.onlab.rest.*,
-                            org.onosproject.*,
-                            org.onlab.util.*,
-                            org.jboss.netty.util.*
-                        </Import-Package>
-                        <Web-ContextPath>${web.context}</Web-ContextPath>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>