ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Smith <>
Subject Re: Environment Variables
Date Wed, 11 Oct 2000 13:25:49 GMT
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
What are the environment variables for?&nbsp; If they are 'locational'
(i.e. PROJECT_HOME=/home/mydir/myproject), one thing to consider is using
a java properties file.&nbsp; Ant will expand all ${varialbe_name} refernces
when a properties file is read in. &nbsp;For example, my properties file
looks something like this:
<p>In my build.xml file, I have two lines like the following:
<p>&lt;property name="home.dir" value="${user.dir}">
<br>&lt;property file="${home.dir}/properties/}">
<p>When the file is read, all references to ${home.dir}
are expanded to ${user.dir}, which is a Java runtime property.&nbsp; The
only problem is the user needs to be in the same directory as the xml file,
but how many people compile via 'ant /home/mydir/myproject/build.xml'?
<p>Hope this helps,
"Sometimes I wish I could be you, just so I could be friends with me."
-- Agelica Pickles</pre>

View raw message