小编Jul*_*ves的帖子

如何使用SVN和Maven获取内部版本号?

我使用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>
Run Code Online (Sandbox Code Playgroud)

但是当我打包一个项目时,我有错误:

[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 …
Run Code Online (Sandbox Code Playgroud)

java svn maven buildnumber-maven-plugin

5
推荐指数
1
解决办法
6038
查看次数

标签 统计

buildnumber-maven-plugin ×1

java ×1

maven ×1

svn ×1