-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Stuart McCulloch
committed
Apr 27, 2009
1 parent
a4ad70a
commit 78f47c3
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|