Wednesday, December 22, 2004

Cruise Control Gotchas

Well, I just got Cruise Control working properly with two gotchas that held up the process.

1. CVS Update

Cruise control uses "cvs log" with lots of options to determine if a repository has changed. I didn't have the full repository checked out for some reason in the build space. I was changing that file, but it wasn't firing off a rebuild. Once I figured out what the problem was (by executing what cruise control does to determine if something had changed) it was a simple fix of checking out the entire project for the build. Apparently the log command only works for files that are present in the local copy of the repository. Presto, changes are now seen.

2. <junit> task

The <junit> task was failing for the cruise control build, i.e. ant didn't know how to run the task, but it worked fine when I ran ant independently. I eventually chased it done in the configuration documentation. <junit> is dependent on the junit.jar library which I've set up correctly for Ant. But cruise control will use its own version of Ant (which isn't set up to use junit properly), unless you sent the antscript attribute for the cruise control task of <ant>. First I tried adding the antscript attribute for the <ant> task in the Ant build script. Dun-dun! Wrong answer. Once I realized this was a cruise control configuration issue, I added it to the <ant> task in config.xml and all was good.

Now, we have continuous integration. And I like it...

1 Comments:

At 25 January, 2007 03:39, Anonymous Anonymous said...

Thanks. This post saved me some time mucking around. You would think after two years CruiseControl would have fixed their distribution to include the ant-junit libraries.

 

Post a Comment

Links to this post:

Create a Link

<< Home