blob: 7f204d5b47254d3ff1cb2a9b01ae5ef07cf8f51d [file] [log] [blame]
david_williams8f37c5e2007-10-01 01:05:18 +00001<project
2 name="Build specific targets and properties"
3 default="build"
4 basedir=".">
david_williams15da5c52010-03-17 06:39: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_williams8f37c5e2007-10-01 01:05:18 +000011 -->
12 <property
david_williams15da5c52010-03-17 06:39:11 +000013 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_williams42f9b242006-11-27 18:45:14 +000021
david_williams8f37c5e2007-10-01 01:05:18 +000022 <!-- = = = end standard properties pattern = = = -->
david_williams15da5c52010-03-17 06:39:11 +000023 <echo
24 message="ant.file: ${ant.file}"/>
25 <target
26 name="build">
david_williamsdcf0c752010-04-14 19:51:31 +000027 <mkdir
28 dir="${buildDirectory}/${buildLabel}"/>
david_williams8f37c5e2007-10-01 01:05:18 +000029 <java
30 jar="${eclipse.launcher}"
31 fork="true"
32 failonerror="true">
david_williams15da5c52010-03-17 06:39:11 +000033 <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_williams5c55e562010-08-24 16:31:05 +000044 value="-DbuildType=${buildType}"/>
45 <jvmarg
46 value="-DdependencyFileLocation=${dependencyFileLocation}"/>
david_williamsbf62a202010-09-27 05:03:32 +000047
david_williams15da5c52010-03-17 06:39:11 +000048 <jvmarg
49 value="-DbuildId=${buildId}"/>
50 <jvmarg
51 value="-DmapVersionTag=${mapVersionTag}"/>
52 <jvmarg
53 value="-Dbuild.distribution=${build.distribution}"/>
54 <jvmarg
55 value="-DbuildDirectory=${buildDirectory}"/>
56 <jvmarg
57 value="-Dwtp.builder.home=${wtp.builder.home}"/>
58 <jvmarg
59 value="-Dprojectname=${projectname}"/>
60 <jvmarg
61 value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
62 <jvmarg
63 value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/>
64 <jvmarg
david_williamsdcf0c752010-04-14 19:51:31 +000065 value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/>
david_williams15da5c52010-03-17 06:39:11 +000066 <arg
67 value="-data"/>
68 <arg
69 value="${basedir}/workspace"/>
70 <arg
71 value="-application"/>
72 <arg
73 value="org.eclipse.ant.core.antRunner"/>
74 <arg
75 value="-buildfile"/>
76 <arg
77 value="${ant.file}"/>
78 <arg
79 value="publish"/>
david_williams2a01c5a2005-11-07 14:27:16 +000080 </java>
81 </target>
david_williams15da5c52010-03-17 06:39:11 +000082 <!--
83 =====================================================================
84 -->
david_williams2a01c5a2005-11-07 14:27:16 +000085 <!-- Steps to do to publish the build results -->
david_williams15da5c52010-03-17 06:39:11 +000086 <!--
87 =====================================================================
88 -->
89 <target
90 name="publish">
david_williams8f37c5e2007-10-01 01:05:18 +000091 <dirname
92 file="${ant.file}"
david_williams15da5c52010-03-17 06:39:11 +000093 property="component.dir"/>
94 <ant
95 antfile="${wtp.builder.home}/scripts/build/label.xml"/>
96 <property
97 file="${buildDirectory}/label.properties"/>
david_williams8f37c5e2007-10-01 01:05:18 +000098 <property
99 name="publish.xml"
david_williams15da5c52010-03-17 06:39:11 +0000100 value="${component.dir}/publish.xml"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000101 <property
102 name="indexFileName"
david_williams15da5c52010-03-17 06:39:11 +0000103 value="index.php"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000104 <property
105 name="result"
david_williams15da5c52010-03-17 06:39:11 +0000106 value="${buildDirectory}/${buildLabel}"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000107 <property
108 name="indexTemplateFilename"
david_williams15da5c52010-03-17 06:39:11 +0000109 value="index.html.template.php"/>
david_williams43ee7312010-07-09 05:13:35 +0000110
david_williams8f37c5e2007-10-01 01:05:18 +0000111 <condition
112 property="isBuildTested"
113 value="true">
114 <available
david_williams15da5c52010-03-17 06:39:11 +0000115 file="${buildDirectory}/${buildLabel}/testResults/html"/>
david_williams2a01c5a2005-11-07 14:27:16 +0000116 </condition>
david_williams8f37c5e2007-10-01 01:05:18 +0000117 <ant
118 antfile="${publish.xml}"
119 dir="${component.dir}">
120 <property
121 name="dropTokenList"
david_williams15da5c52010-03-17 06:39:11 +0000122 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000123 <property
124 name="webtoolsDownloadURL"
david_williams15da5c52010-03-17 06:39:11 +0000125 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000126 <property
127 name="buildBranch"
david_williams15da5c52010-03-17 06:39:11 +0000128 value="${buildBranch}"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000129 <property
david_williams8f37c5e2007-10-01 01:05:18 +0000130 name="isBuildTested"
david_williams15da5c52010-03-17 06:39:11 +0000131 value="${isBuildTested}"/>
david_williams8f37c5e2007-10-01 01:05:18 +0000132 <property
133 name="indexTemplateFilename"
david_williams15da5c52010-03-17 06:39:11 +0000134 value="${indexTemplateFilename}"/>
david_williams2a01c5a2005-11-07 14:27:16 +0000135 </ant>
ndaib8cedc82005-09-13 18:00:32 +0000136
david_williams2a01c5a2005-11-07 14:27:16 +0000137 <!-- Get the build map over for the results to point to. -->
david_williams8f37c5e2007-10-01 01:05:18 +0000138 <copy
139 file="${buildDirectory}/directory.txt"
david_williams15da5c52010-03-17 06:39:11 +0000140 tofile="${result}/directory.txt"/>
ndaib8cedc82005-09-13 18:00:32 +0000141
david_williams2a01c5a2005-11-07 14:27:16 +0000142 <!-- Copy info for build identification -->
david_williams8f37c5e2007-10-01 01:05:18 +0000143 <copy
david_williams1ae20302010-09-11 01:34:56 +0000144 file="${buildDirectory}/label.properties"
145 tofile="${result}/label.properties"/>
david_williams2a01c5a2005-11-07 14:27:16 +0000146
david_williams15da5c52010-03-17 06:39:11 +0000147 <!-- http access logs -->
148 <copy
149 todir="${result}/"
150 failonerror="false">
151 <fileset
152 dir="${buildDirectory}"
153 includes="*.log"/>
154 </copy>
155
156 <!-- ant build log, from control directory -->
157 <copy
158 todir="${result}/"
159 failonerror="false">
160 <fileset
161 dir="${env.ANT_WORKING}/${projectname}"
162 includes="antBuilderOutput.log"/>
163 </copy>
164
david_williams8f37c5e2007-10-01 01:05:18 +0000165 <!-- final count files -->
166 <countBuildFiles
167 sourceDirectory="${buildDirectory}/${buildLabel}"
168 filterString=".zip,.tar.gz"
david_williams15da5c52010-03-17 06:39:11 +0000169 outputFile="${buildDirectory}/${buildLabel}/files.count"/>
david_williams2a01c5a2005-11-07 14:27:16 +0000170 </target>
david_williams15da5c52010-03-17 06:39:11 +0000171</project>