Deploy to multiple snapshot repositories based on the git branch (with Travis) in a multi-module project
You have a multi-module maven project which is structured like this:
project/
pom.xml
module1/
pom.xml
other_stuff/
module2/
pom.xml
other_stuff/
...
and you are using travis as your CI manager.
Your github repository has multiple branches like the following:
- master
- feature_branch_1
- feature_branch_2
- ...
You want Travis to deploy a different snapshot version to your maven snapshot repository based on the branch name. For example, if you have pushed a change to branch feature_branch_1 and the version of the project is 1.0-SNAPSHOT, you would like to deploy using the 1.0-feature_branch_1-SNAPSHOT version number.
This can be done by using the before_install
clause and calling the modify_version.py
python script.