Olivier Prouvost <[EMAIL PROTECTED]> wrote:
> I'm trying to get the 'HOME' environment variable with ant, using
> linux and windows.
> <property name='HOME' environment="Linux" value="Linux.HOME"/> ???
> Does not work.
No, Linux is a prefix to the name of the properties created from your
environment variables. All environment variables will be transformed
into properties at once
<project default="test" basedir=".">
<target name="test">
<property environment="Linux" />
<echo message="${Linux.HOME}" />
</target>
</project>
works:
bodewig@bodewig ~/jakarta/jakarta-ant >ant -f /tmp/env.xml
Buildfile: /tmp/env.xml
test:
[echo] /home/bodewig
BUILD SUCCESSFUL
Total time: 2 seconds
Stefan