Skip to content
Benjamin Golder edited this page Jan 29, 2017 · 31 revisions

How to publish a release of LibrePDF/OpenPDF to Maven Central

First, make sure you have a JIRA account with publishing permission

If you don't already have a Sonatype JIRA login, then register to create a new account. You will use your username and password to sign files and upload them to the OSSRH Repository.

Currently, @bengolder and @andreasrosdal are the only users authorized to publish new releases. If you'd like to help us publish releases, let us know. This repository wouldn't exist without the generous help of newcomers. New contributors are welcome. :)

Second, create and publish your public pgp key

  1. install gpg2 and make sure it is on your PATH

  2. If you don't already have a key, create a key with:

    gpg2 --gen-key

    Use your email and full name and a secure passphrase.

  3. Get the ID for your public key.

    gpg2 --list-keys

    Will show you a list of your keys and their IDs. For example, my key ID is 3806A4CD.

  4. Upload your public key to a keyserver. For example:

    gpg2 --keyserver hkp://pool.sks-keyservers.net --send-keys 3806A4CD

    ... where 3806A4CD is the ID of your public key. It will take 5-30 minutes for the key to become available on the server.

  5. Create a local settings file so that the maven gpg plugin can use your key to sign files. For example, make a file at ~/.m2/settings.xml with similar contents to this example and replace the example JIRA login information and gpg passphrase with your JIRA login and gpg passphrase.

Publish the release

Assuming you have the repository installed and you're able to build it successfully, the final steps are pretty straightforward.

First, make a staging release

mvn clean deploy

If this runs without errors, go to https://oss.sonatype.org/#stagingRepositories to review the staging release. If everything looks good, you can publish the release with:

mvn nexus-staging:release

Congrats! If you made it through this final step, then you've successfully published a release of OpenPDF!