ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 1 | <project name="Build specific targets and properties" default="noDefault" > |
| 2 | <property name="postingDirectory" value="${buildDirectory}" /> |
| 3 | |
| 4 | <!-- ===================================================================== --> |
| 5 | <!-- Run a given ${target} on all elements being built --> |
| 6 | <!-- Add on <ant> task for each top level element being built. --> |
| 7 | <!-- ===================================================================== --> |
| 8 | <target name="allElements"> |
| 9 | <echo message="Target: ${target} " /> |
| 10 | <echo message="basedir: ${basedir}" /> |
| 11 | <echo message="component: ${component}" /> |
| 12 | <echo message="buildDirectory: ${buildDirectory}" /> |
| 13 | <echo message="baseLocation: ${baseLocation}" /> |
| 14 | |
| 15 | <ant antfile="${genericTargets}" target="${target}" > |
| 16 | <property name="type" value="feature" /> |
| 17 | <property name="id" value="org.eclipse.dali.tests" /> |
| 18 | </ant> |
| 19 | </target> |
| 20 | |
| 21 | <!-- ===================================================================== --> |
| 22 | <!-- Targets to assemble the built elements for particular configurations --> |
| 23 | <!-- These generally call the generated assemble scripts (named in --> |
| 24 | <!-- ${assembleScriptName}) but may also add pre and post processing --> |
| 25 | <!-- Add one target for each root element and each configuration --> |
| 26 | <!-- ===================================================================== --> |
| 27 | |
| 28 | <target name="assemble.org.eclipse.dali"> |
| 29 | <property name="archiveName" value="dali-${buildLabel}.zip" /> |
| 30 | |
| 31 | <ant antfile="${assembleScriptName}" dir="${buildDirectory}" /> |
| 32 | |
| 33 | <mkdir dir="${postingDirectory}/${buildLabel}/checksum" /> |
| 34 | <checksum file="${postingDirectory}/${buildLabel}/dali-${buildLabel}.zip" property="md5" /> |
| 35 | |
| 36 | <echo message="${md5} *dali-${buildLabel}.zip" |
| 37 | file="${postingDirectory}/${buildLabel}/checksum/dali-${buildLabel}.zip.md5" /> |
| 38 | <echo message="${md5}" |
| 39 | file="${postingDirectory}/${buildLabel}/checksum/dali-${buildLabel}.zip.md5antformat" /> |
| 40 | </target> |
| 41 | |
| 42 | <!-- ===================================================================== --> |
| 43 | <!-- Targets to assemble the built elements for particular configurations --> |
| 44 | <!-- These generally call the generated assemble scripts (named in --> |
| 45 | <!-- ${assembleScriptName}) but may also add pre and post processing --> |
| 46 | <!-- Add one target for each root element and each configuration --> |
| 47 | <!-- ===================================================================== --> |
| 48 | |
| 49 | <target name="assemble.org.eclipse.dali.tests"> |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 50 | <property name="archiveName" value="dali-Automated-Tests-${buildLabel}.zip" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 51 | |
| 52 | <ant antfile="${assembleScriptName}" dir="${buildDirectory}" /> |
| 53 | |
| 54 | <mkdir dir="${postingDirectory}/${buildLabel}/checksum" /> |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 55 | <checksum file="${postingDirectory}/${buildLabel}/dali-Automated-Tests-${buildLabel}.zip" property="md5" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 56 | |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 57 | <echo message="${md5} *dali-Automated-Tests-${buildLabel}.zip" |
| 58 | file="${postingDirectory}/${buildLabel}/checksum/dali-Automated-Tests-${buildLabel}.zip.md5" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 59 | <echo message="${md5}" |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 60 | file="${postingDirectory}/${buildLabel}/checksum/dali-Automated-Tests-${buildLabel}.zip.md5antformat" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 61 | </target> |
| 62 | |
| 63 | |
| 64 | <!-- ===================================================================== --> |
| 65 | <!-- Check out map files from correct repository --> |
| 66 | <!-- Replace values for cvsRoot, package and mapVersionTag as desired. --> |
| 67 | <!-- ===================================================================== --> |
| 68 | <target name="checkLocal"> |
| 69 | <available property="mapsLocal" file="${buildDirectory}/maps/releng.dali" /> |
| 70 | </target> |
| 71 | |
| 72 | <target name="getMapFiles" depends="checkLocal" unless="mapsLocal"> |
| 73 | |
| 74 | <!-- *** change the repo info --> |
| 75 | <property name="mapCvsRoot" value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" /> |
| 76 | <property name="mapVersionTag" value="HEAD" /> |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 77 | <property name="cvsPackage" value="releng.dali" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 78 | <echo message="${mapCvsRoot} ${mapVersionTag} "/> |
| 79 | <echo message="cvsPackage = ${cvsPackage} "/> |
| 80 | |
| 81 | <cvs cvsRoot="${mapCvsRoot}" package="${cvsPackage}" dest="${buildDirectory}/maps" tag="${mapVersionTag}" /> |
| 82 | <!--tag the map files project--> |
| 83 | <antcall target="tagMapFiles"> |
| 84 | <param name="mapCvsRoot" value="${mapCvsRoot}" /> |
| 85 | </antcall> |
| 86 | </target> |
| 87 | |
| 88 | <target name="tagMapFiles" if="tagMaps"> |
| 89 | <cvs cvsRoot="${mapCvsRoot}" dest="${buildDirectory}/maps" command="tag v${buildType}${timestamp}" /> |
| 90 | </target> |
| 91 | |
| 92 | <!-- ===================================================================== --> |
| 93 | <!-- Steps to do before setup --> |
| 94 | <!-- ===================================================================== --> |
| 95 | <target name="preSetup"> |
| 96 | </target> |
| 97 | |
| 98 | <!-- ===================================================================== --> |
| 99 | <!-- Steps to do after setup but before starting the build proper --> |
| 100 | <!-- ===================================================================== --> |
| 101 | <target name="postSetup"> |
| 102 | <dirname file="${ant.file}" property="component.dir" /> |
| 103 | <echo message="ant.file: ${ant.file}" /> |
| 104 | <echo message="component.dir: ${component.dir}" /> |
| 105 | |
| 106 | <ant antfile="${component.dir}/dependency.xml" target="get"> |
| 107 | <property name="dependency.properties" value="${buildDirectory}/maps/releng.dali/maps/dependencies.properties" /> |
| 108 | <property name="base.install.dir" value="${buildRoot}" /> |
| 109 | </ant> |
| 110 | <!--fetch the additional pieces to build dali tests --> |
| 111 | <property name="featureOnly" value="false" /> |
| 112 | <property name="featureAndPlugins" value="true" /> |
| 113 | <property name="featuresRecursively" value="true" /> |
| 114 | |
| 115 | <ant antfile="${genericTargets}" dir="${pde.build.scripts}" target="fetchElement"> |
| 116 | <property name="type" value="feature" /> |
| 117 | <property name="id" value="org.eclipse.dali" /> |
| 118 | </ant> |
| 119 | </target> |
| 120 | |
| 121 | <!-- ===================================================================== --> |
| 122 | <!-- Steps to do before fetching the build elements --> |
| 123 | <!-- ===================================================================== --> |
| 124 | <target name="preFetch"> |
| 125 | </target> |
| 126 | |
| 127 | <!-- ===================================================================== --> |
| 128 | <!-- Steps to do after fetching the build elements --> |
| 129 | <!-- ===================================================================== --> |
| 130 | <target name="postFetch"> |
| 131 | </target> |
| 132 | |
| 133 | <!-- ===================================================================== --> |
| 134 | <!-- Steps to do before generating the build scripts. --> |
| 135 | <!-- ===================================================================== --> |
| 136 | <target name="preGenerate"> |
| 137 | </target> |
| 138 | |
| 139 | <!-- ===================================================================== --> |
| 140 | <!-- Steps to do after generating the build scripts. --> |
| 141 | <!-- ===================================================================== --> |
| 142 | <target name="postGenerate"> |
| 143 | </target> |
| 144 | |
| 145 | |
| 146 | <!-- ===================================================================== --> |
| 147 | <!-- Steps to do before running the build.xmls for the elements being built. --> |
| 148 | <!-- ===================================================================== --> |
| 149 | <target name="preProcess"> |
| 150 | </target> |
| 151 | |
| 152 | <!-- ===================================================================== --> |
| 153 | <!-- Steps to do after running the build.xmls for the elements being built. --> |
| 154 | <!-- ===================================================================== --> |
| 155 | <target name="postProcess"> |
| 156 | </target> |
| 157 | |
| 158 | |
| 159 | <!-- ===================================================================== --> |
| 160 | <!-- Steps to do before running assemble. --> |
| 161 | <!-- ===================================================================== --> |
| 162 | <target name="preAssemble"> |
| 163 | </target> |
| 164 | |
| 165 | <!-- ===================================================================== --> |
| 166 | <!-- Steps to do after running assemble. --> |
| 167 | <!-- ===================================================================== --> |
| 168 | <target name="postAssemble"> |
| 169 | </target> |
| 170 | |
| 171 | <!-- ===================================================================== --> |
| 172 | <!-- Steps to do after the build is done. --> |
| 173 | <!-- ===================================================================== --> |
| 174 | <target name="postBuild"> |
| 175 | |
| 176 | <!-- create zipped up versions for update site --> |
david_williams | 518a869 | 2006-04-29 19:34:27 +0000 | [diff] [blame^] | 177 | <!-- removing for now, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=139268 |
| 178 | |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 179 | <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite" /> |
| 180 | <antcall target="generateUpdateSite" /> |
david_williams | 518a869 | 2006-04-29 19:34:27 +0000 | [diff] [blame^] | 181 | --> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 182 | </target> |
| 183 | |
| 184 | <target name="generateUpdateSite"> |
| 185 | <!-- Create the directory structure --> |
| 186 | <mkdir dir="${UpdateSiteStagingLocation}" /> |
| 187 | <mkdir dir="${UpdateSiteStagingLocation}/features" /> |
| 188 | <mkdir dir="${UpdateSiteStagingLocation}/plugins" /> |
| 189 | <!-- Build the jar files --> |
| 190 | <antcall target="allElements"> |
| 191 | <param name="genericTargets" value="${builder}/customTargets.xml" /> |
| 192 | <param name="target" value="updateSiteExport" /> |
| 193 | </antcall> |
| 194 | <antcall target="copySiteXmlFromCvs" /> |
| 195 | <antcall target="createNightlyBuildSiteXml" /> |
| 196 | </target> |
| 197 | <target name="updateSiteExport"> |
| 198 | <ant antfile="build.xml" |
| 199 | dir="${buildDirectory}/features/${id}/" |
| 200 | target="build.update.jar"> |
| 201 | <property name="feature.destination" value="${UpdateSiteStagingLocation}/features" /> |
| 202 | <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins" /> |
| 203 | </ant> |
| 204 | </target> |
| 205 | <target name="copySiteXmlFromCvs" unless="isNightlyBuild"> |
| 206 | <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards --> |
| 207 | </target> |
| 208 | <target name="createNightlyBuildSiteXml" if="isNightlyBuild"> |
| 209 | <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version --> |
| 210 | </target> |
| 211 | |
| 212 | <!-- ===================================================================== --> |
| 213 | <!-- Steps to test the build results --> |
| 214 | <!-- ===================================================================== --> |
| 215 | <target name="test" unless="dontRunTests"> |
| 216 | <property name="eclipseAutomatedTestHome" value="${buildDirectory}/plugins/org.eclipse.dali.utility.tests" /> |
| 217 | |
| 218 | <echo message="Setting up tests in ${eclipseAutomatedTestHome}"/> |
| 219 | |
| 220 | <copy file="${buildDirectory}/${buildLabel}/dali-${buildLabel}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-SDK-dali-${buildLabel}.zip" /> |
ndai | 8ab0953 | 2006-03-29 08:48:53 +0000 | [diff] [blame] | 221 | <copy file="${buildDirectory}/${buildLabel}/dali-Automated-Tests-${buildLabel}.zip" tofile="${eclipseAutomatedTestHome}/eclipse-junit-tests-dali-${buildLabel}.zip" /> |
ndai | 91f5c9b | 2006-03-12 13:56:45 +0000 | [diff] [blame] | 222 | |
| 223 | <ant antfile="${eclipseAutomatedTestHome}/test.xml" target="run" dir="${eclipseAutomatedTestHome}"> |
| 224 | <property name="os" value="${baseos}" /> |
| 225 | <property name="ws" value="${basews}" /> |
| 226 | <property name="arch" value="${basearch}" /> |
| 227 | <property name="eclipse-home" value="${baseLocation}" /> |
| 228 | </ant> |
| 229 | |
| 230 | </target> |
| 231 | |
| 232 | <!-- ===================================================================== --> |
| 233 | <!-- Steps to do to publish the build results --> |
| 234 | <!-- ===================================================================== --> |
| 235 | <target name="publish"> |
| 236 | </target> |
| 237 | |
| 238 | <!-- ===================================================================== --> |
| 239 | <!-- Default target --> |
| 240 | <!-- ===================================================================== --> |
| 241 | <target name="noDefault"> |
| 242 | <echo message="You must specify a target when invoking this file" /> |
| 243 | </target> |
| 244 | |
| 245 | </project> |