Maven SCM

Maven Subversion provider get confused by -Dusername= parameter when doing a release:prepare (Tagging operation)

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: maven-scm-provider-svn
  • Labels:
    None
  • Environment:
    Maven 2.0.9
    Mac OSX
    JDK 1.5.0_13-119
    Using svn+ssh with private/public key authentication
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

I am building from a branch of a project with the SCM URL defined as
<connection>svn+ssh://localhost/example/svn/services/tag-test/branches/1.0.0</connection>

I have not defined <developerConnection>

If I do not pass the -Dusername= parameter
I can successfully do:

  • mvn release:prepare
  • mvn release:perform

However if I set the -Dusername=MYUSERNAME to the same username as I am logged in as the release:prepare step fails with:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: Commit failed (details follow):
svn: Source url 'svn+ssh://localhost/example/svn/services/tag-test/branches/1.0.0' is from different repository

Based on what is committed to svn this appears to be occurring when the release plugin is trying to perform the tagging operation.

NOTE: The command line version of svn (version 1.4.4) also gets confused when passed two urls (one with and one without a username) :

svn copy svn+ssh://localhost/example/... svn+ssh://MY_USERNAME@localhost/example/...
svn: Source and dest appear not to be in the same repository (....

Hence I suspect that in order to fix this issue it will be necessary to consider the source of the copy when building the target URL for the tagging operation.

Activity

Hide
Kristoffer Moum added a comment -

I have the exact same problem. However, I found a workaround as it only plays tricks on me if I specifically state -Dusername. Rather than specifying a username from the command line, I added the following to ~/.ssh/config:

Host my.server.com
User username

(Remember an empty line after username.)

This way, I don't have to specify the username from the command-line and it is not appended to the scm string for any commands.

Show
Kristoffer Moum added a comment - I have the exact same problem. However, I found a workaround as it only plays tricks on me if I specifically state -Dusername. Rather than specifying a username from the command line, I added the following to ~/.ssh/config: Host my.server.com User username (Remember an empty line after username.) This way, I don't have to specify the username from the command-line and it is not appended to the scm string for any commands.

People

Vote (3)
Watch (3)

Dates

  • Created:
    Updated: