Maven release:prepare 没有改变 <tag>

Maven release:prepare doesn't change <tag>

我正在使用 mvn release:prepare 来增加我项目的版本号。我的 pom.xml 中有以下内容:

<scm>
    <connection>scm:git:code.stuff.com/scm/project/repo.git</connection>
    <developerConnection>scm:git:ssh://git@code.stuff.com:7999/project/repo.git</developerConnection>
    <tag>HEAD</tag>
</scm>

当我 运行 release:prepare 时,一切似乎都正常,但标记的提交在 POM 中仍然有 <tag>HEAD</tab>。这不是应该改为 git 标签吗?我还在输出开头附近看到一条消息:[INFO] Not generating release POMs

我是不是做错了什么?

我正在使用 Maven 3.3.3。

我一直在使用包含版本的 maven-plugin-release。当我按照文档中的描述将明确的版本号添加到 pom.xml 时:

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
      </plugin>
    </plugins>
    ...
  </build>

这解决了问题。我的理论是它与未正确读取 git 的输出有关。