Marty Andrews

artful code

Sunday, February 15, 2004

CI Demo Part 2 - Template Application

I've started down the road to building my continuous integration demo by setting up a template application with some of the basic tools listed previously.

There's no real code to speak of yet, just a HelloWorld class and an associated test, but most of the surrounding tools are set up in a directory structure that I like. You can download the application template if you like to see how it works. Its about 2MB in size, as the tools for all jars are included. You'll need Ant 1.6 to build it.

There's a couple of interesting things about the build which I don't see all of the time. Firstly, I separate the application source and test code. Not so dramatic, but I don't see everyone do it. I also compile each source tree to their own classes directory, which enables application source to later be bundled into the distribution without tests. The technique is also a sanity check that application source does not depend on test source.

This was my first attempt at using Ant 1.6, and I've had a go at creating some macros for compilation and testing respectively. So far I like it. My build file is certainly cleaner for the effort.

The remaining tools were simian, checkstyle and jcoverage. I haven't done anything too fancy with them, and I haven't completely tweaked the checkstyle config to my liking yet. In any case - they're in and working. The version of JCoverage includes the patch for simple bean-like properties produced by Jon Eaves.

Thats it so far. My next step is to expand it to be a simple web-app with a FIT test. Then I'll wrap cruise control around it and start building actual features ;)

No comments:

Post a Comment