Skip to content

Commit

Permalink
Simple script to upload existing artifact + source + assemblies + sig…
Browse files Browse the repository at this point in the history
…natures to Nexus repository

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@769050 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Stuart McCulloch committed Apr 27, 2009
1 parent a4ad70a commit 78f47c3
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions stage_existing_artifact.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 78f47c3

Please sign in to comment.