1 <project name="groovy-cruisecontrol-starter" default="cruise">
3 <property name="svn.tag" value="https://svn.codehaus.org/groovy/tags/cc"/>
4 <property name="dir.checkout" value=".."/>
5 <property name="svn.user" value="dierk"/>
7 <!--target name="cruise" depends="update, copy-reporting-app, delegate"/-->
8 <target name="cruise" depends="update, copy-reporting-app, delegate, tagLastBuild"/>
10 <!-- label is given by CruiseControl, provides a default value here for the case where the admin starts
11 this script manually. -->
13 <property name="label" value="manualBuild"/>
15 <target name="update">
16 <echo message="*** getting the detected modifications ***"/>
17 <exec executable="svn" failonerror="true">
18 <arg line="--username ${svn.user} --non-interactive"/>
19 <arg line="update ${dir.checkout}"/>
23 <target name="delegate" description="Groovy-specific build parts">
24 <!-- disabled dk: no maven for Groovy build
25 <echo message="*** Starting the groovy-specific Maven 1 build parts ***"/>
26 <exec dir=".." executable="maven" failonerror="true"/>
27 <echo message="*** groovy build Maven 1 successfully ended ***"/>
29 <ant dir=".." antfile="build.xml" target="clean"/>
30 <ant dir=".." antfile="build.xml" target="cruise">
31 <property name="buildnumber" value="${label}"/>
33 <echo message="*** groovy (${label}) Ant build successfully ended ***"/>
36 <target name="tagLastBuild">
37 <exec executable="svn" failonerror="true">
38 <arg line="--username ${svn.user} --non-interactive"/>
39 <arg line="copy -m '' ${dir.checkout} ${svn.tag}/${label}"/>
41 <exec executable="svn" failonerror="true">
42 <arg line="--username ${svn.user} --non-interactive"/>
43 <arg line="rm -m '' ${svn.tag}/LAST_BUILD"/>
45 <exec executable="svn" failonerror="true">
46 <arg line="--username ${svn.user} --non-interactive"/>
47 <arg line="copy -m '' ${svn.tag}/${label} ${svn.tag}/LAST_BUILD"/>
51 <target name="copy-reporting-app">
52 <fail unless="reporting-app-dir" message="The property reporting-app-dir must be set from outside!" />
53 <copy todir="${reporting-app-dir}" > <!-- overwrite="true" can be needed occasionally -->
54 <fileset dir="reporting-app" /> <!-- only changes to web.xml need context reload -->