Additional bazel build files for apps

Change-Id: If3f31139022b5657e4a7b8a33871e4eba0da286e
diff --git a/apps/bgprouter/BUILD b/apps/bgprouter/BUILD
new file mode 100644
index 0000000..d1a3ba2
--- /dev/null
+++ b/apps/bgprouter/BUILD
@@ -0,0 +1,26 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+]
+
+BUNDLES = [
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/routing/common:onos-apps-routing-common",
+    "//apps/bgprouter:onos-apps-bgprouter",
+]
+
+osgi_jar(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "BGP router application.",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.fibinstaller",
+        "org.onosproject.route-service",
+    ],
+    title = "BGP Router",
+    url = "http://onosproject.org",
+)
diff --git a/apps/castor/BUILD b/apps/castor/BUILD
new file mode 100644
index 0000000..fc4b373
--- /dev/null
+++ b/apps/castor/BUILD
@@ -0,0 +1,36 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + REST + [
+    "//core/store/serializers:onos-core-serializers",
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/intentsync:onos-apps-intentsync",
+]
+
+BUNDLES = [
+    "//apps/castor:onos-apps-castor",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/routing/common:onos-apps-routing-common",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//incubator/api:onos-incubator-api-tests",
+    "//apps/routing-api:onos-apps-routing-api-tests",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for Castor",
+    api_package = "org.onosproject.castor",
+    api_title = "Castor",
+    api_version = "1.0",
+    test_deps = TEST_DEPS,
+    web_context = "/onos/castor",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Utility",
+    description = "Castor application",
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.intentsynchronizer"],
+    title = "Castor",
+    url = "http://onosproject.org",
+)
diff --git a/apps/configsync-netconf/BUILD b/apps/configsync-netconf/BUILD
new file mode 100644
index 0000000..63c06c1
--- /dev/null
+++ b/apps/configsync-netconf/BUILD
@@ -0,0 +1,26 @@
+APPS = [
+    "org.onosproject.configsync",
+    "org.onosproject.yang",
+    "org.onosproject.netconf",
+]
+
+COMPILE_DEPS = CORE_DEPS + [
+    "@onos_yang_model//jar",
+    "@onos_yang_runtime//jar",
+    "//protocols/netconf/api:onos-protocols-netconf-api",
+    "//apps/config:onos-apps-config",
+    "//apps/configsync:onos-apps-configsync",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Utility",
+    description = "Application to support the Dynamic configuration service.",
+    required_apps = APPS,
+    title = "Dynamic Configuration Synchronizer for NETCONF",
+    url = "http://onosproject.org",
+)
diff --git a/apps/configsync/BUILD b/apps/configsync/BUILD
new file mode 100644
index 0000000..38b4fe7
--- /dev/null
+++ b/apps/configsync/BUILD
@@ -0,0 +1,20 @@
+APPS = [
+    # dynamic config
+    "org.onosproject.config",
+]
+
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + [
+    "//apps/config:onos-apps-config",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Utility",
+    description = "Application to support the Dynamic configuration service.",
+    required_apps = APPS,
+    title = "Dynamic Configuration Synchronizer",
+    url = "http://onosproject.org",
+)
diff --git a/apps/cord-support/BUILD b/apps/cord-support/BUILD
new file mode 100644
index 0000000..97ddc41
--- /dev/null
+++ b/apps/cord-support/BUILD
@@ -0,0 +1,24 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+TEST_DEPS = TEST_REST + [
+    "//lib:jersey-server",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for CORD inquiry to ONOS topology",
+    api_package = "org.onosproject.cordsupport",
+    api_title = "CORD Support",
+    api_version = "1.0",
+    test_deps = TEST_DEPS,
+    web_context = "/onos/cord-support",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Integration",
+    description = "CORD Support application.",
+    title = "CORD Support",
+    url = "http://onosproject.org",
+)
diff --git a/apps/cpman/app/BUILD b/apps/cpman/app/BUILD
new file mode 100644
index 0000000..9011ba4
--- /dev/null
+++ b/apps/cpman/app/BUILD
@@ -0,0 +1,39 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + METRICS + KRYO + CLI + REST + [
+    "@rrd4j//jar",
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/cpman/api:onos-apps-cpman-api",
+]
+
+TEST_DEPS = TEST_REST + [
+    "//web/api:onos-rest-tests",
+]
+
+BUNDLES = [
+    "//apps/cpman/api:onos-apps-cpman-api",
+    ":onos-apps-cpman-app",
+]
+
+EXCLUDED_BUNDLES = [
+    "@rrd4j//jar",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for Control Plane Manager",
+    api_package = "org.onosproject.cpman.rest",
+    api_title = "Control Plane Manager API",
+    api_version = "1.0",
+    test_deps = TEST_DEPS,
+    web_context = "/onos/cpman",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.cpman",
+    category = "Monitoring",
+    description = "Control Plane Management application for monitoring the health of the ONOS cluster",
+    excluded_bundles = EXCLUDED_BUNDLES,
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.openflow-message"],
+    title = "Control Plane Manager",
+    url = "http://onosproject.org",
+)
diff --git a/apps/drivermatrix/BUILD b/apps/drivermatrix/BUILD
new file mode 100644
index 0000000..2b6950c
--- /dev/null
+++ b/apps/drivermatrix/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + CLI + JACKSON
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "GUI",
+    description = "Extends the ONOS GUI with a view that allows the operator to visualize " +
+                  "the currently loaded drivers.",
+    title = "Driver Support Matrix",
+    url = "http://onosproject.org",
+)
diff --git a/apps/events/BUILD b/apps/events/BUILD
new file mode 100644
index 0000000..d5d9ebf
--- /dev/null
+++ b/apps/events/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Allows recording and tracking of otherwise ephemeral ONOS core events. " +
+                  "It is primarily aimed for supporting various system tests and to assure that expected " +
+                  "events are raised and broadcast to applications that have requested them.",
+    title = "Event History",
+    url = "http://onosproject.org",
+)
diff --git a/apps/evpnopenflow/BUILD b/apps/evpnopenflow/BUILD
new file mode 100644
index 0000000..73d982b
--- /dev/null
+++ b/apps/evpnopenflow/BUILD
@@ -0,0 +1,26 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
+    "//incubator/api:onos-incubator-api",
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/gluon:onos-apps-gluon",
+    "//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
+    "//apps/route-service/api:onos-apps-route-service-api",
+    "//apps/evpn-route-service/api:onos-apps-evpn-route-service-api",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Ethernet VPN (EVPN) introduces a new model for Ethernet services delivery." +
+                  "It enables integrated Layer 2 service over Ethernet with multihoming.",
+    required_apps = [
+        "org.onosproject.route-service",
+        "org.onosproject.evpn-route-service",
+        "org.onosproject.gluon",
+        "org.onosproject.vtn",
+    ],
+    title = "EVPN OpenFlow",
+    url = "http://onosproject.org",
+)
diff --git a/apps/flowanalyzer/BUILD b/apps/flowanalyzer/BUILD
new file mode 100644
index 0000000..422f1be
--- /dev/null
+++ b/apps/flowanalyzer/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + CLI
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "Simple flow space analyzer.",
+    title = "Flow Space Analysis",
+    url = "http://onosproject.org",
+)
diff --git a/apps/gangliametrics/BUILD b/apps/gangliametrics/BUILD
new file mode 100644
index 0000000..b76c08c
--- /dev/null
+++ b/apps/gangliametrics/BUILD
@@ -0,0 +1,23 @@
+COMPILE_DEPS = CORE_DEPS + METRICS + [
+    "@gmetric4j//jar",
+    "@metrics_ganglia//jar",
+    "@remotetea_oncrpc//jar",
+]
+
+EXCLUDED_BUNDLES = [
+    "@gmetric4j//jar",
+    "@metrics_ganglia//jar",
+    "@remotetea_oncrpc//jar",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "Performance metric service reporter",
+    excluded_bundles = EXCLUDED_BUNDLES,
+    title = "Ganglia Report and Query",
+    url = "http://onosproject.org",
+)
diff --git a/apps/gluon/BUILD b/apps/gluon/BUILD
new file mode 100644
index 0000000..183f9cb
--- /dev/null
+++ b/apps/gluon/BUILD
@@ -0,0 +1,28 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + [
+    "@httpclient_osgi//jar",
+    "@httpcore_osgi//jar",
+    "@org_apache_httpcomponents_httpasyncclient_osgi//jar",
+    "@org_apache_httpcomponents_httpcore_nio//jar",
+    "@org_apache_karaf_jaas//jar",
+]
+
+BUNDLES = [
+    ":onos-apps-gluon",
+    "@httpclient_osgi//jar",
+    "@httpcore_osgi//jar",
+    "@org_apache_httpcomponents_httpasyncclient_osgi//jar",
+    "@org_apache_httpcomponents_httpcore_nio//jar",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.gluon",
+    category = "Monitoring",
+    description = "To fetch data from Gluon Server over Http session.",
+    included_bundles = BUNDLES,
+    title = "Gluon Shim",
+    url = "http://onosproject.org",
+)
diff --git a/apps/graphitemetrics/BUILD b/apps/graphitemetrics/BUILD
new file mode 100644
index 0000000..a7ca902
--- /dev/null
+++ b/apps/graphitemetrics/BUILD
@@ -0,0 +1,21 @@
+COMPILE_DEPS = CORE_DEPS + METRICS + [
+    "@gmetric4j//jar",
+    "@metrics_graphite//jar",
+]
+
+EXCLUDED_BUNDLES = [
+    "@gmetric4j//jar",
+    "@metrics_graphite//jar",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "Performance metric service reporter and retriever for graphite",
+    excluded_bundles = EXCLUDED_BUNDLES,
+    title = "Graphite Report and Query",
+    url = "http://onosproject.org",
+)
diff --git a/apps/imr/BUILD b/apps/imr/BUILD
new file mode 100644
index 0000000..b5f9f8b
--- /dev/null
+++ b/apps/imr/BUILD
@@ -0,0 +1,12 @@
+BUNDLES = [
+    "//apps/imr/api:onos-apps-imr-api",
+    "//apps/imr/app:onos-apps-imr-app",
+]
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Intent Monitoring and Rerouting application.",
+    included_bundles = BUNDLES,
+    title = "Intent Monitoring and Rerouting",
+    url = "http://onosproject.org",  # link alla wiki su wiki.onosproject.org
+)
diff --git a/apps/imr/api/BUILD b/apps/imr/api/BUILD
new file mode 100644
index 0000000..a08f18c
--- /dev/null
+++ b/apps/imr/api/BUILD
@@ -0,0 +1,13 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + REST + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/imr/app:onos-apps-imr-app",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for IMR Application",
+    api_package = "org.onosproject.imr.rest",
+    api_title = "IMR REST API",
+    api_version = "1.0",
+    web_context = "/onos/v1/imr",
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/imr/app/BUILD b/apps/imr/app/BUILD
new file mode 100644
index 0000000..ce30441
--- /dev/null
+++ b/apps/imr/app/BUILD
@@ -0,0 +1,10 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + [
+    "//core/store/dist:onos-core-dist",
+    "//core/store/serializers:onos-core-serializers",
+    "//incubator/api:onos-incubator-api",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/influxdbmetrics/BUILD b/apps/influxdbmetrics/BUILD
new file mode 100644
index 0000000..278e4cf
--- /dev/null
+++ b/apps/influxdbmetrics/BUILD
@@ -0,0 +1,39 @@
+COMPILE_DEPS = CORE_DEPS + METRICS + CLI + [
+    "@metrics_influxdb//jar",
+    "@influxdb_java//jar",
+    "@commons_codec//jar",
+    "@retrofit//jar",
+    "@okhttp//jar",
+    "@logging_interceptor//jar",
+    "@okio//jar",
+    "@moshi//jar",
+    "@converter_moshi//jar",
+    "@gson//jar",
+]
+
+EXCLUDED_BUNDLES = [
+    "@metrics_influxdb//jar",
+    "@influxdb_java//jar",
+    "@commons_codec//jar",
+    "@retrofit//jar",
+    "@okhttp//jar",
+    "@logging_interceptor//jar",
+    "@gson//jar",
+    "@okio//jar",
+    "@moshi//jar",
+    "@converter_moshi//jar",
+]
+
+osgi_jar_with_tests(
+    exclude_tests = ["org.onosproject.influxdbmetrics.InfluxDbMetricsReporterTest"],
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "Performance metric service reporter and retriever for influxDB.",
+    excluded_bundles = EXCLUDED_BUNDLES,
+    title = "InfluxDB Report and Query",
+    url = "http://onosproject.org",
+)
diff --git a/apps/intentsync/BUILD b/apps/intentsync/BUILD
new file mode 100644
index 0000000..1928de8
--- /dev/null
+++ b/apps/intentsync/BUILD
@@ -0,0 +1,13 @@
+COMPILE_DEPS = CORE_DEPS + CLI
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.intentsynchronizer",
+    category = "Utility",
+    description = "Synchronizes intents to the intent framework from a single instance",
+    title = "Intent Synchronizer",
+    url = "http://onosproject.org",
+)
diff --git a/apps/iptopology-api/BUILD b/apps/iptopology-api/BUILD
new file mode 100644
index 0000000..f72e3bc
--- /dev/null
+++ b/apps/iptopology-api/BUILD
@@ -0,0 +1,3 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
diff --git a/apps/layout/BUILD b/apps/layout/BUILD
new file mode 100644
index 0000000..12d33e9
--- /dev/null
+++ b/apps/layout/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + [
+    "//core/common:onos-core-common",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "GUI",
+    description = "Automatically lays out the network topology using roles assigned to each " +
+                  "network element via the network configuration. Supports multiple layout variants.",
+    title = "UI Auto-Layout",
+    url = "http://onosproject.org",
+)
diff --git a/apps/linkprops/BUILD b/apps/linkprops/BUILD
new file mode 100644
index 0000000..72e8df9
--- /dev/null
+++ b/apps/linkprops/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "//incubator/api:onos-incubator-api",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "Shows more link properties",
+    title = "Link Properties",
+    url = "https://onosproject.org/",
+)
diff --git a/apps/metrics/BUILD b/apps/metrics/BUILD
new file mode 100644
index 0000000..443c1d4
--- /dev/null
+++ b/apps/metrics/BUILD
@@ -0,0 +1,12 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + METRICS + CLI + REST
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "Monitoring of various metrics related to topology mutation and intent programming.",
+    title = "Topology & Intent Metrics",
+    url = "http://onosproject.org",
+)
diff --git a/apps/mfwd/BUILD b/apps/mfwd/BUILD
new file mode 100644
index 0000000..d5b1a59
--- /dev/null
+++ b/apps/mfwd/BUILD
@@ -0,0 +1,10 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Multicast forwarding application.",
+    title = "Multicast Forwarding",
+    url = "http://onosproject.org",
+)
diff --git a/apps/mlb/BUILD b/apps/mlb/BUILD
new file mode 100644
index 0000000..c99af46
--- /dev/null
+++ b/apps/mlb/BUILD
@@ -0,0 +1,12 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
+
+onos_app(
+    category = "Utility",
+    description = "Monitors distribution of mastership of network devices between the ONOS cluster " +
+                  "nodes and periodically re-assigns the mastership to achieve balanced distribution when " +
+                  "necessary and possible.",
+    title = "Mastership Load Balancer",
+    url = "http://onosproject.org",
+)
diff --git a/apps/network-troubleshoot/BUILD b/apps/network-troubleshoot/BUILD
new file mode 100644
index 0000000..088b0e1
--- /dev/null
+++ b/apps/network-troubleshoot/BUILD
@@ -0,0 +1,13 @@
+BUNDLES = [
+    "//apps/network-troubleshoot/api:onos-apps-network-troubleshoot-api",
+    "//apps/network-troubleshoot/cli:onos-apps-network-troubleshoot-cli",
+    "//apps/network-troubleshoot/core:onos-apps-network-troubleshoot-core",
+]
+
+onos_app(
+    category = "Utility",
+    description = "Provides various network troubleshooting utilities.",
+    included_bundles = BUNDLES,
+    title = "Network Troubleshooter",
+    url = "https://wiki.onosproject.org/display/ONOS/Network+TroubleShooting+Module",
+)
diff --git a/apps/network-troubleshoot/api/BUILD b/apps/network-troubleshoot/api/BUILD
new file mode 100644
index 0000000..f72e3bc
--- /dev/null
+++ b/apps/network-troubleshoot/api/BUILD
@@ -0,0 +1,3 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
diff --git a/apps/network-troubleshoot/cli/BUILD b/apps/network-troubleshoot/cli/BUILD
new file mode 100644
index 0000000..5f68c98
--- /dev/null
+++ b/apps/network-troubleshoot/cli/BUILD
@@ -0,0 +1,8 @@
+COMPILE_DEPS = CORE_DEPS + CLI + [
+    "//apps/network-troubleshoot/api:onos-apps-network-troubleshoot-api",
+]
+
+osgi_jar_with_tests(
+    import_packages = "*,org.onosproject.cli.net",
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/network-troubleshoot/core/BUILD b/apps/network-troubleshoot/core/BUILD
new file mode 100644
index 0000000..3f4545b
--- /dev/null
+++ b/apps/network-troubleshoot/core/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "//incubator/api:onos-incubator-api",
+    "//apps/network-troubleshoot/api:onos-apps-network-troubleshoot-api",
+]
+
+TEST_DEPS = TEST + [
+    "//utils/osgi:onlab-osgi-tests",
+    "//incubator/api:onos-incubator-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/newoptical/BUILD b/apps/newoptical/BUILD
new file mode 100644
index 0000000..c4c8d0b
--- /dev/null
+++ b/apps/newoptical/BUILD
@@ -0,0 +1,21 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/optical-model:onos-apps-optical-model",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//utils/osgi:onlab-osgi-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Optical",
+    description = "Packet/Optical use-case application.",
+    required_apps = ["org.onosproject.optical-model"],
+    title = "Packet/Optical Use-Case",
+    url = "http://onosproject.org",
+)
diff --git a/apps/nodemetrics/BUILD b/apps/nodemetrics/BUILD
new file mode 100644
index 0000000..90425ed
--- /dev/null
+++ b/apps/nodemetrics/BUILD
@@ -0,0 +1,17 @@
+BUNDLES = [
+    "//apps/nodemetrics/api:onos-apps-nodemetrics-api",
+    "//apps/nodemetrics/mgr:onos-apps-nodemetrics-mgr",
+]
+
+onos_app(
+    app_name = "org.onosproject.nodemetrics",
+    category = "Monitoring",
+    description = "1.Nodemetrics Application uses, sigar library to fetch Controller information." +
+                  "2. The Sigar library uses Native libraries and currently It supports Windows, Linux and MacOs platform." +
+                  "3. The Native libraries like .so, .dll and .dylib are packed as jar along with sigar libs." +
+                  "4. If the Native libraries are corrupted because of any reason," +
+                  "so, the controller is vulnerable to crash of the entire JVM",
+    included_bundles = BUNDLES,
+    title = "Controller Monitor Application",
+    url = "http://samsung.com",
+)
diff --git a/apps/nodemetrics/api/BUILD b/apps/nodemetrics/api/BUILD
new file mode 100644
index 0000000..989a4d0
--- /dev/null
+++ b/apps/nodemetrics/api/BUILD
@@ -0,0 +1,5 @@
+COMPILE_DEPS = CORE_DEPS
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/nodemetrics/mgr/BUILD b/apps/nodemetrics/mgr/BUILD
new file mode 100644
index 0000000..9357978
--- /dev/null
+++ b/apps/nodemetrics/mgr/BUILD
@@ -0,0 +1,9 @@
+COMPILE_DEPS = CORE_DEPS + CLI + [
+    "@sigar//jar",
+    "//apps/nodemetrics/api:onos-apps-nodemetrics-api",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/odtn/service/BUILD b/apps/odtn/service/BUILD
new file mode 100644
index 0000000..38f187e
--- /dev/null
+++ b/apps/odtn/service/BUILD
@@ -0,0 +1,40 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + CLI + JACKSON + [
+    "//apps/odtn/api:onos-apps-odtn-api",
+    "//apps/config:onos-apps-config",
+    "//models/tapi:onos-models-tapi",
+    "//models/openconfig:onos-models-openconfig",
+    "//apps/yang:onos-apps-yang",
+    "//incubator/api:onos-incubator-api",
+    "//protocols/netconf/api:onos-protocols-netconf-api",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+APPS = [
+    "org.onosproject.yang",
+    "org.onosproject.config",
+    "org.onosproject.configsync",
+    "org.onosproject.models.tapi",
+    "org.onosproject.models.openconfig",
+    "org.onosproject.odtn-api",
+
+    # strictly speaking following are not mandatory
+    "org.onosproject.restconf",
+    "org.onosproject.drivers.netconf",  # will need if using TemplateManager
+    "org.onosproject.drivers.odtn-driver",
+    "org.onosproject.netconf",
+    "org.onosproject.configsync-netconf",
+    "org.onosproject.protocols.restconfserver",
+]
+
+onos_app(
+    app_name = "org.onosproject.odtn-service",
+    category = "Traffic Engineering",
+    description = "ODTN Service Application",
+    required_apps = APPS,
+    title = "ODTN Service Application",
+    url = "http://onosproject.org",
+)
diff --git a/apps/ofagent/BUILD b/apps/ofagent/BUILD
new file mode 100644
index 0000000..2cf8f09
--- /dev/null
+++ b/apps/ofagent/BUILD
@@ -0,0 +1,43 @@
+COMPILE_DEPS = CORE_DEPS + NETTY + JACKSON + KRYO + CLI + REST + [
+    "@netty_transport//jar",
+    "@netty_codec//jar",
+    "@netty_handler//jar",
+    "@openflowj//jar",
+    "//core/store/serializers:onos-core-serializers",
+    "//core/common:onos-core-common",
+    "//incubator/api:onos-incubator-api",
+    "//providers/openflow/flow:onos-providers-openflow-flow",
+    "//protocols/openflow/api:onos-protocols-openflow-api",
+]
+
+BUNDLES = [
+    "//apps/ofagent:onos-apps-ofagent",
+    "//providers/openflow/flow:onos-providers-openflow-flow",
+    "//protocols/openflow/api:onos-protocols-openflow-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + TEST_REST + [
+    "@jersey_server//jar",
+    "@minimal_json//jar",
+    "//core/api:onos-api-tests",
+    "//core/common:onos-core-common-tests",
+    "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for OFAgent",
+    api_package = "org.onosproject.ofagent.rest",
+    api_title = "OFAgent API",
+    api_version = "1.0",
+    test_deps = TEST_DEPS,
+    web_context = "/onos/ofagent",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "OpenFlow agent application for virtualization subsystem.",
+    included_bundles = BUNDLES,
+    title = "OpenFlow Agent",
+    url = "http://onosproject.org",
+)
diff --git a/apps/openroadm/BUILD b/apps/openroadm/BUILD
new file mode 100644
index 0000000..6678cb4
--- /dev/null
+++ b/apps/openroadm/BUILD
@@ -0,0 +1,25 @@
+APPS = [
+    "org.onosproject.yang",
+    "org.onosproject.yang-gui",
+    "org.onosproject.config",
+    "org.onosproject.restconf",
+    "org.onosproject.protocols.restconfserver",
+    "org.onosproject.netconf",
+    "org.onosproject.netconfsb",
+    "org.onosproject.models.openroadm",
+]
+
+BUNDLES = [
+    "//apps/openroadm/service:onos-apps-openroadm-service",
+    "//apps/openroadm/network:onos-apps-openroadm-network",
+]
+
+onos_app(
+    app_name = "org.onosproject.openroadm",
+    category = "Optical",
+    description = "Open ROADM Application",
+    included_bundles = BUNDLES,
+    required_apps = APPS,
+    title = "Open ROADM",
+    url = "http://onosproject.org",
+)
diff --git a/apps/openroadm/network/BUILD b/apps/openroadm/network/BUILD
new file mode 100644
index 0000000..f27a6fe
--- /dev/null
+++ b/apps/openroadm/network/BUILD
@@ -0,0 +1,10 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + [
+    "@onos_yang_runtime//jar",
+    "//models/openroadm:onos-models-openroadm",
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/yang:onos-apps-yang-native",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/openroadm/service/BUILD b/apps/openroadm/service/BUILD
new file mode 100644
index 0000000..3f9e08f
--- /dev/null
+++ b/apps/openroadm/service/BUILD
@@ -0,0 +1,10 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + [
+    "@onos_yang_runtime//jar",
+    "//apps/yang:onos-apps-yang-native",
+    "//models/openroadm:onos-models-openroadm",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/optical-rest/BUILD b/apps/optical-rest/BUILD
new file mode 100644
index 0000000..bcbdc33
--- /dev/null
+++ b/apps/optical-rest/BUILD
@@ -0,0 +1,24 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + REST + CLI + [
+    "//apps/optical-model:onos-apps-optical-model",
+]
+
+APPS = [
+    "org.onosproject.optical-model",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for Optical Model",
+    api_package = "org.onosproject.net.optical.rest",
+    api_title = "Optical Network Model REST API",
+    api_version = "1.0",
+    web_context = "/onos/optical",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Optical",
+    description = "This application provides REST support for optical network model.",
+    required_apps = APPS,
+    title = "Optical Network Model REST API",
+    url = "http://onosproject.org",
+)
diff --git a/apps/packet-stats/BUILD b/apps/packet-stats/BUILD
new file mode 100644
index 0000000..4019f9b
--- /dev/null
+++ b/apps/packet-stats/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + METRICS + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+    "//core/store/primitives:onos-core-primitives",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Application to calculate the number of packets of different types",
+    title = "Packet Statistics",
+    url = "http://onosproject.org",
+)
diff --git a/apps/pi-demo/common/BUILD b/apps/pi-demo/common/BUILD
new file mode 100644
index 0000000..01d59ae
--- /dev/null
+++ b/apps/pi-demo/common/BUILD
@@ -0,0 +1,3 @@
+osgi_jar(
+    deps = CORE_DEPS,
+)
diff --git a/apps/pi-demo/ecmp/BUILD b/apps/pi-demo/ecmp/BUILD
new file mode 100644
index 0000000..2d2be99
--- /dev/null
+++ b/apps/pi-demo/ecmp/BUILD
@@ -0,0 +1,26 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "@minimal_json//jar",
+    "//apps/pi-demo/common:onos-apps-pi-demo-common",
+    "//pipelines/basic:onos-pipelines-basic",
+]
+
+osgi_jar(
+    deps = COMPILE_DEPS,
+)
+
+BUNDLES = [
+    "//apps/pi-demo/common:onos-apps-pi-demo-common",
+    "//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp",
+]
+
+onos_app(
+    app_name = "org.onosproject.pi-ecmp",
+    category = "Traffic Engineering",
+    description = "Provides ECMP support for a 2-stage clos fabric topology of PI-enabled devices",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.pipelines.basic",
+    ],
+    title = "PI Demo ECMP Fabric",
+    url = "http://onosproject.org",
+)
diff --git a/apps/pim/BUILD b/apps/pim/BUILD
new file mode 100644
index 0000000..ccde728
--- /dev/null
+++ b/apps/pim/BUILD
@@ -0,0 +1,25 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + [
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/route-service/api:onos-apps-route-service-api",
+]
+
+BUNDLES = [
+    "//apps/routing-api:onos-apps-routing-api",
+    ":onos-apps-pim",
+]
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Protocol independent multicast emulation.",
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.route-service"],
+    title = "Protocol Independent Multicast Emulation",
+    url = "http://onosproject.org",
+)
diff --git a/apps/powermanagement/BUILD b/apps/powermanagement/BUILD
new file mode 100644
index 0000000..f364224
--- /dev/null
+++ b/apps/powermanagement/BUILD
@@ -0,0 +1,21 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for Power Management",
+    api_package = "org.onosproject.powermanagement",
+    api_title = "Power Management API",
+    api_version = "1.0",
+    test_deps = TEST_REST,
+    web_context = "/onos/powermanagement",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Monitoring",
+    description = "This application provides northbound interfaces for monitoring and " +
+                  "configuring power.",
+    title = "Power Management",
+    url = "http://onosproject.org",
+)
diff --git a/apps/rabbitmq/BUILD b/apps/rabbitmq/BUILD
new file mode 100644
index 0000000..4111cd6
--- /dev/null
+++ b/apps/rabbitmq/BUILD
@@ -0,0 +1,27 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "@gson//jar",
+    "@amqp_client//jar",
+    "//incubator/api:onos-incubator-api",
+]
+
+BUNDLES = [
+    "@gson//jar",
+    "@amqp_client//jar",
+    "//apps/rabbitmq:onos-apps-rabbitmq",
+]
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Integration",
+    description = "Rabbit MQ application.",
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.proxyarp"],
+    title = "Rabbit MQ Integration",
+    url = "http://onosproject.org",
+)
diff --git a/apps/reactive-routing/BUILD b/apps/reactive-routing/BUILD
new file mode 100644
index 0000000..aca004f
--- /dev/null
+++ b/apps/reactive-routing/BUILD
@@ -0,0 +1,23 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "@concurrent_trees//jar",
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/intentsync:onos-apps-intentsync",
+    "//apps/route-service/api:onos-apps-route-service-api",
+]
+
+osgi_jar(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "SDN-IP reactive routing application.",
+    required_apps = [
+        "org.onosproject.intentsynchronizer",
+        "org.onosproject.sdnip",
+        "org.onosproject.route-service",
+    ],
+    title = "SDN-IP Reactive Routing",
+    url = "http://onosproject.org",
+)
diff --git a/apps/restconf/BUILD b/apps/restconf/BUILD
new file mode 100644
index 0000000..49c1c55
--- /dev/null
+++ b/apps/restconf/BUILD
@@ -0,0 +1,19 @@
+BUNDLES = [
+    "//apps/restconf/api:onos-apps-restconf-api",
+    "//apps/restconf/utils:onos-apps-restconf-utils",
+    "//apps/restconf/restconfmgr:onos-apps-restconf-restconfmgr",
+]
+
+APPS = [
+    "org.onosproject.yang",
+    "org.onosproject.config",
+]
+
+onos_app(
+    app_name = "org.onosproject.restconf",
+    category = "Utility",
+    included_bundles = BUNDLES,
+    required_apps = APPS,
+    title = "RESTCONF Application Module",
+    url = "http://onosproject.org",
+)
diff --git a/apps/restconf/api/BUILD b/apps/restconf/api/BUILD
new file mode 100644
index 0000000..b4f282b
--- /dev/null
+++ b/apps/restconf/api/BUILD
@@ -0,0 +1,9 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + REST + [
+    "@jersey_client//jar",
+    "@jersey_server//jar",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_REST,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/restconf/restconfmgr/BUILD b/apps/restconf/restconfmgr/BUILD
new file mode 100644
index 0000000..0fcae18
--- /dev/null
+++ b/apps/restconf/restconfmgr/BUILD
@@ -0,0 +1,13 @@
+COMPILE_DEPS = CORE_DEPS + ONOS_YANG + JACKSON + [
+    "@jersey_server//jar",
+    "@javax_ws_rs_api//jar",
+    "//incubator/api:onos-incubator-api",
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/restconf/api:onos-apps-restconf-api",
+    "//apps/restconf/utils:onos-apps-restconf-utils",
+    "//apps/config:onos-apps-config",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/restconf/utils/BUILD b/apps/restconf/utils/BUILD
new file mode 100644
index 0000000..5a1ddc6
--- /dev/null
+++ b/apps/restconf/utils/BUILD
@@ -0,0 +1,10 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + ONOS_YANG + [
+    "@onos_yang_runtime//jar",
+    "@javax_ws_rs_api//jar",
+    "//utils/rest:onlab-rest",
+    "//apps/restconf/api:onos-apps-restconf-api",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/roadm/BUILD b/apps/roadm/BUILD
new file mode 100644
index 0000000..384c53f
--- /dev/null
+++ b/apps/roadm/BUILD
@@ -0,0 +1,22 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/optical-model:onos-apps-optical-model",
+]
+
+TEST_DEPS = TEST_REST + [
+    "//core/api:onos-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Optical",
+    description = "This application provides an interface and web GUI for monitoring and " +
+                  "configuring power on ROADM devices.",
+    required_apps = ["org.onosproject.optical-model"],
+    title = "ROADM",
+    url = "http://onosproject.org",
+)
diff --git a/apps/routing/cpr/BUILD b/apps/routing/cpr/BUILD
new file mode 100644
index 0000000..8fcdaa5
--- /dev/null
+++ b/apps/routing/cpr/BUILD
@@ -0,0 +1,30 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//incubator/api:onos-incubator-api-tests",
+    "//apps/routing-api:onos-apps-routing-api-tests",
+    "//utils/osgi:onlab-osgi-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
+
+BUNDLES = [
+    "//apps/routing/common:onos-apps-routing-common",
+    "//apps/routing/cpr:onos-apps-routing-cpr",
+    "//apps/routing-api:onos-apps-routing-api",
+]
+
+onos_app(
+    app_name = "org.onosproject.cpr",
+    category = "Traffic Engineering",
+    description = "Redirects routing control traffic to a control plane",
+    included_bundles = BUNDLES,
+    title = "Control Plane Redirect",
+    url = "http://onosproject.org",
+)
diff --git a/apps/routing/fibinstaller/BUILD b/apps/routing/fibinstaller/BUILD
new file mode 100644
index 0000000..46946a7
--- /dev/null
+++ b/apps/routing/fibinstaller/BUILD
@@ -0,0 +1,31 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/route-service/api:onos-apps-route-service-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//incubator/api:onos-incubator-api-tests",
+    "//apps/routing-api:onos-apps-routing-api-tests",
+    "//apps/route-service/api:onos-apps-route-service-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
+
+BUNDLES = [
+    "//apps/routing/fibinstaller:onos-apps-routing-fibinstaller",
+    "//apps/routing-api:onos-apps-routing-api",
+]
+
+onos_app(
+    app_name = "org.onosproject.fibinstaller",
+    category = "Traffic Engineering",
+    description = "Installs routing rules into switches",
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.route-service"],
+    title = "FIB Installer",
+    url = "http://onosproject.org",
+)
diff --git a/apps/scalablegateway/BUILD b/apps/scalablegateway/BUILD
new file mode 100644
index 0000000..6d56e39
--- /dev/null
+++ b/apps/scalablegateway/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Scalable gateway service",
+    title = "Scalable Gateway",
+    url = "http://onosproject.org",
+)
diff --git a/apps/sdnip/BUILD b/apps/sdnip/BUILD
new file mode 100644
index 0000000..861fe8e
--- /dev/null
+++ b/apps/sdnip/BUILD
@@ -0,0 +1,34 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + [
+    "//incubator/api:onos-incubator-api",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/route-service/api:onos-apps-route-service-api",
+    "//apps/intentsync:onos-apps-intentsync",
+]
+
+BUNDLES = [
+    "//apps/sdnip:onos-apps-sdnip",
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/routing/common:onos-apps-routing-common",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//apps/routing-api:onos-apps-routing-api-tests",
+    "//apps/route-service/api:onos-apps-route-service-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "SDN-IP peering application",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.intentsynchronizer",
+        "org.onosproject.route-service",
+    ],
+    title = "SDN-IP",
+    url = "http://onosproject.org",
+)
diff --git a/apps/simplefabric/BUILD b/apps/simplefabric/BUILD
new file mode 100644
index 0000000..03e118d
--- /dev/null
+++ b/apps/simplefabric/BUILD
@@ -0,0 +1,26 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + REST + [
+    "@concurrent_trees//jar",
+]
+
+BUNDLES = [
+    "//apps/simplefabric:onos-apps-simplefabric",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_ADAPTERS,
+    web_context = "/onos/v1/simplefabric",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Simple Fabric application",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.openflow-base",
+        "org.onosproject.lldpprovider",
+        "org.onosproject.hostprovider",
+    ],
+    title = "SimpleFabric",
+    url = "http://onosproject.org",
+)
diff --git a/apps/t3/BUILD b/apps/t3/BUILD
new file mode 100644
index 0000000..0e444bf
--- /dev/null
+++ b/apps/t3/BUILD
@@ -0,0 +1,19 @@
+BUNDLES = [
+    "//apps/t3/web:onos-apps-t3-web",
+    "//apps/t3/app:onos-apps-t3-app",
+]
+
+onos_app(
+    app_name = "org.onosproject.t3",
+    category = "Utilities",
+    description = "Provides static analysis of flows and groups " +
+                  "to determine the possible paths a packet may take.",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.segmentrouting",
+        "org.onosproject.route-service",
+        "org.onosproject.mcast",
+    ],
+    title = "Trellis Troubleshooting Toolkit",
+    url = "https://wiki.opencord.org/pages/viewpage.action?pageId=4456974",
+)
diff --git a/apps/t3/app/BUILD b/apps/t3/app/BUILD
new file mode 100644
index 0000000..4380cd6
--- /dev/null
+++ b/apps/t3/app/BUILD
@@ -0,0 +1,18 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+    "//core/store/primitives:onos-core-primitives",
+    "//drivers/default:onos-drivers-default",
+    "//apps/segmentrouting/app:onos-apps-segmentrouting-app",
+    "//apps/route-service/api:onos-apps-route-service-api",
+    "//apps/mcast/api:onos-apps-mcast-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//utils/misc:onlab-misc",
+    "//apps/route-service/api:onos-apps-route-service-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/t3/web/BUILD b/apps/t3/web/BUILD
new file mode 100644
index 0000000..0fd733f
--- /dev/null
+++ b/apps/t3/web/BUILD
@@ -0,0 +1,13 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + REST + CLI + [
+    "@jersey_server//jar",
+    "//apps/t3/app:onos-apps-t3-app",
+]
+
+osgi_jar(
+    api_description = "REST API for T3",
+    api_package = "org.onosproject.t3.rest",
+    api_title = "T3 REST API",
+    api_version = "1.0",
+    web_context = "/onos/v1/t3",
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/test/cluster-ha/BUILD b/apps/test/cluster-ha/BUILD
new file mode 100644
index 0000000..fe48d70
--- /dev/null
+++ b/apps/test/cluster-ha/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + CLI + KRYO + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Test for ONOS Cluster HA",
+    title = "Cluster HA Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/demo/BUILD b/apps/test/demo/BUILD
new file mode 100644
index 0000000..16f06f0
--- /dev/null
+++ b/apps/test/demo/BUILD
@@ -0,0 +1,17 @@
+COMPILE_DEPS = CORE_DEPS + REST + JACKSON
+
+osgi_jar_with_tests(
+    api_description = "REST API for Demo",
+    api_package = "org.onosproject.demo",
+    api_title = "Flow Throughput Demo",
+    api_version = "1.0",
+    web_context = "/onos/demo",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "APIs for interacting with the flow throughput test application.",
+    title = "Flow Throughput Demo",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/election/BUILD b/apps/test/election/BUILD
new file mode 100644
index 0000000..91ea75b
--- /dev/null
+++ b/apps/test/election/BUILD
@@ -0,0 +1,12 @@
+COMPILE_DEPS = CORE_DEPS + CLI + REST
+
+osgi_jar(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Master election test application.",
+    title = "Master Election Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/flow-perf/BUILD b/apps/test/flow-perf/BUILD
new file mode 100644
index 0000000..22045a7
--- /dev/null
+++ b/apps/test/flow-perf/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Messaging performance test application.",
+    title = "Flow Performance Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/intent-perf/BUILD b/apps/test/intent-perf/BUILD
new file mode 100644
index 0000000..b5c90d4
--- /dev/null
+++ b/apps/test/intent-perf/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.intentperf",
+    category = "Test Utility",
+    description = "Intent performance test application.",
+    title = "Intent Performance Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/loadtest/BUILD b/apps/test/loadtest/BUILD
new file mode 100644
index 0000000..be2f2da
--- /dev/null
+++ b/apps/test/loadtest/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Distributed consensus load test application.",
+    title = "Distributed Load Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/messaging-perf/BUILD b/apps/test/messaging-perf/BUILD
new file mode 100644
index 0000000..670d927
--- /dev/null
+++ b/apps/test/messaging-perf/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Messaging performance test application.",
+    title = "Messaging Performance Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/netcfg-monitor/BUILD b/apps/test/netcfg-monitor/BUILD
new file mode 100644
index 0000000..09680c4
--- /dev/null
+++ b/apps/test/netcfg-monitor/BUILD
@@ -0,0 +1,10 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Network configuration monitor test application.",
+    title = "Network Configuration Monitor Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/primitive-perf/BUILD b/apps/test/primitive-perf/BUILD
new file mode 100644
index 0000000..c562aa4
--- /dev/null
+++ b/apps/test/primitive-perf/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.primitiveperf",
+    category = "Test Utility",
+    description = "Primitive performance test application.",
+    title = "Primitive Performance Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/proxy/BUILD b/apps/test/proxy/BUILD
new file mode 100644
index 0000000..82ac3d5
--- /dev/null
+++ b/apps/test/proxy/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.proxytest",
+    category = "Test Utility",
+    description = "Proxy test application.",
+    title = "Proxy Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/route-scale/BUILD b/apps/test/route-scale/BUILD
new file mode 100644
index 0000000..328f558
--- /dev/null
+++ b/apps/test/route-scale/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + CLI + REST + [
+    "//apps/route-service/api:onos-apps-route-service-api",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.routescale",
+    category = "Test Utility",
+    description = "Route and flow scalability test facility.",
+    required_apps = ["org.onosproject.route-service"],
+    title = "Route and Flow Scalability Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/test/transaction-perf/BUILD b/apps/test/transaction-perf/BUILD
new file mode 100644
index 0000000..7b879ed
--- /dev/null
+++ b/apps/test/transaction-perf/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + [
+    #CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Test Utility",
+    description = "Transaction performance test application.",
+    title = "Transaction Performance Test",
+    url = "http://onosproject.org",
+)
diff --git a/apps/tetopology/BUILD b/apps/tetopology/BUILD
new file mode 100644
index 0000000..9f16249
--- /dev/null
+++ b/apps/tetopology/BUILD
@@ -0,0 +1,13 @@
+BUNDLES = [
+    "//apps/tetopology/api:onos-apps-tetopology-api",
+    "//apps/tetopology/app:onos-apps-tetopology-app",
+]
+
+onos_app(
+    app_name = "org.onosproject.tetopology",
+    category = "Traffic Engineering",
+    description = "Application to create and manage hierarchical TE topologies.",
+    included_bundles = BUNDLES,
+    title = "TE Topology Core",
+    url = "http://onosproject.org",
+)
diff --git a/apps/tetopology/api/BUILD b/apps/tetopology/api/BUILD
new file mode 100644
index 0000000..f72e3bc
--- /dev/null
+++ b/apps/tetopology/api/BUILD
@@ -0,0 +1,3 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS,
+)
diff --git a/apps/tetopology/app/BUILD b/apps/tetopology/app/BUILD
new file mode 100644
index 0000000..2824311
--- /dev/null
+++ b/apps/tetopology/app/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + [
+    "//apps/tetopology/api:onos-apps-tetopology-api",
+    "//incubator/api:onos-incubator-api",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//utils/osgi:onlab-osgi-tests",
+    "//incubator/api:onos-incubator-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/tetunnel/BUILD b/apps/tetunnel/BUILD
new file mode 100644
index 0000000..bac5864
--- /dev/null
+++ b/apps/tetunnel/BUILD
@@ -0,0 +1,14 @@
+BUNDLES = [
+    "//apps/tetunnel/api:onos-apps-tetunnel-api",
+    "//apps/tetunnel/app:onos-apps-tetunnel-app",
+]
+
+onos_app(
+    app_name = "org.onosproject.tetunnel",
+    category = "Traffic Engineering",
+    description = "Application to create and manage TE tunnels.",
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.tetopology"],
+    title = "TE Tunnel Core",
+    url = "http://onosproject.org",
+)
diff --git a/apps/tetunnel/api/BUILD b/apps/tetunnel/api/BUILD
new file mode 100644
index 0000000..1fb7f05
--- /dev/null
+++ b/apps/tetunnel/api/BUILD
@@ -0,0 +1,8 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "//apps/tetopology/api:onos-apps-tetopology-api",
+    "//incubator/api:onos-incubator-api",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/tetunnel/app/BUILD b/apps/tetunnel/app/BUILD
new file mode 100644
index 0000000..17f4c6b
--- /dev/null
+++ b/apps/tetunnel/app/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + [
+    "//apps/tetopology/api:onos-apps-tetopology-api",
+    "//apps/tetunnel/api:onos-apps-tetunnel-api",
+    "//incubator/api:onos-incubator-api",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//utils/osgi:onlab-osgi-tests",
+    "//incubator/api:onos-incubator-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/virtualbng/BUILD b/apps/virtualbng/BUILD
new file mode 100644
index 0000000..353fda5
--- /dev/null
+++ b/apps/virtualbng/BUILD
@@ -0,0 +1,14 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + REST
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "A virtual Broadband Network Gateway(BNG) application.",
+    title = "Virtual Broadband Gateway",
+    url = "http://onosproject.org",
+)
diff --git a/apps/vpls/BUILD b/apps/vpls/BUILD
new file mode 100644
index 0000000..5e90e5b
--- /dev/null
+++ b/apps/vpls/BUILD
@@ -0,0 +1,19 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + REST + CLI + [
+    "@jersey_client//jar",
+    "//incubator/api:onos-incubator-api",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    exclude_tests = ["org.onosproject.vpls.VplsTest"],
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Application to create L2 broadcast network using VLAN.",
+    required_apps = ["org.onosproject.intentsynchronizer"],
+    title = "VLAN L2 Broadcast Network",
+    url = "http://onosproject.org",
+)
diff --git a/apps/vrouter/BUILD b/apps/vrouter/BUILD
new file mode 100644
index 0000000..e6cc635
--- /dev/null
+++ b/apps/vrouter/BUILD
@@ -0,0 +1,26 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "//incubator/api:onos-incubator-api",
+]
+
+BUNDLES = [
+    "//apps/routing-api:onos-apps-routing-api",
+    "//apps/routing/common:onos-apps-routing-common",
+    "//apps/vrouter:onos-apps-vrouter",
+]
+
+osgi_jar(
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    category = "Traffic Engineering",
+    description = "Virtual router (vRouter) application.",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.fibinstaller",
+        "org.onosproject.cpr",
+        "org.onosproject.fpm",
+    ],
+    title = "Virtual Router",
+    url = "http://onosproject.org",
+)
diff --git a/apps/vtn/BUILD b/apps/vtn/BUILD
new file mode 100644
index 0000000..8331afd
--- /dev/null
+++ b/apps/vtn/BUILD
@@ -0,0 +1,14 @@
+BUNDLES = [
+    "//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
+    "//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr",
+    "//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr",
+    "//apps/vtn/vtnweb:onos-apps-vtn-vtnweb",
+]
+
+onos_app(
+    category = "Integration",
+    description = "ONOS framework applications",
+    included_bundles = BUNDLES,
+    title = "OPNFV",
+    url = "http://onosproject.org",
+)
diff --git a/apps/vtn/sfcmgr/BUILD b/apps/vtn/sfcmgr/BUILD
new file mode 100644
index 0000000..e45ac6e
--- /dev/null
+++ b/apps/vtn/sfcmgr/BUILD
@@ -0,0 +1,9 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/vtn/vtnmgr/BUILD b/apps/vtn/vtnmgr/BUILD
new file mode 100644
index 0000000..0ae2ab8
--- /dev/null
+++ b/apps/vtn/vtnmgr/BUILD
@@ -0,0 +1,10 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
+]
+
+osgi_jar_with_tests(
+    resources = glob(["src/main/resources/**"]),
+    resources_root = "src/main/resources",
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/vtn/vtnrsc/BUILD b/apps/vtn/vtnrsc/BUILD
new file mode 100644
index 0000000..df0a9a9
--- /dev/null
+++ b/apps/vtn/vtnrsc/BUILD
@@ -0,0 +1,12 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+]
+
+osgi_jar_with_tests(
+    exclude_tests = [
+        "org/onosproject/vtnrsc/util/VtnEventuallyConsistentMapTest",
+        "org/onosproject/vtnrsc/util/VtnStorageServiceTest",
+    ],
+    test_deps = TEST_REST,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/vtn/vtnweb/BUILD b/apps/vtn/vtnweb/BUILD
new file mode 100644
index 0000000..0142518
--- /dev/null
+++ b/apps/vtn/vtnweb/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + REST + [
+    "//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
+]
+
+TEST_DEPS = TEST_REST + [
+    "@minimal_json//jar",
+    "//utils/osgi:onlab-osgi-tests",
+    "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+    exclude_tests = ["org.onosproject.vtnweb.resources.VtnResourceTest"],
+    test_deps = TEST_DEPS,
+    web_context = "/onos/vtn",
+    deps = COMPILE_DEPS,
+)
diff --git a/modules.bzl b/modules.bzl
index bee196c..b829045 100644
--- a/modules.bzl
+++ b/modules.bzl
@@ -149,82 +149,82 @@
     "//apps/dhcp:onos-apps-dhcp-oar",
     "//apps/dhcprelay:onos-apps-dhcprelay-oar",
     "//apps/fwd:onos-apps-fwd-oar",
-    #"//apps/packet-stats:onos-apps-packet-stats-oar",
+    "//apps/packet-stats:onos-apps-packet-stats-oar",
     "//apps/acl:onos-apps-acl-oar",
-    #"//apps/bgprouter:onos-apps-bgprouter-oar",
+    "//apps/bgprouter:onos-apps-bgprouter-oar",
     "//apps/cip:onos-apps-cip-oar",
-    #"//apps/drivermatrix:onos-apps-drivermatrix-oar",
-    #"//apps/events:onos-apps-events-oar",
+    "//apps/drivermatrix:onos-apps-drivermatrix-oar",
+    "//apps/events:onos-apps-events-oar",
     "//apps/proxyarp:onos-apps-proxyarp-oar",
     "//apps/segmentrouting:onos-apps-segmentrouting-oar",
-    #"//apps/gangliametrics:onos-apps-gangliametrics-oar",
-    #"//apps/graphitemetrics:onos-apps-graphitemetrics-oar",
-    #"//apps/flowanalyzer:onos-apps-flowanalyzer-oar",
-    #"//apps/intentsync:onos-apps-intentsync-oar",
-    #"//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar",
-    #"//apps/metrics:onos-apps-metrics-oar",
-    #"//apps/mfwd:onos-apps-mfwd-oar",
-    #"//apps/mlb:onos-apps-mlb-oar",
+    "//apps/gangliametrics:onos-apps-gangliametrics-oar",
+    "//apps/graphitemetrics:onos-apps-graphitemetrics-oar",
+    "//apps/flowanalyzer:onos-apps-flowanalyzer-oar",
+    "//apps/intentsync:onos-apps-intentsync-oar",
+    "//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar",
+    "//apps/metrics:onos-apps-metrics-oar",
+    "//apps/mfwd:onos-apps-mfwd-oar",
+    "//apps/mlb:onos-apps-mlb-oar",
     #"//apps/openstacknetworking:onos-apps-openstacknetworking-oar",
     "//apps/mobility:onos-apps-mobility-oar",
-    #"//apps/newoptical:onos-apps-newoptical-oar",
+    "//apps/newoptical:onos-apps-newoptical-oar",
     "//apps/optical-model:onos-apps-optical-model-oar",
-    #"//apps/optical-rest:onos-apps-optical-rest-oar",
+    "//apps/optical-rest:onos-apps-optical-rest-oar",
     "//apps/pathpainter:onos-apps-pathpainter-oar",
     "//apps/pcep-api:onos-apps-pcep-api-oar",
-    #"//apps/pim:onos-apps-pim-oar",
-    #"//apps/linkprops:onos-apps-linkprops-oar",
-    #"//apps/reactive-routing:onos-apps-reactive-routing-oar",
-    #"//apps/roadm:onos-apps-roadm-oar",
-    #"//apps/sdnip:onos-apps-sdnip-oar",
-    #"//apps/test/cluster-ha:onos-apps-test-cluster-ha-oar",
-    #"//apps/test/demo:onos-apps-test-demo-oar",
+    "//apps/pim:onos-apps-pim-oar",
+    "//apps/linkprops:onos-apps-linkprops-oar",
+    "//apps/reactive-routing:onos-apps-reactive-routing-oar",
+    "//apps/roadm:onos-apps-roadm-oar",
+    "//apps/sdnip:onos-apps-sdnip-oar",
+    "//apps/test/cluster-ha:onos-apps-test-cluster-ha-oar",
+    "//apps/test/demo:onos-apps-test-demo-oar",
     "//apps/test/distributed-primitives:onos-apps-test-distributed-primitives-oar",
-    #"//apps/test/election:onos-apps-test-election-oar",
-    #"//apps/test/flow-perf:onos-apps-test-flow-perf-oar",
-    #"//apps/test/intent-perf:onos-apps-test-intent-perf-oar",
-    #"//apps/test/route-scale:onos-apps-test-route-scale-oar",
-    #"//apps/test/loadtest:onos-apps-test-loadtest-oar",
-    #"//apps/test/netcfg-monitor:onos-apps-test-netcfg-monitor-oar",
-    #"//apps/test/messaging-perf:onos-apps-test-messaging-perf-oar",
-    #"//apps/test/primitive-perf:onos-apps-test-primitive-perf-oar",
-    #"//apps/test/transaction-perf:onos-apps-test-transaction-perf-oar",
-    #"//apps/virtualbng:onos-apps-virtualbng-oar",
-    #"//apps/vpls:onos-apps-vpls-oar",
-    #"//apps/vrouter:onos-apps-vrouter-oar",
-    #"//apps/routing/fibinstaller:onos-apps-routing-fibinstaller-oar",
-    #"//apps/routing/cpr:onos-apps-routing-cpr-oar",
+    "//apps/test/election:onos-apps-test-election-oar",
+    "//apps/test/flow-perf:onos-apps-test-flow-perf-oar",
+    "//apps/test/intent-perf:onos-apps-test-intent-perf-oar",
+    "//apps/test/route-scale:onos-apps-test-route-scale-oar",
+    "//apps/test/loadtest:onos-apps-test-loadtest-oar",
+    "//apps/test/netcfg-monitor:onos-apps-test-netcfg-monitor-oar",
+    "//apps/test/messaging-perf:onos-apps-test-messaging-perf-oar",
+    "//apps/test/primitive-perf:onos-apps-test-primitive-perf-oar",
+    "//apps/test/transaction-perf:onos-apps-test-transaction-perf-oar",
+    "//apps/virtualbng:onos-apps-virtualbng-oar",
+    "//apps/vpls:onos-apps-vpls-oar",
+    "//apps/vrouter:onos-apps-vrouter-oar",
+    "//apps/routing/fibinstaller:onos-apps-routing-fibinstaller-oar",
+    "//apps/routing/cpr:onos-apps-routing-cpr-oar",
     "//apps/routing/fpm:onos-apps-routing-fpm-oar",
-    #"//apps/vtn:onos-apps-vtn-oar",
+    "//apps/vtn:onos-apps-vtn-oar",
     "//apps/faultmanagement:onos-apps-faultmanagement-oar",
     #"//apps/openstacknode:onos-apps-openstacknode-oar",
-    #"//apps/cpman/app:onos-apps-cpman-app-oar",
-    #"//apps/scalablegateway:onos-apps-scalablegateway-oar",
-    #"//apps/castor:onos-apps-castor-oar",
+    "//apps/cpman/app:onos-apps-cpman-app-oar",
+    "//apps/scalablegateway:onos-apps-scalablegateway-oar",
+    "//apps/castor:onos-apps-castor-oar",
     #    '//apps/yms:onos-apps-yms-oar',
-    #"//apps/ofagent:onos-apps-ofagent-oar",
+    "//apps/ofagent:onos-apps-ofagent-oar",
     "//apps/mappingmanagement:onos-apps-mappingmanagement-oar",
     "//apps/config:onos-apps-config-oar",
-    #"//apps/configsync:onos-apps-configsync-oar",
-    #"//apps/configsync-netconf:onos-apps-configsync-netconf-oar",
+    "//apps/configsync:onos-apps-configsync-oar",
+    "//apps/configsync-netconf:onos-apps-configsync-netconf-oar",
     "//apps/netconf/client:onos-apps-netconf-client-oar",
-    #"//apps/tetopology:onos-apps-tetopology-oar",
-    #"//apps/tetunnel:onos-apps-tetunnel-oar",
+    "//apps/tetopology:onos-apps-tetopology-oar",
+    "//apps/tetunnel:onos-apps-tetunnel-oar",
     #    '//apps/tenbi/yangmodel:onos-apps-tenbi-yangmodel-feature',
     #    '//apps/tenbi:onos-apps-tenbi-oar',
-    #"//protocols/restconf/server:onos-protocols-restconf-server-oar",
-    #"//apps/restconf:onos-apps-restconf-oar",
+    "//protocols/restconf/server:onos-protocols-restconf-server-oar",
+    "//apps/restconf:onos-apps-restconf-oar",
     "//apps/flowspec-api:onos-apps-flowspec-api-oar",
     "//apps/yang:onos-apps-yang-oar",
     "//apps/yang-gui:onos-apps-yang-gui-oar",
-    #"//apps/cord-support:onos-apps-cord-support-oar",
-    #"//apps/network-troubleshoot:onos-apps-network-troubleshoot-oar",
+    "//apps/cord-support:onos-apps-cord-support-oar",
+    "//apps/network-troubleshoot:onos-apps-network-troubleshoot-oar",
     "//apps/l3vpn:onos-apps-l3vpn-oar",
-    #"//apps/openroadm:onos-apps-openroadm-oar",
+    "//apps/openroadm:onos-apps-openroadm-oar",
     #"//apps/artemis:onos-apps-artemis-oar",
-    #"//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp-oar",
-    #"//apps/gluon:onos-apps-gluon-oar",
-    #"//apps/evpnopenflow:onos-apps-evpnopenflow-oar",
+    "//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp-oar",
+    "//apps/gluon:onos-apps-gluon-oar",
+    "//apps/evpnopenflow:onos-apps-evpnopenflow-oar",
     "//apps/route-service:onos-apps-route-service-oar",
     "//apps/evpn-route-service:onos-apps-evpn-route-service-oar",
     #"//incubator/protobuf/registry:onos-incubator-protobuf-registry-oar",
@@ -235,17 +235,17 @@
     #"//apps/p4-tutorial/mytunnel:onos-apps-p4-tutorial-mytunnel-oar",
     "//apps/cfm:onos-apps-cfm-oar",
     "//apps/routeradvertisement:onos-apps-routeradvertisement-oar",
-    #"//apps/powermanagement:onos-apps-powermanagement-oar",
-    #"//apps/t3:onos-apps-t3-oar",
-    #"//apps/simplefabric:onos-apps-simplefabric-oar",
+    "//apps/powermanagement:onos-apps-powermanagement-oar",
+    "//apps/t3:onos-apps-t3-oar",
+    "//apps/simplefabric:onos-apps-simplefabric-oar",
     #"//apps/kafka-integration:onos-apps-kafka-integration-oar",
-    #"//apps/rabbitmq:onos-apps-rabbitmq-oar",
-    #"//apps/odtn/api:onos-apps-odtn-api-oar",
-    #"//apps/odtn/service:onos-apps-odtn-service-oar",
+    "//apps/rabbitmq:onos-apps-rabbitmq-oar",
+    "//apps/odtn/api:onos-apps-odtn-api-oar",
+    "//apps/odtn/service:onos-apps-odtn-service-oar",
     "//apps/mcast:onos-apps-mcast-oar",
-    #"//apps/layout:onos-apps-layout-oar",
-    #"//apps/imr:onos-apps-imr-oar",
-    #"//apps/nodemetrics:onos-apps-nodemetrics-oar",
+    "//apps/layout:onos-apps-layout-oar",
+    "//apps/imr:onos-apps-imr-oar",
+    "//apps/nodemetrics:onos-apps-nodemetrics-oar",
     #"//web/gui2:onos-web-gui2-oar",
 ]
 
@@ -272,25 +272,25 @@
 ]
 
 PIPELINES = [
-    #"//pipelines/basic:onos-pipelines-basic-oar",
-    #"//pipelines/fabric:onos-pipelines-fabric-oar",
+    "//pipelines/basic:onos-pipelines-basic-oar",
+    "//pipelines/fabric:onos-pipelines-fabric-oar",
 ]
 
 APP_JARS = [
-    #"//apps/cpman/api:onos-apps-cpman-api",
+    "//apps/cpman/api:onos-apps-cpman-api",
     "//apps/routing-api:onos-apps-routing-api",
     "//apps/dhcp/api:onos-apps-dhcp-api",
     "//apps/dhcp/app:onos-apps-dhcp-app",
-    #"//apps/imr/api:onos-apps-imr-api",
-    #"//apps/imr/app:onos-apps-imr-app",
+    "//apps/imr/api:onos-apps-imr-api",
+    "//apps/imr/app:onos-apps-imr-app",
     "//apps/dhcprelay:onos-apps-dhcprelay",
     "//apps/fwd:onos-apps-fwd",
-    #"//apps/iptopology-api:onos-apps-iptopology-api",
+    "//apps/iptopology-api:onos-apps-iptopology-api",
     "//apps/routing/common:onos-apps-routing-common",
-    #"//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
-    #"//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr",
-    #"//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr",
-    #"//apps/vtn/vtnweb:onos-apps-vtn-vtnweb",
+    "//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc",
+    "//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr",
+    "//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr",
+    "//apps/vtn/vtnweb:onos-apps-vtn-vtnweb",
     #   '//apps/p4runtime-test:onos-apps-p4runtime-test',
     #"//apps/kafka-integration/api:onos-apps-kafka-integration-api",
     #"//apps/kafka-integration/app:onos-apps-kafka-integration-app",
diff --git a/pipelines/basic/BUILD b/pipelines/basic/BUILD
index 66314df..3ced348 100644
--- a/pipelines/basic/BUILD
+++ b/pipelines/basic/BUILD
@@ -15,15 +15,15 @@
     deps = COMPILE_DEPS,
 )
 
-#onos_app(
-#    app_name = 'org.onosproject.pipelines.basic',
-#    title = 'Basic Pipelines',
-#    category = 'Pipeline',
-#    url = 'http://onosproject.org',
-#    description = 'Provides pipelines with basic L2/L3 forwarding capabilities and packet-in/out '
-#                  + 'support.',
-#    included_bundles = BUNDLES,
-#    required_apps = [
-#        'org.onosproject.drivers.p4runtime',
-#    ]
-#)
+onos_app(
+    app_name = "org.onosproject.pipelines.basic",
+    category = "Pipeline",
+    description = "Provides pipelines with basic L2/L3 forwarding capabilities and packet-in/out " +
+                  "support.",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.drivers.p4runtime",
+    ],
+    title = "Basic Pipelines",
+    url = "http://onosproject.org",
+)
diff --git a/pipelines/fabric/BUILD b/pipelines/fabric/BUILD
new file mode 100644
index 0000000..06b0ab4
--- /dev/null
+++ b/pipelines/fabric/BUILD
@@ -0,0 +1,29 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + [
+    "//protocols/p4runtime/model:onos-protocols-p4runtime-model",
+    "//protocols/p4runtime/api:onos-protocols-p4runtime-api",
+    "//pipelines/basic:onos-pipelines-basic",
+    "//core/store/serializers:onos-core-serializers",
+]
+
+BUNDLES = [
+    "//pipelines/fabric:onos-pipelines-fabric",
+]
+
+osgi_jar_with_tests(
+    exclude_tests = ["org/onosproject/pipelines/fabric/pipeliner/FabricPipelinerTest"],
+    test_deps = TEST_ADAPTERS,
+    deps = COMPILE_DEPS,
+)
+
+onos_app(
+    app_name = "org.onosproject.pipelines.fabric",
+    category = "Pipeline",
+    description = "Provides pipelines with CORD fabric underlay support.",
+    included_bundles = BUNDLES,
+    required_apps = [
+        "org.onosproject.drivers.p4runtime",
+        "org.onosproject.pipelines.basic",
+    ],
+    title = "Fabric Pipeline",
+    url = "http://onosproject.org",
+)
diff --git a/protocols/restconf/server/BUILD b/protocols/restconf/server/BUILD
new file mode 100644
index 0000000..4f0cd7f
--- /dev/null
+++ b/protocols/restconf/server/BUILD
@@ -0,0 +1,11 @@
+BUNDLES = [
+    "//protocols/restconf/server/rpp:onos-protocols-restconf-server-rpp",
+]
+
+onos_app(
+    app_name = "org.onosproject.protocols.restconfserver",
+    category = "Utility",
+    included_bundles = BUNDLES,
+    title = "RESTCONF Server Module",
+    url = "http://onosproject.org",
+)
diff --git a/protocols/restconf/server/rpp/BUILD b/protocols/restconf/server/rpp/BUILD
new file mode 100644
index 0000000..ebbc59a
--- /dev/null
+++ b/protocols/restconf/server/rpp/BUILD
@@ -0,0 +1,19 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "@jersey_server//jar",
+    "@javax_ws_rs_api//jar",
+    "@javax_servlet_api//jar",
+    "@javax_inject//jar",
+    "//utils/rest:onlab-rest",
+    "//apps/restconf/api:onos-apps-restconf-api",
+]
+
+TEST_DEPS = TEST_REST + [
+    "//utils/osgi:onlab-osgi-tests",
+    "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    web_context = "/onos/restconf",
+    deps = COMPILE_DEPS,
+)