Reputation: 9876
I am using mvn release:prepare
to bump version numbers on my project. I have the following in my pom.xml:
<scm>
<connection>scm:git:code.stuff.com/scm/project/repo.git</connection>
<developerConnection>scm:git:ssh://[email protected]:7999/project/repo.git</developerConnection>
<tag>HEAD</tag>
</scm>
When I run release:prepare
, everything seems to work, but the tagged commit still has <tag>HEAD</tab>
in the POM. Isn't this supposed to be changed to the git tag? I also see a message near the beginning of the output: [INFO] Not generating release POMs
.
Am I doing something wrong?
I am using Maven 3.3.3.
Upvotes: 3
Views: 1718
Reputation: 9876
I had been using the included version of maven-plugin-release. When I added an explicit version number to the pom.xml as described in the documentation:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
...
</build>
This fixed the problem. My theory is that it had something to do with not reading git's output correctly.
Upvotes: 4