CruiseControl and Maven
At work today, I put together a config.xml for CruiseControl to run continuous integration builds for our project. We're using Maven, so I used the CruiseControl Plugin to generate a cruisecontrol.xml file to get started. Then I moved this file up a few directories, renamed it to config.xml and changed all the log paths to be outside of the project.
There's quite a difference between running CruiseControl with Ant vs. Maven. With Ant - you tend to delete the whole project, check it out from CVS and build/test it from scratch. With Maven, the recommendation seems to be a bit different. What I found on the mailing lists and such was that you should manually checkout your project into your "checkout" directory and then call "scm:update-project|clean test" from config.xml. With Maven, it seems there's no CruiseControl-specific maven.xml file for your project.
I tend to like the delete/checkout/test approach you get with Ant over the update/test approach with Maven. For those of you that are using CruiseControl with Maven - is it possible to do delete/checkout/test - or am I stuck with the update/test approach?


<project xmlns:ant="jelly:ant" xmlns:m="jelly:maven"> <goal name="ci-build"> <ant:ant dir="${basedir}" antfile="ant.xml" target="checkout"/> <!-- run the build targets, site-deploy, .... --> </goal> </project>ant.xml then contains the target "checkout":<target name="checkout" description="Update packages from CVS and build with maven"> <delete dir="checkout/m2n-im"/> <cvs command="co m2n-im" cvsroot="${cvs.repository}" quiet="true" dest="checkout"/> </target>I call maven with target "ci-build" from cruise's config.xml. But now that i've read how it is supposed to work, i'm thinking about changing my setup to be more like the one you described. I'm thinking about setting it up so that only altered subprojects have to be re-built, not the whole project (currently ~20 minutes for a full build - sucks big time), plus maybe a nightly build that deletes and checks out instead of updating.Posted by Wolfgang Groiss on January 11, 2005 at 07:33 AM MST #
Posted by Carlos Sanchez on January 11, 2005 at 02:22 PM MST #
Posted by jean-pierre sevigny on November 19, 2006 at 01:35 AM MST #