ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: how to read an environment var in a property file
Date Wed, 09 Mar 2005 16:06:25 GMT
You have to read the ENV before the prop file:

build.properties:
-----------------
test=${ENV.KEY}-Text


build.xml
---------
<project>
  <property environment="ENV"/>
  <property file="build.properties"/>
  <echo>${test}</echo>
</project>


test 
----
C:\TEMP\xx>set KEY=Hello

C:\TEMP\xx>ant
Buildfile: build.xml
     [echo] Hello-Text

BUILD SUCCESSFUL



Jan

-----Ursprüngliche Nachricht-----
Von: Markus Innerebner [mailto:markus.innerebner@wuerth-phoenix.com]
Gesendet am: Mittwoch, 9. März 2005 17:01
An: user@ant.apache.org
Betreff: how to read an environment var in a property file

Hello to all

is it possible to do following in a property file:


aPropertyItem    = ${ENV_VARIABLE}/var

when I am trying to use it later in a ant file, I am not able 
to see the 
content of this property item.
I also tried to do it with:

aPropertyItem    = ${env.ENV_VARIABLE}/var

thanks for helping me

-- 
best regards

Würth Phoenix S.r.l.
Markus Innerebner
ZEUS Developer
Via Kravogl 4
I-39100 Bolzano
Phone: +39 0471 / 564076
Fax: +39 0471 / 564062
E-Mail: markus.innerebner@wuerth-phoenix.com
Website: http://www.wuerth-phoenix.com

pub  1024D/0E45CE6D 2004-09-28 markusin 
<markus.innerebner@wuerth-phoenix.com>
Key fingerprint = 5E12 A775 B742 274B ABFB  DCE8 ED90 806E 0E45 CE6D


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message