-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
419 lines (358 loc) · 16.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
<project name="abora-website" default="dist" basedir=".">
<description>
Abora website generation.
</description>
<!-- set global properties for this build -->
<property name="name" value="abora-website"/>
<property name="Name" value="Abora-Website"/>
<property name="src" location="htdocs"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="htdocs" location="${build}/htdocs"/>
<property name="white.dir" location="../abora-white"/>
<property name="udanax-gold2java.dir" location="../udanax-gold2java"/>
<property name="translator.dir" location="${udanax-gold2java.dir}/translator"/>
<property name="abora-gold.dir" location="${udanax-gold2java.dir}/abora-gold"/>
<property name="sourceforge.dir" value="/home/groups/a/ab/abora"/>
<property name="sourceforge.user" value="dgjones"/>
<property name="sourceforge.server" value ="shell.sourceforge.net"/>
<property name="base.url" value="/"/>
<property name="tarball.dir" location="../sf.tarballs"/>
<tstamp>
<format property="timestamp" pattern="yyyyMMMMdd-HHmmss"/>
</tstamp>
<!--**************************************************************-->
<!--** Init ******************************************************-->
<!--**************************************************************-->
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${htdocs}"/>
</target>
<!--**************************************************************-->
<!--** Collect all website pages *********************************-->
<!--**************************************************************-->
<target name="compile" depends="init"
description="compile the source pages" >
<copy todir="${htdocs}" overwrite="true">
<fileset dir="${src}">
<exclude name="**/*.sxd"/>
</fileset>
</copy>
<copy todir="${htdocs}/abora-white" overwrite="true">
<fileset dir="${white.dir}/docs/">
<include name="*.html"/>
</fileset>
</copy>
</target>
<!--**************************************************************-->
<!--** Update HTML files with navigation bars ********************-->
<!--**************************************************************-->
<target name="replacetemplate" depends="init, bin">
<replace dir="${htdocs}">
<include name="**/*.html"/>
<exclude name="**/api/**"/>
<exclude name="**/clover/**"/>
<replacetoken><![CDATA[<!-- abora:header -->]]></replacetoken>
<replacevalue><![CDATA[
<!-- <table width="100%" bgcolor="#FAEBD7" valign="middle" summary="">
<tr bgcolor="#FAEBD7" valign="middle">
<td> -->
<!-- <div style="background-color: #FAEBD7;"> -->
<!-- <div style="float:left; background-color: #FAEBD7; width: 100%; margin-bottom:0;" align="left">
-->]]></replacevalue>
</replace>
<replace dir="${htdocs}">
<include name="**/*.html"/>
<exclude name="**/api/**"/>
<exclude name="**/clover/**"/>
<replacetoken><![CDATA[<!-- abora:header_close -->]]></replacetoken>
<replacevalue><![CDATA[<!-- </td>
<td align="right"> -->
<!-- </div>
<div align="right"> -->
<!-- <FORM ACTION="http://www.abora.org/cgi-bin/ksearch/ksearch.cgi" METHOD="GET" NAME="search">
<INPUT TYPE="text" NAME="terms">
<INPUT TYPE="submit" VALUE="Search">
</FORM> -->
<!-- </td></tr></table> -->
<!-- </div> -->
<!-- </div> -->
<table width="100%" summary="">
<tr>
<td valign="top"><table width="100%" summary="">
<tr><td valign="top">]]></replacevalue>
</replace>
<replace dir="${htdocs}">
<include name="**/*.html"/>
<exclude name="**/api/**"/>
<exclude name="**/clover/**"/>
<replacetoken><![CDATA[<!-- abora:footer -->]]></replacetoken>
<replacevalue><![CDATA[</td></tr></table>
<td valign="top" width="1%">
<table width="100%" summary="" class="navbar">
<tr><td align="right">
<b>Abora Project</b><br>
<a href="/index.html">Home</a><br>
<a href="/features.html">Features</a><br>
<a href="/screenshots.html">Screenshots</a><br>
<a href="/applications.html">Applications</a><br>
<a href="/author.html">Author</a><br>
<a href="/acknowledgements.html">Thanks</a><br>
<a href="/links.html">Links</a><br>
</td></tr>
<tr><td align="right">
<b>SourceForge</b><br>
<a href="http://sourceforge.net/projects/abora/">Summary</a><br>
<a href="http://sourceforge.net/news/?group_id=64700">News</a><br>
<a href="http://sourceforge.net/mail/?group_id=64700">Lists</a><br>
<a href="http://sourceforge.net/project/showfiles.php?group_id=64700">Downloads</a><br>
</td></tr>
<tr><td align="right">
<b>UGold2Java</b><br>
<a href="/udanax-gold2java/index.html">Overview</a><br>
<a href="/udanax-gold2java/translator/junit_report/index.html">JUnit</a>/<a href="/udanax-gold2java/translator/findbugs/index.html">FindBugs</a><br>
<a href="/udanax-gold2java/translator/clover/index.html">Clover</a>/<a href="/udanax-gold2java/translator/clover_historical/historical.html">History</a><br>
<br>
<a href="/udanax-gold2java/abora-gold/api/index.html">Gold JavaDoc</a><br>
<a href="/udanax-gold2java/abora-gold/junit_report/index.html">JUnit</a>/<a href="/udanax-gold2java/abora-gold/findbugs/index.html">FindBugs</a><br>
<a href="/udanax-gold2java/abora-gold/clover/index.html">Clover</a>/<a href="/udanax-gold2java/abora-gold/clover_historical/historical.html">History</a><br>
</td></tr>
<tr><td align="right">
<b>Dolphin Demo</b><br>
<a href="/dolphin-demo/index.html">Overview</a><br>
<a href="/dolphin-demo/tech.html">Tech Report</a>
</td></tr>
<tr><td align="right">
<b>Abora-White</b><br>
<a href="/abora-white/index.html">Overview</a><br>
<a href="/abora-white/tech.html">Tech Docs</a><br>
<a href="/abora-white/porting.html">Port Details</a><br>
<a href="/abora-white/api/index.html">JavaDoc</a><br>
<a href="/abora-white/junit/html/index.html">JUnit Report</a><br>
<a href="/abora-white/clover/index.html">Clover</a>/<a href="/abora-white/clover-historical/historical.html">History</a><br>
</td></tr>
<tr><td align="right">
<form action="http://www.abora.org/cgi-bin/ksearch/ksearch.cgi" method="GET" name="search">
<input type="submit" value="Search"><br>
<input type="text" name="terms" size="10">
</form>
</td></tr>
</table>
</td></tr>
</table>
<hr bgcolor="#FAEBD7">
<table width="100%" summary="">
<tr><td class="footer">
Copyright 2002-2005 <a href="mailto:david_jones@night.dircon.co.uk">David G Jones</a>. All rights reserved<br>
]]></replacevalue>
</replace>
<replace dir="${htdocs}">
<include name="**/*.html"/>
<exclude name="**/api/**"/>
<replacetoken><![CDATA[<!-- abora:footer_close -->]]></replacetoken>
<replacevalue><![CDATA[
</td>
<td align="right">
<a href="http://sourceforge.net" class="advert"><img src="http://sourceforge.net/sflogo.php?group_id=64700&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"></a>
</td>
</tr>
</table>
]]></replacevalue>
</replace>
<replace dir="${htdocs}" propertyFile="links.properties">
<include name="**/*.html"/>
<exclude name="**/api/**"/>
<exclude name="**/clover/**"/>
<replacefilter token="@link:abora_project@" property="abora_project"/>
<replacefilter token="@link:dolphin_demo@" property="dolphin_demo"/>
<replacefilter token="@link:dolphin_smalltalk@" property="dolphin_smalltalk"/>
<replacefilter token="@link:ent_theory@" property="ent_theory"/>
<replacefilter token="@link:eric_drexler@" property="eric_drexler"/>
<replacefilter token="@link:intware@" property="intware"/>
<replacefilter token="@link:sunless_sea@" property="sunless_sea"/>
<replacefilter token="@link:ted_nelson@" property="ted_nelson"/>
<replacefilter token="@link:udanax_gold@" property="udanax_gold"/>
<replacefilter token="@link:udanax_gold2java@" property="udanax_gold2java"/>
<replacefilter token="@link:xia@" property="xia"/>
<replacefilter token="@link:xoc@" property="xoc"/>
<replacefilter token="@link:xoc_videos@" property="xoc_videos"/>
</replace>
<java classname="org.abora.website.tools.RecentMarkers" failonerror="true" classpath="build">
<arg path="${htdocs}/links.html"/>
</java>
</target>
<!--**************************************************************-->
<!--** Tidy HTML output ******************************************-->
<!--**************************************************************-->
<target name="tidy" depends="init">
<exec executable="tidy.exe" failonerror="true">
<arg value="-errors"/>
<arg value="${htdocs}/*.html"/>
<arg value="${htdocs}/abora-white/*.html"/>
<arg value="${htdocs}/dolphin-demo/*.html"/>
<arg value="${htdocs}/udanax-gold2java/*.html"/>
</exec>
</target>
<!--**************************************************************-->
<!--** Distribute; collect, update docs **************************-->
<!--**************************************************************-->
<target name="dist" depends="clean, compile, collect, replacetemplate, tidy"
description="generate the distribution" >
</target>
<!--**************************************************************-->
<!--** Clean temporary dirs **************************************-->
<!--**************************************************************-->
<target name="clean"
description="clean up" >
<delete dir="${build}"/>
</target>
<!--**************************************************************-->
<!--** Locally Collect docs and metrics from subprojects *********-->
<!--**************************************************************-->
<target name="collect" depends="collect.abora-white, collect.translator, collect.abora-gold"/>
<target name="abora-gold" depends="gen.abora-gold, collect.abora-gold"/>
<target name="translator" depends="gen.translator, collect.translator"/>
<target name="collect.abora-white" depends="init">
<echo/>
<echo message="***********************************************************"/>
<echo message="** Collect docs from abora-white **"/>
<echo message="***********************************************************"/>
<echo/>
<ant antfile="${white.dir}/build.xml" target="dist" dir="${white.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
</ant>
<echo/>
<echo message="***********************************************************"/>
<echo/>
<delete dir="${htdocs}/abora-white/"/>
<copy todir="${htdocs}/abora-white">
<fileset dir="${white.dir}/build/docs"/>
</copy>
</target>
<target name="gen.abora-gold" depends="init">
<ant antfile="${abora-gold.dir}/build.xml" dir="${abora-gold.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
<property name="basedir" value="${abora-gold.dir}"/>
<target name="with.clover"/>
<target name="clean"/>
<target name="test"/>
</ant>
<ant antfile="${abora-gold.dir}/build.xml" dir="${abora-gold.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
<property name="basedir" value="${abora-gold.dir}"/>
<target name="clover.historypoint"/>
<target name="clover.html"/>
</ant>
<ant antfile="${abora-gold.dir}/build.xml" dir="${abora-gold.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
<property name="basedir" value="${abora-gold.dir}"/>
<target name="clean"/>
<target name="findbugs"/>
</ant>
</target>
<target name="collect.abora-gold" depends="init">
<echo/>
<echo message="***********************************************************"/>
<echo message="** Collect docs from abora-gold **"/>
<echo message="***********************************************************"/>
<echo/>
<delete dir="${htdocs}/udanax-gold2java/abora-gold"/>
<copy todir="${htdocs}/udanax-gold2java/abora-gold">
<fileset dir="../udanax-gold2java/abora-gold/docs"/>
</copy>
</target>
<target name="collect.translator" depends="init">
<echo/>
<echo message="***********************************************************"/>
<echo message="** Collect docs from ug2java translator **"/>
<echo message="***********************************************************"/>
<echo/>
<!-- <ant antfile="${white.dir}/build.xml" target="dist" dir="${white.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
</ant> -->
<echo/>
<echo message="***********************************************************"/>
<echo/>
<delete dir="${htdocs}/udanax-gold2java/translator"/>
<copy todir="${htdocs}/udanax-gold2java/translator">
<fileset dir="${translator.dir}/docs"/>
</copy>
</target>
<target name="gen.translator" depends="init">
<ant antfile="${translator.dir}/build.xml" dir="${translator.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
<property name="basedir" value="${translator.dir}"/>
<target name="with.clover"/>
<target name="clean"/>
<target name="test"/>
</ant>
<ant antfile="${translator.dir}/build.xml" dir="${translator.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
<property name="basedir" value="${translator.dir}"/>
<target name="clover.historypoint"/>
<target name="clover.html"/>
</ant>
<ant antfile="${translator.dir}/build.xml" dir="${translator.dir}" inheritAll="false">
<property name="clover.includesource" value="false"/>
<property name="basedir" value="${translator.dir}"/>
<target name="clean"/>
<target name="findbugs"/>
</ant>
</target>
<!--**************************************************************-->
<!--** Upload ****************************************************-->
<!--**************************************************************-->
<target name="uploadNoReplace" depends="init">
<exec executable="rsync">
<arg line="rsync --rsh=ssh -Cavz --whole-file ${htdocs}/ ${sourceforge.user}@${sourceforge.server}:${sourceforge.dir}/htdocs" />
</exec>
<antcall target="website.permissions"/>
</target>
<target name="upload" depends="init">
<exec executable="rsync">
<arg line="rsync --rsh=ssh -Cavz --delete --delete-after --whole-file ${htdocs}/ ${sourceforge.user}@${sourceforge.server}:${sourceforge.dir}/htdocs" />
</exec>
<antcall target="website.permissions"/>
</target>
<target name="website.permissions" depends="init">
<!-- dont know how to drive rysnc to set up correct file/dir permissions, so following hack -->
<exec executable="ssh" failonerror="true">
<arg line="${sourceforge.user}@${sourceforge.server} chmod -R a+r ${sourceforge.dir}/htdocs/*" />
</exec>
<exec executable="ssh" failonerror="true">
<arg line="${sourceforge.user}@${sourceforge.server} chmod -R o+x ${sourceforge.dir}/htdocs/*" />
</exec>
</target>
<!--**************************************************************-->
<!--** Build indexes on website **********************************-->
<!--**************************************************************-->
<target name="index" depends="init">
<exec executable="ssh" failonerror="true">
<arg line="${sourceforge.user}@${sourceforge.server} cd /home/groups/a/ab/abora/cgi-bin/ksearch; ./indexer.pl" />
</exec>
</target>
<!--**************************************************************-->
<!--** Tarball Download from Source Forge ************************-->
<!--**************************************************************-->
<target name="tarball.download" depends="init">
<exec executable="curl">
<arg line="http://cvs.sourceforge.net/cvstarballs/abora-cvsroot.tar.bz2 -o${tarball.dir}/abora-cvsroot-${timestamp}.tar.bz2"/>
</exec>
</target>
<!--**************************************************************-->
<!--** Compile Tools *********************************************-->
<!--**************************************************************-->
<target name="bin" depends="init">
<javac srcdir="src"
destdir="build"
debug="on"
/>
</target>
<!--**************************************************************-->
<!--** Update website with latest pages **************************-->
<!--**************************************************************-->
<target name="updatewebsite" depends="init,compile,replacetemplate,uploadNoReplace"/>
<target name="updatelocal" depends="init,compile,replacetemplate"/>
<!--**************************************************************-->
</project>