-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild.xml
481 lines (402 loc) · 14.1 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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<?xml version="1.0"?>
<!--
! Axis build file
!
! This file describes how to install the local Axis package from its
! released state. It requires Apache ANT and a Java Development Kit.
!
! The main targets are:
!
! build -> makes copies of local files that will be modified
! clean -> removes local copies
! deinstall -> undo the install target
! dist -> makes package into dist state
! export -> creates the full distribution archives
! export-runonly -> same as export
! export-source -> same as export
! install -> install distribution into Starlink tree
! install-runonly -> same as install
! jars -> add manifest and sign jar files
! javadocs -> does nothing
! javadoc-sources -> does nothing
!
! The targets that do nothing are provided for compatibility with
! the normal build system.
!!
!! test targets yet to be done.
!!
! Authors:
! Peter W. Draper (9-JUL-2002)
!
! Version:
! $Id$
!
!-->
<project name="Build file for Axis" default="build" basedir=".">
<!-- If either or both of these files exist then any properties
! contained within them will override those defined here. -->
<property file="${user.home}/.stardev.properties"/>
<property file=".properties"/>
<!-- Properties will also be set for all environment variables
! (PATH becomes "env.PATH"), generally not a good
! idea as names are OS dependent -->
<property environment="env"/>
<!--
! =================
! Global Properties
! =================
!-->
<!-- Directory for the Starlink installation (usually /star/java)-->
<property name="star.dir" value="${basedir}/../../"/>
<!-- Directory to install into (install target, usually /star/java)-->
<property name="star.install" value="${star.dir}"/>
<!-- Directory that contains the Starlink jar tree -->
<property name="star.jar.dir" value="${star.dir}/lib"/>
<!-- Directory that contains the locally built sources (usually
! /star/java/source for full distribution) -->
<property name="star.build.dir" value="${basedir}/../"/>
<!-- Directory that any archives should be placed into. The local
! directory by default -->
<property name="star.archive.dir" value="${basedir}"/>
<!--
! ================
! Local Properties
! ================
!-->
<!-- Define the package name and current versions -->
<property name="Name" value="Axis"/>
<property name="name" value="axis"/>
<property name="version" value="1.0b2"/>
<!-- Extra task options, if any -->
<property name="chmod.fail" value="false"/>
<!-- Directory containing the package source -->
<property name="src.dir" value="${basedir}/src"/>
<!-- Directory containing any unmodified jars of this package -->
<property name="src.jars.dir" value="${src.dir}/lib"/>
<!-- Distribution directories, these are the actual state of this
! package at all times -->
<property name="dist.dir" value="${basedir}"/>
<property name="dist.bin" value="${dist.dir}/bin"/>
<property name="dist.lib" value="${dist.dir}/lib"/>
<property name="dist.docs" value="${dist.dir}/docs"/>
<property name="dist.bin.pkg" value="${dist.bin}/${name}"/>
<property name="dist.lib.pkg" value="${dist.lib}/${name}"/>
<property name="dist.docs.pkg" value="${dist.docs}/${name}"/>
<!-- Version for zipped/tarred export files. -->
<property name="dist.version" value="${name}-${version}"/>
<!-- File for logging the files that are copied by the install target -->
<property name="install.log" value=".${name}.install"/>
<property name="install.overwrite" value="true"/>
<!-- Local webstart properties. Note this needs a local keystore,
! assumed to be called keystore in $star.build.dir, .. by
! default. -->
<property name="webstart.codebase"
value="http://starlink.jach.hawaii.edu/starjava/lib"/>
<property name="webstart.alias" value="Starlink-UK"/>
<property name="webstart.keystore" value="${star.build.dir}/keystore"/>
<property name="webstart.keypass" value="Vroomfondel"/>
<property name="webstart.storepass" value="Majikthise"/>
<property name="webstart.starlink_logo" value="starlink_logo_med.gif"/>
<property name="home.page" value="http://xml.apache.org/axis/"/>
<!--
! =================
! Prepare the build
! =================
!
! Do any jobs that are required before any other target can proceed.
!-->
<target name="prepare">
<tstamp>
<format property="year" pattern="yyyy"/>
</tstamp>
</target>
<!--
! ==============
! Build the code
! ==============
!
! Just makes local copies of the package jar files so that they
! can be safely modified.
!-->
<target name="build"
depends="prepare"
description="-> make local copies of files for modification">
<mkdir dir="${dist.lib.pkg}"/>
<copy todir="${dist.lib.pkg}">
<fileset dir="${src.jars.dir}"/>
</copy>
</target>
<!--
! ===========================
! Create the package jar file
! ===========================
!
! This just updates the manifest and signs with using the local
! keystore.
!-->
<target name="jars"
depends="build"
description="-> packages jar files">
<!-- Add the manifest to the axis.jar file, just an update -->
<mkdir dir="${dist.lib.pkg}"/>
<jar destfile="${dist.lib.pkg}/axis.jar" basedir="${dist.dir}"
update="true" excludes="**">
<!-- Create the manifest, note wraps in column 80 so avoid
! this. TODO: perform this task automatically?-->
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value="${jar.class.path}"/>
</manifest>
</jar>
<!-- Sign all jar files -->
<antcall target="signjars"/>
</target>
<target name="signjars" if="sign.jars">
<signjar alias="${webstart.alias}"
keystore="${webstart.keystore}"
keypass="${webstart.keypass}"
storepass="${webstart.storepass}">
<fileset dir="${dist.lib}" includes="**/*.jar **/*.zip"/>
</signjar>
</target>
<!--
! ========================================
! Make package JNLP file for Java webstart
! ========================================
!-->
<target name="webstart"
description="-> create webstart descriptor files">
<!-- Create a webstart JNLP file for this package, this goes into
! "dist.lib" -->
<mkdir dir="${dist.lib}"/>
<jnlp toFile="${dist.lib}/${name}.jnlp" href="${name}.jnlp"
codebase="${webstart.codebase}">
<information>
<title>AXIS</title>
<vendor>Apache</vendor>
<homepage href="${home.page}"/>
<icon href="${webstart.starlink_logo}"/>
<description>"Apache axis - Webstart edition"</description>
<offline_allowed/>
</information>
<security>
<all_permissions/>
</security>
<resources>
<j2se version="1.6+"/>
<fileset dir="${dist.lib}" includes="**/*.jar **/*.zip"/>
</resources>
<component_desc/>
</jnlp>
</target>
<!--
! =============================
! Create the local distribution
! =============================
!
! Nothing to do, this package is permanently in this condition.
!-->
<target name="dist"
depends="jars,webstart"
description="-> make package ready for distribution">
</target>
<!--
! ========================
! Create the full releases
! ========================
!
! Creates the full "zip", "tar" and "bzip" archives of the
! package.
!
! The archive names are ${dist.version}.<ext>.
!-->
<target name="export"
description="-> creates the full distribution archives">
<antcall target="create_archives">
<param name="archive.name" value="${dist.version}"/>
</antcall>
</target>
<!--
! ==========================
! Create the source releases
! ==========================
!
! Creates the source only "zip", "tar" and "bzip" archives.
! Same as export, except for the name.
!
! The archive names are ${dist.version}-src.<ext>.
!-->
<target name="export-source"
description="-> creates the source distribution archives">
<antcall target="create_archives">
<param name="archive.name" value="${dist.version}-src"/>
</antcall>
</target>
<!--
! ===========================
! Create the runonly releases
! ===========================
!
! Creates the runonly "zip", "tar" and "bzip" archives of the
! products of the "dist" target. Same as export, except for the
! name.
!
! The archive names are ${dist.version}-bin.<ext>.
!-->
<target name="export-runonly"
description="-> creates the runonly distribution archives">
<antcall target="create_archives">
<param name="archive.name" value="${dist.version}-bin"/>
</antcall>
</target>
<!--
! Create release archives of the various types required.
! For this package these are all the same just set the property
! "archive.name" to define what name to use for the outfile
! files. The archives are also written into the directory
! ${star.archive.dir} (the local directory by default).
!-->
<target name="create_archives"
depends="dist">
<mkdir dir="${star.archive.dir}"/>
<zip destfile="${star.archive.dir}/${archive.name}.zip">
<zipfileset dir="${dist.docs}" prefix="${name}/docs"/>
<zipfileset dir="${dist.dir}" includes="build.xml" prefix="${name}"/>
<zipfileset dir="${dist.lib}" prefix="${name}/lib"/>
</zip>
<tar longfile="gnu" destfile="${archive.name}.tar">
<tarfileset dir="${dist.docs}" prefix="${name}/docs"/>
<tarfileset dir="${dist.dir}" prefix="${name}">
<include name="build.xml"/>
</tarfileset>
<tarfileset dir="${dist.lib}" prefix="${name}/lib"/>
</tar>
<gzip zipfile="${star.archive.dir}/${archive.name}.tar.gz"
src="${archive.name}.tar"/>
<bzip2 zipfile="${star.archive.dir}/${archive.name}.tar.bz2"
src="${archive.name}.tar"/>
<delete file="${archive.name}.tar"/>
</target>
<!--
! ============================================
! Cleans up build and distribution directories
! ============================================
!
! Removes copies of jar files.
!-->
<target name="clean"
description="-> removes local copies">
<delete dir="${dist.lib}"/>
</target>
<!--
! ================================
! Install into the "Starlink" tree
! ================================
!
! Installs the package into another set of directories.
!
! An installed system is potentially "undoable" as the copied names
! are logged to "${install.log}".
!-->
<target name="install"
depends="dist"
description="-> install distribution into Starlink tree">
<!-- Installation based directories (based on "star.install")-->
<property name="star.lib" value="${star.install}/lib"/>
<property name="star.lib.pkg" value="${star.lib}/${name}"/>
<property name="star.docs" value="${star.install}/docs"/>
<property name="star.docs.pkg" value="${star.docs}/${name}"/>
<mkdir dir="${star.install}"/>
<mkdir dir="${star.lib.pkg}"/>
<mkdir dir="${star.docs.pkg}"/>
<loggedcopy todir="${star.lib}"
logfile="${install.log}"
overwrite="${install.overwrite}"
logfileAppend="false">
<fileset dir="${dist.lib}"/>
</loggedcopy>
<echo file="${install.log}" append="true">${star.lib.pkg}
</echo>
<loggedcopy todir="${star.docs}"
logfile="${install.log}"
overwrite="${install.overwrite}"
logfileAppend="true">
<fileset dir="${dist.docs}"/>
</loggedcopy>
<echo file="${install.log}" append="true">${star.docs.pkg}
</echo>
</target>
<!--
! ========================================
! Install runonly into the "Starlink" tree
! =========================================
!
! Same as install.
!-->
<target name="install-runonly"
description="-> install distribution into Starlink tree">
<antcall target="install"/>
</target>
<!--
! ===================================
! De-install from the "Starlink" tree
! ===================================
!
! Uses the content of the "${install.log}" to remove the files
! that were copied into place by the install target.
!-->
<target name="deinstall"
description="-> undo the install target">
<available file="${install.log}" property="install.log.present"/>
<antcall target="real_deinstall"/>
</target>
<!-- Real deinstall target. Only activated if "install.log.present"
! is defined -->
<target name="real_deinstall"
if="install.log.present">
<loadfile property="files" srcFile="${install.log}"/>
<listdelete>
<filelist dir="/" files="${files}"/>
</listdelete>
<delete file="${install.log}"/>
</target>
<!--
! =============================
! Creates the API documentation
! =============================
!
! Does nothing.
!-->
<target name="javadocs"
description="-> does nothing">
</target>
<!--
! ==========================================
! Creates the API documentation java sources
! ==========================================
!
! Does nothing.
!-->
<target name="javadoc-sources"
description="-> does nothing">
</target>
<!--
! ============
! Run testcase
! ============
!-->
<target name="test"
description="-> does nothing"/>
<!--
! Get a DTD for this build file. Documentation suggests may be incomplete!
!
! Use:
!
! <!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "./project.dtd">
!
! at head of document to include.
!-->
<target name="dtd">
<antstructure output="project.dtd"/>
</target>
</project>