File: build.xml

package info (click to toggle)
libgroboutils-java 5-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,496 kB
  • sloc: java: 59,880; xml: 12,762; sh: 377; perl: 104; makefile: 20
file content (360 lines) | stat: -rw-r--r-- 11,949 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0"?>

<!DOCTYPE book [

<!-- default sources -->
<!ENTITY inc._init  SYSTEM "_shared/common-ant/common-ant-tasks-init.ant-inc.xml">

]>

<project name="GroboUtils" default="main" basedir=".">
    
    

    &inc._init;
    
    
    <!-- ****************************************************************** -->
    
    <!-- Targets -->

    <target name="all" depends="clean,deploy" />

    
    <target name="help">
<!-- format for 80 column output -->
        <echo>
###################################################################
# Core build file for the GroboUtils Sourceforge project.
#
# The 'make.bat' and 'make.sh' scripts can correctly invoke this
# build file using the expected library dependencies.
#
# To compile an individual project, use:
#   $$ ./make.sh -f &lt;project name&gt;/build.xml
#       &quot;-Dbasedir=&lt;absolute name of project's dir&gt;&quot;
#
# The available project targets include:
#       help        this display
#       all         runs clean &amp; deploy
#       main        runs deploy (default target)
#       clean       calls the builds for each of the sub-projects,
#                   invoking the 'clean' target.
#       deploy      calls the builds for each of the sub-projects,
#                   invoking the 'deploy' target.  It will invoke
#                   these builds in the correct dependency order.
#
# A complete build needs to call this ant build file several times,
# in the following order (Windows and Mac users will need to adjust
# the style to suit your platform):
#
#  $$ JAVA_HOME=my/jdk1.2
#  $$ ./make.sh deploy
#  $$ JAVA_HOME=my/jdk1.3
#  $$ ./make.sh deploy
#  $$ JAVA_HOME=my/jdk1.4
#  $$ ./make.sh deploy
#  $$ ./make.sh -f _projects/build.xml
#
# 
###################################################################
        </echo>
    </target>

    
    <target name="clean">
        <!-- reload this build file to allow the whole dependency tree
            to be executed -->
        <delete dir="${basedir}/tmp" failonerror="false" />
        <delete file="${basedir}/_shared/xdocs/style/input-summary.xml" />
        
        <ant target="GroboUtils.main.all-targets" dir="${basedir}">
            <property name="GroboUtils.main.target" value="clean" />
        </ant>
        
        <!-- since these are commented out in the all-targets, clean
        up here -->
        <ant target="clean" dir="website" />
        <ant target="clean" dir="_projects" />
    </target>

    
    <target name="deploy">
        <!-- reload this build file to allow the whole dependency tree
            to be executed -->
        <ant target="GroboUtils.main.all-targets" dir="${basedir}">
            <property name="GroboUtils.main.target" value="deploy" />
        </ant>
        
        <!--
        These targets can only do deployment and clean, so run them
        separate of the all-targets target.
        
        Note that the website sub-project requires the included version of
        Xerces and Xalan, not the JDK 1.4 versions.  You *must* setup the
        Java invocation correctly, which the included "make.sh" does (but
        make.bat doesn't).
        -->
        <ant target="deploy" dir="website" />
        <ant target="deploy" dir="_projects" />
    </target>
    
    
    <target name="main">
        <!-- reload this build file to allow the whole dependency tree
            to be executed -->
        <ant target="GroboUtils.main.all-targets" dir="${basedir}">
            <property name="GroboUtils.main.target" value="main" />
        </ant>
    </target>


    <target name="test-all">
        <!-- reload this build file to allow the whole dependency tree
            to be executed -->
        <ant target="GroboUtils.main.all-targets" dir="${basedir}">
            <property name="GroboUtils.main.target" value="test-all" />
        </ant>
    </target>
    
    
    <!-- ****************************************************************** -->
    
    <!-- run all the tasks
        - let ANT determine the dependency structure for us. -->
    <target name="GroboUtils.main.all-targets"
            depends="
            _shared.common.depend.jdk-checker,
            codecoverage,
            testing-autodoc,
            testing-junit,
            testing-mbtf,
            testing-tp,
            pmti,
            uicapture,
            util-classes,
            util-datastruct,
            util-io,
            util-states,
            util-thread,
            util-xml
            " >
            
        <!-- Website is always penultimate
        This can only be called with JDK 1.3, or correct Xerces in
        the JDK 1.4 extension lib!
        <ant target="${GroboUtils.main.target}" dir="website" />
            
        _project is always last, but depends on website
        <ant target="${GroboUtils.main.target}" dir="_projects" />
        -->
    </target>
    
    <target name="codecoverage"
            depends="init,
                testing-junit,
                testing-autodoc,
                pmti,
                util-io,
                util-datastruct
                " if="_shared.common.depend.has-jdk12" >
        <ant target="${GroboUtils.main.target}" dir="codecoverage" />
    </target>
    
    <target name="testing-autodoc"
            depends="init,
                testing-junit,
                util-classes
                " >
        <ant target="${GroboUtils.main.target}" dir="testing-autodoc" />
    </target>
    
    <target name="testing-junit"
            depends="init" >
        <ant target="${GroboUtils.main.target}" dir="testing-junit" />
    </target>
    
    <target name="testing-mbtf"
            depends="init,
                testing-junit,
                util-classes,
                pmti,
                testing-autodoc
                " >
<!--
        <ant target="${GroboUtils.main.target}" dir="testing-mbtf" />
-->
    </target>
    
    <target name="testing-tp"
            depends="init,
                testing-junit,
                testing-autodoc,
                pmti,
                util-classes,
                util-xml
                " >
        <ant target="${GroboUtils.main.target}" dir="testing-tp" />
    </target>
    
    <target name="pmti"
            depends="init,
                testing-junit,
                util-classes,
                testing-autodoc,
                util-xml
                " >
        <ant target="${GroboUtils.main.target}" dir="pmti" />
    </target>
    
    <target name="uicapture"
            depends="init,
                testing-junit,
                util-classes,
                pmti,
                testing-tp,
                testing-autodoc,
                util-xml
                " if="_shared.common.depend.has-jdk14" >
        <ant target="${GroboUtils.main.target}" dir="uicapture" />
    </target>
    
    <!-- this is a dependancy for testing-autodoc -->
    <target name="util-classes"
            depends="init,
                testing-junit
                " >
        <ant target="${GroboUtils.main.target}" dir="util-classes" />
    </target>
    
    <target name="util-datastruct"
            depends="init,
                testing-junit,
                util-classes,
                pmti,
                testing-tp,
                testing-autodoc
            ">
        <ant target="${GroboUtils.main.target}" dir="util-datastruct" />
    </target>
    
    <target name="util-io"
            depends="init,
                testing-junit,
                util-classes,
                pmti,
                testing-tp,
                testing-autodoc
                " >
        <ant target="${GroboUtils.main.target}" dir="util-io" />
    </target>
    
    <target name="util-states"
            depends="init,
                testing-junit,
                util-classes,
                pmti,
                testing-tp,
                testing-autodoc
                " >
<!--
        <ant target="${GroboUtils.main.target}" dir="util-states" />
-->
    </target>
    
    <target name="util-thread"
            depends="init,
                testing-junit,
                util-classes,
                pmti,
                testing-tp,
                testing-autodoc,
                util-datastruct
                " >
        <ant target="${GroboUtils.main.target}" dir="util-thread" />
    </target>
    
    <target name="util-xml"
            depends="init,
                testing-junit,
                util-classes,
                testing-autodoc
                " >
        <ant target="${GroboUtils.main.target}" dir="util-xml" />
    </target>
    
    
    
    <!-- ****************************************************************** -->
    
    
    <target name="init"
            depends="bootstrap-check"
            description="perform all pre-build operations" />
    
    
    
    <!-- ****************************************************************** -->
    
    <target name="bootstrap-check"
        description="Ensure the proper bootstrap classes are installed for
the deployment to occur.  This may include compiling some prerequisites, to
allow for 'bootstrapping' the build." depends="check-grobo.autodoc" >
        
        <!-- Call out to these targets, so their defined properties don't
            pollute this project, but their failures will still be valid -->
        <antcall target="check-ant.optional" />
    </target>
    
    
    <target name="check-ant.optional" >
        <available
            classname="org.apache.tools.ant.taskdefs.optional.EchoProperties"
            property="check-ant.echoproperties" />
        <fail message="You must have the Ant 1.5 (or higher) optional package
installed to execute the build." unless="check-ant.echoproperties" />

        <available
            classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
            property="check-ant.junit" />
        <fail message="You must have the Ant optional package and JUnit
libraries installed and in the classpath to execute the build."
            unless="check-ant.junit" />
    </target>
    
    
    <!-- The Autodoc framework is used in the formatter parts of JUnit
        tasks -->
    <target name="check-grobo.autodoc"
        depends="check-grobo.autodoc.check, check-grobo.autodoc.compile">
    </target>
    <target name="check-grobo.autodoc.check">
        <available
            classname="net.sourceforge.groboutils.autodoc.v1.AutoDoc"
            property="check-autodoc.autodoc" />
        <available
            file="${basedir}/testing-autodoc/GroboTestingAutodoc-1.0.0alpha1-core.zip"
            property="check-autodoc.autodoc-exist" />
        <condition property="check-autodoc.autodoc-fail">
            <and>
                <isset property="check-autodoc.autodoc" />
                <not>
                    <isset property="check-autodoc.autodoc-exist" />
                </not>
            </and>
        </condition>
        <fail message="You must include the AutoDoc compiled jar in the
classpath to run this build." if="check-autodoc.autodoc-exist" />
    </target>
    <target name="check-grobo.autodoc.compile" unless="check-autodoc.autodoc">
    <!--
    Nope - we taint going to do this.  Autodoc ends up having too many
    dependencies, and the formatters are loaded in a forked VM w/ the correct
    classpath to load those formatters.
        <ant target="deploy" dir="testing-autodoc" />
    -->
    <!--
        <fail message="Bootstrap AutoDoc not included." />
    -->
    </target>
</project>