Developing projects using ant is pretty easy and straight forward. One convention I like to follow is to organize each component in the system to have its own local build file. These builds can be aggregated by higher level builds very simply. This gives great flexibility while developing since you can build only what you need while working on it and yet you (or continuous integration) can easily perform a full build/test. If you have lots of similar components, your ant scripts might begin to have lots of duplication in them unless you start refactoring the common pieces into includes. In the old days (prior to ant 1.6), there wasn’t an obvious way to include fragements. While reviewing some open source projects back in 1995 I stumbled across the xml include technique (below) that I’ve used a few times. I had forgotten about this until I was recently asked to make some recommendations on an older project’s build approach.
Read the rest of this entry »