Jenkins与Subversion

And*_*dis 1 svn hudson svnkit maven-release-plugin jenkins

/bin/sh: svn: command not found
Caused by: org.apache.maven.plugin.MojoFailureException: Unable to check for local modifications
Provider message:
The svn command failed.
Run Code Online (Sandbox Code Playgroud)

即使已经安装了"Subversion插件",Jenkins也找不到Subversion.

And*_*dis 11

出现此错误的原因是您必须在pom.xml中明确定义maven-release-plugin应该使用svnkit.

这是如何做:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
                <goals>clean install</goals>
                <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.5</version>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)