Merge commit 'codehaus'
[groovy.git] / cruise / build.xml
blobc8e1d2b60f32caffccc83dd964a606ea9a6f6069
1 <project name="groovy-cruisecontrol-starter" default="cruise"> 
2   
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"/>
6   
7   <!--target name="cruise" depends="update, copy-reporting-app, delegate"/-->
8   <target name="cruise" depends="update, copy-reporting-app, delegate, tagLastBuild"/>
9   
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"/>
14   
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}"/>
20     </exec>
21   </target>
22   
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          ***"/>
28     -->
29     <ant dir=".." antfile="build.xml" target="clean"/>
30         <ant dir=".." antfile="build.xml" target="cruise">
31                 <property name="buildnumber" value="${label}"/>
32         </ant>
33     <echo message="*** groovy (${label}) Ant build successfully ended ***"/>
34   </target>
35   
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}"/>
40     </exec>
41     <exec executable="svn" failonerror="true">
42       <arg line="--username ${svn.user} --non-interactive"/>
43       <arg line="rm -m '' ${svn.tag}/LAST_BUILD"/>
44     </exec>
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"/>
48     </exec>
49   </target>
50   
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 -->
55     </copy>
56   </target>
57 </project>