Documentation on basic versioning strategy (as of March 2017)
The develop branch of the git repository is where features are pushed and deployed to UAT for testing.
The develop branch should always be one minor version ahead of master. For example
- master = 1.3.1
- develop = 1.3.2-SNAPSHOT
When it comes time to deploy features to PROD, the master branch needs to be updated/synchronized before that happens.
The basic process is this:
- Pull latest changes for the repository.
- Ensure the project is set to the "develop" branch.
Use "mvn versions:set" to change the versions of the develop branch to the next release version (e.g. 1.3.2)
- Commit the "develop" branch changes (but not need to push)
- Switch to the "master" branch
- Merge changes from "develop" to "master"
- Push the "master" branch (it now has the next release version)
- Switch back to the "develop" branch.
Use "mvn versions:set" to change the versions to the next develop version
- Commit the "develop" branch and push this change
- Redeploy UAT to reflect the next dev version
NOTE: you may notice the complexity of running versions:set twice. This is because of the split nature of the parent and aggregator modules. It is recommended in the future that parent project be merged into the aggregator and removed. Thant involves:
- Moving the dependencyManagement section from parent/pom.xml to pom.xml
- Moving the pluginManagement section from parent/pom.xml to pom.xml
- Removing "parent" from the modules list in pom.xml
- Updating pom.xml to remove the "<parent>" section at the top (it is now the parent)
- Also change pom.xml description to indicate that it is both parent and aggregator
- in particular, change the artifactId to be "...-parent" instead of "...-aggregator" (this is for the next part)
- update all other pom.xml files in submodules to change the relativePath to the parent module
- from "../parent" to ".."
- OR from "../../parent" to "../.."