david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 1 | <project name="Build specific targets and properties" |
| 2 | default="noDefault"> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 3 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 4 | <property name="postingDirectory" |
| 5 | value="${buildDirectory}" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 6 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 7 | <!-- ===================================================================== --> |
| 8 | <!-- Run a given ${target} on all elements being built --> |
| 9 | <!-- Add on <ant> task for each top level element being built. --> |
| 10 | <!-- ===================================================================== --> |
| 11 | <target name="allElements"> |
| 12 | <echo message="Target:${target} " /> |
| 13 | <echo message="basedir: ${basedir}" /> |
| 14 | <echo message="component: ${component}" /> |
| 15 | <echo message="buildDirectory: ${buildDirectory}" /> |
| 16 | <echo message="baseLocation: ${baseLocation}" /> |
| 17 | <ant antfile="${genericTargets}" target="${target}"> |
| 18 | <property name="type" value="feature" /> |
| 19 | <property name="id" value="org.eclipse.jst" /> |
| 20 | </ant> |
| 21 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 22 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 23 | <!-- ===================================================================== --> |
| 24 | <!-- Targets to assemble the built elements for particular configurations --> |
| 25 | <!-- These generally call the generated assemble scripts (named in --> |
| 26 | <!-- ${assembleScriptName}) but may also add pre and post processing --> |
| 27 | <!-- Add one target for each root element and each configuration --> |
| 28 | <!-- ===================================================================== --> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 29 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 30 | <target name="assemble.org.eclipse.jst"> |
| 31 | <property name="archiveName" |
| 32 | value="wtp-${buildId}.zip" /> |
| 33 | <ant antfile="${assembleScriptName}" |
| 34 | dir="${buildDirectory}" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 35 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 36 | <mkdir dir="${postingDirectory}/${buildLabel}/checksum" /> |
| 37 | <checksum file="${postingDirectory}/${buildLabel}/wtp-${buildId}.zip" |
| 38 | property="md5" /> |
| 39 | <echo message="${md5} *wtp-${buildId}.zip" |
| 40 | file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildId}.zip.md5" /> |
| 41 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 42 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 43 | <!-- ===================================================================== --> |
| 44 | <!-- Check out map files from correct repository --> |
| 45 | <!-- Replace values for cvsRoot, package and mapVersionTag as desired. --> |
| 46 | <!-- ===================================================================== --> |
| 47 | <target name="checkLocal"> |
| 48 | <available property="mapsLocal" |
| 49 | file="${buildDirectory}/maps/releng" /> |
| 50 | </target> |
| 51 | <target name="getMapFiles" |
| 52 | depends="checkLocal" |
| 53 | unless="mapsLocal"> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 54 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 55 | <!-- *** change the repo info --> |
| 56 | <property name="mapCvsRoot" |
| 57 | value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" /> |
| 58 | <property name="mapVersionTag" value="HEAD" /> |
| 59 | <echo message="${mapCvsRoot} ${mapVersionTag} "> |
| 60 | </echo> |
| 61 | <cvs cvsRoot="${mapCvsRoot}" |
| 62 | package="releng" |
| 63 | dest="${buildDirectory}/maps" |
| 64 | tag="${mapVersionTag}" /> |
| 65 | <!--tag the map files project--> |
| 66 | <antcall target="tagMapFiles"> |
| 67 | <param name="mapCvsRoot" |
| 68 | value="${mapCvsRoot}" /> |
| 69 | </antcall> |
| 70 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 71 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 72 | <target name="tagMapFiles" if="tagMaps"> |
| 73 | <cvs cvsRoot="${mapCvsRoot}" |
| 74 | dest="${buildDirectory}/maps" |
| 75 | command="tag v${buildType}${timestamp}" /> |
| 76 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 77 | |
| 78 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 79 | <!-- ===================================================================== --> |
| 80 | <!-- Steps to do before setup --> |
| 81 | <!-- ===================================================================== --> |
| 82 | <target name="preSetup"> |
| 83 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 84 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 85 | <!-- ===================================================================== --> |
| 86 | <!-- Steps to do after setup but before starting the build proper --> |
| 87 | <!-- ===================================================================== --> |
| 88 | <target name="postSetup"> |
| 89 | <dirname file="${ant.file}" |
| 90 | property="component.dir" /> |
| 91 | <ant antfile="${component.dir}/dependency.xml" |
| 92 | target="get"> |
| 93 | <property name="dependency.properties" |
| 94 | value="${buildDirectory}/maps/releng/maps/dependencies.properties" /> |
| 95 | <property name="base.install.dir" |
| 96 | value="${buildRoot}" /> |
| 97 | </ant> |
| 98 | </target> |
| 99 | |
| 100 | <!-- ===================================================================== --> |
| 101 | <!-- Steps to do before fetching the build elements --> |
| 102 | <!-- ===================================================================== --> |
| 103 | <target name="preFetch"> |
| 104 | </target> |
| 105 | |
| 106 | <!-- ===================================================================== --> |
| 107 | <!-- Steps to do after fetching the build elements --> |
| 108 | <!-- ===================================================================== --> |
| 109 | <target name="postFetch"> |
| 110 | </target> |
| 111 | |
| 112 | <!-- ===================================================================== --> |
| 113 | <!-- Steps to do before generating the build scripts. --> |
| 114 | <!-- ===================================================================== --> |
| 115 | <target name="preGenerate"> |
| 116 | </target> |
| 117 | |
| 118 | <!-- ===================================================================== --> |
| 119 | <!-- Steps to do after generating the build scripts. --> |
| 120 | <!-- ===================================================================== --> |
| 121 | <target name="postGenerate"> |
| 122 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 123 | |
| 124 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 125 | <!-- ===================================================================== --> |
| 126 | <!-- Steps to do before running the build.xmls for the elements being built. --> |
| 127 | <!-- ===================================================================== --> |
| 128 | <target name="preProcess"> |
| 129 | <replace dir="${buildDirectory}/plugins" |
| 130 | value="${timestamp}" |
| 131 | token="@build@"> |
| 132 | <include name="**/about.mappings" /> |
| 133 | </replace> |
| 134 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 135 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 136 | <!-- ===================================================================== --> |
| 137 | <!-- Steps to do after running the build.xmls for the elements being built. --> |
| 138 | <!-- ===================================================================== --> |
| 139 | <target name="postProcess"> |
| 140 | <condition property="logsAvailable"> |
| 141 | <istrue value="${javacVerbose}" /> |
| 142 | </condition> |
| 143 | <antcall target="gatherLogs" /> |
| 144 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 145 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 146 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 147 | <!-- ===================================================================== --> |
| 148 | <!-- Steps to do before running assemble. --> |
| 149 | <!-- ===================================================================== --> |
| 150 | <target name="preAssemble"> |
| 151 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 152 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 153 | <!-- ===================================================================== --> |
| 154 | <!-- Steps to do after running assemble. --> |
| 155 | <!-- ===================================================================== --> |
| 156 | <target name="postAssemble"> |
| 157 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 158 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 159 | <!-- ===================================================================== --> |
| 160 | <!-- Steps to do after the build is done. --> |
| 161 | <!-- ===================================================================== --> |
| 162 | <target name="postBuild"> |
| 163 | <antcall target="postBuild-${buildType}" /> |
| 164 | <property name="assemble-all" |
| 165 | value="${buildDirectory}/assemble-all" /> |
| 166 | <unzip dest="${assemble-all}" |
| 167 | src="${postingDirectory}/${buildLabel}/wtp-${buildId}.zip" |
| 168 | overwrite="true" /> |
| 169 | <unzip dest="${assemble-all}" |
| 170 | src="${postingDirectory}/${buildLabel}/wtp-wst-${buildId}.zip" |
| 171 | overwrite="true" /> |
| 172 | <zip destfile="${postingDirectory}/${buildLabel}/wtp-${buildId}.zip" |
| 173 | basedir="${assemble-all}" /> |
| 174 | <delete file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildId}.zip.md5" |
| 175 | failonerror="false" /> |
| 176 | <checksum file="${postingDirectory}/${buildLabel}/wtp-${buildId}.zip" |
| 177 | property="md5combined" /> |
| 178 | <echo message="${md5combined} *wtp-${buildId}.zip" |
| 179 | file="${postingDirectory}/${buildLabel}/checksum/wtp-${buildId}.zip.md5" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 180 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 181 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 182 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 183 | <!-- create zipped up versions for update site --> |
| 184 | <property name="UpdateSiteStagingLocation" |
| 185 | value="${buildDirectory}/updateSite" /> |
| 186 | <antcall target="generateUpdateSite" /> |
| 187 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 188 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 189 | <target name="generateUpdateSite"> |
| 190 | <!-- Create the directory structure --> |
| 191 | <mkdir dir="${UpdateSiteStagingLocation}" /> |
| 192 | <mkdir dir="${UpdateSiteStagingLocation}/features" /> |
| 193 | <mkdir dir="${UpdateSiteStagingLocation}/plugins" /> |
| 194 | <!-- Build the jar files --> |
| 195 | <antcall target="allElements"> |
| 196 | <param name="genericTargets" |
| 197 | value="${builder}/customTargets.xml" /> |
| 198 | <param name="target" value="updateSiteExport" /> |
| 199 | </antcall> |
| 200 | <antcall target="copySiteXmlFromCvs" /> |
| 201 | <antcall target="createNightlyBuildSiteXml" /> |
| 202 | </target> |
| 203 | <target name="updateSiteExport"> |
| 204 | <ant antfile="build.xml" |
| 205 | dir="${buildDirectory}/features/${id}/" |
| 206 | target="build.update.jar"> |
| 207 | <property name="feature.destination" |
| 208 | value="${UpdateSiteStagingLocation}/features" /> |
| 209 | <property name="plugin.destination" |
| 210 | value="${UpdateSiteStagingLocation}/plugins" /> |
| 211 | </ant> |
| 212 | </target> |
| 213 | <target name="copySiteXmlFromCvs" |
| 214 | unless="isNightlyBuild"> |
| 215 | <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards --> |
| 216 | </target> |
| 217 | <target name="createNightlyBuildSiteXml" |
| 218 | if="isNightlyBuild"> |
| 219 | <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version --> |
| 220 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 221 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 222 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 223 | <target name="postBuild-I"> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 224 | |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame^] | 225 | </target> |
| 226 | |
| 227 | <target name="postBuild-N"> |
| 228 | </target> |
| 229 | |
| 230 | <target name="postBuild-M"> |
| 231 | </target> |
| 232 | |
| 233 | <target name="postBuild-R"> |
| 234 | </target> |
| 235 | |
| 236 | <target name="postBuild-S"> |
| 237 | </target> |
| 238 | |
| 239 | <target name="postBuild-T"> |
| 240 | </target> |
| 241 | |
| 242 | <target name="getEclipseWindows" |
| 243 | unless="eclipsefilewin.exists"> |
| 244 | <get src="${eclipseURL.win32}" |
| 245 | dest="${localDownloads}/${eclipseFile.win32}" /> |
| 246 | </target> |
| 247 | |
| 248 | <!-- ===================================================================== --> |
| 249 | <!-- Steps to do to test the build results --> |
| 250 | <!-- ===================================================================== --> |
| 251 | <target name="test"> |
| 252 | </target> |
| 253 | |
| 254 | <!-- ===================================================================== --> |
| 255 | <!-- Steps to do to publish the build results --> |
| 256 | <!-- ===================================================================== --> |
| 257 | <target name="publish"> |
| 258 | </target> |
| 259 | |
| 260 | <!-- ===================================================================== --> |
| 261 | <!-- Helper targets --> |
| 262 | <!-- ===================================================================== --> |
| 263 | <target name="gatherLogs" if="logsAvailable"> |
| 264 | <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" /> |
| 265 | <antcall target="allElements"> |
| 266 | <param name="target" value="gatherLogs" /> |
| 267 | </antcall> |
| 268 | |
| 269 | <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" |
| 270 | overwrite="true"> |
| 271 | <fileset dir="${buildDirectory}/features/org.eclipse.jst"> |
| 272 | <include name="*.log.zip" /> |
| 273 | </fileset> |
| 274 | </unzip> |
| 275 | </target> |
| 276 | |
| 277 | <target name="clean" unless="noclean"> |
| 278 | <antcall target="allElements"> |
| 279 | <param name="target" value="cleanElement" /> |
| 280 | </antcall> |
| 281 | </target> |
| 282 | |
| 283 | <!-- ===================================================================== --> |
| 284 | <!-- Default target --> |
| 285 | <!-- ===================================================================== --> |
| 286 | <target name="noDefault"> |
| 287 | <echo message="You must specify a target when invoking this file" /> |
| 288 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 289 | |
| 290 | </project> |