You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Torsten Curdt <tc...@apache.org> on 2005/07/25 16:06:22 UTC

environment variables inside project.properties

I would like to use maven for deploying snapshots
via scp. So've inserted this snippet:

  maven.repo.remote=http://server:9999/repository
  maven.repo.list=my.snapshots
  maven.repo.managesoft.snapshots=scp://server
  maven.repo.managesoft.snapshots.directory=/var/lib/maven-repository/
  maven.repo.managesoft.snapshots.username=tcurdt
  maven.repo.managesoft.snapshots.privatekey=/home/tcurdt/.ssh/id_dsa

All working fine ...but as you can see my userid
and the home directory are hardcoded. Is there any
kind of environment variable substitution mechanism
available inside the project properties?

  maven.repo.managesoft.snapshots.username={user}
  maven.repo.managesoft.snapshots.privatekey={home}/.ssh/id_dsa

...I fear otherwise I would have to pass in the
settings via -D commandline switch.

cheers
--
Torsten

Re: environment variables inside project.properties

Posted by Brett Porter <br...@gmail.com>.
Only system properties, but that covers what you need:

${user.home} = $HOME
${user.name} = $USER / $LOGNAME

HTH,
Brett

On 7/26/05, Torsten Curdt <tc...@apache.org> wrote:
> I would like to use maven for deploying snapshots
> via scp. So've inserted this snippet:
> 
>   maven.repo.remote=http://server:9999/repository
>   maven.repo.list=my.snapshots
>   maven.repo.managesoft.snapshots=scp://server
>   maven.repo.managesoft.snapshots.directory=/var/lib/maven-repository/
>   maven.repo.managesoft.snapshots.username=tcurdt
>   maven.repo.managesoft.snapshots.privatekey=/home/tcurdt/.ssh/id_dsa
> 
> All working fine ...but as you can see my userid
> and the home directory are hardcoded. Is there any
> kind of environment variable substitution mechanism
> available inside the project properties?
> 
>   maven.repo.managesoft.snapshots.username={user}
>   maven.repo.managesoft.snapshots.privatekey={home}/.ssh/id_dsa
> 
> ...I fear otherwise I would have to pass in the
> settings via -D commandline switch.
> 
> cheers
> --
> Torsten
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org