ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinar Bicioglu <p.bicio...@CustomerDialogue.com>
Subject RE: FW: Can't find the files
Date Fri, 06 Apr 2001 19:29:56 GMT


-----Original Message-----
From: Nico Seessle [mailto:nico@apache.org]
Sent: Friday, April 06, 2001 3:19 PM
To: ant-user@jakarta.apache.org
Subject: Re: FW: Can't find the files


----- Original Message -----
From: "Pinar Bicioglu" <p.bicioglu@CustomerDialogue.com>
To: <ant-user@jakarta.apache.org>
Sent: Friday, April 06, 2001 7:41 PM
Subject: RE: FW: Can't find the files


> Everything is working fine now. But I have a question about setting them
as
> an enviroment variables. How do we do that ? And can we solve this problem

You can do that in the following way:

1) set the environment variable
C:\> set MY_VAR=Test

What the "Test" would be in my case ? The apth of my files?

2) Tell Ant to read in your environment
Place a line like

<property environment="prefix"/>

The name "prefix" is standard right ?

in your build.xml in a place which is executed before you use these
variables

3) Use them
If you followed the example you should have a property prefix.MY_VAR which
can be used for example with the echo-task

<echo message="${prefix.MY_VAR}"/>

4) Done.

So before I use the variables I should have these two lines below.

<property environment="prefix"/>
<echo message="${prefix.MY_VAR}"/>


Mime
View raw message