Dashboard > CruiseControl > Frequently Asked Questions
Frequently Asked Questions Log In View a printable version of the current page.

Added by Robert Watkins , last edited by andre schmitt on Oct 04, 2007  (view change)
Labels: 
(None)

If you know of more questions & answers that would have lasting value to the CruiseControl user community, add them here. This page is frequently updated.


Index

OldFrequentlyAskedQuestions

Answers


Q: How can I tell if a build is running right now? Is there a way to show in the project's web page that a build is running now? (Currently it only shows last build result).

A: Use the CurrentBuildStatusListener instead of the (deprecated) currentbuildstatusbootstrapper and currentbuildstatuspublisher. If you want more info on how far your build has progressed, you can also use the XmlLoggerWithStatus from the contrib-directory.

----
Q: Something isn't working right, but I don't know what. How do I debug cruisecontrol problems?

A: See GenericDebuggingHelp.

----
Q: I have tests that are failing but cruisecontrol is reporting Build Successful. How do I fail on a test failure?

A: See FailOnTestFailure.

----
Q: How do I use a different Ant version than is packaged with CC? or How do I use JVM X when CC is using version Y? or Can I use different versions of Ant/JVM on different projects?

A: See AntScriptAttribute

----
Q: Why can't I see the details on the web page? Why is the buildresults page blank?

A: A frequent cause is a url problem, so first try looking at the root cruisecontrol index page (http://host:port/cruisecontrol/index.jsp) and follow the link from there. If that didn't solve the problem, check for zero length files in the _cache directory under the log directory.

Check the override.properties file in the cruisecontrol.war. It specifies the logs and artifacts directories used by the web app. See Getting Started With CruiseControl part 6 for more information.

Another possible problem is a permission issue where the tomcat process doesn't have rights to create the _cache directory under the log directory, or to create files in that directory.

Another issue can be a problem during transform. See Q: Why are the files in the logs/_cache directory zero length?

----
Q: Why are the files in the logs/_cache directory zero length?

A: See ZeroLengthFiles

----
Q: Why is cruisecontrol getting a NullPointerException in org.apache.tools.ant.util.DOMElementWriter.encode()?

A: You have multiple versions of Ant on your classpath and are trying to use one version with cruisecontrol and another to run your build. Make them the same and the problem should go away. Also see Q: How do I use Ant version X when CC is using version Y?

----
Q: CruiseControl keeps hanging and needs to be restarted. Why?

A: If you are using JDK 1.4.1 on Linux there is a known bug in the JDK. This bug doesn't exist in 1.4.0 and has been fixed in the latest 1.4.2 beta. To resolve the problem you should move to one of these other JDKs.

A2: Merging logs (e.g. unittestresults.xml) terminates the build loop (ver.2.1.3) if the directory that should contain the logs does not exist. Make sure to create the directory before the build has a chance to fail. Most important if you make a clean build every cycle.

A3: RedHat Linux 9, kernel 2.4.20 has been patched to support the NPTL and seems buggy. As a workaround, set the environment variable "LD_ASSUME_KERNEL" to "2.4". (in bourne shell run "export LD_ASSUME_KERNEL=2.4"). You can also upgrade the kernel to the 2.4.22 version where two hang bugs has gone away. Another user reported a similar improvement when they upgraded to Fedora Core 2 with kernel 2.6.

A4: You might be hanging due to an external process not returning. An example: the cvs client will hang if the CVS server goes down during a "cvs update" (the cvs bootstrapper) or a "cvs log" (the cvs source control). In these cases you should be able to see the external process in a process viewer.

A5: Unchecked exceptions in the build like NullPointerException will cause that project to hang forever. This is fixed in CVS http://sourceforge.net/mailarchive/forum.php?thread_id=8873691&forum_id=2160

----
Q: How do I stop cruisecontrol from rebuilding after a failure when there has been no change in the repository?

A: See buildafterfailed on the ConfigFiles page or http://cruisecontrol.sourceforge.net/main/configxml.html#project.
B. <project buildafterfailed="false"> ...

----
Q: How come I can't see the output from my Ant build?

A: see UseLogger

----
Q: How can I make my log files smaller? or Why are my log files so huge?

A: see UseLogger. Also, see if the pruning of <properties>-element from your JUnit xml-logs is enabled.

----
Q: Why am I getting an OutOfMemoryError when I run cruise control?

A: see OutOfMemoryError

----
Q: Is there any way to set the mapping of usernames to emails in config.xml?

A: You do the mapping as a nested element w/in the email publisher:

<email .... >
       <map alias="foo" address="bar@baz.com" />
       <map alias="buildmeisters" address="steve@baz.com,mark@baz.com" />
   </email>





Alternatively, if you're using the cvs element to get modifications it will automagically use CVSROOT/users if it exists.
----
Q: The time scheduling and quiet period mechanisms are confusing and don't seem to work correctly. How does it work?
A: See SchedulingExample

----
Q: After the build, how can I make my ant script start my server in the "background" so that ant will complete without waiting for the server? I need my server to start so I can run my Functional Unit Tests during an automated build!

A: See Running Servertests with Ant

----
Q: I'm having trouble using CvsNt with CC. Are there any known issues?

A: See CvsNt.

----
Q: How does one coax the antBuilder into invoking ant -debug?

A: AntBuilder uses -debug if you set the attribute usedebug to true in your <ant>-element in your config.xml.

----
Q: How do I get cruisecontrol to start the loop and look for changes since a given time in the past?

A: In 2.1 you need to use the JMX pages as the lastbuildtime command-line parameter is now ignored. See Managing CruiseControl With JMX.

In 2.0 you can use the JMX interface or the command-line. When you start cruise control, you can pass a number of different values to it, by option. When invoked with the "-lastbuildtime YYYYMMDDHHMMSS" option, you tell cruise control how far back to look for changes, upon startup. For example, if your project started May 10, 2002, and you wanted cruisecontrol to report all of the changes from 8:00 am on that day going forward, you would invoke cruisecontrol.sh, as follows:

./bin/cruisecontrol.sh -projectname myproj -lastbuild 20020510080000

For more information on the options you can use at startup time, refer to the bottom of the page at this URL:

http://cruisecontrol.sourceforge.net/main/install.html

----
Q: I am running some jUnit tests, and the results don't show up in cruise control's JSP. What's going on?

A: There are a couple things that the buildresults.jsp needs. First, your jUnit results need to be xml formatted. You can set this by adding <formatter type="xml"/> element, within your jUnit ANT task. Second, make sure that you merge your unit test results with cruise control's own xml report of the build. Do this in the <log> section of your config file, like this:

if you had one file:\\

<log ...>
    <merge file=""/>
 </log>





and if you had a directory of files:
<log ...>
    <merge dir=""/>
 </log>





Cruise control may also report that you don't have any unit tests if they failed to build and never got to the point of being run in your junit task.
Finally, if you are using a custom XML format and not the default Ant one, you will need to update unittests.xsl as appropriate.
Could someone elaborate on the above code example? A real code example would be nice, instead of all "...". It's not clear to me what merge even means? Is it a copy or a move? Or a concatination onto some other file?

Merge means "add the content of the file as an element inside the cruisecontrol log file".

The "..." just meant that the sample is ignoring any value that might be set for dir or encoding on the log element. http://cruisecontrol.sourceforge.net/main/configxml.html#log

A: I check that this problem may be connected with big size of std output from junit, which is next merged in CC log (system-out element). When jsp with test report is created there is testdetails.xsl used to take string from this element and parse it to escape some letters and add html <br/> - this couse StackOverflowError because of recurrent invoke JS-escape template (of course than input string is big, i have 1800 lines). I resolved this changing JS-escape template some.
I add:

<xsl:template name="JS-escape">
  	<xsl:param name="string"/>
	<xsl:variable name="allStringLen" select="string-length($string)"/>

	<xsl:choose>
		<xsl:when test="$allStringLen mod 2 = 0">
			<xsl:variable name="halfString" select="$allStringLen div 2"/>
			<xsl:variable name="s1" select="substring($string, $halfString)"/>
			<xsl:variable name="s2" select="substring($string, 1, $halfString - 1)"/>
			<xsl:call-template name="JS-escape2"><xsl:with-param name="string" select="$s2"/></xsl:call-template>
			<xsl:call-template name="JS-escape2"><xsl:with-param name="string" select="$s1"/></xsl:call-template>
		</xsl:when>
		<xsl:otherwise>
			<xsl:variable name="halfString" select="($allStringLen - 1) div 2"/>
			<xsl:variable name="s1" select="substring($string, $halfString)"/>
			<xsl:variable name="s2" select="substring($string, 1, $halfString - 1)"/>
			<xsl:call-template name="JS-escape2"><xsl:with-param name="string" select="$s2"/></xsl:call-template>
			<xsl:call-template name="JS-escape2"><xsl:with-param name="string" select="$s1"/></xsl:call-template>
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>





And orginal JS-escape rename to JS-escape2. This couse that point in whitch recurrent happen is move from begin to half string and JS-escape is invoke less times. In my case it worked. Mayby some xslt guru can make it better.
regards
----
Q: I'm running some JUnit tests, and the results show up twice in Cruise Control's JSP. What's going on?

A: If you use the ant JUnitReport task to merge the accumulated XML log files
into one, you should only merge the resulting large file into the
CruiseControl report; merging the entire directory will result in the test

entries being merged twice.

BTW, this means you don't need to use JUnitReport for CruiseControl; just use <merge dir="..."/> to point to the directory containing your individual junit xml result files. Not using the JUnitReport saves a lot of resources if you have a lot of junit tests.

----
Q: I get a 404 when I point my browser to the buildresults jsp. Where is it?

A: The buildresults jsp is generated from your currentbuildstatus file. Verify that web.xml has the correct path to the file you name in your config file's <currentbuildstatuspublisher> element. If you're using Tomcat as your servlet container, you'd find web.xml in $CATALINA_HOME/webapps/cruisecontrol/WEB-INF. It is not necessary to rebuild the war after making in-place changes to web.xml. Prudence suggests that you stop & restart Tomcat to make sure that everything gets read.

Another possibility is that your results email has the wrong url. In cruisecontrol 2.0.2 and earlier the hello world example config files had the incorrect value buildresultsurl="http://hostname:8080/buildresults/BuildServlet". The proper value for cruisecontrol 2.0 should be buildresultsurl="http://hostname:8080/cruisecontrol/buildresults". In cruisecontrol 2.1 or later if your web page is configured for multiple projects you should use buildresultsurl="http://hostname:8080/cruisecontrol/".

Note that the first part of the URL after the port number (i.e., "cruisecontrol") will match the name of the war file in Tomcat. If you rename the war, the URL will change.

----
Q: I see just a dark blue screen when I look for build results and my tomcat log has the following exception: org.apache.xml.utils.?WrappedRuntimeException: The output format must have a 'http://xml.apache.org/xslt}content-handler' property!'. What's going on and how do I fix it?

A: JDK1.4 includes an old version of xalan, try installing a new xalan.jar (from http://xml.apache.org/xalan-j/downloads.html) into tomcat_dir/common/endorsed.

----
Q: The buildresults jsp lists my builds on the left, but doesn't show the actual results on the right, even though the HTML email looks OK.

A: Make sure the directories inside your log directory (e.g. logs/myproject/) are writeable for the tomcat process, since the jsp will try to create _cache directories in there. If that fails, no build results will be shown.

----
Q: I'm having problems getting cvs to recognize my changes. I keep getting "No Modifications Found" - what's going on?

A: As of CC2.0, you don't have <modificationset> available in the buildfile anymore. Focus on config.xml. You can pick up the cvs logs by setting the log4j property so that you can view debug level messages. Look at the actual history command the cvs element is using. You might see some discrepancies between what you have, and what the ANT builder element is doing. You can find log4j properties in cruisecontrol.jar/war All you need to do is edit the first line and change INFO to DEBUG.

Questions to ask:

"If you're seeing the same problem what do you see as the CVS command when you set the log4j level to debug?"

... and ...

"What happens if you run that same command, the one being used by CruiseControl, from the command-line?"

You will find that the error only reveals itself when you are looking at the debug-level properties.

Take a look at the antbuilder element (a.k.a. (syntactically) 'ant') documentation of the ConfigFiles.

----
Q: I'm having timing and scheduling problems between Cruise Control and CVS. What do I do?

A: If you have seperate systems for repository and Cruise Control, make sure that both hosts are synched to your local ntp server. Start there, because a significant drift can cause CVS to generate interesting checkout and update errors all by itself, before ANT and Cruise Control ever get into the picture. Think next about how long it takes for a full checkout to take place, and a full build-test cycle to run. Look to the schedule section of your config file and make sure that you leave enough time for a build to run and test, plus a little room for growth. A simple schedule might look something like this:

<modificationset quietperiod="300" dateformat="yyyy-MMM-dd HH:mm:ss">
    <!-- Our cvsroot -->
    <cvs cvsroot=":pserver:<username>@<repos_host>:/cvsroot"/>
  </modificationset>

  <schedule interval="300" intervaltype="relative">
    <!-- The buildfile and target we want to run every time. -->
    <!-- This assumes that cc-build.xml is in /opt/Cruise2 -->
    <ant buildfile="/opt/Cruise2/cc-build.xml" target="masterbuild" multiple="1">
      <jvmarg arg="-Xmx256M"/>
    </ant>
    <ant buildfile="/opt/Cruise2/cc-build.xml" target="cleanbuild" multiple="5">
      <jvmarg arg="-Xmx256M"/>
    </ant>
    <pause starttime="1900" endtime="2359"/>
    <pause starttime="0000" endtime="0659"/>
  </schedule>





This schedule starts at 7am and runs to 7pm, every day, and rebuilds from a clean checkout every fifth build that runs. It sleeps for five minutes between repository checks, and the modificationset asks for a repository that has stayed the same for five minutes before running the build. It works very well for a checkout-build-test cycle that takes a few minutes or so.
If the loop does not need to roll on a given weekday, you can add a pause for that day like this:
<pause day="saturday" starttime="0000" endtime="2359"/>





The schedule can be very tightly controlled, as is seen in this example, recently-submitted to the user list:
<schedule interval="600">
    <pause starttime="0000" endtime="0459"/>
    <pause starttime="0510" endtime="1059"/>
    <pause starttime="1110" endtime="1359"/>
    <pause starttime="1410" endtime="1659"/>
    <pause starttime="1710" endtime="1959"/>
    <pause starttime="2010" endtime="2259"/>
    <pause starttime="2310" endtime="2359"/>
    <ant buildfile="cruise_build.xml" target="dist.master.build" multiple="1"/>
  </schedule>





This schedule performs builds at 5am, 11am, 2pm, 5pm and 11pm, and leaves just enough time for a single build to run between pauses. The order of the pauses does not matter, but it does make it easier to read this schedule. (For the full thread that explains this schedule and the reasons for it, see http://sourceforge.net/mailarchive/forum.php?thread_id=1325949&forum_id=2203)
----
Q: I'm using StarTeam and cruisecontrol has a problem finding modifications-- I get a [NullPointerException] on StarTeam.addFolderModsToList.
A: Your root folder is set incorrectly. Follow the instructions for the StarTeam configuration at ConfiguringCruiseControl.

----
Q: I'd like the Ant logs (specifically the compile logs) to show up on the buildresults JSP. Is there any other way to do this besides editing buildresults.jsp (and associated xsl files)?

A: The compile results will show up if you are using the ant's javac task. If you've writen your own custom ant task that invokes javac directly then you'll need to update compile.xsl to match the structure of your xml log file.

----
Q: Why does CruiseControl try to compile itself?

A: If you're in the situation where you've turned on debugging and it appears that the cruisecontrol/main/build.xml file itself is being run, then it's wrong.

This problem happens when you're in the main directory, and you type java -jar dist/cruisecontrol.jar -configfile config.xml. The default for the antbuilder is "build.xml", and if you haven't defined it (or don't have an absolute path), then it picks up on the build.xml file in main. It's not intentional behaviour, just a strange default setting.

----
Q: I get an error finding junit.org BUILD FAILED Ant Error Message: file:/export/home/MY_PROJECT_1/build.xml:50: Could not create task or type of type: junit. Ant could not find the task or a class this task ...

Running ant manually from the checkout dir works fine.

I noticed that there is no junit.jar in INSTALL_DIR/main/lib so I copied junit.jar there. Still didn't work.

A: Copy junit.jar to ANT_HOME/lib, assuming you're using the AntScriptAttribute to point to ANT_HOME/bin/ant.

----
Q: I get the above error when using cc 2.1.5 (which does have junit.jar in its lib and manifest classpath).

A: I found that rebuilding the cc jar with a classpath that includes $ANT_HOME/lib/*.jar (including junit) as well as the other non-ant jars already with cc I was able to get around this problem.

----
Q: Can I use a single installation of cruisecontrol configuration for multiple projects to run a separate Java project and a separate C++ project?

A: Yes, cruisecontrol supports MultipleProjects. Just put multiple project elements in the same config.xml file.

----
Q: How do I set up CruiseControl with automatic CVS tagging of successful builds? I can see there's a cvs task with a "tag" attribute and a label builder, but no indication of how they fit together.

A: The value from the label builder is made available to the build script as a property named "label". Register a different Incrementer to generate label names that can be used as CVS tags, as decribed in the documentation (http://cruisecontrol.sourceforge.net/main/configxml.html#labelincrementer).

----
Q: What (other) properties are passed to my build script by CruiseControl?

A: See Properties Passed To The Build Scripts

----
Q: What are the advantages of using CruiseControl? Why cant we just use a ant build.xml file and use cronjob for scheduling purposes?

A: CruiseControl is a fully matured framework for scheduling integration tasks and reporting their results. To replicate the capabilities, conventions, and documentation in a "roll your own" solution would not be practical for most development teams.

----
Q: User name mapping: What is going on with "cannot find module `CVSROOT/users'" ? I would like to map UNIX user login names to their proper email address? Can you set up CC so that it can read the list of <map alias="ryanme" address="meg.ryan@rbos.com" /> from an external file?

A: Create a CvsrootUsers file.

----
Q: A variation on one of the questions above - I run some JUnit tests and merge the XML files. I can see the JUnit test results in the Build Results page, but the Test Details page is always blank. The XML Log File page is also always blank. How can I fix this ?

A: A likely cause is invalid xml in the log file, specifically in one of the junit result files. Try running an xml validator on the log file; this should help identify where the problem is originating.

----
Q: Can I use two different buildfiles in the "schedule interval" -target in config.xml? I have got two different projects that I would like to run, one after the other, but when trying the following, it didn't succeed:

<schedule interval="1800">
<pause starttime="0000" endtime="0500"/>
<pause starttime="0700" endtime="2359"/>
<ant buildfile="firstProject.xml" target="release" multiple="1" uselogger="false" />
<ant buildfile="second/secondProject.xml" target="releaseSecond" multiple="1" uselogger="false" />
</schedule>

A: Nope. You can run multiple targets in one build file (separate them with spaces), but only one build file. Workaround is to create a wrapper build.xml that delegates the two project specific buildfiles.

----
Q: Why does the wrong user show up in the CC email build report when a file is deleted in StarTeam? It looks like the name of the original person who added the file is shown instead of the person who just deleted it. The email goes to the wrong person as well.

A: This is because the ability to lookup who deleted a file was added to the StarTeam SDK in version 4.2 SP2. A patch has been provided for CruiseControl to make use of this feature (now available with the Audit.class). See http://jira.public.thoughtworks.org/browse/CC-368

----
Q: How can I tell if CruiseControl encounters an error?

A: There are multiple ways, but probably the best is by leveraging the logging built into CruiseControl. CruiseControl uses

Log4j for logging extensively.

While there is a default log4j.properties file included in the CruiseControl distribution, you'll probably want to write your own.
You can specify which log4j.properties file gets used by specifying the log4j.configuration system property.

To enable email notification of CruiseControl errors, add the following lines to your log4j.properties file:\\

# Set root logger level to ERROR and its only appender to Mail.
log4j.rootLogger=ERROR, Mail

# Mail is set to be a SMTPAppender
log4j.appender.Mail=org.apache.log4j.net.SMTPAppender
log4j.appender.Mail.BufferSize=100
log4j.appender.Mail.From=<email address to be the sender>
log4j.appender.Mail.SMTPHost=<mail server address>
log4j.appender.Mail.Subject=CC has had an error!!!
log4j.appender.Mail.To=<email address to send the message to>
log4j.appender.Mail.layout=org.apache.log4j.PatternLayout
log4j.appender.Mail.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} %-5p [%x] [%c{3}] %m%n





For further information on configuring Log4J, see the Log4J Documentation
----
Q: My CruiseControl reports show empty sections (e.g. Compile errors/warnings) and/or empty lines. I tracked them down to empty <message>-tags in Ant's log. Can you patch the XSL to ignore empty messages?
A: This is a known issue with Ant's XmlLogger since version 1.6.0. Instead of patching all the XSL-files, we've come up with a better solution that filters the empty messages when the Ant-log is merged into CruiseControl's log. This is available in CC-versions 2.1.6 and later.
If you don't want to upgrade, then a perfect alternative is to use a modified version of Ant's XmlLogger that doesn't print empty messages. I've attached a 'silent' version at the end of this page, you can simply compile it against the jars in your Ant-distribution. You'd use it by including an attribute loggerclassname in the <ant>-tag in your CruiseControl config-file and setting it to net.sourceforge.cruisecontrol.util.SilentXmlLogger. Make sure that the class is on Ant's classpath.

----
Q: The XML log files are being cut off when I try to load it from the XML Log File tab on the jsp site, why is that? Is there a setting that limits the amount of the XML file loaded?
I'm also having this problem. Gary Eberhart

A: Try to replace the xerces & xalan-versions that come with CruiseControl with their latest version, this usually does the trick.

----
Q: I don't like CCs log results and would like to get the output I use to get from XmlLogger - does anyone
know an easy way to do this?

A: [This question is in need of answer]

----
Q: In the buildresults webapp > Control Panel: The JMX Control Panel iframe is blank why?

A: If you started cruisecontrol with -port 8006 option for example, you need to go to controlpanel.jsp and change the line:

<iframe name="controlPanelFrame" ... src="http ://<%= hostname%>:8006" width="605"></iframe>.

----
Q: What are the known issues with Cruise Control?

A: Most known issues are in the CruiseControl Jira. Some known issues show up as WishList items.

----
Q: I am getting following error:

java.io.IOException: CreateProcess: svn log xxxxxxxx error=2
            at java.lang.Win32Process.create(Native Method)
            at java.lang.Win32Process.<init>(Win32Process.java:66)
            at java.lang.Runtime.execInternal(Native Method)
            at java.lang.Runtime.exec(Runtime.java:566)





A: CreateProcess with error=2 means that the thing you're trying to execute wasn't found (not on path).
A: Check if there is an svn.exe file in the Subversion home, and not svn.bat or anything like that.
A: Could be related to a known Windows2003 issue.
----
Q: Does CruiseControl support Ant style properties?
A: Yes. Since version 2.2.2, CruiseControl has had support for Ant-like properties. Please see the ConfigFiles page for more details.



----
Q: I'm getting the error message "Problem looking up modifications in StarTeam". I've attached a snippet from the log below. What's going on?

[cc]May-25 11:13:19 StarTeam - Problem looking up modifications in StarTeam.
The selected configuration is not valid for the current view. The configuration of a view cannot be changed to a time before the view was created, a time in the future, or to a label that was not created within the view or that is empty.

A: More than likely, the system clocks on the client and server machines are out of sync. Please try synchronizing your clocks.

----
Q: What is the proper spelling/pronunciation of 'CruiseControl'?

A: It is one word 'CruiseControl', not two words as in 'Cruise Control'. It is pronounced cruise followed very quickly by control. Examples:

----
Q: How do I rename a project and keep its history of builds and its current status?

A: Renaming the related CruiseControl files should work:

  1. Insure no builds are running in CruiseControl ("grep now\ building cruisecontrol.log")
  2. Kill CruiseControl process
  3. Rename project's logs directory from old project name to new name.
  4. Rename project's *.ser status file from old project name to new name.
  5. Update config.xml to replace old project name with new name. Includes changing name attribute in project's <project> element and changing logdir attribute in dependent projects' <buildstatus> elements.
  6. Start CruiseControl process again
  7. Check for renamed project in reporting app and check the project's status and its old builds
  8. Watch cruisecontrol.log for pickup of renamed project

Note a couple project name references that don't matter:

  • the project's *.ser status file contains the name of the project, but this doesn't seem to affect things, CruiseControl will pick it up OK
  • the project's log .xml files contain the name of the project within their <info> elements, but this doesn't seem to affect the reporting app


Q: How do I use JUnit 4 tests?

A: Use Ant supporting JUnit 4 for the new Tests

  1. Get ant which supports JUnit 4, currently this is Ant-1.7 alpha
  2. If you then have problems with RuntimeExceptions "Mismatch - popped element = task:... finished target element = target:..." use the old ant to execute everything except running the tests by modifying the (new) ant script:
    declare -a OPTIONS[10]
    declare -a COMMON_TARGETS[10]
    declare -a TEST_TARGETS[10]
    declare -i optioncount
    declare -i commontargetcount
    declare -i testtargetcount
    for arg in "$@" ; do
      if ! expr "$arg" : ".*test.*"  ; then
        if expr  "$arg" : ".*[.-].*"  ; then
          OPTIONS[$((optioncount++))]="$arg"
        else
          COMMON_TARGETS[$((commontargetcount++))]="$arg"
        fi
      else
        TEST_TARGETS[$((testtargetcount++))]="$arg"
      fi
    done
    echo launching old ant with  ${OPTIONS[@]} ${COMMON_TARGETS[@]}
    <pathtooldant>/apache-ant-1.6.5/bin/ant "${OPTIONS[@]}" "${COMMON_TARGETS[@]}"
    echo new ant with  ${OPTIONS[@]} ${TEST_TARGETS[@]}
    
    # Extract launch and ant arguments, (see details below).
    ant_exec_args=
    no_config=false
    use_jikes_default=false
    ant_exec_debug=false
    show_help=false
    for arg in "${OPTIONS[@]}" "${TEST_TARGETS[@]}" ; do
    




  3. Then use this ant-script in your build loop, be aware that this script recognizes test-targets by finding the word test in them and not finding a . (dot) or a - (dash). Be also aware that this only works with the bash as executing shell, especially the expr... parts. Last not least, the construct mentioned above does not allow you to only run the tests, it executes the old ant at least without a target.


Q: What are the critical hardware factors for maximum performance? Does CC support multiple processors?

----
 Q: How do I delete old builds to prevent the disk becoming full?

 A: CruiseControl 2.6 supports deleting old build log files, see config.xml delete element. As of CruiseControl 2.6, there is no built in support for deleting old build artifacts. There are patches proposed to resolve this. In the mean time, see DeleteOldArtifactsWorkAround for suggested solutions.

----
 Q: Can I created 'nested' or 'per-project' configuration files?

 A: CruiseControl 2.6.1 supports inclusion of 'nested' config files via the <include.projects> tag, allowing projects to have their properties defined separately, for clarity and portability.

  • The sub-config files need to be 'complete', their contents should be enclosed in a <cruisecontrol></cruisecontrol> tag, and can be made 'fully functional' in their own right, any properties defined locally will override those inherited from the main config.
  • Project names must, however, remain unique.
  • Unlike the main config.xml file, included config files will not auto reload when modified. This will be fixed in CC 2.6.2.

----
 Q: How do I set CruiseControl's CLASSPATH?

 A: Additional paths may be added to CruiseControl's CLASSPATH via the -lib argument to cruisecontrol-launcher. If there are multiple paths to add, use -lib for each of them, like so:

java -jar cruisecontrol-launcher.jar -lib /path1/to/include -lib /path2/to/include -configfile config.xml

 
----

Q: How do I include custom messages in the buildfile?

A:  The place to do this is in a custom logger plugin. A publisher can not alter the buildlog anymore, because it is written to disk before any publisher runs. Use this code to check if your build was succesful:

    public static boolean isBuildSuccessful(Element log) {
        XMLLogHelper helper = new XMLLogHelper(log);
        return helper.isBuildSuccessful();
    }
Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators