My project architecture is like this:
--Parent
--Submodule1
--Submodule2
--pom.xml(main)
Parent is the project which hold all maven plugins configuration, librairies version etc. It’s the parent of all project which is the parent of all submodules.
I configure plugin in pom.xml(main),like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<tagBase>svn://192.168.5.213/hxbos/hxecp-src/tags/hxbos</tagBase>
<branchBase>svn://192.168.5.213/hxbos/hxecp-src/branches/hxbos</branchBase>
<remotetagging>true</remotetagging>
<checkModificationExcludes>
<checkModificationExclude>**/*.log</checkModificationExclude>
<checkModificationExclude>**/*.jar</checkModificationExclude>
<checkModificationExclude>**/system*</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
and this is my scm info:
<scm>
<connection>scm:svn:svn://192.168.5.213/hxbos/hxecp-src/trunk/hxbos</connection>
<developerConnection>scm:svn:svn://192.168.5.213/hxbos/hxecp-src/trunk/hxbos</developerConnection>
<url>scm:svn:svn://192.168.5.213/hxbos/hxecp-src/trunk/hxbos</url>
</scm>
but when I use:mvn release:prepare,an error occurs:
The svn tag command failed.
Command output:
svn: “svn://192.168.5.213/hxbos/hxecp-src/trunk/hxbos” does not exist in
revision 0.
why is revision 0?
Here are a few things to check:
My SCM URLs look something like this:
scm:svn:https://subversion.company.com/svn/maven/trunk/corporate-parent
Note the
httpspart; you showscm:svn:svn, not sure how that works.One place that has tripped me up before: I checked out an existing project using an https protocol but the POM had ‘http’ in its SCM connection block. The mismatch caused problems at release time. So, make the protocol you used for the checkout match the SCM connection in the POM. If you did
svn checkout http://192.168.5.213/hxbos/hxecp-src/trunk/hxbosthen your SCM block should look something like this:
If you are doing a multi-module build, define SCM blocks in all your POMs, don’t let them be inherited from the parent POM.
Last but not least, make sure you are using the latest version of the release plugin.
EDIT: use the http: or https: (whichever you used to perform the original checkout) in the tagBase and branchBase URLs too. I notice that you have the “svn:” prefix in those URLs. The docs for
tagBasesay “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.”