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