ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helliwell, Matthew" <Matthew.Helliw...@DRKW.com>
Subject RE: Conditional build?
Date Mon, 11 Jun 2001 14:57:31 GMT
Use the "available" task for set the properties you're going to check in the
if/unless sections (and yes, I did mean "if/unless" and not "depends",
oops.).

http://jakarta.apache.org/ant/manual/CoreTasks/available.html





-----Original Message-----
From: Baldry, Scot M [mailto:Scot.Baldry@gs.com]
Sent: 11 June 2001 15:39
To: 'ant-user@jakarta.apache.org'
Subject: RE: Conditional build?


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.

Scot

-----Original Message-----
From: Helliwell, Matthew [mailto:Matthew.Helliwell@DRKW.com]
Sent: 11 June 2001 15:10
To: 'ant-user@jakarta.apache.org'
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 [mailto:Scot.Baldry@gs.com]
Sent: 11 June 2001 13:51
To: 'ant-user@jakarta.apache.org'
Subject: Conditional build?


Hi,

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

i.e. imagine the following structure

com.abc.mypackage1
com.abc.mypackage2

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 
http://www.drkw.com/disc/email/ or contact the sender.
----------------------------------------------------------------------


----------------------------------------------------------------------
If you have received this e-mail in error or wish to read our e-mail 
disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender.
----------------------------------------------------------------------

Mime
View raw message