forked from ngallagher/simplexml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
639 lines (611 loc) · 28.8 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
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
<?xml version="1.0"?>
<project name="Simple" default="usage" basedir=".">
<target name="usage">
<echo message="clean - Cleans the build and jar directories"/>
<echo message="build - Builds the JAR archive for the project and generates SHA1 and MD5 signatures"/>
<echo message="report - Generates a Cobertura report from the test cases"/>
<echo message="test - Executes the tests once for each XML library"/>
<echo message="test-woodstox - Executes the tests once with the Woodstox StAX framework"/>
<echo message="test-kxml - Executes the tests once with the KXML framework"/>
<echo message="test-dom - Executes the tests once with the W3C DOM framework"/>
<echo message="benchmark - Runs a rather lame benchmark"/>
<echo message="package - Packages the framework in to a downloadable package"/>
<echo message="pom - Generate the POM file used for Maven"/>
<echo message="maven-archive - Packages a maven execution in to a deployable archive"/>
</target>
<target name="-layout">
<property name="root.path" value="."/>
<property name="source.path" value="src"/>
<property name="main.source.path" value="src/main/java"/>
<property name="test.source.path" value="src/test/java"/>
<property name="benchmark.source.path" value="src/benchmark/java"/>
<property name="main.package.path" value="src/package/java"/>
<property name="javadoc.path" value="doc/javadoc"/>
<property name="tutorial.path" value="doc/tutorial"/>
<property name="target.path" value="target"/>
<property name="doc.path" value="doc"/>
<property name="maven.path" value="maven"/>
<property name="script.path" value="script"/>
<property name="build.path" value="build"/>
<property name="main.build.path" value="build/main"/>
<property name="test.build.path" value="build/test"/>
<property name="benchmark.build.path" value="build/benchmark"/>
<property name="instrumented.build.path" value="build/instrumented"/>
<property name="obfuscated.path" value="obfuscated"/>
<property name="jar.path" value="jar"/>
<property name="lib.path" value="lib"/>
<property name="package.path" value="package"/>
<property name="test.path" value="test"/>
<property name="example.path" value="example"/>
<property name="skel.path" value="skel"/>
<property name="report.path" value="report"/>
<property name="test.report.path" value="report/test"/>
<property name="cobertura.report.path" value="report/cobertura"/>
<property name="cobertura.data" value="cobertura.ser"/>
<property file="build.properties"/>
<property file="ssh.properties"/>
</target>
<target name="clean" depends="-layout">
<delete dir="${build.path}"/>
<delete dir="${jar.path}"/>
<delete dir="${maven.path}"/>
</target>
<target name="-prepare" depends="clean">
<mkdir dir="${maven.path}"/>
<mkdir dir="${build.path}"/>
<mkdir dir="${main.build.path}"/>
<mkdir dir="${test.build.path}"/>
<mkdir dir="${benchmark.build.path}"/>
<mkdir dir="${instrumented.build.path}"/>
<mkdir dir="${report.path}"/>
<mkdir dir="${test.report.path}"/>
<mkdir dir="${cobertura.report.path}"/>
<mkdir dir="${jar.path}"/>
</target>
<target name="-setup" depends="-prepare">
<taskdef resource="tasks.properties">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
</target>
<target name="-compile" depends="-setup">
<javac srcdir="${main.source.path}" destdir="${main.build.path}" debug="true" debuglevel="lines,vars,source" source="1.5" encoding="UTF-8">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
<copy todir="${build.path}">
<fileset dir="${main.source.path}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<javac srcdir="${test.source.path}" destdir="${test.build.path}" debug="true" debuglevel="lines,vars,source" source="1.5" encoding="UTF-8">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${main.build.path}"/>
</classpath>
</javac>
<copy todir="${test.build.path}">
<fileset dir="${test.source.path}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<javac srcdir="${benchmark.source.path}" destdir="${benchmark.build.path}" debug="true" debuglevel="lines,vars,source" source="1.5" encoding="UTF-8">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${main.build.path}"/>
</classpath>
</javac>
</target>
<target name="build" depends="-compile" description="Compile and build project archive">
<jar jarfile="${jar.path}/simple-xml-${version}.jar" basedir="${main.build.path}"/>
<checksum file="${jar.path}/simple-xml-${version}.jar" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${jar.path}/simple-xml-${version}.jar" algorithm="MD5" fileext=".md5"/>
<delete dir="${build.path}"/>
</target>
<target name="-instrument" depends="-compile">
<cobertura-instrument todir="${instrumented.build.path}" datafile="${build.path}/${cobertura.data}">
<fileset dir="${main.build.path}">
<include name="**/*.class"/>
</fileset>
</cobertura-instrument>
</target>
<target name="-coverage" depends="-instrument">
<junit printsummary="yes" haltonfailure="yes" fork="yes">
<sysproperty key="net.sourceforge.cobertura.datafile" file="${build.path}/${cobertura.data}" />
<classpath location="${instrumented.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath location="${main.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${build.path}/test">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="report" depends="-coverage" description="Generate a coverage report with project unit tests">
<mkdir dir="${cobertura.report.path}"/>
<cobertura-report destdir="${cobertura.report.path}" datafile="${build.path}/${cobertura.data}">
<fileset dir="${main.source.path}">
<include name="**/*.java" />
<exclude name="**/*Test.java" />
<exclude name="**/*TestSuite.java" />
</fileset>
</cobertura-report>
<delete dir="${build.path}"/>
</target>
<target name="test" depends="-compile" description="Compile project and run unit tests">
<echo message="Executing tests with W3C DOM"/>
<junit showoutput="true" printsummary="yes" haltonfailure="yes" fork="yes">
<jvmarg value="-Dfile.encoding=UTF-8"/>
<classpath location="${main.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
<exclude name="**/stax-api-1.0.1.jar"/>
<exclude name="**/stax-1.2.0.jar"/>
<exclude name="**/wstx-asl-3.2.1.jar"/>
<exclude name="**/kxml2-2.3.0.jar"/>
<exclude name="**/xpp3-1.1.3.3.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${test.build.path}">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
<echo message="Executing tests with XPP3"/>
<junit showoutput="true" printsummary="yes" haltonfailure="yes" fork="yes">
<jvmarg value="-Dfile.encoding=UTF-8"/>
<classpath location="${main.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
<exclude name="**/stax-api-1.0.1.jar"/>
<exclude name="**/stax-1.2.0.jar"/>
<exclude name="**/wstx-asl-3.2.1.jar"/>
<exclude name="**/xpp3-1.1.3.3.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${test.build.path}">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
<exclude name="**/xpp3-1.1.3.3.jar"/>
</fileset>
</batchtest>
</junit>
<echo message="Executing tests with StAX"/>
<junit showoutput="true" printsummary="yes" haltonfailure="yes" fork="yes">
<jvmarg value="-Dfile.encoding=UTF-8"/>
<classpath location="${main.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${test.build.path}">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
<delete dir="${build.path}"/>
</target>
<target name="test-woodstox" depends="-compile" description="Compile project and run unit tests with Woodstox">
<junit showoutput="true" printsummary="yes" haltonfailure="yes">
<sysproperty key="javax.xml.stream.XMLInputFactory" value="com.ctc.wstx.stax.WstxInputFactory"/>
<classpath location="${main.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${test.build.path}">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
<delete dir="${build.path}"/>
</target>
<target name="test-kxml" depends="-compile" description="Compile project and run unit tests with KXML">
<junit showoutput="true" printsummary="yes" haltonfailure="yes">
<classpath location="${main.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
<exclude name="**/stax-api-1.0.1.jar"/>
<exclude name="**/stax-1.2.0.jar"/>
<exclude name="**/wstx-asl-3.2.1.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${test.build.path}">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
<delete dir="${build.path}"/>
</target>
<target name="test-dom" depends="-compile" description="Compile project and run unit tests with W3C DOM">
<junit showoutput="true" printsummary="yes" haltonfailure="yes">
<classpath location="${main.build.path}"/>
<classpath location="${test.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
<exclude name="**/stax-api-1.0.1.jar"/>
<exclude name="**/stax-1.2.0.jar"/>
<exclude name="**/wstx-asl-3.2.1.jar"/>
<exclude name="**/kxml2-2.3.0.jar"/>
</fileset>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.report.path}">
<fileset dir="${test.build.path}">
<include name="**/*Test.class"/>
<exclude name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>
<delete dir="${build.path}"/>
</target>
<target name="profile" depends="-compile" description="Target for netbeans profiler">
<fail unless="netbeans.home">Requires Net Beans IDE</fail>
<nbprofiledirect>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${main.build.path}"/>
<pathelement path="${benchmark.build.path}"/>
</classpath>
</nbprofiledirect>
<java classname="org.simpleframework.xml.benchmark.Benchmark" fork="yes">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${main.build.path}"/>
<pathelement path="${benchmark.build.path}"/>
</classpath>
<arg value="${root.path}/data/test.xml"/>
</java>
</target>
<target name="benchmark" depends="-compile" description="Benchmark the current version">
<jar jarfile="${jar.path}/simple-xml-benchmark-${version}.jar">
<fileset dir="${main.build.path}">
<include name="**/*.class"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${benchmark.build.path}">
<include name="**/*.class"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
</jar>
<java classname="org.simpleframework.xml.benchmark.Benchmark" fork="yes">
<sysproperty key="javax.xml.stream.XMLInputFactory" value="com.ctc.wstx.stax.WstxInputFactory"/>
<classpath location="${main.build.path}"/>
<classpath location="${benchmark.build.path}"/>
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${main.build.path}"/>
<pathelement path="${benchmark.build.path}"/>
</classpath>
<arg value="${root.path}/data/test.xml"/>
<jvmarg value="-Xms1024m"/>
<jvmarg value="-Xloggc:gc.log"/>
</java>
<delete dir="${build.path}"/>
</target>
<target name="package" depends="test" description="Build and test project for a new release">
<mkdir dir="${package.path}/${build.path}"/>
<mkdir dir="${package.path}/${build.path}/simple-xml-${version}"/>
<copy todir="${package.path}/${build.path}/simple-xml-${version}/${source.path}">
<fileset dir="${main.source.path}">
<exclude name="**/*.class"/>
</fileset>
</copy>
<copy todir="${package.path}/${build.path}/simple-xml-${version}">
<fileset file="LICENSE.txt"/>
</copy>
<copy todir="${package.path}/${build.path}/simple-xml-${version}/${test.path}">
<fileset dir="${skel.path}/${test.path}"/>
</copy>
<copy todir="${package.path}/${build.path}/simple-xml-${version}/${lib.path}">
<fileset dir="${skel.path}/${lib.path}"/>
</copy>
<copy todir="${package.path}/${build.path}/simple-xml-${version}/${test.path}/${source.path}">
<fileset dir="${test.source.path}"/>
</copy>
<copy todir="${package.path}/${build.path}/simple-xml-${version}">
<fileset file="${skel.path}/build.xml"/>
<filterset>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<mkdir dir="${package.path}/${version}"/>
<ant antfile="build.xml" dir="${package.path}/${build.path}/simple-xml-${version}" target="all" inheritall="false"/>
<ant antfile="build.xml" dir="${package.path}/${build.path}/simple-xml-${version}/${test.path}" target="test" inheritall="false"/>
<zip destfile="${package.path}/${version}/simple-xml-${version}.zip" basedir="${package.path}/${build.path}"/>
<tar tarfile="${package.path}/${version}/simple-xml-${version}.tar" basedir="${package.path}/${build.path}"/>
<gzip zipfile="${package.path}/${version}/simple-xml-${version}.tar.gz" src="${package.path}/${version}/simple-xml-${version}.tar"/>
<tstamp>
<format property="build.time" pattern="d MMMM yyyy" locale="en"/>
</tstamp>
<copy todir="${package.path}/${version}">
<fileset file="${skel.path}/build.time"/>
<filterset>
<filter token="timestamp" value="${build.time}"/>
</filterset>
</copy>
<delete file="${package.path}/${version}/simple-xml-${version}.tar"/>
<delete dir="${package.path}/${build.path}"/>
<delete dir="${build.path}"/>
</target>
<target name="site" depends="package" description="Generate the site">
<copy todir="${root.path}" overwrite="true">
<fileset dir="${script.path}">
<include name="site.sh"/>
</fileset>
<filterset>
<filtersfile file="${root.path}/build.properties"/>
</filterset>
</copy>
<antcall target="javadoc" inheritall="false"/>
<antcall target="report" inheritall="false"/>
<exec executable="sh">
<arg value="${root.path}/site.sh"/>
</exec>
</target>
<!--target name="maven" depends="-compile" description="Upload release to maven">
<copy todir="${root.path}" overwrite="true">
<fileset dir="${script.path}">
<include name="pom.xml"/>
<include name="maven.sh"/>
</fileset>
<filterset>
<filtersfile file="${root.path}/build.properties"/>
</filterset>
</copy>
<exec executable="sh">
<arg value="${root.path}/maven.sh"/>
</exec>
</target-->
<target name="pom" depends="-compile" description="Create maven bundle">
<copy todir="${root.path}" overwrite="true">
<fileset dir="${script.path}">
<include name="pom.xml"/>
<include name="maven-package.sh"/>
</fileset>
<filterset>
<filtersfile file="${root.path}/build.properties"/>
</filterset>
</copy>
</target>
<target name="maven-exec" depends="-compile" description="Create maven bundle">
<copy todir="${root.path}" overwrite="true">
<fileset dir="${script.path}">
<include name="pom.xml"/>
<include name="maven-package.sh"/>
</fileset>
<filterset>
<filtersfile file="${root.path}/build.properties"/>
</filterset>
</copy>
<exec executable="sh">
<arg value="${root.path}/maven-package.sh"/>
</exec>
<antcall target="maven-archive"/>
</target>
<target name="maven" depends="-setup">
<copy todir="${root.path}" overwrite="true">
<fileset dir="${script.path}">
<include name="pom.xml"/>
</fileset>
<filterset>
<filtersfile file="${root.path}/build.properties"/>
</filterset>
</copy>
<delete dir="${target.path}/maven"/>
<delete dir="${target.path}/maven/maven-metadata.xml"/>
<mkdir dir="${target.path}/maven"/>
<mkdir dir="${target.path}/maven/${version}"/>
<copy todir="${target.path}/maven/${version}">
<fileset dir="${target.path}">
<include name="simple-xml-${version}.jar"/>
<include name="simple-xml-${version}-sources.jar"/>
<include name="simple-xml-${version}-javadoc.jar"/>
</fileset>
<fileset dir="${root.path}">
<include name="pom.xml"/>
</fileset>
</copy>
<get src="http://www.simpleframework.org/maven/org/simpleframework/simple-xml/maven-metadata.xml" dest="${root.path}/maven-metadata.xml"/>
<copy todir="${target.path}" overwrite="true">
<fileset dir="${root.path}">
<include name="maven-metadata.xml"/>
</fileset>
</copy>
<replace file="${target.path}/maven-metadata.xml">
<replacetoken><![CDATA[</versions>]]></replacetoken>
<replacevalue><![CDATA[ <version>@version@</version>
</versions>]]></replacevalue>
</replace>
<copy todir="${target.path}/maven">
<fileset dir="${target.path}">
<include name="maven-metadata.xml"/>
</fileset>
<filterset>
<filtersfile file="${root.path}/build.properties"/>
</filterset>
</copy>
<move file="${target.path}/maven/${version}/pom.xml" tofile="${target.path}/maven/${version}/simple-xml-${version}.pom"/>
<exec executable="gpg">
<arg value="-ab"/>
<arg value="--passphrase"/>
<arg value="${password}"/>
<arg value="${target.path}/maven/${version}/simple-xml-${version}.jar"/>
</exec>
<exec executable="gpg">
<arg value="-ab"/>
<arg value="--passphrase"/>
<arg value="${password}"/>
<arg value="${target.path}/maven/${version}/simple-xml-${version}-sources.jar"/>
</exec>
<exec executable="gpg">
<arg value="-ab"/>
<arg value="--passphrase"/>
<arg value="${password}"/>
<arg value="${target.path}/maven/${version}/simple-xml-${version}-javadoc.jar"/>
</exec>
<exec executable="gpg">
<arg value="-ab"/>
<arg value="--passphrase"/>
<arg value="${password}"/>
<arg value="${target.path}/maven/${version}/simple-xml-${version}.pom"/>
</exec>
<!--checksum file="${target.path}/maven/${version}/simple-xml-${version}.jar" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.jar" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.jar.asc" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.jar.asc" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-sources.jar" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-sources.jar" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-sources.jar.asc" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-sources.jar.asc" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-javadoc.jar" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-javadoc.jar" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-javadoc.jar.asc" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}-javadoc.jar.asc" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.pom" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.pom" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.pom.asc" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/${version}/simple-xml-${version}.pom.asc" algorithm="MD5" fileext=".md5"/>
<checksum file="${target.path}/maven/maven-metadata.xml" algorithm="SHA1" fileext=".sha1"/>
<checksum file="${target.path}/maven/maven-metadata.xml" algorithm="MD5" fileext=".md5"/-->
<zip destfile="${root.path}/maven-${version}.zip" basedir="${target.path}/maven"/>
<jar destfile="${root.path}/bundle-${version}.jar" basedir="${target.path}/maven/${version}"/>
</target>
<target name="javadoc" depends="clean" description="Generate source documentation">
<mkdir dir="${javadoc.path}"/>
<copy todir="${build.path}">
<fileset dir="${main.source.path}">
<include name="**/*.java"/>
</fileset>
</copy>
<copy todir="${build.path}">
<fileset dir="${main.package.path}">
<include name="**/*.java"/>
</fileset>
</copy>
<javadoc sourcepath="${build.path}" packagenames="org.simpleframework.*" destdir="${javadoc.path}" private="false">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<link offline="true" href="http://download.oracle.com/javase/1.5.0/docs/api/" packagelistloc="${doc.path}" resolvelink="true"/>
</javadoc>
<delete dir="${build.path}"/>
</target>
<target name="javadoc-private" depends="clean" description="Generate source documentation">
<mkdir dir="${javadoc.path}"/>
<javadoc sourcepath="${main.source.path}" packagenames="org.simpleframework.*" destdir="${javadoc.path}" private="true">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<link offline="true" href="http://download.oracle.com/javase/1.5.0/docs/api/" packagelistloc="${doc.path}" resolvelink="true"/>
</javadoc>
<delete dir="${build.path}"/>
</target>
<target name="tutorial" depends="-setup" description="Upload tutorial to sourceforge">
<tar tarfile="tutorial.tar">
<tarfileset dir="${root.path}">
<include name="${tutorial.path}/**/*"/>
</tarfileset>
</tar>
<gzip zipfile="tutorial.tar.gz" src="tutorial.tar"/>
<scp file="tutorial.tar.gz" todir="${login}:${password}@simple.sourceforge.net:${home}" trust="yes"/>
<sshexec host="simple.sourceforge.net" username="${login}" password="${password}" command="tar -xzvf ${home}/tutorial.tar.gz -C ${home}" trust="yes"/>
<delete file="tutorial.tar.gz"/>
<delete file="tutorial.tar"/>
</target>
<target name="obfuscate" depends="build" description="Obfuscates and optimizes the JAR">
<echo message="Copying script from ${script.path} replacing tokens with ${version} where required"/>
<copy todir="${root.path}" overwrite="true">
<fileset file="${script.path}/proguard.pro"/>
<filterset>
<filter token="injar" value="${jar.path}/simple-xml-${version}.jar"/>
<filter token="outjar" value="${obfuscated.path}/simple-xml-${version}-obfuscated.jar"/>
</filterset>
</copy>
<echo message="Running the pro guard task"/>
<java classname="proguard.ProGuard" fork="yes">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<arg value="@proguard.pro"/>
</java>
<antcall target="-compile"/>
<java classname="org.simpleframework.xml.benchmark.Benchmark" fork="yes">
<classpath>
<fileset dir="${lib.path}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${obfuscated.path}">
<include name="simple-xml-${version}-obfuscated.jar"/>
</fileset>
<pathelement path="${benchmark.build.path}"/>
</classpath>
<arg value="${root.path}/data/test.xml"/>
</java>
</target>
</project>