ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ellsworth <>
Subject HELP: how to write ANT script deep in hierarchy?
Date Tue, 02 Oct 2001 17:39:37 GMT
Howdy, all.

I have a four year old project whose directory structure really cannot be 
changed.  Further, it is checked into cvs under org, com, and edu, and that 
cannot change either.  I want to use ANT to do our builds.

Our directory system is set up as follows:

---build  (used to hold CodeWarrior projects for persist,util,etc builds.)
---lib  (used to hold libs used by the build subdirectory.)

Every file is in the proper package for its directory - a file in 
org-metagraph-persistence is in the org.metagraph.persistence package.  We 
want to make one jar containing everything in the three directories 
org.metagraph.persistence, org.metagraph.model, and org.metagraph.util, and 
the directories beneath them.

We want to make a second jar for, with the 
potential for more such jars as we build more metagraph 
applications.  These will need the metagraph.jar created in the last step.

Every ANT project I have seen thus far has been organized as:


and a second project in cvs, organized as:


Because the project is a good four years old at this point, I am not going 
to be able to re-organize the cvs hierarchy, nor am I going to be able to 
get people to update build scripts.  I CAN make sure that nobody checks 
code in to any directory that will not build, so it is perfectly OK for me 
to write a build file that says "build everything in model and persistence, 
then jar it up".

I can also add anything I like to or 
org.metagraph.lib.  I can also create directories in org.metagraph.

So, my questions are:

Can I write a build script that lives in org-metagraph that javac's and 
jars up everything in persistence, model, and util, as well as anything 
below them, without explicitly listing anything in build.xml other than the 
three persistence, model, and util directories?  Getting the packages right 
is critical.

Can I then write a build script in org-metagraph-app-import that javac/jar 
as appropriate for that jar as well?

(I realize these are pretty basic, but after looking through the tutorials 
on the site, and the mailing list archive, I did not see anyone setting 
things up this way.)

Scott Ellsworth

View raw message