Jenkins with Subversion

蹲街弑〆低调 提交于 2020-01-16 05:12:04

问题


/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.

Jenkins could not find Subversion even though the "Subversion Plugin" is already installed.


回答1:


The reason for this error is that you have to define explicitly in the pom.xml that the maven-release-plugin should use svnkit.

Here's how:

<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>



回答2:


You need to install subversion in your machine. If your OS is Centos you can run

yum install subversion



来源:https://stackoverflow.com/questions/16897288/jenkins-with-subversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!