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/incubator/core/BUCK b/incubator/core/BUCK
new file mode 100644
index 0000000..aa3a537
--- /dev/null
+++ b/incubator/core/BUCK
@@ -0,0 +1,29 @@
+SRC = 'src/main/java/org/onosproject/incubator/**/'
+TEST = 'src/test/java/org/onosproject/incubator/**/'
+CURRENT_NAME = 'onos-incubator-core'
+CURRENT_TARGET = ':' + CURRENT_NAME
+
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//incubator/api:onos-incubator-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST',
+]
+
+osgi_jar(
+    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],
+)