ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doremieux, Olivier" <>
Subject RE: Platform detection
Date Thu, 10 Aug 2000 16:29:04 GMT
This might do the trick but not in All cases.
I think when you are using NT you don't need an AutoExec.bat.
You can boot from another harddrive than C:, so the path can not be hardcode
in the build.xml
Is there someway to use the java properties System.getProperty("os.arch") or
System.getProperty("") from there we have some way to know on which
platform the build.xml is used.

Thank you

-----Original Message-----
From: Stefan Bodewig []
Sent: Thursday, August 10, 2000 8:44 AM
Subject: Re: Platform detection

>>>>> "DO" == Doremieux, Olivier <> writes:

 DO> In my build.xml I want to be able to use it on Multiple
 DO> Plaforms. But depending on the Platform I want to run different
 DO> target.  Let say I want to execute target A & B on Windows and A
 DO> & C on Solaris.  How can I do that?

Maybe we should add an option for this to <available>?


<project ... default="main">
  <target name="check">
    <available value="windows" file="C:\autoexec.bat" />

  <target name="A" depends="check">

  <target name="B" depends="A" if="windows">

  <target name="C" depends="A" unless="windows">

  <target name="main" depends="B,C" />

do the trick?


View raw message