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

Jeen Broekstra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2014

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

2 votes
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2014

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.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2014

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
TAGS
AUG Leaders

Atlassian Community Events