-
Notifications
You must be signed in to change notification settings - Fork 0
Release Build
###1) Run everything under bash (see)
http://stackoverflow.com/questions/3243755/maven-error-releasing-code-to-github-hangs-after-push
###2) Set up your keys:
https://help.github.com/articles/generating-ssh-keys
https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
###3) Open up your maven settings.xml and insert
<servers>
...
<server>
<id>sonatype-nexus-staging</id>
<username>XXX</username>
<password>YYY</password>
</server>
...
<servers>
Or you get this error:
Return code is: 401, ReasonPhrase: Unauthorized
###4) Execute following commands
ssh-agent
set SSH_AUTH_SOCK=/tmp/ssh-LhiYjP7924/agent.7924 // Value from above step
set SSH_AGENT_PID=2792 // Value from above step
ssh-add "/Path/To/.ssh/id_rsa"
eval `ssh-agent -s`
ssh -v [email protected] // Should work without asking for passphrase
If this isn't done correctly the git push and clone commands that run as part of the release will hang.
####Maven Process
mvn release:clean
mvn release:prepare javadoc:jar source:jar -Dsign
mvn release:perform
###5) Login to https://oss.sonatype.org/
open staging repository
find and click your repository
close
wait - some time Activity will say "Operation in progress"
release
###Official Docs https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
###Detailed Blog Article http://nicholaspaulsmith.com/maven-sonatype-release/