Build providers using bazel

Change-Id: I7d4ebcfb1d593e10aa93f0a4f7111680ed66a7e7
diff --git a/providers/snmp/BUILD b/providers/snmp/BUILD
new file mode 100644
index 0000000..3324b5f
--- /dev/null
+++ b/providers/snmp/BUILD
@@ -0,0 +1,21 @@
+BUNDLES = [
+    "@org_apache_servicemix_bundles_snmp4j//jar",
+    "@mibs_rfc//jar",
+    "@snmp_core//jar",
+    "@mibs_net_snmp//jar",
+    "//providers/snmp/device:onos-providers-snmp-device",
+    "//providers/snmp/alarm:onos-providers-snmp-alarm",
+    "//protocols/snmp/api:onos-protocols-snmp-api",
+    "//protocols/snmp/ctl:onos-protocols-snmp-ctl",
+]
+
+onos_app(
+    app_name = "org.onosproject.snmp",
+    category = "Provider",
+    description = "Provides means for ONOS to discover and trigger the initial handshake procedure " +
+                  "with SNMP enabled devices from information given by network configuration.",
+    included_bundles = BUNDLES,
+    required_apps = ["org.onosproject.faultmanagement"],
+    title = "SNMP Provider",
+    url = "https://wiki.onosproject.org/display/ONOS/SNMP",
+)
diff --git a/providers/snmp/alarm/BUILD b/providers/snmp/alarm/BUILD
new file mode 100644
index 0000000..bb9de5c
--- /dev/null
+++ b/providers/snmp/alarm/BUILD
@@ -0,0 +1,12 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "@org_apache_servicemix_bundles_snmp4j//jar",
+    "//incubator/api:onos-incubator-api",
+    "//protocols/snmp/api:onos-protocols-snmp-api",
+    "//protocols/snmp/ctl:onos-protocols-snmp-ctl",
+    "//providers/snmp/device:onos-providers-snmp-device",
+]
+
+osgi_jar_with_tests(
+    exclude_tests = ["org.onosproject.provider.snmp.alarm.impl.SnmpAlarmProviderTest"],
+    deps = COMPILE_DEPS,
+)
diff --git a/providers/snmp/device/BUILD b/providers/snmp/device/BUILD
new file mode 100644
index 0000000..95dc777
--- /dev/null
+++ b/providers/snmp/device/BUILD
@@ -0,0 +1,18 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + [
+    "@org_apache_servicemix_bundles_snmp4j//jar",
+    "@snmp_core//jar",
+    "@mibs_net_snmp//jar",
+    "@mibs_rfc//jar",
+    "//incubator/api:onos-incubator-api",
+    "//protocols/snmp/api:onos-protocols-snmp-api",
+    "//protocols/snmp/ctl:onos-protocols-snmp-ctl",
+]
+
+TEST_DEPS = TEST + [
+    "//core/api:onos-api-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)