david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 1 | <project |
david_williams | 05dbe62 | 2007-12-09 01:20:57 +0000 | [diff] [blame] | 2 | name="PDECustomTargets" |
| 3 | default="noDefault" |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 4 | basedir="."> |
| 5 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 6 | <!-- = = = standard properties pattern = = = |
david_williams | 886167e | 2007-12-13 04:42:37 +0000 | [diff] [blame] | 7 | |
david_williams | 886167e | 2007-12-13 04:42:37 +0000 | [diff] [blame] | 8 | Note to be cross-platform, "environment variables" are only appropriate for |
| 9 | some variables, e.g. ones we set, since properties are case sensitive, even if |
| 10 | the environment variables on your operating system are not, e.g. it will |
| 11 | be ${env.Path} not ${env.PATH} on Windows --> |
| 12 | <property environment="env" /> |
| 13 | |
| 14 | <!-- |
| 15 | Let users override standard properties, if desired. |
| 16 | If directory, file, or some properties do not exist, |
| 17 | then standard properties will be used. |
| 18 | --> |
| 19 | <property |
| 20 | file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| 21 | |
| 22 | <!-- let this project specify properties, if not already set --> |
| 23 | <property file="build.properties" /> |
| 24 | |
david_williams | c253e57 | 2009-08-04 07:09:44 +0000 | [diff] [blame] | 25 | <fail message="dependency.properties must be specified by distribution script" |
david_williams | 82a6c64 | 2008-10-08 14:52:33 +0000 | [diff] [blame] | 26 | unless="dependency.properties" /> |
| 27 | |
| 28 | |
| 29 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 30 | <fail |
| 31 | unless="buildDirectory" |
| 32 | message="buildDirectory must be set" /> |
| 33 | <echo message="buildDirectory: ${buildDirectory}" /> |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 34 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 35 | <!-- |
| 36 | Run a given ${target} on all elements being built |
| 37 | Add on <ant> task for each top level element being built. |
| 38 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 39 | <target name="allElements"> |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 40 | <echo |
| 41 | level="info" |
| 42 | message="Target:${target} " /> |
| 43 | <echo |
| 44 | level="debug" |
| 45 | message="basedir: ${basedir}" /> |
| 46 | <echo |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 47 | level="info" |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 48 | message="component: ${component}" /> |
| 49 | <echo |
| 50 | level="debug" |
| 51 | message="buildDirectory: ${buildDirectory}" /> |
| 52 | <echo |
| 53 | level="debug" |
| 54 | message="baseLocation: ${baseLocation}" /> |
| 55 | <echo |
| 56 | level="debug" |
| 57 | message="generic target: ${genericTargets}" /> |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 58 | <echo |
| 59 | message="compilerArg: ${compilerArg}" /> |
| 60 | <echo |
| 61 | message="individualSourceBundles: ${individualSourceBundles}" /> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 62 | <ant |
| 63 | antfile="${genericTargets}" |
| 64 | target="${target}"> |
| 65 | <property |
| 66 | name="type" |
| 67 | value="feature" /> |
| 68 | <property |
| 69 | name="id" |
| 70 | value="org.eclipse.jst.sdk" /> |
| 71 | </ant> |
| 72 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 73 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 74 | <!-- |
| 75 | Targets to assemble the built elements for particular configurations |
| 76 | These generally call the generated assemble scripts (named in |
| 77 | ${assembleScriptName}) but may also add pre and post processing |
| 78 | Add one target for each root element and each configuration |
| 79 | --> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 80 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 81 | <target name="assemble.org.eclipse.jst.sdk"> |
| 82 | <property |
| 83 | name="archiveName" |
| 84 | value="wtp-jst-sdk-${buildLabel}.zip" /> |
| 85 | <ant |
| 86 | antfile="${assembleScriptName}" |
| 87 | dir="${buildDirectory}" /> |
| 88 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 89 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 90 | <target name="prePackage" /> |
david_williams | a0aec8e | 2006-05-23 00:29:00 +0000 | [diff] [blame] | 91 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 92 | <target name="postPackage"> |
david_williams | a0aec8e | 2006-05-23 00:29:00 +0000 | [diff] [blame] | 93 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 94 | <property |
| 95 | name="archiveName" |
| 96 | value="wtp-jst-sdk-${buildLabel}.zip" /> |
david_williams | a0aec8e | 2006-05-23 00:29:00 +0000 | [diff] [blame] | 97 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 98 | <ant |
| 99 | antfile="${wtp.builder.home}/scripts/build/buildutilities.xml" |
| 100 | target="unpackUpdateJarsAndCreateZippedPackages"> |
| 101 | <property |
| 102 | name="buildDirectory" |
| 103 | value="${buildDirectory}" /> |
| 104 | <property |
| 105 | name="buildLabel" |
| 106 | value="${buildLabel}" /> |
| 107 | <property |
| 108 | name="archiveName" |
| 109 | value="${archiveName}" /> |
| 110 | </ant> |
david_williams | a0aec8e | 2006-05-23 00:29:00 +0000 | [diff] [blame] | 111 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 112 | </target> |
david_williams | a0aec8e | 2006-05-23 00:29:00 +0000 | [diff] [blame] | 113 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 114 | <!-- |
| 115 | Check out map files from repository |
| 116 | --> |
| 117 | <target name="getMapFiles"> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 118 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 119 | <!-- for now, get all, at once. May componetize later. --> |
david_williams | 5ad66ff | 2007-07-01 03:35:33 +0000 | [diff] [blame] | 120 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 121 | <ant |
| 122 | antfile="${wtp.builder.home}/scripts/build/maptasks.xml" |
| 123 | target="fetchAllMaps" /> |
david_williams | 5ad66ff | 2007-07-01 03:35:33 +0000 | [diff] [blame] | 124 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 125 | </target> |
| 126 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 127 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 128 | <!-- |
| 129 | Steps to do before setup |
| 130 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 131 | <target name="preSetup"></target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 132 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 133 | <!-- |
| 134 | Steps to do after setup but before starting the build proper |
| 135 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 136 | <target name="postSetup"> |
| 137 | <dirname |
| 138 | file="${ant.file}" |
| 139 | property="component.dir" /> |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 140 | <echo |
| 141 | level="debug" |
| 142 | message="ant.file: ${ant.file}" /> |
| 143 | <echo |
| 144 | level="debug" |
| 145 | message="component.dir: ${component.dir}" /> |
ndai | dab24cb | 2006-07-28 15:22:38 +0000 | [diff] [blame] | 146 | |
david_williams | 82a6c64 | 2008-10-08 14:52:33 +0000 | [diff] [blame] | 147 | <!-- Get the dependencies --> |
| 148 | <antcall target="getDependencies" /> |
| 149 | |
| 150 | </target> |
| 151 | |
| 152 | <!-- ===================================================================== --> |
| 153 | <!-- Get the dependencies based on releng maps --> |
| 154 | <!-- ===================================================================== --> |
| 155 | <target name="getDependencies"> |
| 156 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 157 | <ant |
| 158 | antfile="${component.dir}/dependency.xml" |
| 159 | target="get"> |
| 160 | <property |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 161 | name="base.install.dir" |
| 162 | value="${buildRoot}" /> |
| 163 | </ant> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 164 | </target> |
ndai | dab24cb | 2006-07-28 15:22:38 +0000 | [diff] [blame] | 165 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 166 | <!-- |
| 167 | Steps to do before fetching the build elements |
| 168 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 169 | <target name="preFetch"></target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 170 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 171 | <!-- |
| 172 | Steps to do after fetching the build elements |
| 173 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 174 | <target name="postFetch"></target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 175 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 176 | <!-- |
| 177 | Steps to do before generating the build scripts. |
| 178 | --> |
david_williams | 82a6c64 | 2008-10-08 14:52:33 +0000 | [diff] [blame] | 179 | <target name="preGenerate"></target> |
| 180 | |
| 181 | <!-- |
| 182 | Steps to do after generating the build scripts. |
| 183 | --> |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 184 | <target name="postGenerate"> |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 185 | <echo message="buildDirectory: ${buildDirectory}" /> |
david_williams | 5ad66ff | 2007-07-01 03:35:33 +0000 | [diff] [blame] | 186 | <customizeAccessRules |
| 187 | bundleDirectory="${buildDirectory}/plugins" |
| 188 | defaultRules="+org/eclipse/wst/**/*, +org/eclipse/jst/**/*" /> |
david_williams | 0b74c59 | 2007-04-09 06:11:35 +0000 | [diff] [blame] | 189 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 190 | |
| 191 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 192 | <!-- |
| 193 | Steps to do before running the build.xmls for the elements being built. |
| 194 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 195 | <target name="preProcess"> |
| 196 | <replace |
| 197 | dir="${buildDirectory}/plugins" |
| 198 | value="${timestamp}" |
| 199 | token="@build@"> |
| 200 | <include name="**/about.mappings" /> |
| 201 | </replace> |
| 202 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 203 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 204 | <!-- |
| 205 | Steps to do after running the build.xmls for the elements being built. |
| 206 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 207 | <target name="postProcess"> |
| 208 | <condition property="logsAvailable"> |
| 209 | <istrue value="${javacVerbose}" /> |
| 210 | </condition> |
david_williams | 5ad66ff | 2007-07-01 03:35:33 +0000 | [diff] [blame] | 211 | <antcall target="gatherLogs" /> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 212 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 213 | |
| 214 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 215 | <!-- |
| 216 | Steps to do before running assemble. |
| 217 | --> |
| 218 | <target name="preAssemble"></target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 219 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 220 | <!-- |
| 221 | Steps to do after running assemble. |
| 222 | --> |
| 223 | <target name="postAssemble"></target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 224 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 225 | <!-- |
| 226 | Steps to do after the build is done. |
| 227 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 228 | <target name="postBuild"></target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 229 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 230 | <!-- |
| 231 | Steps to do to test the build results |
| 232 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 233 | <target name="test"></target> |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame] | 234 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 235 | <!-- |
| 236 | Steps to do to publish the build results |
| 237 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 238 | <target name="publish"></target> |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame] | 239 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 240 | <!-- |
| 241 | Helper targets |
| 242 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 243 | <target |
| 244 | name="gatherLogs" |
| 245 | if="logsAvailable"> |
| 246 | <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" /> |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 247 | <echo |
| 248 | level="debug" |
| 249 | message="logExtension: ${logExtension}" /> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 250 | <antcall target="allElements"> |
| 251 | <param |
| 252 | name="target" |
| 253 | value="gatherLogs" /> |
david_williams | 803b3cd | 2007-12-13 07:37:16 +0000 | [diff] [blame] | 254 | <param |
| 255 | name="logExtension" |
| 256 | value="${logExtension}" /> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 257 | </antcall> |
david_williams | 2cfd297 | 2009-11-03 19:09:58 +0000 | [diff] [blame] | 258 | |
david_williams | 0b74c59 | 2007-04-09 06:11:35 +0000 | [diff] [blame] | 259 | |
david_williams | e450be7 | 2007-02-24 01:58:16 +0000 | [diff] [blame] | 260 | <!-- workaround: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156043 --> |
| 261 | <!-- and https://bugs.eclipse.org/bugs/show_bug.cgi?id=172361 --> |
| 262 | <copy |
| 263 | todir="${buildDirectory}/${buildLabel}/compilelogs" |
david_williams | 93e4d97 | 2009-11-03 21:26:49 +0000 | [diff] [blame^] | 264 | overwrite="false" |
| 265 | flatten="true"> |
david_williams | 9b21810 | 2009-11-03 20:33:57 +0000 | [diff] [blame] | 266 | <!-- |
| 267 | we want all @dot.xml files, but assumes a certain structure, to include |
| 268 | directory for name of plugin |
| 269 | --> |
david_williams | e450be7 | 2007-02-24 01:58:16 +0000 | [diff] [blame] | 270 | <fileset |
david_williams | 9b21810 | 2009-11-03 20:33:57 +0000 | [diff] [blame] | 271 | dir="${buildDirectory}/features/" > |
| 272 | |
| 273 | <include name="**/feature.temp.folder/"/> |
| 274 | |
| 275 | </fileset> |
| 276 | |
david_williams | e450be7 | 2007-02-24 01:58:16 +0000 | [diff] [blame] | 277 | </copy> |
| 278 | |
david_williams | 0b74c59 | 2007-04-09 06:11:35 +0000 | [diff] [blame] | 279 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 280 | </target> |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame] | 281 | |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 282 | <target |
| 283 | name="clean" |
| 284 | unless="noclean"> |
| 285 | <antcall target="allElements"> |
| 286 | <param |
| 287 | name="target" |
| 288 | value="cleanElement" /> |
| 289 | </antcall> |
| 290 | </target> |
david_williams | 3696f6f | 2005-12-30 07:59:43 +0000 | [diff] [blame] | 291 | |
david_williams | b641ce3 | 2008-07-01 03:36:40 +0000 | [diff] [blame] | 292 | <!-- |
| 293 | Default target |
| 294 | --> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 295 | <target name="noDefault"> |
david_williams | 403beae | 2007-12-09 02:10:40 +0000 | [diff] [blame] | 296 | <echo |
| 297 | level="error" |
david_williams | 5ad66ff | 2007-07-01 03:35:33 +0000 | [diff] [blame] | 298 | message="You must specify a target when invoking this file" /> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 299 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 300 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 301 | </project> |