Vijay
Vijay

Reputation: 61

Maven Release Plugin throws svn : '' is not a working copy

I have a mavenized project and when I try to do a release, I get the below error:

[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

I have the below questions:

  1. How is the scm configuration is given in POM file
  2. If the communication to scm should happen through https, how can we configure the certificate on the client side
  3. The release should happen from branch or trunk

My scm configuration is as follows:

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

My maven release plugin configuration is as follows:

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

I am struck here and cant move ahead. Please help/guide me in resolving the issue. When I run the same by configuring the Maven Release Plugin in Jenkins I get a different error as: "svn: Authentication required". Why is this difference.

Upvotes: 2

Views: 1891

Answers (1)

burtsevyg
burtsevyg

Reputation: 4076

On Windows Jenkins slave I have same issue with multi maven project. For fix it I added:

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

Upvotes: 1

Related Questions