I just wanted to configure CruiseControl 2.6.2 so that every project will have its own directory, but it looks like there is no simple way to do that...

To have all things of a project in one place, I would like to have a directory structure like:


config.xml
projects
+-- myfirstproject
+-- artifacts
+-- logs
+-- work
+-- mysecondproject
+-- artifacts
+-- logs
+-- work



First, the website expects the logfiles and artifacts in the "artifacts/[projectname]" resp. "logs/[projectname]" directories. Since I don't want to change the website, I have to accept that. So this is the directory structure:




config.xml
+-- artifacts
+-- myfirstproject
+-- mysecondproject
+-- logs
+-- myfirstproject
+-- mysecondproject
projects
+-- myfirstproject
+-- work
+-- mysecondproject
+-- work


I definitly need different working directories for two reasons:



  • Some (Maven-based) projects require an initial CVS checkout (that will be CVS-updated during the build), so I must not clean the working directory before building

  • I am running CruiseControl with two threads, so parallel builds would interfere which each other


Since there is no "project basedir" tag, I specified the working dir right in the builder statements, for example:




<ant antscript="ant.bat" antWorkingDir="projects/myfirstproject" uselogger="true" saveLogDir="projects/myfirstproject/work"/>




Question:

Where do you have to place the "ant.bat" file? In the root directory or in the "projects/myfirstproject" directory?

Answer: In both!

Seems like CruiseControl checks if the file exists in "projects/myfirstproject", but then executes it from the root dir...

Workaround:

Include the absolute path, like:




<ant antscript="d:/builds/ant.bat" antWorkingDir="projects/myfirstproject" uselogger="true" saveLogDir="projects/myfirstproject/work"/>




Too many ugly things so early in the morning, gotta get some coffee ;-)