There are a few slight modifications to make to the ant script that will be used to build using Hudson.

1. In the build.properties file the following needs to be added:

writableBuildRoot=${WORKSPACE}/build

2. In the build.properties file the property settings for forceContext and fetchTag can be set or the values can be specified in the build script. These settings control how the plugin qualifiers are created and where the code is retrieve (i.e. Head or if not specified according to your map entries).

3. In the ANT script by default in the Build from Eclipse script, the build directory is the same name as the BuildType and Timestamp of the build. However, this can leave extra directories laying around on Hudson taking up space. So it is recommended that this directory be set to something like athena:

<property name="buildDir" value="${writableBuildRoot}/athena" />

Build DirThis can also be set in the build.properties file as well.

4. (Optional) If their are long delays between when the build actuall finishes the last target and the cleanup step, an alternative custom cleanup step can be created to delete specific items. Athena uses the <fileset> option in many places and depending on the size of the directories and number of files, this can take a long time to do cleanups. See sample ant script for an alternative.

Sample Ant Script

The following is taken from the cbi-wtp-wst.xsl-psychopath build that is currently running on Athena. This build experienced a 20 minute delay at times in the cleanup process, and by switching to a customized cleanup target the cleanup improved (i.e. 20 minute delay cut down to 1 minute).

<projectdefault="run"name="org.eclipse.wst.xml.xpath2.releng/build.xml - Run a PsychoPath build using the Athena CBI"><!-- load properties and set timestamp for the build --><propertyname="WORKSPACE"location="../../../../"/><propertyenvironment="env"/><propertyfile="build.properties"/><tstamp><formatproperty="buildTimestamp"pattern="yyyyMMddHHmm"/></tstamp><propertyname="forceContextQualifier"value="v${buildTimestamp}"/><propertyname="fetchTag"value="HEAD"/><!-- calculate workspaceDir as parent of this folder, the project's .releng folder (relengBuilderDir) --><propertyname="relengBuilderDir"value="${basedir}"/><dirnamefile="${relengBuilderDir}"property="workspaceDir"/><!-- can build in /tmp, eg., in /tmp/build, or in workspace, eg., ${WORKSPACE}/build --><propertyname="writableBuildRoot"value="/tmp/build"/><!-- can be simple path, eg., ${writableBuildRoot}/${buildType}${buildTimestamp} or longer, eg., ${writableBuildRoot}/${topprojectName}/${projectName}/downloads/drops/${version}/${buildType}${buildTimestamp} or ${writableBuildRoot}/${topprojectName}/${projectName}/${subprojectName}/downloads/drops/${version}/${buildType}${buildTimestamp} --><propertyname="buildDir"value="${writableBuildRoot}/athena"/><targetname="init"><deletedir="${buildDir}"failonerror="false"/></target><targetname="run"depends="init"><echomessage="Workspace: ${WORKSPACE}"/><echomessage="Writable Build Root: ${writableBuildRoot}"/><mkdirdir="${writableBuildRoot}"/><!-- invoke a new Eclipse process and launch the build from the common.releng folder --><propertyname="relengCommonBuilderDir"value="${workspaceDir}/org.eclipse.dash.common.releng"/><antantfile="${relengCommonBuilderDir}/buildAll.xml"target="runEclipse"dir="${relengCommonBuilderDir}"/><antcalltarget="cleanUp"inheritall="true"/></target><targetname="cleanUp"><deletedir="${buildDir}/eclipse"failonerror="false"/><deletedir="${buildDir}/testing"failonerror="false"/><deletedir="${buildDir}/compilelogs"failonerror="false"/><deletedir="${buildDir}/testresults/consolelogs"failonerror="false"/><deletedir="${buildDir}/testresults/html"failonerror="false"/><delete><filesetdir="${writableBuildRoot}"><includename="**/*AllFeatures*.zip"/><includename="**/*Master*.zip"/></fileset></delete></target></project>