Publish top level Maven POMs as part of release build

Change-Id: I6e10d4af4d8b59e3f5e15f001d160838a3c35266
diff --git a/bucklets/onos.bucklet b/bucklets/onos.bucklet
index 16d0b52..f141e85 100644
--- a/bucklets/onos.bucklet
+++ b/bucklets/onos.bucklet
@@ -325,3 +325,44 @@
        out = out if out is not None else ( root if root is not None else name ) + '.tar.gz',
        visibility = visibility,
    )
+
+def only_lib_dep_pom(
+    name,
+    src,
+    out,
+    version = ONOS_VERSION,
+    onosGroupId = ONOS_GROUP_ID,
+    visibility = [ 'PUBLIC' ],
+    ):
+
+    cmd = 'grep -v \<module\> ' + src + ' | sed "s/\<modules\>/\<\modules\>\<module\>lib\<\/module\>/" >$OUT'
+
+    genrule(
+        name = name,
+        srcs = [ src ],
+        bash = cmd,
+        out = out,
+        visibility = visibility,
+        maven_coords = onosGroupId + ':onos:pom:' + version,
+    )
+
+def pass_thru_pom(
+    name,
+    src,
+    out,
+    artifactId,
+    version = ONOS_VERSION,
+    onosGroupId = ONOS_GROUP_ID,
+    visibility = [ 'PUBLIC' ],
+    ):
+
+    cmd = 'cp ' + src + ' $OUT'
+
+    genrule(
+        name = name,
+        srcs = [ src ],
+        bash = cmd,
+        out = out,
+        visibility = visibility,
+        maven_coords = onosGroupId + ':' + artifactId + ':pom:' + version,
+    )