Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simple script to upload existing artifact + source + assemblies + sig…

…natures to Nexus repository

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@769050 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 9278cd5c20ee9a1767d34abf0f4d2c2c79484773 1 parent eda237f
Stuart McCulloch authored
Showing with 55 additions and 0 deletions.
  1. +55 −0 stage_existing_artifact.sh
View
55 stage_existing_artifact.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+GAV=${1}
+
+if [ ! -f "${GAV}.jar" ]
+then
+ echo "Usage: stage_existing_artifact.sh <group.artifact-version>"
+ exit
+fi
+
+################################################################################
+# DEPLOY FUNCTION: deploy [type] [classifier]
+################################################################################
+
+deploy() {
+ EXT=${1:-jar}
+ TARGET=${GAV}${2:+-$2}.${EXT}
+ CLSFR=${2:+-Dclassifier=$2}
+
+ # upload artifact
+ mvn deploy:deploy-file \
+ -DrepositoryId=apache.releases.https \
+ -Durl=https://repository.apache.org/service/local/staging/deploy/maven2 \
+ -DpomFile=${GAV}.pom -Dpackaging=${EXT} -Dfile=${TARGET} ${CLSFR}
+
+ # upload signature
+ mvn deploy:deploy-file \
+ -DrepositoryId=apache.releases.https \
+ -Durl=https://repository.apache.org/service/local/staging/deploy/maven2 \
+ -DpomFile=${GAV}.pom -Dpackaging=${EXT}.asc -Dfile=${TARGET}.asc ${CLSFR}
+}
+
+echo "################################################################################"
+echo " STAGE PRIMARY ARTIFACTS "
+echo "################################################################################"
+
+deploy pom
+deploy jar
+
+deploy jar sources
+
+echo "################################################################################"
+echo " STAGE BINARY ASSEMBLIES "
+echo "################################################################################"
+
+deploy zip bin
+deploy tar.gz bin
+
+echo "################################################################################"
+echo " STAGE PROJECT ASSEMBLIES "
+echo "################################################################################"
+
+deploy zip project
+deploy tar.gz project
+
Please sign in to comment.
Something went wrong with that request. Please try again.