Maven pom.xml,SCM和发布

Bli*_*1eg 6 release pom.xml maven maven-release-plugin

我想做一个mvn版本:准备,将从版本中删除"-SNAPSHOT"并在SVN中标记它.

我在pom.xml中有这些设置:

<scm>
  <connection>scm:svn:http://subversion.local:3690/svn/projects/x/trunk</connection>
  <developerConnection>scm:svn:http://subversion.local:3690/svn/projects/x/tags</developerConnection>
  <url>scm:svn:http://subversion.loi.local:3690/svn/projects/x/tags</url>
 </scm>
Run Code Online (Sandbox Code Playgroud)

但这些并不像我想要的那样.相反,它会从/标签中获取所有内容,并在/标签下重新标记它.

再一次,我想要的,从HEAD中取出"-SNAPSHOT"并将其标记在/ tags下

MaD*_*aDa 6

<scm>标签表示只读连接配置("连接"元素),读写连接("developerConnection"),并公开显示的网址.它与标记没有任何关系.在小型本地网络中,这3个参数通常是相同的.

对于标记库,您需要配置发布插件:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <configuration>
        <tagBase>scm:svn:http://subversion.local:3690/svn/projects/x/tags</tagBase>
        <autoVersionSubmodules>true</autoVersionSubmodules>
    </configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)