svn - 如何获取maven版本:prepare to put tagged release in tags folder?

标签 svn maven maven-2 maven-release-plugin

我的项目的存储库设置了标准结构 - 分支/标签/主干。我的项目源代码存储在/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:

  1. Verify that there are no uncommitted changes in the workspace.
  2. Prompt the user for the desired tag, release and development version names.
  3. Modify and commit release information into the pom.xml file.
  4. 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/

相关文章:

svn - scons 支持 subversion checkout 吗?

java - Maven 3.3.1 ECLIPSE : -Dmaven. multiModuleProjectDirectory 系统属性未设置

java - 将参数添加到从命令行调用的 Maven Enforcer Rules

java - Spring-Flex 1.5 示例可以工作吗?

git - svn 到 git 迁移后 trunk 与 master 分支的区别

svn - 如何通过FTP将多个多级(不同层次)文件从本地版本覆盖到在线版本

java - 如何在Eclipse中查看maven项目的web内容

java - 让 Nexus 从没有 .index 文件的存储库下载依赖项

macos - SVN 无法在全新的 Mac OSX 安装上运行

java - 设置 Mavens Java 版本