ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guthrie, John" <JGuth...@air.org>
Subject RE: Make to Ant
Date Thu, 04 Apr 2002 15:51:17 GMT
Building on this reply, you could put all your properties in your build root
directory in a property file, e.g. build.properties:

DATAJAR=${user.home}/jar/uts/Company-V1.0.jar
PERLDIR=${build.topdir}/bin
 ...

Then add the following line to any build.xml in your hierarchy to have the
variables set

<property file="${build.topdir}/build.properties" />

Then start ant with (as stated below):
  ant mytarget -Dbuild.topdir=.

---
john guthrie
american institutes for research
wash dc


-----Original Message-----
From: stephan beal [mailto:stephan@wanderinghorse.net]
Sent: Thursday, April 04, 2002 4:16 AM
To: Ant Users List
Subject: Re: Make to Ant


On Thursday 04 April 2002 06:35 am, Abhay Kulkarni wrote:
> i am facing the problem about the environment variables
> acually i want to convert make file to xml file
> the make file looks like this
>...
> so i am not understanding  how to set those HOME ,BROOT variables
> externally or i'll have to hardcode it in every xml file

$(HOME) is available via a standard Java var ${user.home}.
The rest you set in your build file or a property file, or pass it in 
from the command line:

Property file:

  build.topdir = .

build.xml:

  <property name="build.topdir" value="."/>

command line:

  ant mytarget -Dbuild.topdir=.
(i think that's the syntax)


----- stephan
Generic Unix Computer Guy
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"...control is a degree of inhibition, and a system which is perfectly
inhibited is completely frozen." -- Alan W. Watts

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

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


Mime
View raw message