ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ellsworth <sc...@alodar.com>
Subject Help: is there a way to include another build file?
Date Mon, 08 Oct 2001 20:57:29 GMT
Howdy, all.

In our hierarchy, we have a build directory with subdirectories for each 
product of the work.  Each one of those has an ant build script in it to 
generate the resulting library, executable, or whatever.  I noted recently 
that the four build files are identical except for a few defines at the 
top.  This has let me document the entire build process as:

1.  Go to the overall build directory.
2.  Seek a directory named after the product you want to build.  For 
example, if you want to build the "experiment" program, look for the 
"experiment" subdirectory under build.  Similarly, the "metagraph.jar" 
library is built in the "metagraph" directory under build.
3.  Move into the appropriate subdirectory
4.  Type "ant" to build the product in question.  This will not deploy it.
5.  Type "ant deploy-debug" to deploy a debug version of the product.

I am a bit uncomfortable having the exact same tasks in each of the 
build.xml files.  Is there a way to have a build file include a bunch of 
tasks from another one?  I could then have all of the product build files 
just do some defines and include a single master build script.

It appears that I could go the other way - have one master build file which 
then did tasks on the subdirectories, but we really do not want that 
behavior.  The master build file is something we would kind of like people 
not to mess with, and thus we would rather not have them execute it.

For the visually inclined:

org
-metagraph
--build
---build.xml
---metagraph
----build.xml
---experiment
----build.xml

To build "metagraph.jar", cd to org.metagraph.build.metagraph, and type 
"ant", then to deploy, type "ant deploy-debug".

Scott
Scott Ellsworth
scott@alodar.com


Mime
View raw message