Implement bazel rules for generation of swagger files

Change-Id: I0e5d33174898cc6a1bbca475f2e1696c4fdda1ca
diff --git a/tools/build/buck-plugin/BUILD b/tools/build/buck-plugin/BUILD
new file mode 100644
index 0000000..1c07690
--- /dev/null
+++ b/tools/build/buck-plugin/BUILD
@@ -0,0 +1,16 @@
+SWAGGER_EXECUTABLE = "swagger_generator"
+
+COMPILE_DEPS = JACKSON + [
+    "@guava//jar",
+    "@qdox//jar",
+    "@org_apache_felix_scr_bnd//jar",
+]
+
+java_binary(
+    name = SWAGGER_EXECUTABLE,
+    srcs = glob(["src/main/java/org/onosproject/onosjar/SwaggerGenerator.java"]),
+    main_class = "org.onosproject.onosjar.SwaggerGenerator",
+    resources = glob(["src/main/resources/registrator.javat"]),
+    visibility = ["//visibility:public"],
+    deps = COMPILE_DEPS,
+)