Raible's Wiki
Raible Designs AppFuseHomepage- Korean - Chinese - Italian - Japanese QuickStart Guide User Guide Tutorials Other ApplicationsStruts ResumeSecurity Example Struts Menu
Set your name in
UserPreferences
Referenced by
JSPWiki v2.2.33
Hide Menu |
It's pretty easy to setup your AppFuse application to work with CruiseControl. You can either download the files from this page or if you're using 1.6.1+ - they're located in the extras/cruisecontrol directory. Thanks to Mike Clark and Jared Richardson for their help getting this work. NOTE: I recommend setting up CruiseControl on a Linux machine if you have one available
To run CruiseControl on your AppFuse project, perform the following steps: 1. Download and install CruiseControl 2.4.1. Extract it to your $TOOLS_HOME directory, wherever that may be. 2. After you've installed CruiseControl, download the following files and put them in the cruisecontrol-2.4.1 ($CC_HOME) directory. The latest version of these files can be found in CVS or in your project's extras/cruisecontrol directory. 3. Modify config.xml for your e-mail address and project name. 4. Modify build.xml so it points to your CVS server and project. 5. Run "ant" in the current directory or checkout your project into the "projects". 6. Run cruisecontrol.bat (Windows) or cruisecontrol.sh (Unix). NOTE: If you're using Subversion instead of CVS, download svnant. Extract the download into your work directory, delete everything but it's "lib" directory and adjust the path in build.xml accordingly.I was puzzled why my HTML E-Mails didn't contain all the pretty formatting like Spring's does. Then I looked at their latest archived one and noticed it looks the same on Gmane as it does in GMail. I'd recommend sending your build notifications to an e-mail account that can be read with a good HTML e-mail reader. If you want to use CruiseControl to build your Equinox project, that's in Equinox's CVS. Setup CruiseControl DaemonAfter getting all the above working, I setup CruiseControl to run as a daemon. I has some issues with getting these instructions working, so I pinged the mailing list. After a few back-and-forth e-mails, the following solution worked for me on Suse 10.
#!/bin/sh #content of /opt/cruisecontrol/init script # chkconfig: 345 99 05 # description: CruiseControl build loop (see /home/tools) # based on http://confluence.public.thoughtworks.org/display/CC/RunningCruiseControlFromUnixInit # adapted for multiple projects # # Cruise Control startup: Startup and kill script for Cruise Control # PATH=/sbin:/usr/sbin:/usr/bin:/bin export PATH NAME=cruisecontrol DESC="CruiseControl 2.2 continuous integration build loop" CC_USER=mraible CC_WORK_DIR=/opt/tools/cruisecontrol CC_INSTALL_DIR=/opt/tools/cruisecontrol CC_DAEMON=$CC_INSTALL_DIR/cruise.sh CC_CONFIG_FILE=$CC_WORK_DIR/config.xml CC_LOG_FILE=$CC_WORK_DIR/cruisecontrol.log CC_PORT=8082 CC_RMIPORT= CC_COMMAND="$CC_DAEMON -configfile $CC_CONFIG_FILE -port $CC_PORT -rmiport $CC_RMIPORT" # overwrite settings from default file if [ -f /etc/default/cruisecontrol ]; then . /etc/default/cruisecontrol fi test -f $CC_DAEMON || exit 0 if [ `id -u` -ne 0 ]; then echo "Not starting/stopping $DESC, you are not root." exit 4 fi # PPID is read-only in my shell - GNU bash, version 2.05b.0(1)-release (i586-mandrake-linux-gnu) PARPID=`ps -ea -o "pid ppid args" | grep -v grep | grep "${CC_DAEMON}" | sed -e 's/^ *//' -e 's/ .*//'` if [ "${PARPID}" != "" ] then PID=`ps -ea -o "pid ppid args" | grep -v grep | grep java | grep "${PARPID}" | \ sed -e 's/^ *//' -e 's/ .*//'` fi case "$1" in 'start') # going into the work dir allows for use of relative PATHs in the config file cd $CC_WORK_DIR su $CC_USER -c "$CC_COMMAND >> $CC_LOG_FILE 2>&1" & RETVAL=$? echo "$NAME started with jmx on port ${CC_PORT}" ;; 'stop') if [ "${PID}" != "" ] then kill -9 ${PID} ${PARPID} $0 status RETVAL=$? else echo "$NAME is not running" RETVAL=1 fi ;; 'status') # echo PARPIDs $PARPID # echo PIDs $PID kill -0 $PID >/dev/null 2>&1 if [ "$?" = "0" ] then echo $NAME \(pids $PARPID $PID\) is running RETVAL=0 else echo "$NAME is stopped" RETVAL=1 fi ;; 'restart') $0 stop && $0 start RETVAL=$? ;; *) echo "Usage: $0 { start | stop | status | restart }" exit 1 ;; esac #echo ending $0 $$.... exit 0; That's it - you should be able to run /etc/init.d/cruisecontrol as root and CC will check for new updates every hour. Attachments:
|