Skip to content

Latest commit

 

History

History
44 lines (41 loc) · 1.99 KB

README-dev.md

File metadata and controls

44 lines (41 loc) · 1.99 KB

Code coverage

mvn clean test jacoco:report

Deploy to Maven Central

  1. Read rules
  2. Register on Sonatype OSSRH
  3. Provide project details for Sonatype OSSRH
  4. Create tiket for project * Summary: I want to publish artifact of my project to Maven Central * Description: I own domain valery1707.name * Group ID: name.valery1707 * Project URL: https://github.com/valery1707/jcommander-ext * SCM URL: https://github.com/valery1707/jcommander-ext.git * Already Synced to Central: No
  5. Wait for ticket resolution
  6. Add credentials for Sonatype OSSRH into maven
  7. Detect maven HOME: mvn --version | grep 'Maven home'
  8. Edit conf/setting.xml from maven home
  9. Inside servers add new server * id: ossrh * username: your-jira-id * password: your-jira-pwd
  10. Install GPG
  11. Check sign: mvn clean package verify -P release -Dgpg.passphrase=real-gpg-passphrase
  12. Commit and deploy artifact to Sonatype OSSRH
  13. mvn versions:set -DnewVersion=0.1.0
  14. git commit -m 'Release version 0.1.0' pom.xml */pom.xml
  15. mvn clean deploy -P release -Dgpg.passphrase=real-gpg-passphrase
  16. mvn versions:set -DnewVersion=0.1.0-SNAPSHOT
  17. git commit -m 'Prepare for next development iteration' pom.xml */pom.xml
  18. Promote artifacts to Maven Central
  19. Login into Sonatype OSSRH
  20. Find staging repository with name namevalery1707-
  21. Close it
  22. Wait some time, refresh page
  23. Release
  24. After some time (about 10 minutes) artifact will be published into Maven Cenral
  25. After more time (about 2 hours) new release will be accessible on search
  26. Release on Github
  27. git tag -u '[email protected]' -m 'Release version 0.1.0' v0.1.0 HEAD~1
  28. git push
  29. git push --tags