You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RELEASE.md 1.3KB

8 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ## Releasing
  2. These are quick notes on using Maven to release artifacts to Sonatype.
  3. ### Snapshots
  4. To release a snapshot to [Sonatype OSS Snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/):
  5. mvn clean deploy
  6. ### Releases
  7. Releases are deployed to [Sonatype OSSRH Staging](http://central.sonatype.org/pages/releasing-the-deployment.html) and then manually synced to Central.
  8. To release with automated versioning and SCM integration:
  9. mvn release:clean release:prepare
  10. mvn release:perform
  11. To release manually:
  12. mvn versions:set -DnewVersion=1.2.3
  13. mvn clean deploy -P release
  14. ### Settings.xml
  15. Sonatype uploads are authenticated and require credentials.
  16. GPG signing requires a passphrase to unlock the signing key.
  17. Both of these secrets can be stored in `~/.m2/settings.xml`.
  18. ```xml
  19. <settings>
  20. <servers>
  21. <server>
  22. <id>ossrh</id>
  23. <username>jira-username</username>
  24. <password>jira-password</password>
  25. </server>
  26. </servers>
  27. <profiles>
  28. <profile>
  29. <id>ossrh</id>
  30. <activation>
  31. <activeByDefault>true</activeByDefault>
  32. </activation>
  33. <properties>
  34. <gpg.executable>gpg</gpg.executable>
  35. <gpg.passphrase>gpg-password</gpg.passphrase>
  36. </properties>
  37. </profile>
  38. </profiles>
  39. </settings>
  40. ```