Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POM Conflicts on feature-finish #238

Open
bcluap opened this issue Jun 26, 2020 · 6 comments
Open

POM Conflicts on feature-finish #238

bcluap opened this issue Jun 26, 2020 · 6 comments

Comments

@bcluap
Copy link

bcluap commented Jun 26, 2020

First off, thanks so much for a great tool!

One challenge I am having is with merge conflicts on all POM files in a project (multi module) when I follow a fairly simple flow like this:

  1. Start on develop branch with version 2.3.4-SNAPSHOT
  2. gitflow:feature-start for feature FEAT-1, make some changes in the feature branch & commit them. Feature has POM version 2.3.4-FEAT-1-SNAPSHOT
  3. Checkout develop branch and do a gitflow:release of 2.3.4. Develop now goes to 2.3.5-SNAPSHOT
  4. gitflow:feature-finish of FEAT-1. Get conflicts e.g.
[ERROR] Auto-merging pom.xml
[ERROR] CONFLICT (content): Merge conflict in pom.xml
<<<<<<< HEAD
    <version>2.3.5-SNAPSHOT</version>
=======
    <version>2.3.4-FEAT-1-SNAPSHOT</version>
>>>>>>> feature/FEAT-1

Am I doing something wrong? My expectation would be that gitflow would automagically update the version in the FEAT-1 POMs before merging to develop branch so that there are no merge conflicts in the POMs? I'm sure its a common scenario for a feature to be finished after the develop branch has had some version changes?

Any guidance would be greatly appreciated.

@bcluap
Copy link
Author

bcluap commented Jul 6, 2020

I would really appreciate some insight on this. Thanks.

@aleksandr-m
Copy link
Owner

gitflow would automagically update the version in the FEAT-1 POMs before merging to develop branch

Update it to what version? Develop? What if feature version is greater than develop one?

@bcluap
Copy link
Author

bcluap commented Jul 6, 2020

I kind of assumed it would be to the current develop version as feature-finish is pretty much saying that you want to merge the feature into the current develop branch and whatever state/version it is in will be preserved. If you wanted it into a different version then I guess you would first set develop to that version before merging.

@bcluap
Copy link
Author

bcluap commented Jul 6, 2020

Maybe have some option/flag to indicate that feature-finish must adopt/keep the develop branch version.

@bcluap
Copy link
Author

bcluap commented Jul 7, 2020

I've added a PR to enable this by setting retainDevelopVersion=true

#239

@NR-MC
Copy link

NR-MC commented Jul 15, 2020

Is this possible with release branches too? I am encountering the same issue where we have upgraded the release pom to include a CI build number (To ensure we don't build with old dependencies), and when we finish the release branch it causes the same conflict you're seeing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants