1

「childA」と「ChildB」の 2 つの子を持つ「parent」という名前のモジュールがあるとします。

私が走れば

mvn release:branch -DbranchName=my-branch

「親」フォルダーでは、2 つの子モジュールなしで、親モジュール コードを SVN /branches/my-branch に分岐します。

release:branch で親モジュールとそのすべての子モジュールを分岐させたい

  • /branches/my-branch/parent
  • /branches/my-branch/childA
  • /branches/my-branch/childB

ドキュメントにはまだ解決策が見つかりませんでした:

実現可能ですか?

助けていただければ幸いです、ありがとう

フレッド

4

1 に答える 1

2

解決策を見つけました。

モジュールが階層的に構成されている場合、それは機能します:

/トランク/親 /トランク/親/子A /トランク/親/子B

ただし、SCM パラメータが 100% 正しいことを確認する必要があります。

すなわち:

/トランク/親/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>

/trunk/parent/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>

次に、次のコマンドを実行すると: mvn release:branch -DbranchName= -DupdateBranchVersions=true -DupdateWorkingCopyVersions=true -DreleaseVersion= -DdevelopmentVersion=

すべてのモジュールが /branches/ に正しく分岐され、すべてのバージョンと SCM プロパティが自動的に更新されます

于 2011-06-16T05:42:03.040 に答える