This description used only for maintainer of project
Ticket OSSRH-39506 to deploy a library was created at sonatype.org, using Apache's Guide to uploading artifacts to the Central Repository and OSSRH Guide.
Library is hosted at Sonatype Maven Repository
For deployment process some requirements should be fulfilled:
- Installed Java 8+
- Installed and configured (
settings.xml
) Maven 3+ - Installed and configured GPG (GnuPG)
To set a new version of library use
$ mvn versions:set -DnewVersion=x.x.x
After new version has been set, deploy to sonatype with
$ mvn deploy
In case of troubles with deployment, check maven's settings.xml
file to contain
<server>
<id>ossrh</id>
<username>sonatype-username-token</username>
<password>sonatype-access-token-encoded</password>
</server>
To retrieve access token, login to Sonatype Nexus Repository Manager
and after opening Profile
, select User Token
from drop-down list.
Click Access User Token
button and after entering of current user password,
take provided access tokens into settings.xml
.
For successful signing of artifact, corresponding profile should also be set in settings.xml
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>password-of-gpg-key</gpg.passphrase>
</properties>
</profile>
It is recommended to keep all passwords in encrypted form. Detailed learn at Maven Password Encryption Guide