> I am a maven beginner. We use maven to build and manage our 
> project. Right now we want to build a nightly build system 
> that will automatically build, deploy, run all the tests of 
> the project at least once a day. 
> Can anyone give me some ideas for it?

I use CruiseControl for this (http://cruisecontrol.sourceforge.net/). It has
acceptable Maven support.

My only real problem with this is that I want the daily build to happen
whether it needs to or not, and the CruiseControl philosophy seems to be
that things should only be built when code has change. I sort of hacked
around this by configuring the list of files CruiseControl looks at to see
if any changes happened to look at the CruiseControl's own log file, which
changes when the check for changes starts, thus guaranteeing that the
build's always happen.

A typical CruiseControl script for us looks like this (note that we use
Perforce for source control; the CVS config is slightly different). This
script compiles a project called "dispatcher". Note that the goal lists
contain a lot of goals from a custom plugin, but you can put whatever goals
you want:

<cruisecontrol>
   <!-- ******* dispatcher ******* -->
   <project name="dispatcher">
      <!-- Events that get executed all of the time when a build is started,
         before the actual build begins -->
      <bootstrappers>
         <currentbuildstatusbootstrapper
file="logs/current-dispatcher.txt"/>
         <p4bootstrapper path="//depot/dispatcher/main/project.xml"
p4port="p4depot.tagaudit.com:1666" p4user="p4daemon"
p4client="linux-cruise"/>
         <p4bootstrapper path="//depot/dispatcher/main/project.properties"
p4port="p4depot.tagaudit.com:1666" p4user="p4daemon"
p4client="linux-cruise"/>
         <p4bootstrapper path="//depot/dispatcher/main/maven.xml"
p4port="p4.domain.com:1666" p4user="p4daemon" p4client="linux-cruise"/>
      </bootstrappers>

      <!-- A set of data to look at to see if there have been changes 
         and, therefore, a new build is required. -->
      <modificationset quietperiod="0">
         <!-- Use the always changing log to force a build -->
         <filesystem folder="cruisecontrol.log"/>
         <p4 port="p4.domain.com:1666" user="p4daemon" client="linux-cruise"
view="//depot/dispatcher/main/..."/>
      </modificationset>

      <!-- The build process. Interval is in seconds. -->
      <schedule interval="300">
         <maven time="2300" mavenscript="/opt/maven/bin/maven"
projectfile="/home/build/cruise/checkout/dispatcher/main/project.xml"
goal="tag:bad-build-icon tag:checkout tag:clean|tag:build|tag:site
tag:good-build-icon"/>
      </schedule>

      <!-- Output -->
      <publishers>
         <currentbuildstatuspublisher file="logs/current-dispatcher.txt"/>
         <email
buildresultsurl="http://build.tagaudit.com:8080/cruisecontrol/buildresults/d
ispatcher/" defaultsuffix="@tagaudit.com" mailhost="mail"
reportsuccess="always" returnaddress="lward" subjectprefix="[BUILD]">
            <always address="lward"/>
            <failure address="lward"/>
            <success address="lward"/>
         </email>
      </publishers>
   </project>
</cruisecontrol>

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

Reply via email to