Initial BUCK build

Change-Id: I64e8a979301989062f4545a4841b06c15a372049
diff --git a/providers/bgp/cfg/BUCK b/providers/bgp/cfg/BUCK
new file mode 100644
index 0000000..8c5b713
--- /dev/null
+++ b/providers/bgp/cfg/BUCK
@@ -0,0 +1,16 @@
+SRC = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-bgp-provider-cfg'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/bgp/api:onos-bgp-api',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
diff --git a/providers/bgp/flow/BUCK b/providers/bgp/flow/BUCK
new file mode 100644
index 0000000..b900d14
--- /dev/null
+++ b/providers/bgp/flow/BUCK
@@ -0,0 +1,16 @@
+SRC = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-bgp-provider-flow'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/bgp/api:onos-bgp-api',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
diff --git a/providers/bgp/topology/BUCK b/providers/bgp/topology/BUCK
new file mode 100644
index 0000000..e0f5321
--- /dev/null
+++ b/providers/bgp/topology/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-bgp-provider-topology'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/bgp/api:onos-bgp-api',
+    '//protocols/bgp/bgpio:onos-bgpio',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/host/BUCK b/providers/host/BUCK
new file mode 100644
index 0000000..f8bedb1
--- /dev/null
+++ b/providers/host/BUCK
@@ -0,0 +1,15 @@
+SRC = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-host-provider'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
diff --git a/providers/lldp/BUCK b/providers/lldp/BUCK
new file mode 100644
index 0000000..99d526d
--- /dev/null
+++ b/providers/lldp/BUCK
@@ -0,0 +1,30 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-lldp-provider'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//providers/lldpcommon:onos-lldp-provider-common',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/lldpcommon/BUCK b/providers/lldpcommon/BUCK
new file mode 100644
index 0000000..f9b1b12
--- /dev/null
+++ b/providers/lldpcommon/BUCK
@@ -0,0 +1,29 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-lldp-provider-common'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/netcfghost/BUCK b/providers/netcfghost/BUCK
new file mode 100644
index 0000000..51fe94b
--- /dev/null
+++ b/providers/netcfghost/BUCK
@@ -0,0 +1,29 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-netcfg-links-provider'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/netcfglinks/BUCK b/providers/netcfglinks/BUCK
new file mode 100644
index 0000000..c752714
--- /dev/null
+++ b/providers/netcfglinks/BUCK
@@ -0,0 +1,30 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-netcfg-links-provider'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//providers/lldpcommon:onos-lldp-provider-common',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/netconf/device/BUCK b/providers/netconf/device/BUCK
new file mode 100644
index 0000000..6206f12
--- /dev/null
+++ b/providers/netconf/device/BUCK
@@ -0,0 +1,17 @@
+SRC = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-netconf-provider-device'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//incubator/api:onos-incubator-api',
+    '//protocols/netconf/api:onos-netconf-api',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
diff --git a/providers/null/BUCK b/providers/null/BUCK
new file mode 100644
index 0000000..a449353
--- /dev/null
+++ b/providers/null/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-null-providers'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/openflow/device/BUCK b/providers/openflow/device/BUCK
new file mode 100644
index 0000000..b243b36
--- /dev/null
+++ b/providers/openflow/device/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-of-provider-device'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:openflowj',
+    '//protocols/openflow/api:onos-of-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/openflow/flow/BUCK b/providers/openflow/flow/BUCK
new file mode 100644
index 0000000..299e97d
--- /dev/null
+++ b/providers/openflow/flow/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-of-provider-flow'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:openflowj',
+    '//protocols/openflow/api:onos-of-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/openflow/group/BUCK b/providers/openflow/group/BUCK
new file mode 100644
index 0000000..0636c42
--- /dev/null
+++ b/providers/openflow/group/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-of-provider-group'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:openflowj',
+    '//protocols/openflow/api:onos-of-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/openflow/message/BUCK b/providers/openflow/message/BUCK
new file mode 100644
index 0000000..139062a
--- /dev/null
+++ b/providers/openflow/message/BUCK
@@ -0,0 +1,32 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-of-provider-message'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:openflowj',
+    '//protocols/openflow/api:onos-of-api',
+    '//apps/cpman/api:onos-app-cpman-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/openflow/meter/BUCK b/providers/openflow/meter/BUCK
new file mode 100644
index 0000000..2d9cc70
--- /dev/null
+++ b/providers/openflow/meter/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-of-provider-meter'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:openflowj',
+    '//protocols/openflow/api:onos-of-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/openflow/packet/BUCK b/providers/openflow/packet/BUCK
new file mode 100644
index 0000000..0356876
--- /dev/null
+++ b/providers/openflow/packet/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-of-provider-packet'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:openflowj',
+    '//protocols/openflow/api:onos-of-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/ovsdb/device/BUCK b/providers/ovsdb/device/BUCK
new file mode 100644
index 0000000..e9aa0b6
--- /dev/null
+++ b/providers/ovsdb/device/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-ovsdb-provider-device'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/ovsdb/host/BUCK b/providers/ovsdb/host/BUCK
new file mode 100644
index 0000000..4b4dc05
--- /dev/null
+++ b/providers/ovsdb/host/BUCK
@@ -0,0 +1,31 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-ovsdb-provider-host'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/ovsdb/tunnel/BUCK b/providers/ovsdb/tunnel/BUCK
new file mode 100644
index 0000000..c88cbf6
--- /dev/null
+++ b/providers/ovsdb/tunnel/BUCK
@@ -0,0 +1,32 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-ovsdb-provider-tunnel'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+    '//incubator/api:onos-incubator-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/pcep/topology/BUCK b/providers/pcep/topology/BUCK
new file mode 100644
index 0000000..91564cf
--- /dev/null
+++ b/providers/pcep/topology/BUCK
@@ -0,0 +1,32 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-pcep-provider-topology'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+    '//apps/pcep-api:onos-app-pcep-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/pcep/tunnel/BUCK b/providers/pcep/tunnel/BUCK
new file mode 100644
index 0000000..1b2fe6e
--- /dev/null
+++ b/providers/pcep/tunnel/BUCK
@@ -0,0 +1,35 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-pcep-provider-tunnel'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+    '//apps/pcep-api:onos-app-pcep-api',
+    '//incubator/api:onos-incubator-api',
+    '//protocols/pcep/pcepio:onos-pcep-pcepio',
+    '//protocols/pcep/api:onos-pcep-controller-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/rest/device/BUCK b/providers/rest/device/BUCK
new file mode 100644
index 0000000..b710097
--- /dev/null
+++ b/providers/rest/device/BUCK
@@ -0,0 +1,35 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-restsb-provider-device'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+    '//apps/pcep-api:onos-app-pcep-api',
+    '//incubator/api:onos-incubator-api',
+    '//protocols/rest/api:onos-restsb-api',
+    '//lib:javax.ws.rs-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/snmp/alarm/BUCK b/providers/snmp/alarm/BUCK
new file mode 100644
index 0000000..6695f13
--- /dev/null
+++ b/providers/snmp/alarm/BUCK
@@ -0,0 +1,37 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-snmp-provider-alarm'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:org.apache.servicemix.bundles.snmp4j',
+    '//lib:snmp-core',
+    '//lib:bti7000',
+    '//lib:mibs-net-snmp',
+    '//lib:mibs-rfc',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+    '//incubator/api:onos-incubator-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)
diff --git a/providers/snmp/device/BUCK b/providers/snmp/device/BUCK
new file mode 100644
index 0000000..1f05085
--- /dev/null
+++ b/providers/snmp/device/BUCK
@@ -0,0 +1,37 @@
+SRC = 'src/main/java/org/onosproject/**/'
+TEST = 'src/main/java/org/onosproject/**/'
+
+CURRENT_NAME = 'onos-snmp-provider-device'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:org.apache.servicemix.bundles.snmp4j',
+    '//lib:snmp-core',
+    '//lib:bti7000',
+    '//lib:mibs-net-snmp',
+    '//lib:mibs-rfc',
+    '//protocols/ovsdb/api:onos-ovsdb-api',
+    '//protocols/ovsdb/rfc:onos-ovsdb-rfc',
+    '//incubator/api:onos-incubator-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+java_library(
+    name = CURRENT_NAME,
+    srcs = glob([SRC + '/*.java']),
+    deps = COMPILE_DEPS,
+    visibility = ['PUBLIC'],
+)
+
+java_test(
+    name = 'tests',
+    srcs = glob([TEST + '/*.java']),
+    deps = COMPILE_DEPS +
+           TEST_DEPS +
+           [CURRENT_TARGET],
+    source_under_test = [CURRENT_TARGET],
+)