2011-06-13 40 views
1

假设你有一个名为“父”其中有2名儿童“childA”和“ChildB”模块使用maven-release-plugin,如何分支模块及其子项?

如果我运行

mvn release:branch -DbranchName=my-branch 
在“父”文件夹

,将跳转父模块代码到SVN /分支机构/我的分支没有2个子模块。

我想释放:树枝间父模块及其所有儿童

  • /分支机构/我的分支/父
  • /分支机构/我的分支/ childA
  • /枝/我的分支/ childB

我没有发现,在文档的任何解决方案尚未:

是否可行?

任何帮助,将不胜感激,谢谢

弗雷德

回答

2

我找到了解决办法。

如果模块结构化分层它的工作原理:

/主干/父 /主干/父母/ childA /主干/父母/ childB

,但你必须确保SCM参数是100 %正确。

即:

/trunk/parent/pom.xml

<scm> 
    <connection>scm:svn:https://svnserver:18080/svn/trunk</connection> 
    <developerConnection>scm:svn:https://svnserver:18080/svn/trunk</developerConnection> 
    <url>https://svnserver:18080/viewvc/trunk</url> 
</scm> 

/trunk/parent/childA/pom.xml

<scm> 
    <connection>scm:svn:https://svnserver:18080/svn/trunk/childA</connection> 
    <developerConnection>scm:svn:https://svnserver:18080/svn/trunk/childA</developerConnection> 
    <url>https://svnserver:18080/viewvc/trunk/childA</url> 
</scm> 

/中继/父/ childB/POM .xml

<scm> 
    <connection>scm:svn:https://svnserver:18080/svn/trunk/childB</connection> 
    <developerConnection>scm:svn:https://svnserver:18080/svn/trunk/childB</developerConnection> 
    <url>https://svnserver:18080/viewvc/trunk/childB</url> 
</scm> 

然后当你运行f ollowing命令: MVN释放:分支-DbranchName = -DupdateBranchVersions =真-DupdateWorkingCopyVersions =真-DreleaseVersion = -DdevelopmentVersion =

所有模块都正确地分支到/支链/与所有版本和SCM属性自动更新

相关问题