ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Unix Home set in Build.xml
Date Mon, 11 May 2009 05:12:53 GMT
>I want to set one properties HOMEDIR in build.xml which will 
>be set through user logged in the current system..
>
>How to read Unix home directory and put that value in build.xml

You could access all Java system properties directly via ${name}, e.g.
${user.name}, ${user.dir}, ${user.home}, ...

You could read environment properties and use them
  <properties environment="env"/>
  ${env.ENVIRONMENT_VARIABLE}
e.g.
  ${env.USERPROFILE}, ${env.USERNAME}, ${env.PATH}

You could pass properties during Ants start
  ant -Dname=value -Danothername=anothervalue

Also you Ant could ask for input
  <input addproperty="foo"/>
  ${foo}


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message