Updating Buck files to build OSGi jars

- Using osgi_jar for all modules except apps
- Adding target for installation of core modules to .m2 repo

Change-Id: I65d9e3a9567918e275191724842d7d9b1f485128
diff --git a/protocols/bgp/api/BUCK b/protocols/bgp/api/BUCK
index 5f295c9..7b7ac98 100644
--- a/protocols/bgp/api/BUCK
+++ b/protocols/bgp/api/BUCK
@@ -8,7 +8,7 @@
     '//protocols/bgp/bgpio:onos-bgpio',
 ]
 
-java_library(
+osgi_jar(
     name = CURRENT_NAME,
     srcs = glob([SRC + '/*.java']),
     deps = COMPILE_DEPS,
diff --git a/protocols/bgp/bgpio/BUCK b/protocols/bgp/bgpio/BUCK
index 645be9e..3d6b280 100644
--- a/protocols/bgp/bgpio/BUCK
+++ b/protocols/bgp/bgpio/BUCK
@@ -11,7 +11,7 @@
     '//lib:TEST',
 ]
 
-java_library(
+osgi_jar(
     name = CURRENT_NAME,
     srcs = glob([SRC + '/*.java']),
     deps = COMPILE_DEPS,
diff --git a/protocols/bgp/ctl/BUCK b/protocols/bgp/ctl/BUCK
index e4d653c..6336f97 100644
--- a/protocols/bgp/ctl/BUCK
+++ b/protocols/bgp/ctl/BUCK
@@ -17,7 +17,7 @@
     '//lib:TEST',
 ]
 
-java_library(
+osgi_jar(
     name = CURRENT_NAME,
     srcs = glob([SRC + '/*.java']),
     deps = COMPILE_DEPS,