ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Smith <dan.sm...@globalone.net>
Subject Re: Environment Variables
Date Wed, 11 Oct 2000 13:25:49 GMT
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
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>src.dir=${home.dir}/src
<br>build.dir=${home.dir}/build
<br>docs.dir=${home.dir}/docs
<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/build.properties}">
<p>When the build.properties 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,
<br>Dan
<pre>--&nbsp;
"Sometimes I wish I could be you, just so I could be friends with me."
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-- Agelica Pickles</pre>
&nbsp;</html>


Mime
View raw message