ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vineet Chaoji <>
Subject RE: Control statements in Ant
Date Mon, 01 Jul 2002 21:40:44 GMT
Thanks for the reply Martin.
Apart from detecting the OS, I want to set a property(variable) based on the
OS. Is there some way I can do that in ant?
Its like an if-else statement.

-----Original Message-----
From: Martin Gainty []
Sent: Monday, July 01, 2002 2:34 PM
Subject: Re: Control statements in Ant


The output from project.class is "Detected OS" if you can access the
source and twiddle 
it as a detection alogorithm for Type of OS you should have a solution that

Also you might want to read for existence of environment variables such as 
winbootdir or windir..Obviously if they are present then you are running on
NT or 2K..
Good Luck,

Martin Gainty


Software Engineer:
(see Unemployed American)
>I want to do the following in ant: 
> if(operating system is windows) { 
> os = "win"; 
> } else { 
> os = "other"; 
> } 
> Can I do this in ant? 
> Can properties once defined(initialized) in Ant be assigned another value 
>based on some conditional evaluation? 
>To unsubscribe, e-mail: 
>For additional commands, e-mail: 


MSN Photos is the easiest way to share and print your photos: Click
<> Here

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

View raw message