blob: a05daccbaa5d844c5411f8f5fa24d2d0afde8d6b [file] [log] [blame]
david_williams3d6137b2010-07-31 01:40:49 +00001<?xml version="1.0" encoding="UTF-8"?>
2<project
3 default="build"
4 basedir=".">
5 <fail
6 unless="wtp.builder.home"/>
7 <property
8 file="${wtp.builder.home}/build.properties"/>
9 <property
10 environment="env"/>
11
12 <!-- required to get proper value of doCreateFprojZips -->
13 <property
14 name="keyCfgFile"
15 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
16 <echo
17 level="info"
18 message="keyCfgFile: ${keyCfgFile}"/>
19 <property
20 file="${keyCfgFile}"/>
21
david_williamsaff12282010-07-31 03:10:28 +000022 <echo
23 message="transformedRepoLocation: ${transformedRepoLocation}"/>
24 <mkdir
25 dir="${transformedRepoLocation}"/>
26
27
david_williams3d6137b2010-07-31 01:40:49 +000028 <!-- main -->
29 <target
30 name="build"
31 depends="getBaseBuilder">
david_williams1a2ddec2010-09-24 01:19:23 +000032
33 <echoproperties/>
34
david_williams3d6137b2010-07-31 01:40:49 +000035 <dirname
36 file="${ant.file}"
37 property="distribution.wtp.build.dir"/>
38 <property
39 name="buildTargets"
40 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
david_williamsf46c7712010-08-08 01:58:59 +000041
david_williams3d6137b2010-07-31 01:40:49 +000042 <property
43 name="dependency.properties"
david_williamsf46c7712010-08-08 01:58:59 +000044 value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
david_williams3d6137b2010-07-31 01:40:49 +000045
46 <!-- calling label.xml to createg label.properties file -->
47 <ant
48 antfile="${wtp.builder.home}/scripts/build/label.xml"/>
49 <echo
50 level="info"
51 message="invoking buildTargets: ${buildTargets} to build for each component"/>
52 <ant
53 antfile="${buildTargets}">
54 <property
55 name="component"
56 value="wtp-patches32x"/>
57 </ant>
david_williamse2ccf822010-07-31 02:40:06 +000058 <!--
david_williams3d6137b2010-07-31 01:40:49 +000059 <ant
60 antfile="${buildTargets}">
61 <property
62 name="component"
63 value="wtp-patches32x-tests"/>
64 </ant>
david_williamse2ccf822010-07-31 02:40:06 +000065 -->
david_williams1a2ddec2010-09-24 01:19:23 +000066
67 <!-- copy early, if we can ... else site won't be created, if we fail -->
68 <ant
69 antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
70
71 <antcall
72 target="handleCompilationProblems"/>
david_williams7e568c72010-09-12 09:04:15 +000073
david_williams60d275b2010-09-26 05:39:57 +000074
david_williams3d6137b2010-07-31 01:40:49 +000075 </target>
76
77 <!-- invoking runbuild.xml targetting getBaseBuilder -->
78 <target
79 name="getBaseBuilder"
80 if="eclipse.builder.fetch">
81 <dirname
82 file="${ant.file}"
83 property="wtbuilder.dir"/>
84 <property
85 name="buildTargets"
86 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
87 <echo
88 level="info"
89 message="invoking buildTargets: ${buildTargets} -> getBaseBuilder"/>
90 <ant
91 antfile="${buildTargets}"
92 target="getBaseBuilder"/>
93 </target>
david_williams60d275b2010-09-26 05:39:57 +000094
david_williams14a5e162010-09-24 01:32:42 +000095
96 <target
97 name="handleCompilationProblems"
98 depends="checkIfCompileProblems"
99 if="compilation.problem.found">
100
101 <!-- if there is a problem, leave a marker file in download directory, so the webpage can
102 describe what happened -->
103
104 <echo
105 message="Compilation problems were found"
106 file="${buildDirectory}/${buildLabel}/compilationProblems.txt"/>
107
108 <!-- always force an early copy, before fail, so all results and files get to "downloads" area -->
109 <ant
110 antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
111 <fail
112 if="compilation.problem.found"
113 message="The remaining build and tests were canceled since compilation problems were found."/>
114 </target>
115
116
117 <target
118 name="checkIfCompileProblems">
119 <!--
120 Not sure how reliable the presence of this 'compilation.problem' file is ...
121 I just noticed it in recent PDE builds with compile problems.
122 May have to make this "fancier" in future.
123 For now, looks only one level down in plugins directory (in build's workdir) for a file with
124 the name 'complilation.problem'. We may have a "summary" in xml file format, summarizing logs,
125 ... but not sure then created (during site? We'd have to call site first. This way, we'll see if the match :) .
126 -->
127 <available
128 file="compilation.problem"
129 type="file"
130 property="compilation.problem.found">
131 <filepath>
132 <dirset
133 dir="${buildDirectory}">
134 <include
135 name="plugins/*"/>
136 </dirset>
137
138 </filepath>
139 </available>
140 <echo
141 message="compilation.problem path buildDirectory: ${buildDirectory}/plugins/*/"/>
142 </target>
david_williams14a5e162010-09-24 01:32:42 +0000143
144
david_williams60d275b2010-09-26 05:39:57 +0000145
david_williams3d6137b2010-07-31 01:40:49 +0000146</project>