ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helliwell, Matthew" <>
Subject RE: Conditional build?
Date Mon, 11 Jun 2001 14:19:51 GMT
Sorry, another point I forgot to mention: this will silently ignore packages
that do not exist. If you are trying to do a full build for release you're
going to be in trouble if some directories are missing as you won't have an
error when you do the build. Therefore it would make sense to define
different targets (DEV, PROD or whatever); one target will build whatever
happens to be there. The other target will build everything and fail if some
things are missing.

Of course, if you're just building Java packages, you could just have a
single build file at the top level that builds all the .java files it finds
in subdirectories.

-----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