source: trunk/abcl/doc/releng.org @ 15274

Last change on this file since 15274 was 15274, checked in by Mark Evenson, 2 years ago

doc: update the releng notes for Maven

File size: 4.2 KB
Line 
1* ABCL Release Engineering
2
3See also <https://abcl.org/trac/wiki/ReleaseSteps>.
4
5** Maven
6
7Instructions for releasing ABCL on Sonatype's OSS Maven repository.
8
9You need a Sonatype account, see
10<https://central.sonatype.org/pages/ossrh-guide.html>.  This will
11result in providing you with a "JIRA username and a password".
12
13*** settings.xml
14
15Enter your "JIRA username and a password" in a
16<file:.m2/settings.xml>.  This will authenticate
17
18#+BEGIN_SRC xml
19<settings>
20 <server>
21   <id>sonatype-nexus-snapshots</id>
22   <username>sonatype-jira-username</username>
23   <password>sonatype-jira-password</password>
24 </server>
25 <server>
26   <id>sonatype-nexus-staging</id>
27   <username>sonatype-jira-username</username>
28   <password>sonatype-jira-password</password>
29 </server>
30</settings>
31#+END_SRC
32
33*** Process
34
35Ensure that the artifacts you wish to upload are present by building
36them.
37
38#+BEGIN_SRC
39ant abcl.jar abcl.source.jar abcl.javadoc.jar abcl.contrib
40#+END_SRC
41
42And maybe test it as well
43
44#+BEGIN_SRC
45ant abcl.test
46#+END_SRC
47
48
49**** Snapshots
50For snapshots - development versions - the version in the POM should look like ~x.y.z-SNAPSHOT~.
51
52#+BEGIN_SRC bash
53keyname='<your_pgp_key@example.com>'
54mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots
55mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-sources.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots -Dclassifier=sources
56mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-javadoc.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots -Dclassifier=javadoc
57mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-contrib.jar -DpomFile=contrib/pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots
58#+END_SRC
59
60
61**** Release
62For releases - the version in the POM should look like  ~x.y.z~
63
64#+BEGIN_SRC bash
65keyname='<evenson.not.org@gmail.com>'
66abcl_version=1.6.1
67mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging
68mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-${abcl_version}-sources.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -Dclassifier=sources
69mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-${abcl_version}-javadoc.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -Dclassifier=javadoc
70#+END_SRC
71
72abcl-contrib release
73
74#+BEGIN_SRC
75keyname='<evenson.not.org@gmail.com>'
76abcl_version=1.6.1
77mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-contrib.jar -DpomFile=contrib/pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging
78mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-contrib-${abcl_version}-sources.jar -DpomFile=contrib/pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -Dclassifier=sources
79mvn gpg:sign-and-deploy-file -Dgpg.keyname=${keyname} -Dfile=dist/abcl-contrib-${abcl_version}-javadoc.jar -DpomFile=contrib/pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -Dclassifier=javadoc
80#+END_SRC
81
82**** Testing downloads
83
84#+BEGIN_SRC
85mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -DrepoUrl=https://oss.sonatype.org/content/repositories/snapshots -Dartifact=org.abcl:abcl-contrib:1.5.0-SNAPSHOT:jar
86#+END_SRC
87
88*** See also
89<http://www.sonatype.org/nexus/2015/06/02/how-to-publish-software-artifacts-to-maven-central/>
90<http://central.sonatype.org/pages/releasing-the-deployment.html>
91
92*** Specifying GPG executable
93
94For specifying gpg executable, use a property specified via
95'-Dgpg.executable=gpg2'.
Note: See TracBrowser for help on using the repository browser.