I have following project structure:
In the pom.xml of framework-parent-pom I have defined following plugin:
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<branchBase>http://.../svn/REPO/branches/framework</branchBase>
<tagBase>http://.../svn/REPO/tags/releases/framework</tagBase>
<tagNameFormat>release-@{project.version}</tagNameFormat>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
And following SCM:
<scm>
<developerConnection>scm:svn:http://.../svn/REPO/trunk/framework/framework-parent-pom</developerConnection>
</scm>
When I run following command...
mvn release:prepare -DautoVersionSubmodules=true -Darguments="-DskipTests" -Dresume=false
...everything seems to go well.
Locally the JAR's with the release version were created and the POM's are nicely updated to the next SNAPSHOT version. Also in SVN, at first sight it seems ok. The tag has been created with all the framework projects inside it.
However, when looking at the POM's of the tag I see that they still have the initial snapshot version as version. This then of course causes the perform step to build the snapshot version and not the release version.
What am I doing wrong?
I find the workaround in the maven-release-plugin issue tracker MRELEASE-812 :
In my case the change was :
<plugin>
<artifactId>maven-release-plugin</artifactId>
- <version>2.2.2</version>
+ <version>2.4.1</version>
<configuration>
<releaseProfiles>release</releaseProfiles>
<goals>install animal-sniffer:check deploy site</goals>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-api</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-gitexe</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ </dependencies>
</plugin>