Maven Release Plugin抛出svn:''不是工作副本

时间:2014-03-06 13:47:14

标签: jenkins maven-3 jenkins-plugins maven-release-plugin maven-scm-plugin

我有一个mavenized项目,当我尝试发布时,我得到以下错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4
.2:prepare (default-cli) on project SimpleWeb: Unable to check for local modific
ations
[ERROR] Provider message:
[ERROR] SVN status failed.
[ERROR] Command output:
[ERROR] svn: '' is not a working copy

我有以下问题:

  1. 如何在POM文件中给出scm配置
  2. 如果通过https与scm进行通信,我们如何在客户端配置证书
  3. 发布应该来自分支机构或主干
  4. 我的scm配置如下:

    <scm>
        <connection>scm:svn:https://domain.com/svn/New_FW/CI_POC/SimpleWeb/trunk</connection>
        <developerConnection>scm:svn:https://domain.com/svn/New_FW/CI_POC/SimpleWeb/trunk</developerConnection>
        <url>https://domain.com/svn/New_FW/CI_POC/SimpleWeb/trunk</url>
    </scm>
    

    我的maven发布插件配置如下:

    <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.3</version>
          <configuration>
            <providerImplementations>
              <svn>javasvn</svn>
            </providerImplementations>
            <username>${scm.username}</username>                            
            <password>${scm.password}</password>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
              <artifactId>maven-scm-provider-svnjava</artifactId>
              <version>1.14</version>
            </dependency>
          </dependencies>
    </plugin>            
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.2</version>
        <dependencies>
            <dependency>    
            <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
            <artifactId>maven-scm-provider-svnjava</artifactId>
            <version>1.6</version>
            </dependency>
        </dependencies>
        <configuration>
            <providerImplementations>
                <svn>javasvn</svn>
            </providerImplementations>
            <tagBase>https://domain-inc.com/svn/New_FW/CI_POC/SimpleWeb/tags</tagBase>
            <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
    </plugin>
    

    我被击中了,无法前进。请帮助/指导我解决问题。当我通过在Jenkins中配置Maven Release Plugin来运行相同的操作时,我得到一个不同的错误:“svn:Authentication required”。为什么会有这种差异。

1 个答案:

答案 0 :(得分:1)

在Windows Jenkins slave上我遇到了与multi maven项目相同的问题。 为了解决这个问题,我补充说:

...
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    ...
    <configuration>
        <commitByProject>true</commitByProject>
        ...
    </configuration>
...