In order to publish daff
to Maven Central, the file ~/.jreleaser/config.properties
with the following contents is required:
JRELEASER_NEXUS2_USERNAME=<your-sonatype-account-username>
JRELEASER_NEXUS2_PASSWORD=<your-sonatype-account-password>
JRELEASER_GPG_PASSPHRASE=<your-pgp-passphrase>
JRELEASER_GPG_PUBLIC_KEY=/path/to/public.gpg
JRELEASER_GPG_SECRET_KEY=/path/to/private.gpg
JRELEASER_GITHUB_TOKEN=<your-github-token>
In order to get a Sonatype account, follow the steps in this guide.
The GPG public key has to be published to a key server:
gpg --keyserver keyserver.ubuntu.com --send-keys <key id>
The public and private keys can be exported to files with the following commands:
gpg --output public.gpg --armor --export username@email-host
gpg --output private.gpg --armor --export-secret-key username@email-host
The GitHub token can be generated in GitHub/User Profile/Settings/Developer settings.
Once all configuration is in place, execute the following commands from the directory java_bin/daff
(from JReleaser's docs):
- Verify release & deploy configuration
mvn jreleaser:config
- Stage all artifacts to a local directory
mvn -Ppublication
- Deploy and release
mvn jreleaser:full-release