nickboldt | 03a6f08 | 2019-02-12 15:17:11 -0500 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright (c) 2009, 2019 IBM Corporation and others. |
| 3 | This program and the accompanying materials |
| 4 | are made available under the terms of the Eclipse Public License 2.0 |
| 5 | which accompanies this distribution, and is available at |
| 6 | https://www.eclipse.org/legal/epl-2.0/ |
| 7 | |
| 8 | SPDX-License-Identifier: EPL-2.0 |
| 9 | |
| 10 | Contributors: |
| 11 | IBM Corporation - initial API and implementation |
| 12 | --> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 13 | <project |
| 14 | name="Build specific targets and properties" |
| 15 | default="build" |
| 16 | basedir="."> |
| 17 | <!-- |
| 18 | Note to be cross-platform, "environment variables" are only |
| 19 | appropriate for some variables, e.g. ones we set, since |
| 20 | properties are case sensitive, even if the environment variables |
| 21 | on your operating system are not, e.g. it will be ${env.Path} |
| 22 | not ${env.PATH} on Windows |
| 23 | --> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 24 | <property environment="env"/> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 25 | <!-- |
| 26 | Let users override standard properties, if desired. If |
| 27 | directory, file, or some properties do not exist, then standard |
| 28 | properties will be used. |
| 29 | --> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 30 | <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 31 | |
| 32 | <!-- = = = end standard properties pattern = = = --> |
david_williams | 14cadd1 | 2011-03-23 06:43:39 +0000 | [diff] [blame] | 33 | <echo level="debug" message="ant.file: ${ant.file}"/> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 34 | <target name="build"> |
david_williams | 9e7f584 | 2011-03-06 03:32:03 +0000 | [diff] [blame] | 35 | |
| 36 | <!-- make sure there is a base builder, since we need the launcher --> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 37 | <ant |
| 38 | antfile="${wtp.builder.home}/scripts/build/runbuild.xml" |
| 39 | target="getBaseBuilder"/> |
david_williams | ba00a34 | 2011-03-12 05:11:19 +0000 | [diff] [blame] | 40 | <condition |
| 41 | property="antQuietValue" |
| 42 | value="-quiet" |
| 43 | else=""> |
| 44 | <istrue value="${env.USE_QUIET}"/> |
| 45 | </condition> |
david_williams | 7802d89 | 2011-03-06 08:13:58 +0000 | [diff] [blame] | 46 | <!-- TODO: should set 'failonerror' to false, and follow up with error |
| 47 | check and appropriate cleanup/finishup actions before failing --> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 48 | |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 49 | <java |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 50 | fork="true" |
david_williams | ef62fc4 | 2011-03-18 02:33:39 +0000 | [diff] [blame] | 51 | failonerror="true" |
| 52 | classname="org.eclipse.equinox.launcher.Main"> |
| 53 | <classpath> |
| 54 | <fileset dir="${pde.builder.path}/plugins"> |
| 55 | <include name="org.eclipse.equinox.launcher_*.jar"/> |
| 56 | </fileset> |
| 57 | </classpath> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 58 | <jvmarg value="-Dosgi.ws=${env.BASEWS}"/> |
| 59 | <jvmarg value="-Dosgi.os=${env.BASEOS}"/> |
| 60 | <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/> |
| 61 | <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/> |
| 62 | <jvmarg value="-DbuildBranch=${buildBranch}"/> |
| 63 | <jvmarg value="-DbuildType=${buildType}"/> |
| 64 | <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/> |
david_williams | bf62a20 | 2010-09-27 05:03:32 +0000 | [diff] [blame] | 65 | |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 66 | <jvmarg value="-DbuildId=${buildId}"/> |
| 67 | <jvmarg value="-DmapVersionTag=${mapVersionTag}"/> |
| 68 | <jvmarg value="-Dbuild.distribution=${build.distribution}"/> |
| 69 | <jvmarg value="-DbuildDirectory=${buildDirectory}"/> |
| 70 | <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> |
| 71 | <jvmarg value="-Dprojectname=${projectname}"/> |
| 72 | <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> |
david_williams | 204cb1e | 2011-09-25 04:34:37 +0000 | [diff] [blame] | 73 | <jvmarg value="-Djava.protocol.handler.pkgs=org.eclipse.wtp.releng.www.protocol"/> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 74 | <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/> |
| 75 | <arg value="-data"/> |
| 76 | <arg value="${basedir}/workspace"/> |
| 77 | <arg value="-application"/> |
| 78 | <arg value="org.eclipse.ant.core.antRunner"/> |
david_williams | ba00a34 | 2011-03-12 05:11:19 +0000 | [diff] [blame] | 79 | <arg value="${antQuietValue}"/> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 80 | <arg value="-buildfile"/> |
| 81 | <arg value="${ant.file}"/> |
| 82 | <arg value="publish"/> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 83 | </java> |
| 84 | </target> |
| 85 | <!-- |
| 86 | ===================================================================== |
| 87 | --> |
| 88 | <!-- Steps to do to publish the build results --> |
| 89 | <!-- |
| 90 | ===================================================================== |
| 91 | --> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 92 | <target name="publish"> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 93 | <dirname |
| 94 | file="${ant.file}" |
| 95 | property="component.dir"/> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 96 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/> |
| 97 | <property file="${buildDirectory}/label.properties"/> |
david_williams | c9750b2 | 2011-03-06 06:36:01 +0000 | [diff] [blame] | 98 | |
| 99 | <!-- buildLabel is defined in label.properties --> |
| 100 | <mkdir dir="${buildDirectory}/${buildLabel}"/> |
| 101 | |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 102 | <property |
| 103 | name="publish.xml" |
| 104 | value="${component.dir}/publish.xml"/> |
| 105 | <property |
| 106 | name="indexFileName" |
| 107 | value="index.php"/> |
| 108 | <property |
| 109 | name="result" |
| 110 | value="${buildDirectory}/${buildLabel}"/> |
| 111 | <property |
| 112 | name="indexTemplateFilename" |
| 113 | value="index.html.template.php"/> |
david_williams | 5de0a3e | 2010-08-23 00:54:53 +0000 | [diff] [blame] | 114 | |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 115 | <condition |
| 116 | property="isBuildTested" |
| 117 | value="true"> |
david_williams | 2398e36 | 2011-03-05 02:45:39 +0000 | [diff] [blame] | 118 | <available file="${buildDirectory}/${buildLabel}/testResults/html"/> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 119 | </condition> |
| 120 | <ant |
| 121 | antfile="${publish.xml}" |
| 122 | dir="${component.dir}"> |
| 123 | <property |
| 124 | name="dropTokenList" |
| 125 | value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/> |
| 126 | <property |
| 127 | name="webtoolsDownloadURL" |
| 128 | value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/> |
| 129 | <property |
| 130 | name="buildBranch" |
| 131 | value="${buildBranch}"/> |
| 132 | <property |
| 133 | name="isBuildTested" |
| 134 | value="${isBuildTested}"/> |
| 135 | <property |
| 136 | name="indexTemplateFilename" |
| 137 | value="${indexTemplateFilename}"/> |
| 138 | </ant> |
| 139 | |
| 140 | <!-- Get the build map over for the results to point to. --> |
| 141 | <copy |
david_williams | c9750b2 | 2011-03-06 06:36:01 +0000 | [diff] [blame] | 142 | failonerror="false" |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 143 | file="${buildDirectory}/directory.txt" |
| 144 | tofile="${result}/directory.txt"/> |
| 145 | |
| 146 | <!-- Copy info for build identification --> |
| 147 | <copy |
david_williams | c9750b2 | 2011-03-06 06:36:01 +0000 | [diff] [blame] | 148 | failonerror="false" |
david_williams | 1ae2030 | 2010-09-11 01:34:56 +0000 | [diff] [blame] | 149 | file="${buildDirectory}/label.properties" |
| 150 | tofile="${result}/label.properties"/> |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 151 | |
| 152 | <!-- http access logs --> |
| 153 | <copy |
| 154 | todir="${result}/" |
| 155 | failonerror="false"> |
| 156 | <fileset |
| 157 | dir="${buildDirectory}" |
| 158 | includes="*.log"/> |
| 159 | </copy> |
| 160 | |
| 161 | <!-- ant build log, from control directory --> |
| 162 | <copy |
| 163 | todir="${result}/" |
| 164 | failonerror="false"> |
| 165 | <fileset |
| 166 | dir="${env.ANT_WORKING}/${projectname}" |
| 167 | includes="antBuilderOutput.log"/> |
| 168 | </copy> |
david_williams | 5e5f04f | 2011-03-07 20:07:42 +0000 | [diff] [blame] | 169 | |
david_williams | 0ecd8ec | 2009-11-09 04:16:21 +0000 | [diff] [blame] | 170 | <!-- final count files --> |
| 171 | <countBuildFiles |
| 172 | sourceDirectory="${buildDirectory}/${buildLabel}" |
| 173 | filterString=".zip,.tar.gz" |
| 174 | outputFile="${buildDirectory}/${buildLabel}/files.count"/> |
| 175 | </target> |
| 176 | </project> |