You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Arik Kfir <ar...@gmail.com> on 2006/04/22 18:20:10 UTC

Using properties in settings.xml

Hi,

I'm trying to deploy my maven site to a server (using "mvn site
site:deploy"), with private-key authentication. My settings.xml has a
<server> definition, like this:
        <server>
            <id>myserver</id>
            <privateKey>${user.home}/.ssh/id_dsa</privateKey>
        </server>

Note the "${user.home}" property.

The wagon-ssh does not interpolate the "${user.home}" property, and actually
tries to locate the private key at the path "${user.home}/.ssh/id_dsa" - I
know this for certain because I've added debug statements in the wagon-ssh
provider. I don't think it's a wagon issue, but rather, the
settings.xmlparser needs to do this, and pass the interpolated value
on to wagon.

This definitly looks like a bug to me, but I wanted to make sure before I
post a JIRA - could anyone confirm this please? I've also tried using the
"~" instead of the ${...} property, but to no avail.

I've also created a small patch that resolves that property (only user.home),
which of course is not the ideal solution (as I said, I think it should be
interpolated during the settings.xml parsing, rather inside wagon) but I
lack to knowledge to really do it properly - if one of the maven devs could
point me in the right direction, I'd be happy to implement a real patch that
actually solves this problem...

______________________________________
Cheers,
      Arik Kfir                                   arikkfir@gmail.com
      Linux user, number 415067 - http://counter.li.org/
      http://corleon.dnsalias.org