我使用buildnumber-maven-plugin
并且我需要从 svn 获取项目的内部版本号。我的 pom.xml:
<scm>
<connection>
scm:svn:https://username:password@path_to_repositiry
</connection>
</scm>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<providerImplementations>
<svn>javasvn</svn>
</providerImplementations>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>1.7.4-v1</version>
</dependency>
</dependencies>
</plugin>
但是我有错误,当我打包一个项目时:
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.1:create (default)on project myproject: Cannot get the revision information from the scm repository : [ERROR] Exception while executing SCM command. svn: E155021: This client is too old to work with the working copy at [ERROR] 'D:\projects\myproject' (format {1}).
虽然我使用的是 TortoiseSVN 1.8.2!
我读到buildnumber-maven-plugin
TortoiseSVN 1.7 及更早版本的行为如此。如何使用 SVN 和 Maven 获取内部版本号?