Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
## Releasing | ||
|
||
These are quick notes on using Maven to release artifacts to Sonatype. | ||
|
||
### Snapshots | ||
|
||
To release a snapshot to [Sonatype OSS Snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/): | ||
|
||
mvn clean deploy | ||
|
||
### Releases | ||
|
||
Releases are deployed to [Sonatype OSSRH Staging](http://central.sonatype.org/pages/releasing-the-deployment.html) and then manually synced to Central. | ||
|
||
To release with automated versioning and SCM integration: | ||
|
||
mvn release:clean release:prepare | ||
mvn release:perform | ||
|
||
To release manually: | ||
|
||
mvn versions:set -DnewVersion=1.2.3 | ||
mvn clean deploy -P release | ||
|
||
### Settings.xml | ||
|
||
Sonatype uploads are authenticated and require credentials. | ||
GPG signing requires a passphrase to unlock the signing key. | ||
Both of these secrets can be stored in `~/.m2/settings.xml`. | ||
|
||
```xml | ||
<settings> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>jira-username</username> | ||
<password>jira-password</password> | ||
</server> | ||
</servers> | ||
<profiles> | ||
<profile> | ||
<id>ossrh</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<gpg.executable>gpg</gpg.executable> | ||
<gpg.passphrase>gpg-password</gpg.passphrase> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</settings> | ||
``` |