blob: 0455f5c3189d79ba23015f6f096f706be0a39c04 [file] [log] [blame]
david_williams88cbf012009-01-12 21:53:05 +00001<project
2 name="Build specific targets and properties"
3 default="build"
4 basedir=".">
david_williams0902bf82009-01-14 05:14:11 +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
david_williams88cbf012009-01-12 21:53:05 +000011 -->
david_williams2398e362011-03-05 02:45:39 +000012 <property environment="env"/>
david_williams0902bf82009-01-14 05:14:11 +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.
17 -->
david_williams2398e362011-03-05 02:45:39 +000018 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
david_williams88cbf012009-01-12 21:53:05 +000019
20 <!-- = = = end standard properties pattern = = = -->
david_williams2398e362011-03-05 02:45:39 +000021 <echo message="ant.file: ${ant.file}"/>
22 <target name="build">
23 <mkdir dir="${buildDirectory}/${buildLabel}"/>
david_williamsba00a342011-03-12 05:11:19 +000024 <condition
25 property="antQuietValue"
26 value="-quiet"
27 else="">
28 <istrue value="${env.USE_QUIET}"/>
29 </condition>
david_williams88cbf012009-01-12 21:53:05 +000030 <java
david_williams88cbf012009-01-12 21:53:05 +000031 fork="true"
david_williamsef62fc42011-03-18 02:33:39 +000032 failonerror="true"
33 classname="org.eclipse.equinox.launcher.Main">
34 <classpath>
35 <fileset dir="${pde.builder.path}/plugins">
36 <include name="org.eclipse.equinox.launcher_*.jar"/>
37 </fileset>
38 </classpath>
david_williams2398e362011-03-05 02:45:39 +000039 <jvmarg value="-Dosgi.ws=${env.BASEWS}"/>
40 <jvmarg value="-Dosgi.os=${env.BASEOS}"/>
41 <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/>
42 <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/>
43 <jvmarg value="-DbuildBranch=${buildBranch}"/>
44 <jvmarg value="-DbuildType=${buildType}"/>
45 <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
david_williamsbf62a202010-09-27 05:03:32 +000046
david_williams2398e362011-03-05 02:45:39 +000047 <jvmarg value="-DbuildId=${buildId}"/>
48 <jvmarg value="-DmapVersionTag=${mapVersionTag}"/>
49 <jvmarg value="-Dbuild.distribution=${build.distribution}"/>
50 <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
51 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
52 <jvmarg value="-Dprojectname=${projectname}"/>
53 <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
54 <jvmarg value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/>
55 <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/>
56 <arg value="-data"/>
57 <arg value="${basedir}/workspace"/>
58 <arg value="-application"/>
59 <arg value="org.eclipse.ant.core.antRunner"/>
david_williamsba00a342011-03-12 05:11:19 +000060 <arg value="${antQuietValue}"/>
david_williams2398e362011-03-05 02:45:39 +000061 <arg value="-buildfile"/>
62 <arg value="${ant.file}"/>
63 <arg value="publish"/>
david_williams88cbf012009-01-12 21:53:05 +000064 </java>
65 </target>
david_williams0902bf82009-01-14 05:14:11 +000066 <!--
67 =====================================================================
68 -->
david_williams88cbf012009-01-12 21:53:05 +000069 <!-- Steps to do to publish the build results -->
david_williams0902bf82009-01-14 05:14:11 +000070 <!--
71 =====================================================================
72 -->
david_williams2398e362011-03-05 02:45:39 +000073 <target name="publish">
david_williams88cbf012009-01-12 21:53:05 +000074 <dirname
75 file="${ant.file}"
david_williams0902bf82009-01-14 05:14:11 +000076 property="component.dir"/>
david_williams2398e362011-03-05 02:45:39 +000077 <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
78 <property file="${buildDirectory}/label.properties"/>
david_williams88cbf012009-01-12 21:53:05 +000079 <property
80 name="publish.xml"
david_williams0902bf82009-01-14 05:14:11 +000081 value="${component.dir}/publish.xml"/>
david_williams88cbf012009-01-12 21:53:05 +000082 <property
83 name="indexFileName"
david_williams0902bf82009-01-14 05:14:11 +000084 value="index.php"/>
david_williams88cbf012009-01-12 21:53:05 +000085 <property
86 name="result"
david_williams0902bf82009-01-14 05:14:11 +000087 value="${buildDirectory}/${buildLabel}"/>
david_williams88cbf012009-01-12 21:53:05 +000088 <property
89 name="indexTemplateFilename"
david_williams0902bf82009-01-14 05:14:11 +000090 value="index.html.template.php"/>
david_williams43ee7312010-07-09 05:13:35 +000091
david_williams88cbf012009-01-12 21:53:05 +000092 <condition
93 property="isBuildTested"
94 value="true">
david_williams2398e362011-03-05 02:45:39 +000095 <available file="${buildDirectory}/${buildLabel}/testResults/html"/>
david_williams88cbf012009-01-12 21:53:05 +000096 </condition>
david_williams88cbf012009-01-12 21:53:05 +000097 <ant
98 antfile="${publish.xml}"
99 dir="${component.dir}">
100 <property
101 name="dropTokenList"
david_williams0902bf82009-01-14 05:14:11 +0000102 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/>
david_williams88cbf012009-01-12 21:53:05 +0000103 <property
104 name="webtoolsDownloadURL"
david_williams0902bf82009-01-14 05:14:11 +0000105 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
david_williams88cbf012009-01-12 21:53:05 +0000106 <property
107 name="buildBranch"
david_williams0902bf82009-01-14 05:14:11 +0000108 value="${buildBranch}"/>
david_williams88cbf012009-01-12 21:53:05 +0000109 <property
110 name="isBuildTested"
david_williams0902bf82009-01-14 05:14:11 +0000111 value="${isBuildTested}"/>
david_williams88cbf012009-01-12 21:53:05 +0000112 <property
113 name="indexTemplateFilename"
david_williams0902bf82009-01-14 05:14:11 +0000114 value="${indexTemplateFilename}"/>
david_williams88cbf012009-01-12 21:53:05 +0000115 </ant>
116
117 <!-- Get the build map over for the results to point to. -->
118 <copy
119 file="${buildDirectory}/directory.txt"
david_williams0902bf82009-01-14 05:14:11 +0000120 tofile="${result}/directory.txt"/>
david_williams88cbf012009-01-12 21:53:05 +0000121
122 <!-- Copy info for build identification -->
123 <copy
david_williams1ae20302010-09-11 01:34:56 +0000124 file="${buildDirectory}/label.properties"
125 tofile="${result}/label.properties"/>
david_williams88cbf012009-01-12 21:53:05 +0000126
david_williams0902bf82009-01-14 05:14:11 +0000127 <!-- http access logs -->
128 <copy
129 todir="${result}/"
130 failonerror="false">
131 <fileset
132 dir="${buildDirectory}"
133 includes="*.log"/>
134 </copy>
david_williamsc2cad412009-01-13 06:13:42 +0000135
david_williams0902bf82009-01-14 05:14:11 +0000136 <!-- ant build log, from control directory -->
137 <copy
138 todir="${result}/"
139 failonerror="false">
140 <fileset
141 dir="${env.ANT_WORKING}/${projectname}"
142 includes="antBuilderOutput.log"/>
143 </copy>
david_williamsc2cad412009-01-13 06:13:42 +0000144
145
david_williams0902bf82009-01-14 05:14:11 +0000146
david_williams88cbf012009-01-12 21:53:05 +0000147 <!-- final count files -->
148 <countBuildFiles
149 sourceDirectory="${buildDirectory}/${buildLabel}"
150 filterString=".zip,.tar.gz"
david_williams0902bf82009-01-14 05:14:11 +0000151 outputFile="${buildDirectory}/${buildLabel}/files.count"/>
david_williams88cbf012009-01-12 21:53:05 +0000152 </target>
david_williams0902bf82009-01-14 05:14:11 +0000153</project>