Thank you, Martijn. I followed your examples and got Maven + CruiseControl
running.
It is a little off topic, but I have another question. I have a target to
run unit tests in cc-build.xml.
<target name="test" depends="prepare">
<exec executable="maven.bat" dir="myapp">
<arg line="clean:clean test:test" />
</exec>
</target>
There are some compile errors in the code, but CruiseControl's email
publisher still said "build successful" and skipped unit tests. I noticed
you have a "check failure" step in your example. How does it work? and can
you include the error messages in the log file into the email publisher?
Thanks in advance.
-----Original Message-----
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Monday, August 23, 2004 10:39 AM
To: Maven Users List
Subject: Re: email maven build log
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]