File: build.xml

package info (click to toggle)
libjibx1.2-java 1.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,260 kB
  • sloc: java: 75,013; xml: 14,068; makefile: 17
file content (344 lines) | stat: -rw-r--r-- 13,701 bytes parent folder | download | duplicates (9)
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
<?xml version="1.0"?>

<project name="tutorial" default="help" basedir="..">

  <!-- Definitions -->
  <property name="root-dir" value="${basedir}/tutorial"/>
  <property name="lib" value="${basedir}/lib"/>
  <path id="example-classpath">
    <pathelement location="${root-dir}"/>
    <fileset dir="${lib}" includes="*.jar"/>
  </path>
  <path id="binding-classpath">
    <pathelement location="${root-dir}"/>
    <fileset dir="${lib}" includes="*.jar"/>
  </path>

  <!-- Delete class files for a single example -->
  <target name="clean">
    <delete quiet="true">
      <fileset dir="${root-dir}/${example}" includes="**/*.class"/>
    </delete>
  </target>

  <!-- Compile the example classes -->
  <target name="compile">
    <javac srcdir="${root-dir}"
      destdir="${root-dir}"
      includes="${example}/**/*.java"
      debug="true"
      deprecation="on">
      <classpath refid="example-classpath"/>
    </javac>
  </target>

  <!-- Run the JiBX binding. -->
  <target name="run-bind">
    <java classname="org.jibx.binding.Compile" fork="yes" dir="${root-dir}"
        failonerror="true">
      <classpath path="${root-dir}:${lib}/jibx-run.jar:${lib}/jibx-bind.jar:${lib}/xpp3.jar:${lib}/bcel.jar"/>
      <arg value="${root-dir}/${example}/${binding-file}"/>
    </java>
  </target>

  <!-- Run the example code. -->
  <target name="run-example">
    <java classname="org.jibx.extras.TestRoundtrip" fork="yes" dir="${root-dir}"
        failonerror="true">
      <classpath refid="example-classpath"/>
      <arg line="${bound-class} ${example}/${data-file} ${example}/${out-file}"/>
    </java>
  </target>

  <target name="full-test" depends="clean,compile,run-bind,run-example"/>
  
  <!-- Special case for running example 22 -->
  <target name="run-example22">
    <java classname="example22.Test" fork="yes" dir="${root-dir}"
        failonerror="true">
      <classpath refid="example-classpath"/>
      <arg value="example22/data0.xml"/>
    </java>
  </target>
  
  <!-- Configurations for each example. -->
  <target name="config1">
    <property name="example" value="example1"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config2">
    <property name="example" value="example2"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config3">
    <property name="example" value="example3"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="out.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config5">
    <property name="example" value="example5"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config6">
    <property name="example" value="example6"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config7">
    <property name="example" value="example7"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="out.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config8">
    <property name="example" value="example8"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.TimeTable"/>
  </target>
  
  <target name="config9">
    <property name="example" value="example9"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.TimeTable"/>
  </target>
  
  <target name="config10">
    <property name="example" value="example10"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.TimeTable"/>
  </target>
  
  <target name="config11">
    <property name="example" value="example11"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.TimeTable"/>
  </target>
  
  <target name="config12">
    <property name="example" value="example12"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config13">
    <property name="example" value="example13"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config14">
    <property name="example" value="example14"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data1.xml"/>
    <property name="out-file" value="data1.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config15">
    <property name="example" value="example15"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data1.xml"/>
    <property name="out-file" value="data1.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config16">
    <property name="example" value="example16"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data1.xml"/>
    <property name="out-file" value="data1.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config17">
    <property name="example" value="example17"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data1.xml"/>
    <property name="out-file" value="data1.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config18">
    <property name="example" value="example18"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config19">
    <property name="example" value="example19"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Order"/>
  </target>
  
  <target name="config20">
    <property name="example" value="example20"/>
    <property name="binding-file" value="binding.xml"/>
    <property name="data-file" value="data.xml"/>
    <property name="out-file" value="data.xml"/>
    <property name="bound-class" value="${example}.Customer"/>
  </target>
  
  <target name="config21">
    <property name="example" value="example21"/>
    <property name="binding-file" value="binding0.xml"/>
    <property name="data-file" value="data0.xml"/>
    <property name="out-file" value="data0.xml"/>
    <property name="bound-class" value="${example}.Directory"/>
  </target>
  
  <target name="config22">
    <property name="example" value="example22"/>
    <property name="binding-file" value="binding0.xml"/>
  </target>

  <!-- Targets for tutorial examples -->
  <target name="example1" depends="config1,full-test"
    description="Compile and run example1"/>
  <target name="example2" depends="config2,full-test"
    description="Compile and run example2"/>
  <target name="example3" depends="config3,full-test"
    description="Compile and run example3"/>
  <target name="example5" depends="config5,full-test"
    description="Compile and run example5"/>
  <target name="example6" depends="config6,full-test"
    description="Compile and run example6"/>
  <target name="example7" depends="config7,full-test"
    description="Compile and run example7"/>
  <target name="example8" depends="config8,full-test"
    description="Compile and run example8"/>
  <target name="example9" depends="config9,full-test"
    description="Compile and run example9"/>
  <target name="example10" depends="config10,full-test"
    description="Compile and run example10"/>
  <target name="example11" depends="config11,full-test"
    description="Compile and run example11"/>
  <target name="example12" depends="config12,full-test"
    description="Compile and run example12"/>
  <target name="example13" depends="config13,full-test"
    description="Compile and run example13"/>
  <target name="example14" depends="config14,full-test"
    description="Compile and run example14"/>
  <target name="example15" depends="config15,full-test"
    description="Compile and run example15"/>
  <target name="example16" depends="config16,full-test"
    description="Compile and run example16"/>
  <target name="example17" depends="config17,full-test"
    description="Compile and run example17"/>
  <target name="example18" depends="config18,full-test"
    description="Compile and run example18"/>
  <target name="example19" depends="config19,full-test"
    description="Compile and run example19"/>
  <target name="example20" depends="config20,full-test"
    description="Compile and run example20"/>
  <target name="example21" depends="config21,full-test"
    description="Compile and run example21"/>
  <target name="example22" depends="config22,clean,compile,run-bind,run-example22"
    description="Compile and run example22"/>
  <target name="run1" depends="config1,run-example"
    description="Run example1"/>
  <target name="run2" depends="config2,run-example"
    description="Run example2"/>
  <target name="run3" depends="config3,run-example"
    description="Run example3"/>
  <target name="run5" depends="config5,run-example"
    description="Run example5"/>
  <target name="run6" depends="config6,run-example"
    description="Run example6"/>
  <target name="run7" depends="config7,run-example"
    description="Run example7"/>
  <target name="run8" depends="config8,run-example"
    description="Run example8"/>
  <target name="run9" depends="config9,run-example"
    description="Run example9"/>
  <target name="run10" depends="config10,run-example"
    description="Run example10"/>
  <target name="run11" depends="config11,run-example"
    description="Run example11"/>
  <target name="run12" depends="config12,run-example"
    description="Run example12"/>
  <target name="run13" depends="config13,run-example"
    description="Run example13"/>
  <target name="run14" depends="config14,run-example"
    description="Run example14"/>
  <target name="run15" depends="config15,run-example"
    description="Run example15"/>
  <target name="run16" depends="config16,run-example"
    description="Run example16"/>
  <target name="run17" depends="config17,run-example"
    description="Run example17"/>
  <target name="run18" depends="config18,run-example"
    description="Run example18"/>
  <target name="run19" depends="config19,run-example"
    description="Run example19"/>
  <target name="run20" depends="config20,run-example"
    description="Run example20"/>
  <target name="run21" depends="config21,run-example"
    description="Run example21"/>
  <target name="run22" depends="config22,run-example22"
    description="Run example22"/>

  <!-- Delete class files for all examples -->
  <target name="clean-all" description="Clean all class and output files">
    <delete quiet="true">
      <fileset dir="${root-dir}" includes="**/*.class"/>
    </delete>
  </target>
  
  <!-- Provide basic usage description -->
  <target name="help" description="Show basic usage">
    <echo message="Targets are:"/>
    <echo/>
    <echo message="example1   compile and run tutorial example1 code"/>
    <echo message="example2   compile and run tutorial example2 code"/>
    <echo message="..."/>
    <echo message="example22  compile and run tutorial example22 code"/>
    <echo message="run1       run previously-compiled tutorial example1 code"/>
    <echo message="run2       run previously-compiled tutorial example2 code"/>
    <echo message="..."/>
    <echo message="run22      run previously-compiled tutorial example22 code"/>
    <echo message="clean-all  delete all class files"/>
    <echo/>
    <echo message="The exampleN targets just run the basic compile and test"/>
    <echo message=" for the corresponding tutorial example, generally without"/>
    <echo message=" interesting output. The runN targets just run the test,"/>
    <echo message=" which requires you to have run the corresponding exampleN"/>
    <echo message=" previously."/>
  </target>
  
</project>