ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: How do you access environment variables ant build.xml files
Date Thu, 25 Mar 2004 14:09:48 GMT
First of all you need <property environment="env"/>
Then you can use ${env.X} for environment variable X.

Hope this helps
Keith


-----Original Message-----
From: Edward Murphy [mailto:EMurphy@betrusted.com]
Sent: 25 March 2004 14:03
To: 'Ant Users List'
Subject: How do you access environment variables ant build.xml files 


Hi,
I am using ant 1.6.1 and want to use environment variables in my build.xml
file to reference jarsigner.exe. I set my JAVA_HOME environment variable to
my downloaded jdk folder. I am using the following in my build.xml file to
reference the JAVA_HOME environment variable <property name="java"
value="${env.JAVA_HOME}"/> and the following to reference "java" 
<exec dir="." executable="${sign}/bin/jarsigner.exe">
 
When I run my build.xml file I get an error 
 
Execute failed: java.io.IOException: CreateProcess:
${env.JAVA_HOME}\bin\jarsigner.exe -
 
I thought I was doing everything correctly, can anyone advise on how to
reference environment variable in ant, thanks 
 
Edward
 

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


Mime
View raw message