Publish Java Artifacts to Maven Central

Register Domain with Sonatype

GNU Privacy Guard

gpg2 --gen-key
$ gpg2 --list-keys/Users/zteater/.gnupg/pubring.kbx
---------------------------------
pub rsa2048 2020-09-04 [SC]
CBD4A688527344A89DA698A667E4BA1596973688
uid [ultimate] Zack Teater <zteater@gmail.com>
sub rsa2048 2020-09-04 [E]
$ gpg2 — keyserver hkp://pool.sks-keyservers.net — send-keys CBD4A688527344A89DA698A667E4BA1596973688

Configure Maven Password Encryption

$ mvn --encrypt-master-password
{foaG444L5k8HfeBBQJ9CPwoInd52AZ58HBJQ9Xha/04=}

Configure settings.xml with Nexus Login

Encrypt Nexus password

$ mvn --encrypt-password
$ {Qet4qKbuSQYHJh3YprA/kgfG40fD/ki+U9TRy/+oltk=}

Configure Nexus login

Configure pom.xml with Artifact Details

Add Artifact Details

Add License Details

Add Developer Details

Add SCM Details

Add Java Release Version

Configure pom.xml for Release

Add Distribution Management

Add Staging Plugin

Add Sources Plugin

Add Javadoc Plugin

Add GPG Plugin

Publish to Maven Central

mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} versions:commit
mvn deploy
Maven Central extracts meta-data from your pom.xml to populate the artifact details page.

--

--

--

I am a Java architect currently working at CapTech Consulting. I enjoy developing web applications and integrating enterprise systems.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Is A Bug Bounty In Crypto?

How Vodafone and Three Can Protect Subscribers in Ireland From SMS Phishing Attacks Like FluBot

HTTP Session Management

Mirai | HTB | OSCP | Box 5

[Notice] Deadwalker Whitelist registration OPEN

The Quickest Way to Find Out if You’ve Been Hacked

{UPDATE} Shara, Pocket Girlfriend Hack Free Resources Generator

AWS Control Tower & VPC Traffic Mirroring

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Zack Teater

Zack Teater

I am a Java architect currently working at CapTech Consulting. I enjoy developing web applications and integrating enterprise systems.

More from Medium

Dynamically route to read-only and read-write database instances in spring-boot

LogMasker — OpenSource masking library for Java

Java Consumer Interface

H2 In-memory Database