david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 1 | <project |
| 2 | name="Build specific targets and properties" |
| 3 | default="build" |
| 4 | basedir="."> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 5 | <!-- |
| 6 | Note to be cross-platform, "environment variables" are only |
| 7 | appropriate for some variables, e.g. ones we set, since |
| 8 | properties are case sensitive, even if the environment variables |
| 9 | on your operating system are not, e.g. it will be ${env.Path} |
| 10 | not ${env.PATH} on Windows |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 11 | --> |
| 12 | <property |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 13 | environment="env"/> |
| 14 | <!-- |
| 15 | Let users override standard properties, if desired. If |
| 16 | directory, file, or some properties do not exist, then standard |
| 17 | properties will be used. |
| 18 | --> |
| 19 | <property |
| 20 | file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 21 | |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 22 | <!-- = = = end standard properties pattern = = = --> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 23 | <echo |
| 24 | message="ant.file: ${ant.file}"/> |
| 25 | <target |
| 26 | name="build"> |
david_williams | dcf0c75 | 2010-04-14 19:51:31 +0000 | [diff] [blame] | 27 | <mkdir |
| 28 | dir="${buildDirectory}/${buildLabel}"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 29 | <java |
| 30 | jar="${eclipse.launcher}" |
| 31 | fork="true" |
| 32 | failonerror="true"> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 33 | <jvmarg |
| 34 | value="-Dosgi.ws=${env.BASEWS}"/> |
| 35 | <jvmarg |
| 36 | value="-Dosgi.os=${env.BASEOS}"/> |
| 37 | <jvmarg |
| 38 | value="-Dosgi.arch=${env.BASEARCH}"/> |
| 39 | <jvmarg |
| 40 | value="-Dbuild.donottagmaps=${build.donottagmaps}"/> |
| 41 | <jvmarg |
| 42 | value="-DbuildBranch=${buildBranch}"/> |
| 43 | <jvmarg |
david_williams | 5c55e56 | 2010-08-24 16:31:05 +0000 | [diff] [blame^] | 44 | value="-DbuildType=${buildType}"/> |
| 45 | <jvmarg |
| 46 | value="-DdependencyFileLocation=${dependencyFileLocation}"/> |
| 47 | <jvmarg |
| 48 | value="-DtestdependencyFileLocation=${testdependencyFileLocation}"/> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 49 | <jvmarg |
| 50 | value="-DbuildId=${buildId}"/> |
| 51 | <jvmarg |
| 52 | value="-DmapVersionTag=${mapVersionTag}"/> |
| 53 | <jvmarg |
| 54 | value="-Dbuild.distribution=${build.distribution}"/> |
| 55 | <jvmarg |
| 56 | value="-DbuildDirectory=${buildDirectory}"/> |
| 57 | <jvmarg |
| 58 | value="-Dwtp.builder.home=${wtp.builder.home}"/> |
| 59 | <jvmarg |
| 60 | value="-Dprojectname=${projectname}"/> |
| 61 | <jvmarg |
| 62 | value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> |
| 63 | <jvmarg |
| 64 | value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/> |
| 65 | <jvmarg |
david_williams | dcf0c75 | 2010-04-14 19:51:31 +0000 | [diff] [blame] | 66 | value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 67 | <arg |
| 68 | value="-data"/> |
| 69 | <arg |
| 70 | value="${basedir}/workspace"/> |
| 71 | <arg |
| 72 | value="-application"/> |
| 73 | <arg |
| 74 | value="org.eclipse.ant.core.antRunner"/> |
| 75 | <arg |
| 76 | value="-buildfile"/> |
| 77 | <arg |
| 78 | value="${ant.file}"/> |
| 79 | <arg |
| 80 | value="publish"/> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 81 | </java> |
| 82 | </target> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 83 | <!-- |
| 84 | ===================================================================== |
| 85 | --> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 86 | <!-- Steps to do to publish the build results --> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 87 | <!-- |
| 88 | ===================================================================== |
| 89 | --> |
| 90 | <target |
| 91 | name="publish"> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 92 | <dirname |
| 93 | file="${ant.file}" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 94 | property="component.dir"/> |
| 95 | <ant |
| 96 | antfile="${wtp.builder.home}/scripts/build/label.xml"/> |
| 97 | <property |
| 98 | file="${buildDirectory}/label.properties"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 99 | <property |
| 100 | name="publish.xml" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 101 | value="${component.dir}/publish.xml"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 102 | <property |
| 103 | name="indexFileName" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 104 | value="index.php"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 105 | <property |
| 106 | name="result" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 107 | value="${buildDirectory}/${buildLabel}"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 108 | <property |
| 109 | name="indexTemplateFilename" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 110 | value="index.html.template.php"/> |
david_williams | 43ee731 | 2010-07-09 05:13:35 +0000 | [diff] [blame] | 111 | |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 112 | <condition |
| 113 | property="isBuildTested" |
| 114 | value="true"> |
| 115 | <available |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 116 | file="${buildDirectory}/${buildLabel}/testResults/html"/> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 117 | </condition> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 118 | <ant |
| 119 | antfile="${publish.xml}" |
| 120 | dir="${component.dir}"> |
| 121 | <property |
| 122 | name="dropTokenList" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 123 | value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 124 | <property |
| 125 | name="webtoolsDownloadURL" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 126 | value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 127 | <property |
| 128 | name="buildBranch" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 129 | value="${buildBranch}"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 130 | <property |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 131 | name="isBuildTested" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 132 | value="${isBuildTested}"/> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 133 | <property |
| 134 | name="indexTemplateFilename" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 135 | value="${indexTemplateFilename}"/> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 136 | </ant> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 137 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 138 | <!-- Get the build map over for the results to point to. --> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 139 | <copy |
| 140 | file="${buildDirectory}/directory.txt" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 141 | tofile="${result}/directory.txt"/> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 142 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 143 | <!-- Copy info for build identification --> |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 144 | <copy |
| 145 | file="${buildDirectory}/buildmachineinfo.properties" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 146 | tofile="${result}/buildmachineinfo.properties"/> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 147 | |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 148 | <!-- http access logs --> |
| 149 | <copy |
| 150 | todir="${result}/" |
| 151 | failonerror="false"> |
| 152 | <fileset |
| 153 | dir="${buildDirectory}" |
| 154 | includes="*.log"/> |
| 155 | </copy> |
| 156 | |
| 157 | <!-- ant build log, from control directory --> |
| 158 | <copy |
| 159 | todir="${result}/" |
| 160 | failonerror="false"> |
| 161 | <fileset |
| 162 | dir="${env.ANT_WORKING}/${projectname}" |
| 163 | includes="antBuilderOutput.log"/> |
| 164 | </copy> |
| 165 | |
david_williams | 8f37c5e | 2007-10-01 01:05:18 +0000 | [diff] [blame] | 166 | <!-- final count files --> |
| 167 | <countBuildFiles |
| 168 | sourceDirectory="${buildDirectory}/${buildLabel}" |
| 169 | filterString=".zip,.tar.gz" |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 170 | outputFile="${buildDirectory}/${buildLabel}/files.count"/> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 171 | </target> |
david_williams | 15da5c5 | 2010-03-17 06:39:11 +0000 | [diff] [blame] | 172 | </project> |