• git-branch-renamer-maven-plugin

    When working with many feature/release/bugix/hotfix branches, it is a bad idea to start changing the pom version as this will create merge conflicts using pull request. this plugin allow you to keep in ALL branches the same pom version for all your projects, for example MASTER-SNAPSHOT the version will be derived from branch name automagically :-)

    You may want to read more first these 2 short articles

    git-branch-renamer-maven-plugin allow you to keep in ALL branches the same pom version for all your projects: for example MASTER-SNAPSHOT and never change it again.

    the project version will be derived from branch name automatically when running in your continuous integration server.

    branch name feature/xxxx

    • <version>xxxx-SNAPSHOT</version> (default)
    • <version>xxxx</version> (release = true)
    • <version>0-xxxx-SNAPSHOT</version> (forceNumericalVersion = true)
    • <version>feature-xxxx-SNAPSHOT</version> (filterOutBranchQualifier = false)

    The project is hosted at Github https://github.com/cedricwalter/git-branch-renamer-maven-plugin 

  • Update Maven pom version on GIT checkout in TeamCity

    Here is a solution to the following problems

    • Deriving #Maven artifact version from #GIT branch,
    • Update pom version on GIT checkout automatically,
    • Add the ability to use Pull request with Apache #Maven.

    You have a workflow requirement that require you to have the artifact version of a module externally defined from the current branch in GIT.

    For example

    You want to start working on a new feature branch “feature-memory-improvement”, so you branch from master a new branch named feature/feature-memory-improvement

    Having unique snapshot is a something you need to share your code using a #Maven repository, so you may want to have into the branch all pom.xml version changed to


    changing all your pom.xml and doing a technical commit  will create merge conflicts when using pull request!

    One solution, while not perfect is to do the following:  You can add a separate execution to run a goal which will change the version of the POM automatically in the #Maven reactor. This small script will do it¨