Publish top level Maven POMs as part of release build
Change-Id: I6e10d4af4d8b59e3f5e15f001d160838a3c35266
diff --git a/tools/build/libgen/src/main/java/org/onosproject/libgen/BuckLibGenerator.java b/tools/build/libgen/src/main/java/org/onosproject/libgen/BuckLibGenerator.java
index 5b67a5c..f05593d 100644
--- a/tools/build/libgen/src/main/java/org/onosproject/libgen/BuckLibGenerator.java
+++ b/tools/build/libgen/src/main/java/org/onosproject/libgen/BuckLibGenerator.java
@@ -175,6 +175,16 @@
"# ***** This file was auto-generated at %s. Do not edit this file manually. *****\n",
new Date().toString()));
writer.write("# ***** Use onos-lib-gen *****\n");
+
+ // rule to publish the onos dependency pom
+ writer.write("\npass_thru_pom( \n" +
+ " name = 'onos-dependencies-pom',\n" +
+ " src = 'pom.xml',\n" +
+ " out = 'onos-dependencies.pom',\n" +
+ " artifactId = 'onos-dependencies',\n" +
+ ")\n\n");
+
+
libraries.forEach(library -> writer.print(library.getBuckFragment()));
artifacts.forEach(artifact -> writer.print(artifact.getBuckFragment()));
writer.flush();
diff --git a/tools/build/onos-buck-publish b/tools/build/onos-buck-publish
index 0d82c1c..2b137f8 100755
--- a/tools/build/onos-buck-publish
+++ b/tools/build/onos-buck-publish
@@ -39,5 +39,9 @@
cat $TEST_PUB
bash $TEST_PUB
+# stage ONOS poms
+onos-buck publish --to-maven-central --sign //:top-level-pom
+onos-buck publish --to-maven-central --sign //lib:onos-dependencies-pom
+
# Close the staging area
onos-close-staging