Adding maven coords to OAR and onos features.xml genrules

Change-Id: Id2d3b0f4686888a48feb09eacef3f27136c1df0e
diff --git a/bucklets/onos_app.bucklet b/bucklets/onos_app.bucklet
index 20c6ce5..fa31479 100644
--- a/bucklets/onos_app.bucklet
+++ b/bucklets/onos_app.bucklet
@@ -71,6 +71,7 @@
 def compile_features(
         name,
         features = [],
+        maven_coords = None,
         visibility = [ 'PUBLIC' ],
     ):
 
@@ -83,6 +84,7 @@
             bash = cmd,
             visibility = visibility,
             out = 'features.xml',
+            maven_coords = maven_coords,
     )
 
 
@@ -137,6 +139,8 @@
     if app_name is None:
         app_name = _get_app_name()
 
+    maven_coords = '%s:%s:oar:%s' % ( ONOS_GROUP_ID, name, ONOS_VERSION )
+
     if title is None:
         print "Missing title for %s" % _get_name()
         title = _get_app_name()
@@ -201,5 +205,6 @@
         name = name + '-oar',
         out = 'app.oar',
         bash = '$(exe //buck-tools:onos-app-oar) $OUT ' + ' '.join(sources),
+        maven_coords = maven_coords,
         visibility = visibility,
     )
diff --git a/tools/package/BUCK b/tools/package/BUCK
index 7127214..4c63cc7 100644
--- a/tools/package/BUCK
+++ b/tools/package/BUCK
@@ -29,6 +29,7 @@
 compile_features(
   name = 'onos-features',
   features = FEATURES,
+  maven_coords = 'org.onosproject:onos-features:xml:features:' + ONOS_VERSION,
 )
 
 staged_repos = ['$(location %s-repo)' % f for f in FEATURES]
@@ -42,7 +43,7 @@
   name = 'onos-package',
   srcs = glob(['bin/*', 'etc/*', 'init/*', 'config/*']),
   out = 'onos.tar.gz',
-  bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources),
+  bash = '$(exe //buck-tools:onos-stage) $OUT ' + ONOS_VERSION + ' $(location :onos-karaf) ' + ' '.join(sources),
   visibility = [ 'PUBLIC' ],
 )