Skip to content

Commit 1191221

Browse files
committed
Merge bug20664 into default
2 parents 79d22b7 + 718817a commit 1191221

File tree

5 files changed

+136
-6
lines changed

5 files changed

+136
-6
lines changed

Makefile

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ PACKAGE_NAME=rabbitmq-java-client
44

55
JAVADOC_ARCHIVE=$(PACKAGE_NAME)-javadoc-$(VERSION)
66
SRC_ARCHIVE=$(PACKAGE_NAME)-$(VERSION)
7+
SIGNING_KEY=056E8E56
8+
GNUPG_PATH=~
79

810
WEB_URL=http://stage.rabbitmq.com/
11+
NEXUS_STAGE_URL=http://oss.sonatype.org/service/local/staging/deploy/maven2
912

1013
AMQP_CODEGEN_DIR=$(shell fgrep sibling.codegen.dir build.properties | sed -e 's:sibling\.codegen\.dir=::')
1114

@@ -66,5 +69,37 @@ srcdist: distclean
6669
(cd build; zip -r $(SRC_ARCHIVE).zip $(SRC_ARCHIVE))
6770
(cd build; rm -rf $(SRC_ARCHIVE))
6871

69-
deploy-maven-bundle: maven-bundle
70-
rsync -r build/bundle/* $(MAVEN_RSYNC_DESTINATION)
72+
stage-maven-bundle: maven-bundle
73+
( \
74+
cd build/bundle; \
75+
NEXUS_USERNAME=`cat $(GNUPG_PATH)/../nexus/username`; \
76+
NEXUS_PASSWORD=`cat $(GNUPG_PATH)/../nexus/password`; \
77+
VERSION=$(VERSION) \
78+
SIGNING_KEY=$(SIGNING_KEY) \
79+
GNUPG_PATH=$(GNUPG_PATH) \
80+
CREDS="$$NEXUS_USERNAME:$$NEXUS_PASSWORD" \
81+
../../nexus-upload.sh \
82+
amqp-client-$(VERSION).pom \
83+
amqp-client-$(VERSION).jar \
84+
amqp-client-$(VERSION)-javadoc.jar \
85+
amqp-client-$(VERSION)-sources.jar && \
86+
mvn org.sonatype.plugins:nexus-maven-plugin:staging-close \
87+
-Dnexus.url=http://oss.sonatype.org \
88+
-Dnexus.username=$$NEXUS_USERNAME \
89+
-Dnexus.password=$$NEXUS_PASSWORD \
90+
-B \
91+
-Dnexus.description="Public release of $$VERSION" \
92+
)
93+
94+
promote-maven-bundle:
95+
( \
96+
NEXUS_USERNAME=`cat $(GNUPG_PATH)/../nexus/username`; \
97+
NEXUS_PASSWORD=`cat $(GNUPG_PATH)/../nexus/password`; \
98+
mvn org.sonatype.plugins:nexus-maven-plugin:staging-promote \
99+
-Dnexus.url=http://oss.sonatype.org \
100+
-Dnexus.username=$$NEXUS_USERNAME \
101+
-Dnexus.password=$$NEXUS_PASSWORD \
102+
-Dnexus.promote.autoSelectOverride=true \
103+
-DtargetRepositoryId=releases \
104+
-B \
105+
)

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ test.src.home=test/src
1414
java-jvm-1.4=c:/Program Files/java/j2re1.4.2_14/bin/java
1515
sibling.codegen.dir=../rabbitmq-codegen/
1616
spec.version=0.8
17-
bundle.out=${build.out}/bundle/com/rabbitmq/amqp-client/${impl.version}/
17+
bundle.out=${build.out}/bundle
1818
javadoc.out=build/doc/api
1919
python.bin=python

build.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,10 @@
400400
<mkdir dir="${bundle.out}"/>
401401
<copy file="${lib.out}/rabbitmq-client.jar"
402402
tofile="${bundle.out}/amqp-client-${impl.version}.jar"/>
403-
<jar destfile="${bundle.out}/amqp-client-sources-${impl.version}.jar">
403+
<jar destfile="${bundle.out}/amqp-client-${impl.version}-sources.jar">
404404
<fileset dir="src"/>
405405
</jar>
406-
<jar destfile="${bundle.out}/amqp-client-javadoc-${impl.version}.jar">
406+
<jar destfile="${bundle.out}/amqp-client-${impl.version}-javadoc.jar">
407407
<fileset dir="${javadoc.out}"/>
408408
</jar>
409409
<copy file="pom.xml" tofile="${bundle.out}/amqp-client-${impl.version}.pom"/>

nexus-upload.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# Required flags:
6+
# CREDS -- basic auth credentials, in form username:password
7+
# VERSION -- the version of the bundle
8+
# SIGNING_KEY -- the signing key to use
9+
# GNUPG_PATH -- the path to the home directory for gnupg
10+
11+
NEXUS_ROOT="http://$CREDS@oss.sonatype.org/service/local/staging/deploy/maven2/com/rabbitmq/amqp-client/$VERSION"
12+
13+
for ARTIFACT_NAME in $@; do
14+
echo "Uploading $ARTIFACT_NAME"
15+
16+
rm -f $ARTIFACT_NAME.asc
17+
gpg --homedir $GNUPG_PATH/.gnupg --local-user $SIGNING_KEY --no-tty --armor --detach-sign --output $ARTIFACT_NAME.asc $ARTIFACT_NAME
18+
md5sum $ARTIFACT_NAME | cut -f1 -d' ' >$ARTIFACT_NAME.md5
19+
md5sum $ARTIFACT_NAME.asc | cut -f1 -d' ' >$ARTIFACT_NAME.asc.md5
20+
sha1sum $ARTIFACT_NAME | cut -f1 -d' ' >$ARTIFACT_NAME.sha1
21+
sha1sum $ARTIFACT_NAME.asc | cut -f1 -d' ' >$ARTIFACT_NAME.asc.sha1
22+
curl -XPUT --data-binary @$ARTIFACT_NAME $NEXUS_ROOT/$ARTIFACT_NAME
23+
24+
for EXT in md5 sha1 asc asc.md5 asc.sha1; do
25+
curl -XPUT --data-binary @$ARTIFACT_NAME.$EXT $NEXUS_ROOT/$ARTIFACT_NAME.$EXT
26+
done
27+
done

pom.xml

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,66 @@
44
<groupId>com.rabbitmq</groupId>
55
<artifactId>amqp-client</artifactId>
66
<version>VERSION</version>
7+
<packaging>jar</packaging>
8+
<name>RabbitMQ Java Client</name>
9+
<description>RabbitMQ AMQP Java Client</description>
10+
<url>http://www.rabbitmq.com</url>
11+
12+
<licenses>
13+
<license>
14+
<name>GPL v2</name>
15+
<url>http://www.gnu.org/licenses/gpl-2.0.txt</url>
16+
<distribution>repo</distribution>
17+
</license>
18+
<license>
19+
<name>MPL 1.1</name>
20+
<url>http://www.mozilla.org/MPL/MPL-1.1.txt</url>
21+
<distribution>repo</distribution>
22+
</license>
23+
</licenses>
24+
25+
<scm>
26+
<url>http://hg.rabbitmq.com/rabbitmq-java-client</url>
27+
<connection>scm:hg:http://hg.rabbitmq.com/rabbitmq-java-client</connection>
28+
</scm>
29+
30+
<developers>
31+
<developer>
32+
<id>matthias.radestock</id>
33+
<name>Matthias Radestock</name>
34+
<roles>
35+
<role>Developer</role>
36+
</roles>
37+
</developer>
38+
<developer>
39+
<id>tonyg</id>
40+
<name>Tony Garnock-Jones</name>
41+
<roles>
42+
<role>Developer</role>
43+
</roles>
44+
</developer>
45+
<developer>
46+
<id>matthew.sackman</id>
47+
<name>Matthias Sackman</name>
48+
<roles>
49+
<role>Developer</role>
50+
</roles>
51+
</developer>
52+
<developer>
53+
<id>david.maciver</id>
54+
<name>David MacIver</name>
55+
<roles>
56+
<role>Developer</role>
57+
</roles>
58+
</developer>
59+
<developer>
60+
<id>paul.jones</id>
61+
<name>Paul Jones</name>
62+
<roles>
63+
<role>Developer</role>
64+
</roles>
65+
</developer>
66+
</developers>
767

868
<dependencies>
969

@@ -27,4 +87,12 @@
2787
</dependency>
2888

2989
</dependencies>
30-
</project>
90+
91+
<distributionManagement>
92+
<repository>
93+
<id>sonatype-nexus-staging</id>
94+
<name>Nexus Release Repository</name>
95+
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
96+
</repository>
97+
</distributionManagement>
98+
</project>

0 commit comments

Comments
 (0)