How to Publish to Maven Central
Pre-requisites
- Skim http://central.sonatype.org/pages/ossrh-guide.html
- And http://central.sonatype.org/pages/requirements.html
- Setup gpg http://central.sonatype.org/pages/working-with-pgp-signatures.html
- Setup password http://central.sonatype.org/pages/apache-maven.html (under Distribution Management and Authentication)
- Go to https://oss.sonatype.org/ and follow the directions at http://central.sonatype.org/pages/releasing-the-deployment.html
Basic workflow
- cd to the project source dir
- run the following command to sign into your gpg key (can run as a script):
output=$(mktemp) rm $output gpg2 --use-agent --armor --detach-sign --output $output pom.xml rm $output
- check out the release tag
- deploy the project via maven
- go to https://oss.sonatype.org/#stagingRepositories and log in
- find the recently created repository corresponding to your build
- select the repository and click 'close' - wait a while for it to be closed (hit refresh to check status)
- click 'release' (keep the 'drop' box checked)
- check maven central for the artifacts (may take an hour or so)
- ...
- profit!
geomesa
- build command: mvn clean deploy -Pcentral,bigtable -DskipTests
- repository name: orglocationtechgeomesa-xxxx
geomesa-geoserver
- build comand: mvn clean deploy -Pcentral -DskipTests
- repository name: orggeomesa-xxxx