ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Calum Maclean <calum.macl...@aspects-sw.com>
Subject Building modular software
Date Fri, 12 Jan 2001 12:39:20 GMT
Hi
I've just started using Ant, so I'm a bit of a novice.  So far, I've found
it pretty useful for automating our build processes.
Our software consists of a number of modules, which are pulled together in
different ways to make up different products.  So one product might be made
up of modules A and X, while another might be made up of B, X and Y.
When distributing our software, we have suites which include different
combinations of these products.  So we might release P1 and P2 as one
package, and P1 and P3 as another package.
I'd like to use hierarchical build files to manage this.  I've read some
previous mails on this subject, but I have a couple of specific questions:

1. How do I manage dependencies between different build.xml files?  For
example, module A in build1.xml might depend on module B in build2.xml.  If
there was just one build.xml file, I could just put B in the "depends"
attribute of target A.  How do I manage such a scenario with multiple build
files?
It might be nice if I could do <target name="A" depends="build2.xml.B">...
(I know I can't...)

2. How do I manage the various suites of products without duplicating files?
For example, I might have 3 products P1, P2 and P3 and want to release any
combination of these.  How do I use a single build file to manage this?
My first thought is that the main target for, say, P1 has an "if" attribute
called "P1".  So this product is only built if I set this property when I
run Ant on this build file.  In this scenario, I might have:
<target name="P1" if="P1"> ...
<target name="P2" if="P2"> ...
<target name="P2" if="P2"> ...
<target name="all" depends="P1,P2,P3>...
so that I always run Ant on the "all" target, and configure what gets built
by setting the properties externally.
Another thought is that I choose what targets to run Ant on, e.g. specify
"P1" and "P2" when running Ant if I want P1 and P2.  I'd then probably have
to have a further target to build the overall package, in terms of building
an installer etc.
Are there better ways to achieve this sort of thing?

Thanks,
Calum


CONFIDENTIALITY NOTICE:  This message is confidential and for the use only
of the intended recipient. If you receive the message in error you are not
entitled to disseminate, copy or use the contents in any way. In such
circumstances please forward the message back to the sender or contact IT
Services at Aspects Software Ltd by telephone on 0131 624 0439.
WARNING : While Aspects Software Ltd takes steps to prevent computer viruses
from being transmitted via electronic mail attachments we cannot guarantee
that attachments do not contain computer virus code.  You are therefore
strongly advised to undertake anti virus checks prior to accessing the
attachment to this electronic mail.  Aspects Software Ltd grants no
warranties regarding performance use or quality of any attachment and
undertakes no liability for loss or damage howsoever caused.



Mime
View raw message