ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Wood <>
Subject A question about "available" and doing conditionals in a build xml file.
Date Wed, 17 May 2000 14:52:40 GMT
I don't seem to find much in the documentation
on the use of properties set by 'available' to
do conditional things in the ".xml" file.

For example, while it's not in the documentation I've
read, I see in the ant build.xml (browsing the repository...)
that there is an 'exclude unless="xxx.present"' . Well, I never
saw "unless" in any of the documentation....

I wanted to run a java application via the "java" task, 
conditional upon a property that checks to see
if a file is present. So I tried adding "unless"
in my call to the java task. Ant didn't like it.

So, I guess my question becomes this - for which tasks
is "unless" recognized? Is there a plan to add
"unless" to all the tasks?

Is there some other way of doing conditionals within
a build xml file? For example, I'm building a
target to bundle up the files for a distribution,
and on Unix I need to copy some "sh" files into
the 'bin' directory, but on windows I need to
copy some "bat" files into the bin directory.
So, I want to have two copies, each conditional
on the operating system...



View raw message