【发布时间】:2014-10-19 11:23:35
【问题描述】:
我制作的每个新版本都包含标签,这最终导致了这种结构:
...VersionExperimentation/tags/VersionExperimentation-0.0.7/tags/VersionExperimentation-0.0.6/tags/VersionExperimentation-0.0.5/tags/VersionExperimentation-0.0.4/tags/VersionExperimentation-0.0.3/tags/VersionExperimentation-0.0.2-beta/tags/VersionExperimentation-0.0.2-alpha/src/main/java
我的 POM 如下所示:
<scm>
<developerConnection>scm:svn:https://[..root svn folder]/VersionExperimentation</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>[..root svn folder]/VersionExperimentation/tags</tagBase>
</configuration>
</plugin>
</plugins>
</build>
显然,标签应该在根目录中,而不是在项目所在的 VersionExperimentation 文件夹中,该文件夹在 developerConnection 中定义。
这里的最佳做法是什么?我们是否应该在 SVN 根目录中的某个文件夹中创建一个项目,并在项目文件夹所在的同一路径中添加标签?
喜欢:
./projectFolder
./tagsFolder
DeveloperConnection 将指向 projectFolder 并将发布 tagbase 标签的配置指向 tagsFolder?
这似乎遵循svn book推荐的存储库布局,可以在here找到
$ svn list file:///var/svn/single-project-repo
trunk/
branches/
tags/
如果是,我们应该怎么做,如果我们有项目,不幸的是立即将项目存储在根文件夹中?
我们是否应该创建文件夹,将数据移动到正确的位置并适当地配置 pom,将标签存储在 tags 文件夹中并提交到 trunk/projectFolder?
【问题讨论】: