Is there a reason you're not using the maven specific capabilities of
CruiseControl?

i.e.

rather than 

        <schedule interval="60">
            <ant buildfile="ProjectX-build.xml" target="build" />
        </schedule>

have something like

        <schedule interval="300">
                <maven goal="clean:clean test:test"
projectfile="S:\fo_tcw_fip\TCW/project.xml"
mavenscript="C:/Progra~1/Apache~1/Maven1~1.0-R/bin/maven" /> 
        </schedule>



-----Original Message-----
From: Liu, Zhihai [mailto:[EMAIL PROTECTED] 
Sent: 02 September 2004 16:48
To: 'Maven Users List'
Subject: RE: email maven build log


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]


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


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

Reply via email to