How to get Sourcetree gitflow action to update version in pom.xml

I am trying to get my head around use of git flow inside Sourcetree. However, I'm struggling with the way it deals with (or rather, _doesn't_ deal with) versions in maven pom.xml files.

For some reason, when I use "start a release" from the Sourcetree Git Flow menu, it does not update the version set in the project pom, but just creates a new release branch. In contrast, when i execute `mvn jgitflow:release-start` from the commandline, it does update the pom as I expect it to, so as far as I can tell my project is set up correctly.

What am I overlooking/is there some way to correct this behavior?

This is sourcetree 1.8.1 on Mac OS X 10.9.1, using embedded git-flow by the way.

1 answer

1 accepted

This widget could not be displayed.

In the command you list, it is important to note that maven is not integrated with git. Rather, git has been integrated into maven. SourceTree is a Git client, not a maven client, so when you do gitflow in sourcetree, it is the same as running "git flow release start" at the command line. Your "mvn" command (maven) is a maven command that also runs a git flow command.

Additionally, nvie's gitflow (the one used by SourceTree) does not support hooks, so I can't see any way to emulate mvn's behavior in SourceTree's gitflow. I don't know if you can get sourcetree to use petervanderdoes fork, but if you can, you can make a hook on release start to update pom.xml. You can also join the chorus of people asking SourceTree to switch their embedded gitflow plugin to petervanderdoes, but who knows if/when that'll happen.

You might consider creating a set of Custom Actions that run the mvn jgitflow commands instead of using SourceTree's Gitflow UI, but you'd lose the recognition of your current gitflow state that the UI provides.

If you want to request SourceTree to use the petervanderdoes (AVH) fork, do so at JIRA.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

176 views 18 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you