我的项目的存储库设置了标准结构 - 分支/标签/主干。我的项目源代码存储在/trunk 中。
我的 pom.xml 文件中的 scm 配置如下:
<scm>
<url>https://repourl/trunk/scs-global-parent</url>
<connection>scm:svn:https://repourl/trunk/scs-global-parent</connection>
<developerConnection>scm:svn:https://repourl/trunk/scs-global-parent</developerConnection>
<tag>head</tag>
</scm>
当maven release:prepare标记一个release时,它会被放入我的后备箱中吗?它“知道”标签文件夹吗?我需要调整我的 scm 配置吗?谢谢!
最佳答案
根据user guide :
The release:prepare goal will:
- Verify that there are no uncommitted changes in the workspace.
- Prompt the user for the desired tag, release and development version names.
- Modify and commit release information into the pom.xml file.
- Tag the entire project source tree with the new tag name.
您的 scm 设置足够了。如果您遵循标准 SVN 命名约定 (trunk/tags/branches),mvn release:prepare
将了解您的标签 URL 位置 https://repourl/tags/
并在此处自动创建一个标签。
如果您使用此约定以外的其他内容,则可以通过 tagBase configuration 指定标签 URL 位置。在 pom.xml 中:
tagBase:
The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.
- 类型: java.lang.String
- 必填:否
- 表达式: ${tagBase}
关于svn - 如何获取maven版本:prepare to put tagged release in tags folder?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9849185/