Skip to content

Miscellaneous

Jacob edited this page Oct 10, 2020 · 1 revision

Deploy to OSSRH (Open Source Software Repository Host)

Following contents will lead you to install and configure your settings to deploy this project to OSSRH, who will automatically synchronize your repositories to Central Maven Repository.

Step one: How to set up GPG signature to deploy to Central Maven Repository

Take this article for reference:

  1. install gnupg: brew install gpg .
  2. generate a key pair: gpg --gen-key. In the interactive, it require you a passphrase. Write it down, you'll sign your files by inputting this passphrase.(also can be set in maven setting.xml to pass the input)
  3. distribute your key to public. some available key servers are 'keys.gnupg.net', 'pool.sks-keyservers.net'.
gpg --keyserver hkp://keys.gnupg.net --send-keys YOUR_KEY_ID
gpg --keyserver hkp://pool.sks-keyservers.net --send-keys YOUR_KEY_ID

GPG Suite is a useful to maintain GPG key on MacOS. Signing commits doc on github explained how to sign the commits.

Step two: register an OSSRH account and configure to maven setting

The first, register a JIRA account. Then inform the maintainer of this project with your username. Then a new issue about allowing you to push the repository will be initiated and wait for official approval.

Then that issue is resolved. add following to your maven 'setting.xml':

<server>
    <id>ossrh</id>
    <username>YOUR_USERNAME</username>
    <password>YOUR_PASSWORD</password>
</server>