Refactor buck external dependencies

Change-Id: Ia4b99493407eb7d4e893804cba6b944f758f085e
diff --git a/lib/BUCK b/lib/BUCK
index de17152..f1774fc 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Fri, 18 Aug 2017 16:55:01 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Mon, 21 Aug 2017 15:52:00 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 pass_thru_pom(
@@ -12,7 +12,6 @@
   name = 'COMPILE',
   visibility = ['PUBLIC'],
   exported_deps = [
-    ':joda-time',
     ':commons-configuration',
     ':commons-logging',
     ':commons-collections',
@@ -20,37 +19,15 @@
     ':commons-lang3',
     ':commons-io',
     ':commons-pool',
-    ':objenesis',
     ':guava',
-    ':netty',
-    ':netty-buffer',
-    ':netty-common',
-    ':minimal-json',
-    ':kryo',
-    ':reflectasm',
-    ':asm',
-    ':minlog',
-    ':metrics-core',
-    ':metrics-json',
     ':slf4j-api',
     ':osgi-core',
     ':org.osgi.compendium',
     ':org.apache.felix.scr.annotations',
     ':org.apache.felix.scr',
-    ':jackson-annotations',
-    ':jackson-core',
-    ':jackson-databind',
     ':org.apache.karaf.features.core',
     ':org.apache.karaf.system.core',
     ':jsr305',
-    ':onos-yang-datamodel',
-    ':onos-yang-utils-generator',
-    ':onos-yang-model',
-    ':onos-yang-compiler-api',
-    ':onos-yang-maven-plugin',
-    ':onos-yang-serializers-json',
-    ':onos-yang-serializers-xml',
-    ':onos-yang-serializers-utils',
     ':org.apache.servicemix.bundles.dom4j',
   ],
 )
@@ -122,6 +99,15 @@
 )
 
 osgi_feature_group(
+  name = 'NETTY',
+  visibility = ['PUBLIC'],
+  exported_deps = [
+    ':netty-buffer',
+    ':netty-common',
+  ],
+)
+
+osgi_feature_group(
   name = 'GRPC_1.3',
   visibility = ['PUBLIC'],
   exported_deps = [
@@ -149,6 +135,51 @@
   ],
 )
 
+osgi_feature_group(
+  name = 'ONOS_YANG',
+  visibility = ['PUBLIC'],
+  exported_deps = [
+    ':onos-yang-datamodel',
+    ':onos-yang-utils-generator',
+    ':onos-yang-model',
+    ':onos-yang-compiler-api',
+    ':onos-yang-serializers-json',
+    ':onos-yang-serializers-xml',
+    ':onos-yang-serializers-utils',
+  ],
+)
+
+osgi_feature_group(
+  name = 'JACKSON',
+  visibility = ['PUBLIC'],
+  exported_deps = [
+    ':jackson-annotations',
+    ':jackson-core',
+    ':jackson-databind',
+  ],
+)
+
+osgi_feature_group(
+  name = 'METRICS',
+  visibility = ['PUBLIC'],
+  exported_deps = [
+    ':metrics-core',
+    ':metrics-json',
+  ],
+)
+
+osgi_feature_group(
+  name = 'KRYO',
+  visibility = ['PUBLIC'],
+  exported_deps = [
+    ':kryo',
+    ':reflectasm',
+    ':asm',
+    ':minlog',
+    ':objenesis',
+  ],
+)
+
 remote_jar (
   name = 'aopalliance-repackaged',
   out = 'aopalliance-repackaged-2.5.0-b32.jar',