forked from plutext/docx4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
595 lines (453 loc) · 25.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
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="docx4j">
<property environment="env"/>
<property name="junit.output.dir" value="junit"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.5"/>
<property name="source" value="1.5"/>
<property name="dist" value="./dist"/>
<property name="version" value="3.3.7-SNAPSHOT"/>
<property name="importxhtml-version" value="3.3.6"/>
<property name="release.dir" value="docx4j-community-${version}"/>
<property name="src.main.java.dir" value="src/main/java"/>
<property name="m2Repository" value="../../.m2/repository"/>
<!--.NET properties
<property name="ikvm.dir" value="/Java/ikvm/ikvm-7.3.4830.0"/>
-->
<property name="ikvm.dir" value="/Java/ikvm/ikvm-8.1.5717.0"/>
<property name="ikvmc" value="${ikvm.dir}/bin/ikvmc.exe"/>
<!--
org.docx4j:docx4j:jar:3.3.0
+- org.plutext:jaxb-svg11:jar:1.0.2
+- net.engio:mbassador:jar:1.2.4.2
+- org.slf4j:slf4j-api:jar:1.7.21
+- org.slf4j:jcl-over-slf4j:jar:1.7.21
+- org.slf4j:slf4j-log4j12:jar:1.7.21
+- log4j:log4j:jar:1.2.17
+- org.apache.commons:commons-lang3:jar:3.4
+- commons-codec:commons-codec:jar:1.10
+- commons-io:commons-io:jar:2.4
+- org.apache.httpcomponents:httpclient:jar:4.5.2
| +- org.apache.httpcomponents:httpcore:jar:4.4.4
| \- commons-logging:commons-logging:jar:1.2
+- com.fasterxml.jackson.core:jackson-core:jar:2.7.3
+- com.fasterxml.jackson.core:jackson-databind:jar:2.7.3
| \- com.fasterxml.jackson.core:jackson-annotations:jar:2.7.0
+- org.apache.xmlgraphics:xmlgraphics-commons:jar:2.1
+- org.apache.avalon.framework:avalon-framework-api:jar:4.3.1
+- org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1
+- xalan:xalan:jar:2.7.2
| \- xalan:serializer:jar:2.7.2
+- net.arnx:wmf2svg:jar:0.9.8
+- org.antlr:antlr-runtime:jar:3.5.2
+- org.antlr:stringtemplate:jar:3.2.1
| \- antlr:antlr:jar:2.7.7
+- com.google.guava:guava:jar:19.0
+- com.thedeanda:lorem:jar:2.0
\- junit:junit:jar:4.12:test
\- org.hamcrest:hamcrest-core:jar:1.3:test
Optional:
+- org.docx4j:docx4j-MOXy-JAXBContext:jar:3.3.5
+- org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.5.2
| +- org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.2
| | \- org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.2
| \- org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.5.2
+- javax.mail:mail:jar:1.4.7
| \- javax.activation:activation:jar:1.1
-->
<path id="Maven Dependencies.libraryclasspath">
<!-- TODO put these in optional
<pathelement location="${m2Repository}/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar"/>
<pathelement location="${m2Repository}/log4j/log4j/1.2.17/log4j-1.2.17.jar"/>
-->
<!-- Optional MOXy stuff adds about 5MB to jars; since org.eclipse.persistence.core is 4.5MB
<pathelement location="${m2Repository}/org/docx4j/docx4j-MOXy-JAXBContext/3.3.5/docx4j-MOXy-JAXBContext-3.3.5.jar"/>
<pathelement location="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.moxy/2.5.2/org.eclipse.persistence.moxy-2.5.2.jar"/>
<pathelement location="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.core/2.5.2/org.eclipse.persistence.core-2.5.2.jar"/>
<pathelement location="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.asm/2.5.2/org.eclipse.persistence.asm-2.5.2.jar"/>
<pathelement location="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.antlr/2.5.2/org.eclipse.persistence.antlr-2.5.2.jar"/>
<pathelement location="${m2Repository}/javax/mail/mail/1.4.7/mail-1.4.7.jar"/>
<pathelement location="${m2Repository}/javax/activation/activation/1.1/activation-1.1.jar"/>
-->
<!-- end MOXy -->
<pathelement location="${m2Repository}/org/plutext/jaxb-svg11/1.0.2/jaxb-svg11-1.0.2.jar"/>
<pathelement location="${m2Repository}/net/engio/mbassador/1.2.4.2/mbassador-1.2.4.2.jar"/>
<pathelement location="${m2Repository}/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar"/>
<!--
<pathelement location="${m2Repository}/org/slf4j/jcl-over-slf4j/1.7.21/jcl-over-slf4j-1.7.21.jar"/>
-->
<!--
<pathelement location="${m2Repository}/org/slf4j/slf4j-log4j12/1.7.21/slf4j-log4j12-1.7.21.jar"/>
<pathelement location="${m2Repository}/log4j/log4j/1.2.17/log4j-1.2.17.jar"/>
-->
<!-- <pathelement location="${m2Repository}/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/> -->
<pathelement location="${m2Repository}/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar"/>
<pathelement location="${m2Repository}/commons-codec/commons-codec/1.10/commons-codec-1.10.jar"/>
<pathelement location="${m2Repository}/commons-io/commons-io/2.4/commons-io-2.4.jar"/>
<pathelement location="${m2Repository}/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar"/>
<pathelement location="${m2Repository}/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar"/>
<pathelement location="${m2Repository}/commons-logging/commons-logging/1.2/commons-logging-1.2.jar"/>
<pathelement location="${m2Repository}/com/fasterxml/jackson/core/jackson-core/2.7.3/jackson-core-2.7.3.jar"/>
<pathelement location="${m2Repository}/com/fasterxml/jackson/core/jackson-databind/2.7.3/jackson-databind-2.7.3.jar"/>
<pathelement location="${m2Repository}/com/fasterxml/jackson/core/jackson-annotations/2.7.0/jackson-annotations-2.7.0.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/xmlgraphics-commons/2.1/xmlgraphics-commons-2.1.jar"/>
<pathelement location="${m2Repository}/org/apache/avalon/framework/avalon-framework-api/4.3.1/avalon-framework-api-4.3.1.jar"/>
<pathelement location="${m2Repository}/org/apache/avalon/framework/avalon-framework-impl/4.3.1/avalon-framework-impl-4.3.1.jar"/>
<!-- Xalan 2.7.1 and dependencies: see further below -->
<pathelement location="${m2Repository}/net/arnx/wmf2svg/0.9.8/wmf2svg-0.9.8.jar"/>
<pathelement location="${m2Repository}/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar"/>
<pathelement location="${m2Repository}/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
<pathelement location="${m2Repository}/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar"/>
<pathelement location="${m2Repository}/com/google/guava/guava/19.0/guava-19.0.jar"/>
<pathelement location="${m2Repository}/com/thedeanda/lorem/2.0/lorem-2.0.jar"/>
<!--
<pathelement location="${m2Repository}/junit/junit/4.12/junit-4.12.jar"/>
<pathelement location="${m2Repository}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
-->
<!-- Uncomment to use the vfs stuff in docx4j-extras
<pathelement location="${m2Repository}/jdom/jdom/1.0/jdom-1.0.jar"/>
<pathelement location="${m2Repository}/org/apache/commons/commons-vfs-patched/1.9.1/commons-vfs-patched-1.9.1.jar"/>
-->
<!-- Uncomment for load/save via JCR, which
may be found in docx4j-extras.
<pathelement location="${m2Repository}/javax/jcr/jcr/1.0/jcr-1.0.jar"/>
(but you'd be better off using CMIS)
-->
</path>
<path id="docx4j.classpath">
<pathelement location="bin"/>
<pathelement location="${m2Repository}/com/googlecode/jaxb-namespaceprefixmapper-interfaces/JAXBNamespacePrefixMapper/2.2.4/JAXBNamespacePrefixMapper-2.2.4.jar"/>
<path refid="Maven Dependencies.libraryclasspath"/>
</path>
<path id="dist.classpath">
<pathelement location="${m2Repository}/xalan/xalan/2.7.2/xalan-2.7.2.jar"/>
<pathelement location="${m2Repository}/xalan/serializer/2.7.2/serializer-2.7.2.jar"/>
<path refid="docx4j.classpath"/>
</path>
<!-- for release only; build docx4j-export-fo first! -->
<path id="docx4j-export-fo.classpath">
<pathelement location="${m2Repository}/org/docx4j/docx4j-export-fo/3.3.6/docx4j-export-fo-3.3.6.jar"/>
<pathelement location="${m2Repository}/org/plutext/jaxb-xslfo/1.0.1/jaxb-xslfo-1.0.1.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/fop/2.2/fop-2.2.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-svg-dom/1.8/batik-svg-dom-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-css/1.8/batik-css-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-dom/1.8/batik-dom-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-parser/1.8/batik-parser-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-util/1.8/batik-util-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-bridge/1.8/batik-bridge-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-anim/1.8/batik-anim-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-script/1.8/batik-script-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-xml/1.8/batik-xml-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-awt-util/1.8/batik-awt-util-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-gvt/1.8/batik-gvt-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-transcoder/1.8/batik-transcoder-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-svggen/1.8/batik-svggen-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-extension/1.8/batik-extension-1.8.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-ext/1.8/batik-ext-1.8.jar"/>
</path>
<path id="junit.classpath">
<path refid="docx4j.classpath"/>
<pathelement location="${m2Repository}/junit/junit/4.8/junit-4.8.jar"/>
</path>
<path id="jre.libs" description="Java runtime libraries">
<pathelement location="${java.home}\lib" />
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="${src.main.java.dir}" excludes="**/*.launch, **/*.java"/>
<fileset dir="src/pptx4j/java" excludes="**/*.launch, **/*.java"/>
<fileset dir="src/xlsx4j/java" excludes="**/*.launch, **/*.java"/>
<fileset dir="src/main/resources" excludes="log4j.*, docx4j.properties"/>
<!--
<fileset dir="src/samples/_resources" />
-->
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="${dist}"/>
</target>
<target depends="build-project" name="build"/>
<target name="build-project" depends="init" >
<echo message="${ant.project.name}: ${ant.file}"/>
<echo message="${ant.java.version}"/>
<javac bootclasspathref="jre.libs" includeJavaRuntime="yes"
debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}"
target="${target}" encoding="utf-8">
<src path="${src.main.java.dir}"/>
<src path="src/diffx"/>
<src path="src/glox4j/java"/>
<src path="src/pptx4j/java"/>
<src path="src/xlsx4j/java"/>
<!--
<src path="src/samples/docx4j"/>
-->
<!-- <classpath refid="docx4j.classpath"/> -->
<!-- build with earlier than
java version "1.6.0_19" (and possibly later)
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) 64-Bit Server VM (build 16.2-b04, mixed mode)
requires Xalan 2.7.1, so -->
<classpath refid="dist.classpath"/>
</javac>
<!-- Force ant to compile package-info.java.
Without these, you'll get JAXB "unexpected element" errors.
This is necessary because of a dubious change in ant behaviour,
starting with 1.7.1 (see javac task doc, and ant bug 43114).
"In Ant 1.7.1 the package-info.java will only be compiled if:
1. If a package-info.class file exists and is older than the package-info.java file.
2. If the directory for the package-info.class file does not exist.
3. If the directory for the package-info.class file exists, and has an older modification
time than the the package-info.java file. In this case <javac> will touch the corresponding
.class directory on successful compilation."
-->
<sleep seconds="2"/> <!-- wait a little, so our modifications times are newer -->
<touch><fileset dir="${src.main.java.dir}" includes="**/package-info.java" /></touch>
<touch><fileset dir="src/pptx4j/java" includes="**/package-info.java" /></touch>
<javac bootclasspathref="jre.libs" includeJavaRuntime="yes"
debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="${src.main.java.dir}"/>
<src path="src/pptx4j/java"/>
<src path="src/xlsx4j/java"/>
<include name="**/package-info.java"/>
<classpath refid="docx4j.classpath"/>
</javac>
<echo message="Join the docx4j developers mailing list by emailing [email protected]" />
</target>
<!-- ANT_OPTS="-Xmx512m -XX:MaxPermSize=256m" ant dist -->
<target name="dist" depends="clean, build-project" >
<mkdir dir="${dist}"/>
<jar destfile="${dist}/docx4j-${version}.jar" basedir="./bin"/>
<!-- copy all the jar files! -->
<copy todir="${dist}" flatten="true">
<!-- requires Ant 1.7.0 -->
<path>
<path refid="dist.classpath"/>
</path>
</copy>
<delete file="${dist}/JAXBNamespacePrefixMapper-2.2.4.jar" />
</target>
<target name="release" >
<delete dir="${release.dir}"/>
<mkdir dir="${release.dir}"/>
<!-- docx4j itself, as built by maven -->
<copy file="${m2Repository}/org/docx4j/docx4j/${version}/docx4j-${version}.jar" todir="${release.dir}"/>
<copy file="CHANGELOG.md" todir="${release.dir}"/>
<!-- dependencies -->
<mkdir dir="${release.dir}/dependencies"/>
<copy includeemptydirs="false" todir="${release.dir}/dependencies" flatten="true">
<!-- requires Ant 1.7.0 -->
<path>
<path refid="dist.classpath"/>
</path>
</copy>
<delete file="${release.dir}/dependencies/JAXBNamespacePrefixMapper-2.2.4.jar" />
<!-- documentation -->
<mkdir dir="${release.dir}/documentation"/>
<copy file="docs/Docx4j_GettingStarted.pdf" todir="${release.dir}/documentation" />
<!-- legals -->
<mkdir dir="${release.dir}/legals"/>
<copy includeemptydirs="false" todir="${release.dir}/legals">
<fileset dir="legals" />
</copy>
<!-- optional -->
<mkdir dir="${release.dir}/optional"/>
<!-- ImportXHTML -->
<mkdir dir="${release.dir}/optional/ImportXHTML"/>
<copy file="${m2Repository}/org/docx4j/docx4j-ImportXHTML/${importxhtml-version}/docx4j-ImportXHTML-${importxhtml-version}.jar" todir="${release.dir}/optional/ImportXHTML"/>
<copy file="${m2Repository}/org/docx4j/xhtmlrenderer/3.0.0/xhtmlrenderer-3.0.0.jar" todir="${release.dir}/optional/ImportXHTML"/>
<copy file="${m2Repository}/com/lowagie/itext/2.1.7/itext-2.1.7.jar" todir="${release.dir}/optional/ImportXHTML"/>
<copy file="../docx4j-ImportXHTML/src/samples/_resources/docx4j-ImportXHTML.properties" todir="${release.dir}/optional/ImportXHTML"/>
<!-- export-fo -->
<mkdir dir="${release.dir}/optional/export-fo"/>
<copy todir="${release.dir}/optional/export-fo" flatten="true">
<!-- requires Ant 1.7.0 -->
<path>
<path refid="docx4j-export-fo.classpath"/>
</path>
</copy>
<!-- MOXy -->
<mkdir dir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/org/docx4j/docx4j-MOXy-JAXBContext/3.3.6/docx4j-MOXy-JAXBContext-3.3.6.jar" todir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.moxy/2.5.2/org.eclipse.persistence.moxy-2.5.2.jar" todir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.core/2.5.2/org.eclipse.persistence.core-2.5.2.jar" todir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.asm/2.5.2/org.eclipse.persistence.asm-2.5.2.jar" todir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/org/eclipse/persistence/org.eclipse.persistence.antlr/2.5.2/org.eclipse.persistence.antlr-2.5.2.jar" todir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/javax/mail/mail/1.4.7/mail-1.4.7.jar" todir="${release.dir}/optional/MOXy"/>
<copy file="${m2Repository}/javax/activation/activation/1.1/activation-1.1.jar" todir="${release.dir}/optional/MOXy"/>
<!-- resources -->
<mkdir dir="${release.dir}/resources"/>
<copy file="src/samples/_resources/docx4j.properties" todir="${release.dir}/resources"/>
<copy file="src/samples/_resources/log4j.xml" todir="${release.dir}/resources"/>
<!-- zip it up -->
<zip destfile="docx4j-community-${version}.zip" basedir="${release.dir}"/>
</target>
<target name="checkForIKVM">
<condition property="IKVMAvailable">
<and>
<os family="windows"/>
<available file="${ikvmc}" property="ignored" />
</and>
</condition>
</target>
<target name="dist.NET" depends="checkForIKVM" if="IKVMAvailable" description="Build docx4j .NET DLL files">
<echo>Building docx4j.DLL</echo>
<!--
<fileset id="fileset" dir="${dist}">
<include name="*"/>
</fileset>
<pathconvert refid="fileset" property="jars" pathsep=" "/>
-->
<!-- splitting fop out results in 2 jars:
8,885,248 docx4j-fop.dll
16,741,888 docx4j.dll
and its natural to do that in docx4j 3.30 onwards (since export-fo is a separate project)
<pathconvert refid="FOP-stuff.classpath" property="fop-jars" pathsep=" "/>
<exec executable="${ikvmc}">
<arg value="-out:${dist}/docx4j-fop.dll" />
<arg value="-keyfile:Plutext.snk" />
<arg value="-version:2.9.9.3" />
<arg value="-target:library" />
<arg line="${fop-jars}" />
</exec>
<path id="docx4j-main.classpath">
<path refid="Maven Dependencies.libraryclasspath"/>
<pathelement location="${m2Repository}/xalan/xalan/2.7.1/xalan-2.7.1.jar"/>
<pathelement location="${m2Repository}/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
<pathelement location="${dist}/docx4j-${version}.jar" />
</path>
<pathconvert refid="docx4j-main.classpath" property="docx4j-jars" pathsep=" "/>
<exec executable="${ikvmc}">
<arg value="-out:${dist}/docx4j.dll" />
<arg value="-keyfile:Plutext.snk" />
<arg value="-version:2.9.9.3" />
<arg value="-reference:dist/docx4j-fop.dll" />
<arg value="-target:library" />
<arg line="${docx4j-jars}" />
</exec>
It is also possible to split out Xalan (inc serializer);
in that case docx4j.dll is 20mb, and xalan is 4mb
-->
<path id="docx4j-main.classpath">
<path refid="Maven Dependencies.libraryclasspath"/>
<pathelement location="${m2Repository}/xalan/xalan/2.7.2/xalan-2.7.2.jar"/>
<pathelement location="${m2Repository}/xalan/serializer/2.7.2/serializer-2.7.2.jar"/>
<!-- Omit for 3.3.x
<path refid="FOP-stuff.classpath"/>
-->
<!--
<pathelement location="${m2Repository}/org/docx4j/docx4j/${version}/docx4j-${version}.jar"/>
-->
<pathelement location="${dist}/docx4j-${version}.jar" />
</path>
<pathconvert refid="docx4j-main.classpath" property="docx4j-jars" pathsep=" "/>
<exec executable="${ikvmc}">
<arg value="-out:${dist}/docx4j.dll" />
<arg value="-keyfile:Plutext.snk" />
<arg value="-version:${version}.81" /> <!-- must be of the form a.b.c.d -->
<!--
.1 is last IKVM 7.3.4830.0
.5 uses IKVM 8.1.5717.0, fixes canonicalisation problem
-->
<arg value="-reference:dll/slf4j-api.dll" />
<!--
<arg value="-reference:dll/slf4j-NetCommonLogging.dll" />
-->
<arg value="-target:library" />
<arg line="${docx4j-jars}" />
</exec>
</target>
<!--
These targets are no longer used:
<target name="JAXB-use-MOXy" >
<target name="JAXB-switch-from-MOXy-to-Oracle" >
Instead, use of MOXy is controlled by presence/absence of docx4j-MOXy-JAXBContext.jar
-->
<!-- build just diffx; the usual targets build diffx as part of docx4j -->
<target name="build-diffx" depends="init" >
<echo message="${ant.project.name}: ${ant.file}"/>
<javac bootclasspathref="jre.libs" includeJavaRuntime="yes"
debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="src/diffx"/>
<classpath refid="docx4j.classpath"/>
</javac>
</target>
<target name="diffxjar" depends="clean, build-diffx" >
<jar destfile="diffx.jar" basedir="./bin"/>
</target>
<target name="javadoc">
<delete dir="javadoc"/>
<mkdir dir="javadoc"/>
<javadoc access="public" author="false"
destdir="javadoc"
doctitle="docx4j ${version}"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
source="1.6"
sourcepath="src/main/java:src/pptx4j/java:src/xlsx4j/java:src/glox4j/java:src/diffx"
splitindex="true" use="true" version="false"
maxmemory="512m">
<classpath refid="docx4j.classpath"/>
</javadoc>
<!--
<Doctitle><![CDATA[<h1>docx4j API Documentation</h1>]]></Doctitle>
<bottom>
<![CDATA[<i>Copyright 2007-2008 Plutext Pty Ltd.</i>]]>
</bottom>
<group>
<title>dml - DrawingML</title>
<package name="org.docx4j.dml*"/>
</group>
<group>
<title>wml - WordprocessingML</title>
<package name="org.docx4j.wml*"/>
</group>
-->
</target>
<target name="test" depends="dist">
<path id="tests.classpath">
<pathelement location="${dist}/docx4j.jar" />
<path refid="Maven Dependencies.libraryclasspath"/>
<pathelement location="${m2Repository}/xalan/xalan/2.7.2/xalan-2.7.2.jar"/>
<pathelement location="${m2Repository}/xalan/serializer/2.7.2/serializer-2.7.2.jar"/>
<pathelement location="${m2Repository}/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar"/>
<pathelement location="${m2Repository}/junit/junit/4.8/junit-4.8.jar"/>
</path>
<!-- Make jar containing tests only -->
<delete file="docx4j-tests-only.jar"/>
<delete dir="testing"/>
<mkdir dir="testing"/>
<javac debug="off" destdir="testing" source="${source}" target="${target}">
<src path="src/test/java"/>
<classpath refid="tests.classpath"/>
</javac>
<copy includeemptydirs="false" todir="testing">
<fileset dir="src/test/resources">
<include name="**/*"/>
</fileset>
</copy>
<jar destfile="docx4j-tests-only.jar">
<fileset dir="./testing" />
</jar>
<path id="testsplus.classpath">
<pathelement location="docx4j-tests-only.jar" />
<path refid="tests.classpath"/>
</path>
<delete dir="${junit.output.dir}"/>
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="on" haltonfailure="on">
<formatter type="xml"/>
<batchtest fork="yes" todir="${junit.output.dir}">
<resources>
<zipfileset src="docx4j-tests-only.jar" includes="**/*Test.class"/>
</resources>
</batchtest>
<classpath refid="testsplus.classpath"/>
</junit>
<delete dir="testing"/>
</target>
</project>