git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Merge conflicts with version numbers in release branches

From
TKThomas Koch <thomas@koch.ro>
Date
Apr 7, 2013, 15:49 UTC
Message-ID
<201304071749.10912.thomas@koch.ro>
Hi,

it's a common problem[1,2,3] in Maven (Java) projects and probably in other environments too: You have the version number of your project written in the pom.xml. When one merges changes upwards from the maint branche to master, the version numbers in maint and master are different and cause a merge conflict.

You might think of solutions for easy cases, but think about several releases from the maint branches and several major releases in the same time frame and you will run into merge conflicts.

Still, do you know any best practice how to deal with these? Do you know examples from other language environments that also keep the version numbers under version control and suffer from the same problem? Or is the version number somehow taken from the git tag in your environment?

[1] http://brettporter.wordpress.com/2012/02/02/automatically-resolving- version-conflicts-in-maven-poms-when-merging/ [2] http://bxm-dev.blogspot.ch/2012/05/gitflow-and-maven.html [3] http://stackoverflow.com/questions/3555160/merging-changes-from-a-maven- relase-branch-yields-conflicts-due-to-changed-versi

Thank you,
Thomas Koch, http://www.koch.ro
Next: Enrico Weigelt
Message 1 of 2 in “Merge conflicts with version numbers in release branches”
  1. Thomas KochApr 7, 2013
  2. Enrico WeigeltMay 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.