This is a brief procedure to publish artifacts to the maven Central.

Initial Setup at Sonatype Jira

The important and mandatory during jira ticket creation are:

  • Group Id
  • Project URL
  • SCM url

Working with PGP Signatures

Installing GnuPG

If gpg is not installed, get it from here

Generating a Key Pair

Generate the keys, provide the information as prompted.

$ gpg --gen-key

Listing Keys

$ gpg --list-keys
pub   2048R/9D9D7541 2016-11-10
uid                  Lokhendro Ning <>
sub   2048R/3EFB9D5A 2016-11-10

The key-id is the 9D9D7541.

Distributing Your Public Key

Send the public key to public key server

$ gpg2 --keyserver hkp:// --send-keys 9D9D7541

To import your public key from the key server to their local machines:

$ gpg2 --keyserver hkp:// --recv-keys 9D9D7541

Bonus: Add Key in github.

If you have github account, you can add this gpg key for syncing with the github.

Requirement at the Project Object Model file

The folloing are the mandatory Requirement to define in the POM file.

Correct Coordinates

Should be valid and unique GAV(Group-Artifact-Version) definition.


Project Name, Description and URL

<description>My Awesome Project.</description>

License Information

Define the type of License.

        <name>Apache License, Version 2.0</name>

Developer Information

        <name>Ningthoujam Lokhendro</name>
            <role>Lead Developer</role>

SCM Information


Distribution Management.


Authentication at ossrh

Define the authentication for the ossrh at the maven settting.xml as


And define the GPG credential as well:


Supply Javadoc and Sources


Sign Files with GPG/PGP


For more example on the POM structure.


To deploy the artifact at the maven central.


$ mvn clean deploy

If all is fine should be available under :


Set the proper version without snapshots and activate the release profile.

$ mvn versions:set -DnewVersion=1.2.3

$ mvn clean deploy -P release

If all is fine should be available under :

For more information on the apache maven.