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

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 Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

285 views 38 9
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot