ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Flegman" <adam.fleg...@astracon.com.au>
Subject Ant and Conditional Expressions1
Date Fri, 04 May 2001 03:39:18 GMT
Hello All,

I am very new to the world of XML and in particular have just discovered Ant

I am was wondering if there was an easy way to create conditional
expressions within the ant xml build files to help control execution of the
build process. (eg to execute a target depending on the value for a given
parameter).


To give a more concrete example:
========================
We have an orb parameter (orb) declared in an external property file which
should have either the value 'orbix' or 'visibroker'.

I have separate targets created to copy the visibroker or orbix files to the
output build area in my project. II would like to branch to the appropriate
task based on the value of the ${orb} parameter.

I notice that targets can have an 'if' argument, but unfortunately this is
only concerned with the existence of a parameter whereas I am also
interested in the value of a parameter


Any ideas would be greatly appreciated.



As an aside any information resources for tutorials and more complete ant
reference documentation would also be received with much thanks.

The documentation that ships with the ant product is a great start but is
frustrating in some aspects - eg: no keyword reference just in case you were
looking for the role of 'unless', and often ant attributes that have fixed
range of allowable values do not indicated what the range of values are
(true/false, "on/off' etc)..




Cheers,

          Ad.

==========================================================
Adam Flegman - Senior Software Engineer
Astracon (Australia) Pty Ltd
Email:  adam.flegman@astracon.com.au
Phone: (07) 3368 6979,  DID: +617 3368 6979
Fax: (07) 3368 6999
PO Box 1656,
Milton   4064,
Australia.
==========================================================


Mime
View raw message