title: Maven release plugin not using configured username
body: <p>I am using maven-release-plugin:2.5.1.  I need to configure it to connect to SVN using public/private key authentication.  I'm having problems getting the configuration to use the correct username when attempting the SSH connection to SVN.</p>
  
  <p>My deploy-settings.xml <code>&lt;server&gt;</code> config looks like:</p>
  
  <pre><code>&lt;server&gt;
    &lt;id&gt;my.server.org&lt;/id&gt;
    &lt;username&gt;[XXXX]&lt;/username&gt;
    &lt;privateKey&gt;/home/[YYYY]/.ssh/id_rsa&lt;/privateKey&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>My pom.xml <code>&lt;scm&gt;</code> config looks like:</p>
  
  <pre><code>scm:svn:svn+ssh://my.server.org/data1/svns_zzzz/zzzz/path/to/the/project/trunk
  </code></pre>
  
  <p>My <code>mvn</code> command line looks like:</p>
  
  <pre><code>--batch-mode  release:clean release:prepare release:perform  
  -s /home/[YYYY]/.m2/deploy-settings.xml 
  -Dsettings.security=/home/[YYYY]/.m2/master-settings.xml 
  </code></pre>
  
  <p>When I tried the above configuration it failed.  It could not commit the modified POM file to SVN.  To help debug this problem, I set the following environment variable:</p>
  
  <pre><code>SVN_SSH="ssh -vvv"
  </code></pre>
  
  <p>When I did this, I saw in the debug statements too many authentication failures with a username other than the <code>[XXXX]</code> username defined in the <code>&lt;server&gt;</code> tag.</p>
  
  <p>So then I tried to specify the username in the command line:</p>
  
  <pre><code>--batch-mode -Dusername=[XXXX] release:clean release:prepare release:perform...
  </code></pre>
  
  <p>That didn't work.</p>
  
  <p>So then I tried to specify the username in the POM:</p>
  
  <pre><code>scm:svn:svn+ssh://[XXXX]@my.server.org/data1/svns_zzzz/zzzz/path/to/the/project/trunk
  </code></pre>
  
  <p>That didn't work either.</p>
  
  <p>To debug and verify my <code>[XXXX]</code> username and <code>/home/[YYYY]/.ssh/id_rsa</code> key did in fact work, I added them to the environment variable:</p>
  
  <pre><code>SVN_SSH="ssh -vvv -l [XXXX] -i /home/[YYYY]/.ssh/id_rsa"
  </code></pre>
  
  <p>After setting the environment variable like this, it worked.  The release plugin was able to successfully commit the modified POM file to SVN.  So I know the username and password work.  </p>
  
  <p>So now the question is what is wrong with my Maven configuration?  Setting the SVN_SSH environment variable helped diagnose the problem, and provides a work-around but I don't want to leave it as a long-term solution.</p>
  
  <p>Any thoughts?</p>