ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninju Bohra <ninju_bo...@yahoo.com>
Subject Re: Access to OS environment variables?
Date Fri, 16 Dec 2005 21:14:57 GMT
Take a look at the <property> task with the environment="env" attribute to allow to access
the OS enviroment variables as ANT properties
You should be able to do the following
 
<property environment="env"/>
<echo message="FOP_HOME value is ${env.FOP_NAME}"/>
 
Note the names of the created properties will be case-sensitive to the name of the OS environment
variables.
 
later,
 
Ninju
 


----- Original Message ----
From: cknell@onebox.com
To: user@ant.apache.org
Sent: Friday, December 16, 2005 3:07:43 PM
Subject: Access to OS environment variables?


Am I just looking in the wrong place, or is there no way to read or capture the value of an
operating system environment variable from within an ant build file. For example. I would
like to use the fop task, but in order to do so I must create a property named "fop.dir" and
 enter the path to my fop .jar files. Since I already have an FOP_HOME environment variable,
I'd like to extract the value of that from the OS and place it "value" attribute of the aforementioned
property element.

-- 
Charles Knell
cknell@onebox.com - email

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

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


Mime
View raw message