ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Cepek" <>
Subject different O/S names
Date Fri, 19 Jul 2002 15:18:14 GMT
mc> Extra Credit:  Anyone know why <exec> and <condition>
mc> use two different sets of names for O/Ses?  I know
mc> THAT they do; I'm curious about WHY...

dh> I don't think they do -- not for 'name', anyway.
dh> (You're welcome to prove me wrong, though.)

>From the Ant 1.4 and 1.5 docs, <exec os=...> values (note plural) are
documented as:  "list of Operating Systems on which the command may be
executed. If the current OS's name is contained in this list, the
command will be executed. The OS's name is determined by the Java
Virtual machine and is set in the "" system property."

Names like "Linux" and "Windows 2000" work here.

>From the Ant 1.4 docs, the <condition> <os family=...> value (note
singular) is documented as: "The name of the operating system family to
expect... Supported values for the family attribute are: windows...
dos... mac... unix"

So as of 1.4, they were different.

I see now that 1.5 has fixed this inconsistency by redefining
<condition> <os family=...> to match the <exec os=...>, and creating
<condition> <os name=...> to allow more precise O/S name matching.

Perhaps this O/S stuff could be abstracted out to allow their use
consistently in both <condition> and <exec>?  (Yeah, I know, whine whine
whine :-)

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message