Add modules to Bazel build
cli
core
incubator/rpc
pipelines/basic
protocols/netconf
protocols/openflow
protocols/rest

Change-Id: I165b94a04ba893d97d944e5deb2746f54566503b
diff --git a/protocols/netconf/api/BUILD b/protocols/netconf/api/BUILD
new file mode 100644
index 0000000..2d486c5
--- /dev/null
+++ b/protocols/netconf/api/BUILD
@@ -0,0 +1,3 @@
+osgi_jar_with_tests(
+    deps = CORE_DEPS + JACKSON,
+)
diff --git a/protocols/netconf/ctl/BUILD b/protocols/netconf/ctl/BUILD
new file mode 100644
index 0000000..09346b2
--- /dev/null
+++ b/protocols/netconf/ctl/BUILD
@@ -0,0 +1,19 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "@ganymed_ssh2//jar",
+    "@org_apache_karaf_shell_console//jar",
+    "@sshd_core//jar",
+    "@bcpkix_jdk15on//jar",
+    "@bcprov_jdk15on//jar",
+    "//protocols/netconf/api:onos-protocols-netconf-api",
+    "//cli:onos-cli",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//utils/osgi:onlab-osgi-tests",
+    "//core/api:onos-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/protocols/openflow/ctl/BUILD b/protocols/openflow/ctl/BUILD
new file mode 100644
index 0000000..3bf8b7f
--- /dev/null
+++ b/protocols/openflow/ctl/BUILD
@@ -0,0 +1,17 @@
+COMPILE_DEPS = CORE_DEPS + NETTY + JACKSON + [
+    "@openflowj//jar",
+    "@netty_codec//jar",
+    "@netty_handler//jar",
+    "@netty_transport//jar",
+    "@netty_transport_native_epoll//jar",
+    "//protocols/openflow/api:onos-protocols-openflow-api",
+]
+
+TEST_DEPS = TEST + [
+    "//core/api:onos-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/protocols/p4runtime/api/BUILD b/protocols/p4runtime/api/BUILD
index 4b86e7f..de7b487 100644
--- a/protocols/p4runtime/api/BUILD
+++ b/protocols/p4runtime/api/BUILD
@@ -8,7 +8,7 @@
     "//core/api:onos-api-tests",
 ]
 
-osgi_jar_with_tests (
-    deps = COMPILE_DEPS,
+osgi_jar_with_tests(
     test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
 )
diff --git a/protocols/p4runtime/model/BUILD b/protocols/p4runtime/model/BUILD
index 5fa75cd..3ac33b6 100644
--- a/protocols/p4runtime/model/BUILD
+++ b/protocols/p4runtime/model/BUILD
@@ -6,6 +6,6 @@
     "@com_google_protobuf//:protobuf_java",
 ]
 
-osgi_jar_with_tests (
+osgi_jar_with_tests(
     deps = COMPILE_DEPS,
 )
diff --git a/protocols/p4runtime/proto/BUILD b/protocols/p4runtime/proto/BUILD
index 2a6d5f5..51da262 100644
--- a/protocols/p4runtime/proto/BUILD
+++ b/protocols/p4runtime/proto/BUILD
@@ -1,24 +1,23 @@
 java_proto_library(
     name = "p4_types_java_proto",
-    deps = [ "@p4lang_pi//:p4types_proto" ],
     visibility = ["//visibility:public"],
+    deps = ["@p4lang_pi//:p4types_proto"],
 )
 
 java_proto_library(
     name = "p4_config_java_proto",
-    deps = [ "@p4lang_pi//:p4config_proto" ],
     visibility = ["//visibility:public"],
+    deps = ["@p4lang_pi//:p4config_proto"],
 )
 
 java_proto_library(
     name = "p4_tmp_config_java_proto",
-    deps = [ "@p4lang_pi//:p4_tmp_config_proto" ],
     visibility = ["//visibility:public"],
+    deps = ["@p4lang_pi//:p4_tmp_config_proto"],
 )
 
 java_proto_library(
     name = "p4_runtime_java_proto",
-    deps = [ "@p4lang_pi//:p4_runtime_proto" ],
     visibility = ["//visibility:public"],
+    deps = ["@p4lang_pi//:p4_runtime_proto"],
 )
-
diff --git a/protocols/rest/api/BUILD b/protocols/rest/api/BUILD
new file mode 100644
index 0000000..feaa98f
--- /dev/null
+++ b/protocols/rest/api/BUILD
@@ -0,0 +1,19 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "@jersey_client//jar",
+    "@jersey_server//jar",
+    "@jersey_common//jar",
+    "@jersey_security//jar",
+    "@httpclient_osgi//jar",
+    "@httpcore_osgi//jar",
+    "@javax_ws_rs_api//jar",
+    "@hk2_api//jar",
+    "@aopalliance_repackaged//jar",
+    "@javax_inject//jar",
+    "//incubator/api:onos-incubator-api",
+    "//utils/rest:onlab-rest",
+]
+
+osgi_jar_with_tests(
+    visibility = ["//visibility:public"],
+    deps = COMPILE_DEPS,
+)
diff --git a/protocols/rest/ctl/BUILD b/protocols/rest/ctl/BUILD
new file mode 100644
index 0000000..f2b3d0c
--- /dev/null
+++ b/protocols/rest/ctl/BUILD
@@ -0,0 +1,17 @@
+COMPILE_DEPS = CORE_DEPS + [
+    "@jersey_client//jar",
+    "@jersey_server//jar",
+    "@jersey_common//jar",
+    "@jersey_security//jar",
+    "@httpclient_osgi//jar",
+    "@httpcore_osgi//jar",
+    "@javax_ws_rs_api//jar",
+    "@hk2_api//jar",
+    "@aopalliance_repackaged//jar",
+    "@javax_inject//jar",
+    "//protocols/rest/api:onos-protocols-rest-api",
+]
+
+osgi_jar_with_tests(
+    deps = COMPILE_DEPS,
+)