Cruisecontrol with Clover

Learned some things today to get something running with Clover. First off I learned that Clover uses it’s own embedded version of ant unless you specify otherwise. IntelliJ does a similiar thing, so you just have to tell it where yours is so it can use your version of ant.

<schedule interval=”60”>
  <ant anthome=”C:\apache-ant-1.6.5” buildfile=”cc-build.xml” target=”build”/>
</schedule>

This took me a little while to catch until I noticed the console was reporting running 1.6.2 and I only had 1.6.5 on the machine.

I had all sorts of problems getting the Clover html reports to run until I added fork=”yes” to the

1
</div> </td> </tr> </table> </div> ant task. Then of course I had an issue with it not being able to find the clover.jar package. I need to go back and research a bit on the fork option, but I found a rather quick fix. I just added clover.jar to the CLASSPATH. It felt a bit like a hack since I couldn’t figure out why ant couldn’t find clover.jar on its own. Anyway research for another day. Turns out on the project I ran it against we get a stunning 7% test coverage, mostly due to the bulk of the code being in Struts Action and Form classes that aren’t being tested.