Java – Maven svn: E215004: Authentication failed and interactive prompting is disabled; see the –force-interactive option

eclipsejavamavensvntortoisesvn

When I try to do a mvn release: perform, I get this error

[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
svn: E215004: Commit failed (details follow):
svn: E215004: No more credentials or we tried too many times.
Authentication failed
svn: E215004: Additional errors:
svn: E215004: No more credentials or we tried too many times.
Authentication failed

So I thought something maybe wrong with my pom. So I tried doing

mvn scm:checkin -Dmessage="relase" -Dusername=<username> -Dpassword=<password>.

I have the scm related section in pom in this manner:

<scm>
  <url>url</url> 
  <connection>scm:svn:url</connection> 
  <developerConnection>scm:svn:url</developerConnection>

  </scm>

But I still get the same error.

I have subclipse installed in eclipse. I have collabnet and tortoise SVN installed on my machine. All are 1.8.1 version. When I try to checkin directly from eclipse using Team–> Commit, I am able to commit using the same credentials. Also I am able to commit using the same credentials from TortoiseSVN. But using the same credentials I am not able to release perform or scm checkin from maven. I saw some links which talk about ${user.home}.scm\svn-settings.xml where we can configure interactive svn. But I do not see it on my machine. I do not see the .scm folder itself. Am I doing anything wrong here?

These are software that I installed in eclipse

Collabnet merge client -4.0.2
Subclipse- 1.10.4
Subclipse client adapter -1.10.1
Subversion JavaHL native library adapter- 1.8.8.1

Best Answer

The only place I've seen this documented is in the Maven release plugin FAQ. You may add a server entry to your POM, then configure the project to use it.

<!-- Project POM, or a corporate parent -->
<properties>
  <project.scm.id>my-scm-server<project.scm.id>
</properties>

<!-- User's settings.xml file -->
<server>
    <id>my-scm-server</id>
    <username>username</username>
    <password>password</password>  <!-- encrypted I hope! -->
</server>

I can't find the reference for this (maybe I looked at the source code), but once upon a time I discovered that if you set the ID to the Subversion host, then the server info will be located by many plugins, including release and scm. It would look like this:

<!-- Project POM, or a corporate parent -->
<properties>
  <project.scm.id>your.subversion.host<project.scm.id>  <!-- note, no scm:svn part -->
</properties>

<!-- User's settings.xml file -->
<server>
    <id>your.subversion.host</id>
    <username>username</username>
    <password>password</password>  <!-- encrypted I hope! -->
</server>
Related Topic