blob: 00ecb30b54c73530640243653929c0173cdf001f [file] [log] [blame]
david_williams88cbf012009-01-12 21:53:05 +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 value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" />
39 <jvmarg
40 value="-Dprojectname=${projectname}" />
david_williams067725b2009-01-13 06:31:51 +000041 <jvmarg
42 value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/>
43 <jvmarg
44 value="-DurlLogLocation=${buildDirectory}/outgoinghttplogfromsitebuild.log"/>
45
david_williams88cbf012009-01-12 21:53:05 +000046 <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
david_williams067725b2009-01-13 06:31:51 +0000122 <!-- http access logs -->
123 <copy
124 todir="${result}/"
125 failonerror="false">
126 <fileset
127 dir="${buildDirectory}"
128 includes="*.log"/>
129 </copy>
130
131 <!-- ant build log, from control directory -->
132 <copy
133 todir="${result}/"
134 failonerror="false">
135 <fileset
136 dir="${env.ANT_WORKING}/${projectname}"
137 includes="antBuilderOutput.log"/>
138 </copy>
139
140
141
david_williams88cbf012009-01-12 21:53:05 +0000142 <!-- final count files -->
143 <countBuildFiles
144 sourceDirectory="${buildDirectory}/${buildLabel}"
145 filterString=".zip,.tar.gz"
146 outputFile="${buildDirectory}/${buildLabel}/files.count" />
147
148 </target>
149
150
151</project>