ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Varsoke <jvars...@yahoo.com>
Subject Env Properties & Linux?
Date Sun, 13 Jul 2003 21:35:54 GMT
I'm trying to get access to the system environment properties on Linux
(Specifically SuSE 8.2).  I mention this because the manual states that
this tag doesn't work for all platforms -- though I'd be surprised if
Linux was such a platform.  Anyway here's my test build.xml

<project name="env" default="debug">

   <!-- tasks -->
   <target name="debug">
   <property environment="env"/>
   <property name="junit.home"        value="${env.JUNIT_HOME}"/>
   <echo message="Number of Processors = ${env.NUMBER_OF_PROCESSORS}"/>
   <echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>
   <echo message="${junit.home}"/>
   <echo message="${env.JUNIT_HOME}"/>
   </target>
</project>

And here's what I get as a result (with the -v param)

sancho% ant -v
Apache Ant version 1.5.3 compiled on April 16 2003
Buildfile: build.xml
Detected Java version: 1.4 in: /usr/local/j2sdk1.4.1_02/jre
Detected OS: Linux
parsing buildfile build.xml with URI =
file:/home/jvarsoke/src/java/test/ant/build.xml
Project base dir set to: /home/jvarsoke/src/java/test/ant
Build sequence for target `debug' is [debug]
Complete build sequence is [debug]

debug:
 [property] Loading Environment env.
Property ${env.JUNIT_HOME} has not been set
Property ${env.NUMBER_OF_PROCESSORS} has not been set
     [echo] Number of Processors = ${env.NUMBER_OF_PROCESSORS}
Property ${env.ANT_HOME} has not been set
     [echo] ANT_HOME is set to = ${env.ANT_HOME}
     [echo] ${env.JUNIT_HOME}
Property ${env.JUNIT_HOME} has not been set
     [echo] ${env.JUNIT_HOME}

BUILD SUCCESSFUL
Total time: 6 seconds

Do I have Ant configured wrong or something?

thanks for the help,
-jason


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Mime
View raw message