ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Locke <j...@muppetlabs.com>
Subject Re: Env Properties & Linux?
Date Sun, 13 Jul 2003 22:44:59 GMT

interesting... how does ant get environment variables...?
the only thing i can think of is that it must call System.exec
and then parse the output of some system-dependent utility
whatever it is, it certainly would limit portability.

Eric Lennon Bowman wrote:

> Jason Varsoke wrote:
>
>> 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>
>>
>> Do I have Ant configured wrong or something?
>
>
> You might try moving the <property environment="env"/> out to "global 
> scope".
>
> I use this functionality all the time...it definitely works.
>
>


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


Mime
View raw message