svn - Maven release plugin not using configured username -
i using maven-release-plugin:2.5.1. need configure connect svn using public/private key authentication. i'm having problems getting configuration use correct username when attempting ssh connection svn.
my deploy-settings.xml <server>
config looks like:
<server> <id>my.server.org</id> <username>[xxxx]</username> <privatekey>/home/[yyyy]/.ssh/id_rsa</privatekey> </server>
my pom.xml <scm>
config looks like:
scm:svn:svn+ssh://my.server.org/data1/svns_zzzz/zzzz/path/to/the/project/trunk
my mvn
command line looks like:
--batch-mode release:clean release:prepare release:perform -s /home/[yyyy]/.m2/deploy-settings.xml -dsettings.security=/home/[yyyy]/.m2/master-settings.xml
when tried above configuration failed. not commit modified pom file svn. debug problem, set following environment variable:
svn_ssh="ssh -vvv"
when did this, saw in debug statements many authentication failures username other [xxxx]
username defined in <server>
tag.
so tried specify username in command line:
--batch-mode -dusername=[xxxx] release:clean release:prepare release:perform...
that didn't work.
so tried specify username in pom:
scm:svn:svn+ssh://[xxxx]@my.server.org/data1/svns_zzzz/zzzz/path/to/the/project/trunk
that didn't work either.
to debug , verify [xxxx]
username , /home/[yyyy]/.ssh/id_rsa
key did in fact work, added them environment variable:
svn_ssh="ssh -vvv -l [xxxx] -i /home/[yyyy]/.ssh/id_rsa"
after setting environment variable this, worked. release plugin able commit modified pom file svn. know username , password work.
so question wrong maven configuration? setting svn_ssh environment variable helped diagnose problem, , provides work-around don't want leave long-term solution.
any thoughts?
the release plugin forks build, , doesn't pass arguments provide on command line forked process default. try adding this: -darguments="-s /home/[yyyy]/.m2/deploy-settings.xml -dsettings.security=/home/[yyyy]/.m2/master-settings.xml"
(note double quotes) current command line. should pass changes forked processes.
Comments
Post a Comment