Manual release process: change the version in pom.xml, commit, build, upload to Nexus, change the version to the next SNAPSHOT, commit. Five steps where any one can fail. Maven Release Plugin automates this to a single command.
How it works¶
mvn release:prepare — changes the version from 2.1-SNAPSHOT to 2.1.0, commits, creates a tag, changes the version to 2.2-SNAPSHOT, commits. mvn release:perform — checks out the tag, builds and deploys to Nexus. Automatic, repeatable, without human error.
Nexus Staging¶
Release artifacts go to a Nexus staging repository. After verification (QA test) they are promoted to the releases repository. If QA fails, staging is discarded — production is unaffected.
Problems in practice¶
SCM access — the release plugin needs write access to Git (SSH keys on the Jenkins server). SNAPSHOT dependencies — the release plugin will refuse to release a project with SNAPSHOT dependencies. Multi-module projects — release all modules at once, or individually? Our choice: all at once.
Versioning conventions¶
Semantic versioning: MAJOR.MINOR.PATCH. Major for breaking changes, minor for new features, patch for bug fixes. SNAPSHOT for development versions.
Conclusion¶
Maven Release Plugin saves time and eliminates errors. The investment in proper configuration (SCM, Nexus staging) pays off with every release.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us