-
Notifications
You must be signed in to change notification settings - Fork 6
How To Publish To Nexus
craig jackson edited this page Oct 10, 2015
·
6 revisions
This page describes how to setup your dev environment to publish an artifact to http://oss.sonatype.org/.
Sign up for a sonatype JIRA account
First, create the key:
gpg --gen-key
Now list the public key:
gpg --list-keys|grep ^pub
The output will include the text "key" followed by the key length, a slash and the key itself.
Finally, send the key to a keyserver
gpg --keyserver hkp://pgp.mit.edu --send-keys "__your_key_here__"
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>__your_sonatype_login__</username>
<password>__your_sonatype_password__</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>__your_sonatype_login_here__</username>
<password>__your_sonatype_password_here__</password>
</server>
</servers>
<profiles>
<profile>
<id>sign</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.passphrase>__your_gpg_passphrase_here__</gpg.passphrase>
</properties>
</profile>
</profiles>
mvn -Dresume=false -Dgpg.passphrase="__your_pgp_passphrase_here__" clean release:prepare
Note: Ensure the pom.xml version is NOT postfixed with "-SNAPSHOT".
mvn -Dgpg.passphrase="__your_pgp_passphrase_here__" clean deploy -P release-sign-artifacts
- Login to https//oss.sonatype.org/
- Select Staging Repositories
- Scroll down the repository list to find a repository called "netsourceforgejavaflacencoder"
- Select that repository and click the "Close" button