blob: 195353b38d00e1b650750114a128587ace5c0e27 [file] [log] [blame]
david_williams97bee852009-06-08 04:44:09 +00001<project
2 name="Build specific targets and properties"
3 default="build"
4 basedir=".">
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
11 -->
12 <property
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"/>
21
22 <!-- = = = end standard properties pattern = = = -->
23 <echo
24 message="ant.file: ${ant.file}"/>
25 <target
26 name="build">
david_williams0fadc4e2010-03-01 04:45:19 +000027 <mkdir
28 dir="${buildDirectory}/${buildLabel}"/>
david_williams97bee852009-06-08 04:44:09 +000029 <java
30 jar="${eclipse.launcher}"
31 fork="true"
32 failonerror="true">
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
44 value="-DbuildType=${buildType}"/>
45 <jvmarg
46 value="-DbuildId=${buildId}"/>
47 <jvmarg
48 value="-DmapVersionTag=${mapVersionTag}"/>
49 <jvmarg
50 value="-Dbuild.distribution=${build.distribution}"/>
51 <jvmarg
52 value="-DbuildDirectory=${buildDirectory}"/>
53 <jvmarg
54 value="-Dwtp.builder.home=${wtp.builder.home}"/>
55 <jvmarg
56 value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
57 <jvmarg
58 value="-Dprojectname=${projectname}"/>
59 <jvmarg
60 value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/>
61 <jvmarg
david_williams0fadc4e2010-03-01 04:45:19 +000062 value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/>
david_williams97bee852009-06-08 04:44:09 +000063 <arg
64 value="-data"/>
65 <arg
66 value="${basedir}/workspace"/>
67 <arg
68 value="-application"/>
69 <arg
70 value="org.eclipse.ant.core.antRunner"/>
71 <arg
72 value="-buildfile"/>
73 <arg
74 value="${ant.file}"/>
75 <arg
76 value="publish"/>
77 </java>
78 </target>
79 <!--
80 =====================================================================
81 -->
82 <!-- Steps to do to publish the build results -->
83 <!--
84 =====================================================================
85 -->
86 <target
87 name="publish">
88 <dirname
89 file="${ant.file}"
90 property="component.dir"/>
91 <ant
92 antfile="${wtp.builder.home}/scripts/build/label.xml"/>
93 <property
94 file="${buildDirectory}/label.properties"/>
95 <property
96 name="publish.xml"
97 value="${component.dir}/publish.xml"/>
98 <property
99 name="indexFileName"
100 value="index.php"/>
101 <property
102 name="result"
103 value="${buildDirectory}/${buildLabel}"/>
104 <property
105 name="indexTemplateFilename"
106 value="index.html.template.php"/>
107 <copy
108 file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
109 tofile="${buildDirectory}/${indexFileName}"/>
110 <condition
111 property="isBuildTested"
112 value="true">
113 <available
114 file="${buildDirectory}/${buildLabel}/testResults/html"/>
115 </condition>
116 <ant
117 antfile="${publish.xml}"
118 dir="${component.dir}">
119 <property
120 name="dropTokenList"
121 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/>
122 <property
123 name="webtoolsDownloadURL"
124 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
125 <property
126 name="buildBranch"
127 value="${buildBranch}"/>
128 <property
129 name="isBuildTested"
130 value="${isBuildTested}"/>
131 <property
132 name="indexTemplateFilename"
133 value="${indexTemplateFilename}"/>
134 </ant>
135
136 <!-- Get the build map over for the results to point to. -->
137 <copy
138 file="${buildDirectory}/directory.txt"
139 tofile="${result}/directory.txt"/>
140
141 <!-- Copy info for build identification -->
142 <copy
143 file="${buildDirectory}/buildmachineinfo.properties"
144 tofile="${result}/buildmachineinfo.properties"/>
145
146 <!-- http access logs -->
147 <copy
148 todir="${result}/"
149 failonerror="false">
150 <fileset
151 dir="${buildDirectory}"
152 includes="*.log"/>
153 </copy>
154
155 <!-- ant build log, from control directory -->
156 <copy
157 todir="${result}/"
158 failonerror="false">
159 <fileset
160 dir="${env.ANT_WORKING}/${projectname}"
161 includes="antBuilderOutput.log"/>
162 </copy>
163
164
165
166 <!-- final count files -->
167 <countBuildFiles
168 sourceDirectory="${buildDirectory}/${buildLabel}"
169 filterString=".zip,.tar.gz"
170 outputFile="${buildDirectory}/${buildLabel}/files.count"/>
171 </target>
172</project>