diff --git a/buck-tools/onos_app.py b/buck-tools/onos_app.py
index 30f6edf..dc2e5fa 100755
--- a/buck-tools/onos_app.py
+++ b/buck-tools/onos_app.py
@@ -51,31 +51,47 @@
                 parts[4] = parts[4][len(NON_OSGI_TAG):]
     return prefix + '/'.join(parts) + suffix
 
-def generateFeatureFile(feature_name,
-                        version,
-                        title,
-                        feature_repo_name,
+def generateFeatureFile(feature_repo_name,
                         features = [],
-                        bundles = [],
                         **kwargs):
     values = {
+        'feature_repo_name' : '-'.join(feature_repo_name.split(':')[1:3]),
+    }
+
+    output = FEATURES_HEADER % values
+
+    for feature in features:
+        output += feature
+
+    output += FEATURES_FOOTER
+    return output
+
+def generateFeature(feature_name,
+                    version,
+                    title,
+                    features = [],
+                    bundles = [],
+                    **kwargs):
+    values = {
         'feature_name' : feature_name,
         'version' : version,
         'title' : title,
-        'feature_repo_name' : '-'.join(feature_repo_name.split(':')[1:3]),
     }
 
-    output = FEATURES_HEADER % values + FEATURE_HEADER % values
+    output = FEATURE_HEADER % values
 
-    for feature in features:
-        output += EXISTING_FEATURE % feature
+    if features:
+        for feature in features:
+            output += EXISTING_FEATURE % feature
 
-    for bundle in bundles:
-        output += BUNDLE % mvnUrl(bundle)
+    if bundles:
+        for bundle in bundles:
+            output += BUNDLE % mvnUrl(bundle)
 
-    output += FEATURE_FOOTER + FEATURES_FOOTER
+    output += FEATURE_FOOTER
     return output
 
+
 def generateAppFile(app_name,
                     origin,
                     version,
@@ -139,12 +155,14 @@
 
     parser.add_option("-A", "--write-app", dest="write_app", action="store_true")
     parser.add_option("-F", "--write-features", dest="write_features", action="store_true")
+    parser.add_option("-E", "--write-feature", dest="write_feature", action="store_true")
 
     (options, args) = parser.parse_args()
 
     values = {}
     if options.feature_coords and options.version and options.title:
-        values['feature_name'] = options.feature_coords.split(':')[1]
+        parts = options.feature_coords.split(':')
+        values['feature_name'] = parts[1] if len(parts) > 1 else parts[0]
         values['version'] = options.version
         values['title'] = options.title
     else:
@@ -165,15 +183,22 @@
     values['feature_repo_name'] = options.repo_name if options.repo_name \
                                     else options.feature_coords
 
+    bundles = []
+    if options.included_bundles:
+        bundles += options.included_bundles
+    if options.excluded_bundles:
+        bundles += options.excluded_bundles
+    feature = generateFeature(bundles=bundles,
+                              features=options.features,
+                              **values)
+
+    if options.write_feature:
+        print feature
+
     if options.write_features:
-        bundles = []
-        if options.included_bundles:
-            bundles += options.included_bundles
-        if options.excluded_bundles:
-            bundles += options.excluded_bundles
-        print generateFeatureFile(bundles=bundles,
-                                  features=options.features,
+        print generateFeatureFile(features=[ feature ],
                                   **values)
+
     if options.write_app:
         print generateAppFile(artifacts=options.included_bundles,
                               apps=options.apps,
diff --git a/bucklets/onos_app.bucklet b/bucklets/onos_app.bucklet
index 476bdac..8d0eca3 100644
--- a/bucklets/onos_app.bucklet
+++ b/bucklets/onos_app.bucklet
@@ -16,6 +16,107 @@
     base_path = get_base_path()
     return APP_PREFIX + os.path.basename(base_path)
 
+def osgi_feature(
+        name,
+        title,
+        feature_coords = None,
+        version = ONOS_VERSION,
+        required_features = [ 'onos-api' ],
+        required_apps = [],
+        included_bundles = None,
+        excluded_bundles = [],
+        generate_file = False,
+        visibility = [ 'PUBLIC' ],
+        stage_repo = True,
+    ):
+
+    if not feature_coords:
+        feature_coords = name
+    args = [ '-n %s' % feature_coords,
+             '-v %s' % version,
+             '-t "%s"' % title,
+             ]
+    args += [ '-f %s' % f for f in required_features ]
+    args += [ '-b $(maven_coords %s)' % b for b in included_bundles ]
+    args += [ '-e $(maven_coords %s)' % b for b in excluded_bundles ]
+    args += [ '-d %s' % a for a in required_apps ]
+
+    feature_cmd = '-F' if generate_file else '-E'
+
+    cmd = '$(exe //buck-tools:onos-app-writer) %s ' % feature_cmd
+    cmd += ' '.join(args) + ' > $OUT'
+    genrule(
+            name = name + '-feature',
+            bash = cmd,
+            out = 'features.xml',
+            visibility = visibility,
+    )
+
+    if stage_repo:
+        sources = ['$(location %s) $(maven_coords %s)' % (i, i) for i in included_bundles]
+        genrule(
+                name = name + '-repo',
+                out = name + '-repo.zip.part',
+                bash = '$(exe //buck-tools:onos-feature) $OUT ' + ' '.join(sources),
+                visibility = visibility,
+        )
+
+FEATURES_HEADER = '''\
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+          name="onos-%s">
+    <repository>mvn:org.apache.karaf.features/standard/3.0.5/xml/features</repository>
+
+''' % ONOS_VERSION
+
+FEATURES_FOOTER = '</features>'
+
+def compile_features(
+        name,
+        features = [],
+        visibility = [ 'PUBLIC' ],
+    ):
+
+    cmd = "(echo '%s'; " % FEATURES_HEADER
+    cmd += ''.join(['cat $(location %s-feature); ' % s for s in features])
+    cmd += "echo '%s') > $OUT" % FEATURES_FOOTER
+
+    genrule(
+            name = name,
+            bash = cmd,
+            visibility = visibility,
+            out = 'features.xml',
+    )
+
+
+#TODO rename this
+def osgi_feature_group(
+        name,
+        description = 'TEST',
+        version = ONOS_VERSION,
+        exported_deps = [],
+        visibility = ['PUBLIC'],
+        **kwargs
+    ):
+    java_library(
+            name = name,
+            exported_deps = exported_deps, #compile only
+            visibility = visibility,
+    )
+
+    osgi_feature(
+            name = name,
+            feature_coords = name,
+            version = version,
+            title = description,
+            required_features = [],
+            included_bundles = exported_deps,
+            generate_file = False,
+            visibility = visibility,
+    )
+
+
+
 def onos_app(
         app_name = None,
         name = None,
@@ -66,13 +167,26 @@
     args += [ '-e $(maven_coords %s)' % b for b in excluded_bundles ]
     args += [ '-d %s' % a for a in required_apps ]
 
-    cmd = '$(exe //buck-tools:onos-app-writer) -F ' + ' '.join(args) + ' > $OUT'
-    genrule(
-        name = name + '-features',
-        bash = cmd,
-        out = 'features.xml',
+    # cmd = '$(exe //buck-tools:onos-app-writer) -F ' + ' '.join(args) + ' > $OUT'
+    # genrule(
+    #     name = name + '-feature',
+    #     bash = cmd,
+    #     out = 'features.xml',
+    #     visibility = [],
+    # )
+    osgi_feature(
+        name = name,
+        feature_coords = feature_coords,
+        version = version,
+        title = title,
+        required_features = required_features,
+        included_bundles = included_bundles,
+        excluded_bundles = excluded_bundles,
+        generate_file = True,
         visibility = [],
+        stage_repo = False,
     )
+
     cmd = '$(exe //buck-tools:onos-app-writer) -A ' + ' '.join(args) + ' > $OUT'
     genrule(
         name = name + '-app-xml',
@@ -82,7 +196,7 @@
     )
 
     sources = [
-        '$(location :%s-features) %s' % (name, feature_coords),
+        '$(location :%s-feature) %s' % (name, feature_coords),
         '$(location :%s-app-xml) NONE' % name,
     ]
     sources += ['$(location %s) $(maven_coords %s)' % (i, i) for i in included_bundles]
