-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.xml
249 lines (222 loc) · 10.2 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<?xml version="1.0"?>
<!-- ======================================================== -->
<!-- Main Ant build file -->
<!-- Serves as a facade for different project build files. -->
<!-- ======================================================== -->
<project name="all-projects" default="dist" basedir=".">
<!-- ========================================== -->
<!-- Load properties files. -->
<!-- ========================================== -->
<property file="build.properties" />
<property file="${user.home}${file.separator}build.properties" />
<property file="${user.home}${file.separator}Library${file.separator}wobuild.properties" />
<loadproperties srcfile="default.properties">
<filterchain>
<tokenfilter>
<replacestring from="$Revision: " to="" />
<replacestring from=" $" to="" />
</tokenfilter>
</filterchain>
</loadproperties>
<property file="${project.lib.dir}/lib.properties" />
<property name="wo.dir.library.frameworks" value="${wo.wosystemroot}/Library/Frameworks" />
<property name="build.version.to.replace" value="1.0.6" />
<!-- ak: dirty trick so we don't have to create a directory -->
<property name="eclipse.deps.home" value="${eclipse.deps.home}/features" />
<property name="eclipse.plugin.home" value="${eclipse.home}" />
<!-- ========================================== -->
<!-- Print help. -->
<!-- ========================================== -->
<target name="help">
<echo>
****************************************
* TARGETS (also you can use "-projecthelp" ant flag):
*
* 1. help - prints this message.
* 2. all - build all projects.
* 3. dist - build distribution.
* 4. distnightly - build nigthly distribution.
* 5. clean - cleans temporary directories.
* 6. test - Run JUnit tests.
* 7. check - Stores the wo specific properties in a file.
* 8. .ds_store - delete .DS_store files
* 9. buildserver - Target for the buildserver
* 10. buildserver.publish - Target for the buildserver to publish
****************************************
</echo>
</target>
<!-- ========================================== -->
<!-- Print environment. -->
<!-- ========================================== -->
<target name="print.environment">
<echo>
****************************************
* java.home = ${java.home}
* build.compiler = ${build.compiler}
* ant.home = ${ant.home}
* user.home = ${user.home}
* build.version = ${build.version}
* build.version.to.replace = ${build.version.to.replace}
* build.output.dir = ${build.output.dir}
* build.output.java.dir = ${build.output.java.dir}
* build.output.java.test.dir = ${build.output.java.test.dir}
* build.output.build.dir = ${build.output.build.dir}
* build.output.dist.dir = ${build.output.dist.dir}
* build.output.dist.targz.dir = ${build.output.dist.targz.dir}
* deploy.dir = ${deploy.dir} (set by the buildserver)
* eclipse.home = ${eclipse.home}
* eclipse.deps.home = ${eclipse.deps.home}
* no.clean = ${no.clean}
* no.docs = ${no.docs}
* compile options
* compile.deprecation= ${compile.deprecation}
* compile.debug= ${compile.debug}
* compile.optimize= ${compile.optimize}
* compile.source= ${compile.source}
* compile.target= ${compile.target}
* feature.updateSiteName= ${feature.updateSiteName}
* feature.updateSite= ${feature.updateSite}
****************************************
</echo>
</target>
<!-- ========================================== -->
<!-- Build woenvironment. -->
<!-- ========================================== -->
<target name="woenvironment">
<ant dir="${project.woenvironment.dir}" target="all" />
</target>
<!-- ========================================== -->
<!-- Build woproject. -->
<!-- ========================================== -->
<target name="woproject">
<ant dir="${project.woproject.dir}" target="all">
</ant>
</target>
<!-- ========================================== -->
<!-- Build wolips. -->
<!-- ========================================== -->
<target name="wolips">
<ant dir="${project.wolips.dir}" target="all" />
</target>
<!-- ========================================== -->
<!-- Build all. -->
<!-- ========================================== -->
<target name="all" depends="print.environment,verify.clean,set.clean,call.clean,prepare,woenvironment,woproject,wolips">
</target>
<!-- ========================================== -->
<!-- Build all. -->
<!-- ========================================== -->
<target name="woproject.all" depends="print.environment,verify.clean,set.clean,call.clean,prepare,woenvironment,woproject">
</target>
<!-- ========================================== -->
<!-- Build dist. -->
<!-- ========================================== -->
<target name="dist" depends="definestableupdatesite,distchildren">
</target>
<!-- ========================================== -->
<!-- Build dist wolips maven. -->
<!-- ========================================== -->
<target name="dist.wolips.maven" depends="definestableupdatesite,print.environment,verify.clean,set.clean,call.clean,prepare,wolips">
<ant dir="${project.wolips.dir}" target="dist" />
</target>
<!-- ========================================== -->
<!-- Build dist. -->
<!-- ========================================== -->
<target name="distnightly" depends="definenightlyupdatesite,distchildren">
</target>
<!-- ========================================== -->
<!-- Build definenightlyupdatesite. -->
<!-- ========================================== -->
<target name="definenightlyupdatesite">
<property name="feature.updateSiteName" value="${feature.updateSiteName.nightly}" />
<property name="feature.updateSite" value="${feature.updateSite.nightly}" />
</target>
<!-- ========================================== -->
<!-- Build definestableupdatesite. -->
<!-- ========================================== -->
<target name="definestableupdatesite">
<property name="feature.updateSiteName" value="${feature.updateSiteName.stable}" />
<property name="feature.updateSite" value="${feature.updateSite.stable}" />
</target>
<!-- ========================================== -->
<!-- Build dist children. -->
<!-- ========================================== -->
<target name="distchildren" depends="all">
<ant dir="${project.woenvironment.dir}" target="dist" />
<ant dir="${project.woproject.dir}" target="dist" />
<ant dir="${project.wolips.dir}" target="dist" />
</target>
<!-- ========================================== -->
<!-- Build buildserver. -->
<!-- ========================================== -->
<target name="buildserver" depends="dist">
</target>
<!-- ============================================= -->
<!-- Prepare. -->
<!-- ============================================= -->
<target name="prepare" depends=".ds_store,check">
<mkdir dir="${build.output.java.dir}" />
<mkdir dir="${build.output.build.dir}" />
<mkdir dir="${build.output.dist.dir}" />
<mkdir dir="${build.output.homepage.dir}" />
</target>
<!-- ============================================= -->
<!-- Deletes temporary files. -->
<!-- ============================================= -->
<target name="clean">
<delete dir="${build.output.dir}" />
<delete file="velocity.log" />
</target>
<!-- ============================================= -->
<!-- Run tests. -->
<!-- ============================================= -->
<target name="test" depends="print.environment,prepare,woenvironment.test,woproject.test">
</target>
<!-- ========================================== -->
<!-- Run woenvironment tests. -->
<!-- ========================================== -->
<target name="woenvironment.test">
<ant dir="${project.woenvironment.dir}" target="test" />
</target>
<!-- ========================================== -->
<!-- Run woproject tests. -->
<!-- ========================================== -->
<target name="woproject.test">
<ant dir="${project.woproject.dir}" target="test" />
</target>
<!-- ========================================== -->
<!-- Check properties. -->
<!-- ========================================== -->
<target name="check">
<ant antfile="${project.buildscripts.dir}/woproperties.xml" target="check" />
</target>
<!-- ========================================== -->
<!-- Delete .DS_Store files. -->
<!-- ========================================== -->
<target name=".ds_store">
<ant dir="." antfile="${project.buildscripts.dir}/delete_DS_store_files.xml" target=".ds_store" />
</target>
<!-- ========================================== -->
<!-- Verify clean. -->
<!-- ========================================== -->
<target name="verify.clean">
<condition property="no.clean.not.set">
<not>
<isset property="no.clean" />
</not>
</condition>
</target>
<!-- ========================================== -->
<!-- Set clean property. -->
<!-- ========================================== -->
<target name="set.clean" if="no.clean.not.set">
<property name="clean" value="true" />
<echo message="To skip the clean set the property no.clean in your build.properties" />
</target>
<!-- ========================================== -->
<!-- Call clean. -->
<!-- ========================================== -->
<target name="call.clean" if="clean">
<antcall target="clean" />
</target>
</project>