ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Michael" <Michael_Br...@jdedwards.com>
Subject RE: dynamic properties
Date Tue, 21 May 2002 20:19:10 GMT
I don't know if this is useful for you, but I did utilize one of the
properties I saw when I ran with -debug.  If you run your project with the
-debug setting you will see all that gets loaded and set as a part of ant.
The two useful properties for me were:
Setting project property: os.name -> Windows 2000
....
Setting project property: env.OS -> Windows_NT
...

I then used the condition:
<!-- set company.onos400 to true  -->
	  <condition property="company.osrunning" value="onAS400">
	    	<equals arg1="${os.name}" arg2="OS/400"/>
  	  </condition>

to set my os value.  I think some of your suggestions will help me design a
better end solution, but for now this works well for me.

Hope this helps....

MB


-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Tuesday, May 21, 2002 1:42 PM
To: 'Ant Users List'
Subject: RE: dynamic properties


I don't know, you tell me ;-)

This ANT idiom of loading platform-specific properties is common enough that
a little build-in support for it would be nice... Erik and I both posted it
at the same time, so it *has* to be common enough!

All that would be needed in fact is:

<property file="build-win32.properties"
          os="Windows NT, Windows 2000" />

<property file="build-unix.properties"
          os="unix1, unix2, whatever" />

but I know, I know <property> is already *so* overloaded. The construct
above would nonetheless support this idiom *so* conveniently. --DD

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Tuesday, May 21, 2002 2:33 PM
To: ant-user@jakarta.apache.org
Subject: Re: dynamic properties

On Tue, 21 May 2002, Dominique Devienne <DDevienne@lgc.com> wrote:

> It would be nice to be able to access an os.family property direclty
> instead of having to do multiple <condition>s though...

What would it's value be for Windows 95 (windows, dos, win9x)?  For
MacOS X (mac, unix)?

Stefan

--
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>

--
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