How to publish the java library into Maven Central Repository
2023-04-07- Create a Sonatype Account and Claim your Namespace by an new issue. Sonatype URL
- Create and Publish the PGP Keys
- Download Gpg4win from https://gpg4win.org/download.html
- Install and check version by command: gpg –version
- Create new key pair by gpg –gen-key
- List keys and find id by gpg –list-keys
- Send the public key to public server
gpg –keyserver hkp://keyserver.ubuntu.com:11371 –send-keys OR gpg –keyserver keyserver.ubuntu.com –send-keys
- Check the server is received
gpg –keyserver hkp://keyserver.ubuntu.com –recv-keys
- Signing a File
gpg -ab xxx.jar
- Verify Signed file
gpg –verify xxx.jar.asc
- Prepare Your Project Maven POM File