ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baldry, Scot M" <>
Subject RE: Conditional build?
Date Mon, 11 Jun 2001 14:39:18 GMT
Thanks for you comments - however if, unless and depends are attributes of a
target not a call to ant antfile. The only way I can see of doing this is to
extend the ant task so that it accepts "if" and "unless" attributes.


-----Original Message-----
From: Helliwell, Matthew []
Sent: 11 June 2001 15:10
To: ''
Subject: RE: Conditional build?

Use the "available" to set properties based on files and "depends" to only
build tasks depending on which files you've found existing.

-----Original Message-----
From: Baldry, Scot M []
Sent: 11 June 2001 13:51
To: ''
Subject: Conditional build?


I am trying to find an elegant solution to the following problem:

I am using ANT to build an entire code tree which contains many packages and
sub-projects. I have setup my various build.sml files to work in a cascading

i.e. imagine the following structure

the build build.xml under "com" merely calls the build.xml under "abc". The
build.xml under "abc" calls the build.xml under "mypackage1" and
"mypackage2" etc.

The problem I have is... imagine someone is working on "mypackage1" so has
the whole tree checked out apart from "mypackage2". If they attempt use "ant
compile" under "com" the build will fail since the build expects to find all
build files (since I have hardcoded the order in which I want modules built
using the ant antfile task). What I would really like ant to do is only
attempt to call a build file if it exists.

If you have received this e-mail in error or wish to read our e-mail 
disclaimer statement and monitoring policy, please refer to or contact the sender.

View raw message