diff --git a/tools/build/bazel/osgi_java_library.bzl b/tools/build/bazel/osgi_java_library.bzl
index 523224c..d1b86d3 100644
--- a/tools/build/bazel/osgi_java_library.bzl
+++ b/tools/build/bazel/osgi_java_library.bzl
@@ -474,7 +474,7 @@
 
     # rule for building javadocs
     if not suppress_javadocs:
-      javadoc(name = name + "-javadocs", deps = deps, srcs = srcs, visibility = visibility)
+      javadoc(name = name + "-javadoc", deps = deps, srcs = srcs, visibility = visibility)
 
     if test_srcs != []:
         native.java_library(
diff --git a/tools/build/bazel/publish_catalog.bzl b/tools/build/bazel/publish_catalog.bzl
index 7f0db76..b36559f 100644
--- a/tools/build/bazel/publish_catalog.bzl
+++ b/tools/build/bazel/publish_catalog.bzl
@@ -26,7 +26,7 @@
 
     c = artifact_id.split("-")
 
-    if len(c) > 1 and c[len(c)-1] in ("javadocs", "sources", "tests", "pom"):
+    if len(c) > 1 and c[len(c)-1] in ("javadoc", "sources", "tests", "pom"):
         classifier = c[len(c)-1]
         artifact_id = "-".join(c[:len(c)-1])
         if classifier == "pom":
diff --git a/tools/build/onos-publish-catalog b/tools/build/onos-publish-catalog
index c095bdb..410e022 100755
--- a/tools/build/onos-publish-catalog
+++ b/tools/build/onos-publish-catalog
@@ -3,6 +3,8 @@
 # Generates a catalog for publishing ONOS artifacts to a Maven repository.
 # -----------------------------------------------------------------------------
 
+set -e -o pipefail
+
 CATALOG=${1:-/tmp/onos.catalog}
 
 rm -f $CATALOG
diff --git a/tools/build/onos-upload-artifacts.py b/tools/build/onos-upload-artifacts.py
index 54c3c33..0cd6c3e 100755
--- a/tools/build/onos-upload-artifacts.py
+++ b/tools/build/onos-upload-artifacts.py
@@ -53,10 +53,10 @@
         output.close()
 
 
-def generate_metadata_files(input_file):
+def generate_metadata_files(input_file, dest):
     # create a temporary directory to hold the metadata files
     global tempdir
-    base_metadata_filename = tempdir + "/" + os.path.basename(input_file)
+    base_metadata_filename = tempdir + "/" + os.path.basename(dest)
 
     files = []
 
@@ -77,6 +77,11 @@
     hashlib_compute(sha1, input_file, sha1_filename)
     files.append(sha1_filename)
 
+    # generate the base artifact
+    base_artifact_filename = base_metadata_filename
+    shutil.copyfile(input_file, base_artifact_filename)
+    files.append(base_artifact_filename)
+
     return files
 
 
@@ -102,20 +107,25 @@
 
 
 def stage_file(file, repo_id, dest):
+    filename_in_repo = os.path.dirname(dest) + "/" + os.path.basename(file)
     if destination_repo_url is not None:
         # deploy to Nexus repo
         upload_base = "https://" + destination_repo_url + "/service/local/staging/deployByRepositoryId"
-        url = upload_base + "/" + repo_id + "/" + dest
+        url = upload_base + "/" + repo_id + "/" + filename_in_repo
         headers = {'Content-Type': 'application/xml'}
         with open(file, 'rb') as f:
-            r = requests.post(url, files={file: f}, headers=headers, auth=(SONATYPE_USER, SONATYPE_PASSWORD))
+            r = requests.post(url, data=f.read(), headers=headers, auth=(SONATYPE_USER, SONATYPE_PASSWORD))
+            if r.status_code != 201:
+                print (r.status_code)
+                print (r.text)
+                sys.exit(1)
     else:
         # deploy to local repo
-        dest_local_repo = os.path.expanduser(local_maven_repo + "/" + dest)
-        dest_local_repo_dir = os.path.dirname(dest_local_repo)
-        if not os.path.isdir(dest_local_repo_dir):
-            os.makedirs(dest_local_repo_dir)
-        shutil.copyfile(src, dest_local_repo)
+        file_in_local_repo = os.path.expanduser(local_maven_repo + "/" + filename_in_repo)
+        dir_in_local_repo = os.path.dirname(file_in_local_repo)
+        if not os.path.isdir(dir_in_local_repo):
+            os.makedirs(dir_in_local_repo)
+        shutil.copyfile(src, file_in_local_repo)
 
 
 def stage_files(files, dest):
@@ -124,8 +134,8 @@
 
 
 def upload_file(src, dest):
-    files = generate_metadata_files(src)
-    files.append(src)
+    print ("publishing: " + dest.replace("org/onosproject", ""))
+    files = generate_metadata_files(src, dest)
     stage_files(files, dest)
 
 
