blob: 09456db5d3042c2e4e85df2e73a148a786581d28 [file] [log] [blame]
david_williams403beae2007-12-09 02:10:40 +00001<project
2 name="Build specific targets and properties"
tle170c7902008-10-02 03:15:49 +00003 default="build"
4 basedir=".">
tle237bacc2011-09-29 22:56:14 +00005 <!--
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
11 -->
david_williams2398e362011-03-05 02:45:39 +000012 <property environment="env"/>
tle237bacc2011-09-29 22:56:14 +000013 <!--
14 Let users override standard properties, if desired. If
15 directory, file, or some properties do not exist, then standard
16 properties will be used.
tle170c7902008-10-02 03:15:49 +000017 -->
david_williams2398e362011-03-05 02:45:39 +000018 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
david_williams42f9b242006-11-27 18:45:14 +000019
tle170c7902008-10-02 03:15:49 +000020 <!-- = = = end standard properties pattern = = = -->
david_williams14cadd12011-03-23 06:43:39 +000021 <echo level="debug" message="ant.file: ${ant.file}"/>
david_williams2398e362011-03-05 02:45:39 +000022 <target name="build">
tle237bacc2011-09-29 22:56:14 +000023
24 <!-- make sure there is a base builder, since we need the launcher -->
25 <ant
26 antfile="${wtp.builder.home}/scripts/build/runbuild.xml"
27 target="getBaseBuilder"/>
28 <condition
29 property="antQuietValue"
30 value="-quiet"
31 else="">
32 <istrue value="${env.USE_QUIET}"/>
33 </condition>
34 <!-- TODO: should set 'failonerror' to false, and follow up with error
35 check and appropriate cleanup/finishup actions before failing -->
36
david_williams403beae2007-12-09 02:10:40 +000037 <java
david_williams403beae2007-12-09 02:10:40 +000038 fork="true"
david_williamsef62fc42011-03-18 02:33:39 +000039 failonerror="true"
40 classname="org.eclipse.equinox.launcher.Main">
41 <classpath>
42 <fileset dir="${pde.builder.path}/plugins">
43 <include name="org.eclipse.equinox.launcher_*.jar"/>
44 </fileset>
45 </classpath>
david_williams2398e362011-03-05 02:45:39 +000046 <jvmarg value="-Dosgi.ws=${env.BASEWS}"/>
47 <jvmarg value="-Dosgi.os=${env.BASEOS}"/>
48 <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/>
49 <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/>
50 <jvmarg value="-DbuildBranch=${buildBranch}"/>
51 <jvmarg value="-DbuildType=${buildType}"/>
tle237bacc2011-09-29 22:56:14 +000052 <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
53
david_williams2398e362011-03-05 02:45:39 +000054 <jvmarg value="-DbuildId=${buildId}"/>
55 <jvmarg value="-DmapVersionTag=${mapVersionTag}"/>
56 <jvmarg value="-Dbuild.distribution=${build.distribution}"/>
57 <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
58 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
david_williams2398e362011-03-05 02:45:39 +000059 <jvmarg value="-Dprojectname=${projectname}"/>
tle237bacc2011-09-29 22:56:14 +000060 <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
61 <jvmarg value="-Djava.protocol.handler.pkgs=org.eclipse.wtp.releng.www.protocol"/>
62 <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/>
david_williams2398e362011-03-05 02:45:39 +000063 <arg value="-data"/>
64 <arg value="${basedir}/workspace"/>
65 <arg value="-application"/>
66 <arg value="org.eclipse.ant.core.antRunner"/>
david_williamsba00a342011-03-12 05:11:19 +000067 <arg value="${antQuietValue}"/>
david_williams2398e362011-03-05 02:45:39 +000068 <arg value="-buildfile"/>
69 <arg value="${ant.file}"/>
70 <arg value="publish"/>
david_williams403beae2007-12-09 02:10:40 +000071 </java>
72 </target>
tle237bacc2011-09-29 22:56:14 +000073 <!--
74 =====================================================================
75 -->
david_williams403beae2007-12-09 02:10:40 +000076 <!-- Steps to do to publish the build results -->
tle237bacc2011-09-29 22:56:14 +000077 <!--
78 =====================================================================
79 -->
david_williams2398e362011-03-05 02:45:39 +000080 <target name="publish">
david_williams403beae2007-12-09 02:10:40 +000081 <dirname
82 file="${ant.file}"
david_williams7e568c72010-09-12 09:04:15 +000083 property="component.dir"/>
david_williams2398e362011-03-05 02:45:39 +000084 <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
85 <property file="${buildDirectory}/label.properties"/>
ndai91f5c9b2006-03-12 13:56:45 +000086
tle237bacc2011-09-29 22:56:14 +000087 <!-- buildLabel is defined in label.properties -->
88 <mkdir dir="${buildDirectory}/${buildLabel}"/>
89
david_williams403beae2007-12-09 02:10:40 +000090 <property
91 name="publish.xml"
david_williams7e568c72010-09-12 09:04:15 +000092 value="${component.dir}/publish.xml"/>
david_williams403beae2007-12-09 02:10:40 +000093 <property
94 name="indexFileName"
david_williams7e568c72010-09-12 09:04:15 +000095 value="index.php"/>
david_williams403beae2007-12-09 02:10:40 +000096 <property
97 name="result"
david_williams7e568c72010-09-12 09:04:15 +000098 value="${buildDirectory}/${buildLabel}"/>
david_williams403beae2007-12-09 02:10:40 +000099 <property
100 name="indexTemplateFilename"
david_williams7e568c72010-09-12 09:04:15 +0000101 value="index.html.template.php"/>
tle170c7902008-10-02 03:15:49 +0000102
david_williams403beae2007-12-09 02:10:40 +0000103 <condition
104 property="isBuildTested"
105 value="true">
david_williams2398e362011-03-05 02:45:39 +0000106 <available file="${buildDirectory}/${buildLabel}/testResults/html"/>
david_williams403beae2007-12-09 02:10:40 +0000107 </condition>
david_williams403beae2007-12-09 02:10:40 +0000108 <ant
109 antfile="${publish.xml}"
110 dir="${component.dir}">
111 <property
112 name="dropTokenList"
david_williams7e568c72010-09-12 09:04:15 +0000113 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/>
tle237bacc2011-09-29 22:56:14 +0000114 <property
tle170c7902008-10-02 03:15:49 +0000115 name="webtoolsDownloadURL"
david_williams7e568c72010-09-12 09:04:15 +0000116 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
david_williams403beae2007-12-09 02:10:40 +0000117 <property
tle170c7902008-10-02 03:15:49 +0000118 name="buildBranch"
david_williams7e568c72010-09-12 09:04:15 +0000119 value="${buildBranch}"/>
david_williams403beae2007-12-09 02:10:40 +0000120 <property
121 name="isBuildTested"
david_williams7e568c72010-09-12 09:04:15 +0000122 value="${isBuildTested}"/>
david_williams403beae2007-12-09 02:10:40 +0000123 <property
124 name="indexTemplateFilename"
david_williams7e568c72010-09-12 09:04:15 +0000125 value="${indexTemplateFilename}"/>
david_williams403beae2007-12-09 02:10:40 +0000126 </ant>
ndai91f5c9b2006-03-12 13:56:45 +0000127
david_williams403beae2007-12-09 02:10:40 +0000128 <!-- Get the build map over for the results to point to. -->
129 <copy
tle237bacc2011-09-29 22:56:14 +0000130 failonerror="false"
david_williams403beae2007-12-09 02:10:40 +0000131 file="${buildDirectory}/directory.txt"
david_williams7e568c72010-09-12 09:04:15 +0000132 tofile="${result}/directory.txt"/>
ndai91f5c9b2006-03-12 13:56:45 +0000133
david_williams403beae2007-12-09 02:10:40 +0000134 <!-- Copy info for build identification -->
135 <copy
tle237bacc2011-09-29 22:56:14 +0000136 failonerror="false"
david_williams1ae20302010-09-11 01:34:56 +0000137 file="${buildDirectory}/label.properties"
david_williams7e568c72010-09-12 09:04:15 +0000138 tofile="${result}/label.properties"/>
david_williamsae0e4cb2006-11-11 02:55:51 +0000139
tle237bacc2011-09-29 22:56:14 +0000140 <!-- http access logs -->
141 <copy
142 todir="${result}/"
143 failonerror="false">
144 <fileset
145 dir="${buildDirectory}"
146 includes="*.log"/>
147 </copy>
148
149 <!-- ant build log, from control directory -->
150 <copy
151 todir="${result}/"
152 failonerror="false">
153 <fileset
154 dir="${env.ANT_WORKING}/${projectname}"
155 includes="antBuilderOutput.log"/>
156 </copy>
157
tle170c7902008-10-02 03:15:49 +0000158 <!-- final count files -->
159 <countBuildFiles
160 sourceDirectory="${buildDirectory}/${buildLabel}"
161 filterString=".zip,.tar.gz"
david_williams7e568c72010-09-12 09:04:15 +0000162 outputFile="${buildDirectory}/${buildLabel}/files.count"/>
david_williams403beae2007-12-09 02:10:40 +0000163 </target>
tle237bacc2011-09-29 22:56:14 +0000164</project>