* ABCL Release Engineering practices
** Maven
Instructions for Releasing ABCL on Sonatype's OSS Maven repository
*** settings.xml
This assumes your settings.xml (/etc/maven2/settings.xml for
Ubuntu-packaged Maven) contains something like this in its
section:
#+BEGIN_SRC
sonatype-nexus-snapshots
sonatype-jira-username
sonatype-jira-password
sonatype-nexus-staging
sonatype-jira-username
sonatype-jira-password
#+END_SRC
*** Process
First, remember to build it!
#+BEGIN_SRC
ant abcl.jar abcl.source.jar abcl.javadoc.jar abcl.contrib
#+END_SRC
And maybe test it as well
#+BEGIN_SRC
ant abcl.test
#+END_SRC
For snapshots - development versions - the version in the POM should be like x.y.z-SNAPSHOT
#+BEGIN_SRC
mvn gpg:sign-and-deploy-file -Dfile=dist/abcl.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots
mvn gpg:sign-and-deploy-file -Dfile=dist/abcl-sources.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots -Dclassifier=sources
mvn gpg:sign-and-deploy-file -Dfile=dist/abcl-javadoc.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots -Dclassifier=javadoc
mvn gpg:sign-and-deploy-file -Dfile=dist/abcl-contrib.jar -DpomFile=contrib/pom.xml -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DrepositoryId=sonatype-nexus-snapshots
#+END_SRC
For releases - the version in the POM should be x.y.z
#+BEGIN_SRC
mvn gpg:sign-and-deploy-file -Dfile=dist/abcl.jar -DpomFile=pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging
mvn gpg:sign-and-deploy-file -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
mvn gpg:sign-and-deploy-file -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
#+END_SRC
abcl-contrib release
#+BEGIN_SRC
mvn gpg:sign-and-deploy-file -Dfile=dist/abcl-contrib.jar -DpomFile=contrib/pom.xml -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging
mvn gpg:sign-and-deploy-file -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
mvn gpg:sign-and-deploy-file -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
#+END_SRC
**** Testing downloads
#+BEGIN_SRC
mvn 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
#+END_SRC
*** See also
*** Specifiying GPG executable
For specifying gpg executable, use a property specified via
'-Dgpg.executable=gpg2'.