Implement bazel support for web context

- add web context to OSGI rules
- build ACL app
- build DHCP app

Change-Id: I03687d109eb44621458ad7269a435e03eec47495
diff --git a/apps/acl/BUILD b/apps/acl/BUILD
new file mode 100644
index 0000000..58e48ae
--- /dev/null
+++ b/apps/acl/BUILD
@@ -0,0 +1,22 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + [
+    "@javax_ws_rs_api//jar",
+    "//utils/rest:onlab-rest",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+TEST_DEPS = TEST_REST + [
+    "@jersey_server//jar",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    web_context = "/onos/v1/acl",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Security",
+    description = "ONOS ACL application.",
+    title = "Access Control Lists",
+    url = "http://onosproject.org",
+)
diff --git a/apps/dhcp/BUILD b/apps/dhcp/BUILD
new file mode 100644
index 0000000..dbf2ac4
--- /dev/null
+++ b/apps/dhcp/BUILD
@@ -0,0 +1,11 @@
+BUNDLES = [
+    "//apps/dhcp/api:onos-apps-dhcp-api",
+    "//apps/dhcp/app:onos-apps-dhcp-app",
+]
+
+onos_app(
+    category = "Utility",
+    included_bundles = BUNDLES,
+    title = "DHCP Server",
+    url = "http://onosproject.org",
+)
diff --git a/apps/dhcp/api/BUILD b/apps/dhcp/api/BUILD
new file mode 100644
index 0000000..f72e3bc
--- /dev/null
+++ b/apps/dhcp/api/BUILD
@@ -0,0 +1,3 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
diff --git a/apps/dhcp/app/BUILD b/apps/dhcp/app/BUILD
new file mode 100644
index 0000000..5d1f800
--- /dev/null
+++ b/apps/dhcp/app/BUILD
@@ -0,0 +1,18 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + [
+    "@javax_ws_rs_api//jar",
+    "@org_apache_karaf_shell_console//jar",
+    "//apps/dhcp/api:onos-apps-dhcp-api",
+    "//utils/rest:onlab-rest",
+    "//core/store/serializers:onos-core-serializers",
+    "//cli:onos-cli",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for DHCP Server",
+    api_package = "org.onosproject.dhcp.rest",
+    api_title = "DHCP Server",
+    api_version = "1.0",
+    test_deps = TEST_ADAPTERS,
+    web_context = "/onos/dhcp",
+    deps = COMPILE_DEPS,
+)