The message of our Build Engineer Bootcamp was that build scripts need to be treated more like code. Douglas Bullard has some really excellent slides on Object Oriented Ant Scripts that show how to take common OO concepts and apply them in Ant. But another important idea that Paul and I brought up was the idea of reusing common libraries.
Most developers recognize the productivity gains of using libraries rather than writing all code for a project from scratch. And yet on these same projects — with the notable exception of projects using Maven — there is little thought given to writing every single line of the build scripts fresh. In our bootcamp we were happy to point out some projects that provide an alternative and I'm happy to share them again now:
- ant-master-build-scripts
- From the aforementioned Douglas Bullard, this project provides A collection of "master" Ant build scripts, which can be used to make your individual project build scripts 5-10 lines long with a particular focus on J2EE projects and leveraging Ivy for dependency management.
- easyant
- Another project combining Ant and Ivy, easyant looks to provide an Ant-based alternative to Maven with lots of conventions to get default behavior. The product of a group rather than a single person easyant is under more active development than the ant-master-build-scripts.
- Ant Script Library
- The work of Joe Schmetzer, Ant Script Library lays out some pretty clear design principles. While similar at first glance to easyant the Ant Script Library shows much less Maven envy and is therefore less centered around Ivy. ASL is under active development and on his blog Joe has recently discussed adding support for more code metrics tools and for an enhanced JDepend.