开发者

Is there a way to use maven to automate feature branch reintegration?

开发者 https://www.devze.com 2023-02-08 16:27 出处:网络
Say you have a project that uses maven and a subversion repository. It consists of quite a lot of modules. So far, development happened in trunk, but now feature branches are to be introduced. This ha

Say you have a project that uses maven and a subversion repository. It consists of quite a lot of modules. So far, development happened in trunk, but now feature branches are to be introduced. This has to be as painless as possible considering all developers on the team should start using feature branches.

So, to create a branch, you use the release plugin which conveniently creates a branch for you, changes the version numbers of all module poms correctly and even updates the <scm> section in the parent pom.

Now, if you want to reintegrate the feature branch to trunk, there is no matching functionality in the release plugin -- you have to do everything by hand:

  • Merge with reintegrate flag
  • Change the version number in all poms
  • Change the <scm> section manually
  • Com开发者_如何学Gomit

This is not only cumbersome but also error prone if done by hand every time (and this might be frequent when using feature branches extensively). I know that at least the second point could be automated using release:update-versions or version:set, but there has to be more, right? What am I missing?


There's no really good way to do that with the maven release plugin. Your best bet is to do the merge with just subversion (merge feature branch into trunk) and then eventually release off the trunk again.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号