0% found this document useful (0 votes)
37 views8 pages

Apache Maven: Beginner To Guru

The Maven Release Plugin is used to automate the process of preparing and performing software releases. It handles tasks like checking for SNAPSHOT dependencies, updating POM versions, tagging the source code, deploying artifacts, and more. The main goals are release:prepare to update versions and commit changes, and release:perform to check out the tagged code and run deployment. Release:rollback can revert changes if needed.

Uploaded by

Arun m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views8 pages

Apache Maven: Beginner To Guru

The Maven Release Plugin is used to automate the process of preparing and performing software releases. It handles tasks like checking for SNAPSHOT dependencies, updating POM versions, tagging the source code, deploying artifacts, and more. The main goals are release:prepare to update versions and commit changes, and release:perform to check out the tagged code and run deployment. Release:rollback can revert changes if needed.

Uploaded by

Arun m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Apache Maven

Beginner to Guru

Maven Release Plugin Overview


Maven Release Plugin
• The Maven Release Plugin can be used to release versions of your project.
• High level release process:
1. Version 1.0.0-SNAPSHOT

2. Version 1.0.0
3. Version 1.0.1-SNAPSHOT
Release Considerations
• Snapshots are considered development versions and source changes are not closely tracked
• Releases however, are formal releases of a software project.
• Source code should be tracked

• Auditors in some industries will require source code of a release to be tracked


• You should be able to re-create the released artifact from your SCM
• Best practice is to tag SCM with release
• Allows you to definitively know what is in the ‘release’
Maven Release Plugin Goals
• Prepare Release • Perform Release
• Check no uncommitted changes • Checkout of SCM with SCM tag
• Check no snapshots • Run release goals

• Update to release version • default deploy site deploy


• Run Tests • Remove release files
• Tag in SCM • Checkout of SCM master

• Next Snapshot version


• Commit
Release Rollback
• Typically used if errors have occurred in release:prepare goal
• Will revert POMs back to pre-release state
• SCM Tag may be removed

• Tag removal is not fully implemented (depends on SCM)


• SourceTree is a handy tool for GIT
• Will not work if goal release:clean has been run
Clean Release
• Cleans up release files
• removes release.properties
• removes any backup POMs

• Normally removed with release:perform


Update POM Versions
• Goal can be used to update POM versions in multi-model projects
• Handy tool if default release process does not meet your needs
• Not shown in course

• command: mvn release:update-versions -DautoVersionSubmodules=true

You might also like