ONOS Swagger Plugin

just does swagger now
to build the plugin, you need to download to following:
https://github.com/bocon13/buck/releases/download/v2016.07.29.01-wip/buck.jar

put the buck.jar in tools/build/buck-plugin/lib

Change-Id: Id1b833dd013fbc5581f8e884e755920829c4a17e
diff --git a/bucklets/onos.bucklet b/bucklets/onos.bucklet
index e3aa372..ecdb88c 100644
--- a/bucklets/onos.bucklet
+++ b/bucklets/onos.bucklet
@@ -107,6 +107,10 @@
     package_name_root = 'org.onosproject',
     include_resources = NONE,
     web_context = NONE,
+    api_title = NONE,
+    api_version = NONE,
+    api_package = NONE,
+    api_description = NONE,
     resources = NONE,
     resources_root = None,
     **kwargs
@@ -128,18 +132,27 @@
   if resources and not resources_root:
       resources_root = RESOURCES_ROOT
 
+  if api_title != NONE:
+      r = 'WEB-INF/classes/apidoc/swagger.json=bin/swagger.json'
+      include_resources = include_resources + ',' + r if include_resources != NONE else r
+
   bare_jar_name = name + '-jar'
   osgi_jar_name = name + '-osgi'
   mvn_coords = group_id + ':' + name + ':' + version
 
 
-  java_library(
+  onos_jar(
       name = bare_jar_name,
       srcs = srcs,
       deps = deps,
       visibility = [], #intentially, not visible
       resources = resources,
       resources_root = resources_root,
+      web_context = web_context,
+      api_title = api_title,
+      api_version = api_version,
+      api_package = api_package,
+      api_description = api_description,
       **kwargs
   )
 
@@ -167,6 +180,7 @@
     bash = stage_jar + DEBUG_ARG + ' ' + wrap_jar
     print bash
 
+  # FIXME: make sure that /swagger.json gets filtered
   genrule(
     name = osgi_jar_name,
     bash = bash,