Liu, Zhihai wrote:

Thank you, Dion. I heard of CruiseControl but am reluctant to switch to it
just because of this requirement. That's why I am searching for a quick and
easy solution.



See the 'pragmatic project automation' example chapter (can't remember the exact link now), for installing and configuring cruisecontrol.

On a Windows box it is *very* simple. I had implemented this within 1 hour.

My cruisecontrol config:
<cruisecontrol>
<project name="ProjectX" buildafterfailed="false">
<bootstrappers>
<currentbuildstatusbootstrapper
file="logs/ProjectX/currentbuildstatus.txt" />
</bootstrappers>
<modificationset quietperiod="60">
<cvs localworkingcopy="checkout/ProjectX" />
</modificationset>
<schedule interval="60">
<ant buildfile="ProjectX-build.xml" target="build" />
</schedule>
<log dir="logs/ProjectX">
<merge dir="checkout/ProjectX/target/test-reports" />
</log>
<publishers>
<currentbuildstatuspublisher
file="logs/ProjectX/currentbuildstatus.txt" />
<execute command="checkbuild.bat" />
<htmlemail
mailhost="mailserver"
returnaddress="[EMAIL PROTECTED]"
defaultsuffix="@mailserver"
buildresultsurl="http://buildserver/cruisecontrol/buildresults/ProjectX";
css="d:/cruisecontrol-2.1.6/reporting/jsp/css/cruisecontrol.css"
xsldir="d:/cruisecontrol-2.1.6/reporting/jsp/xsl"
logdir="logs/ProjectX">


<always address="user1" />
<failure address="user2" reportWhenFixed="true" />
</htmlemail> </publishers>
</project>
</cruisecontrol>


<?xml version="1.0"?>
<project name="cc-build" default="build" basedir="checkout">
<target name="build">
<delete dir="ProjectX"/>
<cvs command="co ProjectX" cvsRoot=":pserver:[EMAIL PROTECTED]:d:/cvs"/>
<exec executable="maven.bat" dir="ProjectX">
<arg line="clean site:deploy"/>
</exec>
<!-- checks if 'failure' or 'error' exists in the TEST-results.xml files -->
<exec executable="checkbuild.bat" dir="d:/builds"/>
<available file="ProjectX.FAIL" filepath="d:/builds" property="build.failure"/>
<fail if="build.failure" message="Tests failed" />
</target>
</project>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to