Skip to content

Commit 9f4f749

Browse files
author
Stuart McCulloch
committed
Simple script to upload existing artifact + source + assemblies + signatures to Nexus repository
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@769050 13f79535-47bb-0310-9956-ffa450edef68
1 parent ed6c720 commit 9f4f749

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

stage_existing_artifact.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/sh
2+
3+
GAV=${1}
4+
5+
if [ ! -f "${GAV}.jar" ]
6+
then
7+
echo "Usage: stage_existing_artifact.sh <group.artifact-version>"
8+
exit
9+
fi
10+
11+
################################################################################
12+
# DEPLOY FUNCTION: deploy [type] [classifier]
13+
################################################################################
14+
15+
deploy() {
16+
EXT=${1:-jar}
17+
TARGET=${GAV}${2:+-$2}.${EXT}
18+
CLSFR=${2:+-Dclassifier=$2}
19+
20+
# upload artifact
21+
mvn deploy:deploy-file \
22+
-DrepositoryId=apache.releases.https \
23+
-Durl=https://repository.apache.org/service/local/staging/deploy/maven2 \
24+
-DpomFile=${GAV}.pom -Dpackaging=${EXT} -Dfile=${TARGET} ${CLSFR}
25+
26+
# upload signature
27+
mvn deploy:deploy-file \
28+
-DrepositoryId=apache.releases.https \
29+
-Durl=https://repository.apache.org/service/local/staging/deploy/maven2 \
30+
-DpomFile=${GAV}.pom -Dpackaging=${EXT}.asc -Dfile=${TARGET}.asc ${CLSFR}
31+
}
32+
33+
echo "################################################################################"
34+
echo " STAGE PRIMARY ARTIFACTS "
35+
echo "################################################################################"
36+
37+
deploy pom
38+
deploy jar
39+
40+
deploy jar sources
41+
42+
echo "################################################################################"
43+
echo " STAGE BINARY ASSEMBLIES "
44+
echo "################################################################################"
45+
46+
deploy zip bin
47+
deploy tar.gz bin
48+
49+
echo "################################################################################"
50+
echo " STAGE PROJECT ASSEMBLIES "
51+
echo "################################################################################"
52+
53+
deploy zip project
54+
deploy tar.gz project
55+

0 commit comments

Comments
 (0)