-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
build.xml
1163 lines (997 loc) · 65.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
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<project name="net.sf.mpxj" default="archive" basedir=".">
<target name="init" description="Initialize properties">
<tstamp />
<property environment="env"/>
<!-- Build Configuration -->
<property name="current.version" value="13.8.0" />
<property name="current.version.classifier" value="" />
<!-- Environment Configuration-->
<property name="maven.cmd" value="mvn.cmd"/>
<property name="ruby.cmd" value="bundle.bat"/>
<property name="python.cmd" value="py.exe" />
<property name="nuget.cmd" value="nuget.exe" />
<property name="ikvm.net45.dir" value="${basedir}/../mpxj-legacy-ikvm/ikvm-8.1.5717.0" />
<property name="ikvmc.net45.cmd" value="${ikvm.net45.dir}/bin/ikvmc.exe" />
<property name="ikvmstub.net45.cmd" value="${ikvm.net45.dir}/bin/ikvmstub.exe" />
<property name="tlbexp.net45.cmd" value="C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/tlbexp.exe" />
<property name="ikvm.nca31.dir" value="${basedir}/../mpxj-legacy-ikvm/ikvm-netcoreapp3.1" />
<property name="ikvmc.nca31.cmd" value="${ikvm.nca31.dir}/ikvmc.exe" />
<property name="ikvmstub.nca31.cmd" value="${ikvm.nca31.dir}/ikvmstub.exe" />
<property name="xjc.cmd" value="${basedir}/../jaxb-ri-3.0.2/bin/xjc.bat" />
<!-- Common properties -->
<property name="dist.dir" value="${basedir}/dist" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="distribution" value="${dist.dir}/mpxj-${current.version}.zip" />
<!-- Runtime Dependencies -->
<!-- NOTE: poi.jar is only used to name the legacy DLL -->
<property name="poi.jar" value="poi-5.2.2"/>
<property name="poifs.jar" value="poifs-5.2.2"/>
<property name="commons-collections.jar" value="commons-collections4-4.4" />
<property name="commons-io.jar" value="commons-io-2.11.0" />
<property name="commons-math.jar" value="commons-math3-3.6.1" />
<property name="log4j-api.jar" value="log4j-api-2.17.2" />
<property name="rtfparserkit.jar" value="rtfparserkit-1.16.0" />
<property name="sqlite-jdbc.jar" value="sqlite-jdbc-3.42.0.0" />
<property name="jsoup.jar" value="jsoup-1.15.3" />
<property name="commons-lang3.jar" value="commons-lang3-3.10" />
<property name="commons-logging.jar" value="commons-logging-1.2" />
<property name="jackcess.jar" value="jackcess-4.0.1" />
<property name="jakarta.activation.jar" value="jakarta.activation-2.0.1" />
<property name="jakarta.xml.bind-api.jar" value="jakarta.xml.bind-api-3.0.1" />
<property name="istack-commons-runtime.jar" value="istack-commons-runtime-4.0.1" />
<property name="txw2.jar" value="txw2-3.0.2" />
<property name="jaxb-core.jar" value="jaxb-core-3.0.2" />
<property name="jaxb-runtime.jar" value="jaxb-runtime-3.0.2" />
<!-- Test Dependencies -->
<property name="junit.jar" value="junit-4.13.1"/>
<property name="hamcrest.jar" value="hamcrest-core-1.3"/>
<!-- Dependency Paths -->
<path id="poifs.path"><pathelement location="${basedir}/../poifs/target/${poifs.jar}.jar" /></path>
<path id="commons-collections.path"><pathelement location="${basedir}/../poifs/target/${commons-collections.jar}.jar" /></path>
<path id="commons-io.path"><pathelement location="${basedir}/../poifs/target/${commons-io.jar}.jar" /></path>
<path id="commons-math.path"><pathelement location="${basedir}/../poifs/target/${commons-math.jar}.jar" /></path>
<path id="log4j-api.path"><pathelement location="${basedir}/../poifs/target/${log4j-api.jar}.jar" /></path>
<path id="rtfparserkit.path"><pathelement location="${lib.dir}/${rtfparserkit.jar}.jar" /></path>
<path id="sqlite-jdbc.path"><pathelement location="${lib.dir}/${sqlite-jdbc.jar}.jar" /></path>
<path id="jsoup.path"><pathelement location="${lib.dir}/${jsoup.jar}.jar" /></path>
<path id="commons-lang3.path"><pathelement location="${lib.dir}/${commons-lang3.jar}.jar" /></path>
<path id="commons-logging.path"><pathelement location="${lib.dir}/${commons-logging.jar}.jar" /></path>
<path id="jackcess.path"><pathelement location="${lib.dir}/${jackcess.jar}.jar" /></path>
<path id="jakarta.activation.path"><pathelement location="${lib.dir}/${jakarta.activation.jar}.jar" /></path>
<path id="jakarta.xml.bind-api.path"><pathelement location="${lib.dir}/${jakarta.xml.bind-api.jar}.jar" /></path>
<path id="istack-commons-runtime.path"><pathelement location="${lib.dir}/${istack-commons-runtime.jar}.jar" /></path>
<path id="txw2.path"><pathelement location="${lib.dir}/${txw2.jar}.jar" /></path>
<path id="jaxb-core.path"><pathelement location="${lib.dir}/${jaxb-core.jar}.jar" /></path>
<path id="jaxb-runtime.path"><pathelement location="${lib.dir}/${jaxb-runtime.jar}.jar" /></path>
<path id="junit.path"><pathelement location="${lib.dir}/${junit.jar}.jar" /></path>
<!-- Dependency Classpaths -->
<property name="poifs.classpath" refid="poifs.path" />
<property name="commons-collections.classpath" refid="commons-collections.path" />
<property name="commons-io.classpath" refid="commons-io.path" />
<property name="commons-math.classpath" refid="commons-math.path" />
<property name="log4j-api.classpath" refid="log4j-api.path" />
<property name="rtfparserkit.classpath" refid="rtfparserkit.path" />
<property name="sqlite-jdbc.classpath" refid="sqlite-jdbc.path" />
<property name="jsoup.classpath" refid="jsoup.path" />
<property name="commons-lang3.classpath" refid="commons-lang3.path" />
<property name="commons-logging.classpath" refid="commons-logging.path" />
<property name="jackcess.classpath" refid="jackcess.path" />
<property name="jaxb-core.classpath" refid="jaxb-core.path" />
<property name="jakarta.activation.classpath" refid="jakarta.activation.path" />
<property name="jakarta.xml.bind-api.classpath" refid="jakarta.xml.bind-api.path" />
<property name="istack-commons-runtime.classpath" refid="istack-commons-runtime.path" />
<property name="txw2.classpath" refid="txw2.path" />
<property name="jaxb-runtime.classpath" refid="jaxb-runtime.path" />
<property name="junit.classpath" refid="junit.path" />
<mkdir dir="${lib.dir}" />
</target>
<target name="update-version-numbers" depends="init" description="Ensure that version numbers in the code are up-to-date">
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="versions:set -DnewVersion=${current.version}${current.version.classifier}"/>
</exec>
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="versions:set -f ${basedir}/pom.tests.xml -DnewVersion=${current.version}${current.version.classifier}"/>
</exec>
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="versions:commit"/>
</exec>
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="versions:commit -f ${basedir}/pom.tests.xml"/>
</exec>
<replaceregexp
match='(\[assembly: (AssemblyVersion|AssemblyFileVersion)\(").+("\)\])'
replace='\1${current.version}.0\3'
byline="true">
<fileset dir="${basedir}/src.net/samples" includes="**/*.cs" />
</replaceregexp>
<replaceregexp
match='(\[assembly: (AssemblyVersion|AssemblyFileVersion)\(").+("\)\])'
replace='\1${current.version}.0\3'
byline="true">
<fileset dir="${basedir}/src.net/utilities" includes="**/*.cs" />
</replaceregexp>
<replaceregexp file="${basedir}/src.net/utilities/MpxjUtilities.nca31.csproj"
match="<Version>.*</Version>"
replace="<Version>${current.version}.0</Version>"
byline="true"
/>
<replaceregexp file="${basedir}/src/main/java/net/sf/mpxj/MPXJ.java"
match='VERSION = ".*"'
replace='VERSION = "${current.version}"'
byline="true"
/>
<replaceregexp file="${basedir}/src.ruby/mpxj/lib/mpxj/version.rb"
match='VERSION = ".*"'
replace='VERSION = "${current.version}"'
byline="true"
/>
<replaceregexp file="${basedir}/src.python/mpxj/setup.py"
match='version=".*",'
replace='version="${current.version}",'
byline="true"
/>
</target>
<target name="maven-install" depends="init,update-version-numbers">
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="-DskipTests=true -Dmaven.javadoc.skip=true -Dsource.skip=true install" />
</exec>
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="-f ${basedir}/pom.tests.xml -DskipTests=true -Dmaven.javadoc.skip=true -Dsource.skip=true install" />
</exec>
<copy file="${basedir}/target/mpxj-${current.version}${current.version.classifier}.jar" tofile="${basedir}/mpxj.jar"/>
<copy file="${basedir}/target.tests/mpxj-tests-${current.version}${current.version.classifier}.jar" tofile="${basedir}/mpxj-test.jar"/>
</target>
<target name="changelog" description="Update changelog">
<xslt in="${basedir}/src/changes/changes.xml" out="${basedir}/CHANGELOG.md" style="${basedir}/doc/changelog.xsl"/>
</target>
<target name="releasenotes" depends="init" description="Create release notes">
<xslt in="${basedir}/src/changes/changes.xml" out="${dist.dir}/readme.md" style="${basedir}/doc/releasenote.xsl">
<param name="version" expression="${current.version}"/>
</xslt>
</target>
<target name="gem-source" description="Generate source required by Ruby gem">
<java classname="net.sf.mpxj.ruby.MethodGenerator" failonerror="true">
<arg value="${basedir}/src.ruby/mpxj/lib/mpxj" />
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${basedir}/mpxj.jar" />
</classpath>
</java>
</target>
<!-- For deploy efficiency, assumes that the maven-install target has been run -->
<target name="gem-setup" depends="init" description="Build jars required by ruby gem and copy to correct location">
<copy file="${basedir}/mpxj.jar" todir="${basedir}/src.ruby/mpxj/lib/mpxj"/>
<copy todir="${basedir}/src.ruby/mpxj/lib/mpxj">
<fileset dir="${lib.dir}" includes="*.jar" />
</copy>
<copy todir="${basedir}/src.ruby/mpxj/legal">
<fileset dir="${basedir}/legal" includes="*" />
</copy>
<exec executable="${ruby.cmd}" dir="${basedir}/src.ruby/mpxj" failonerror="true">
<arg line="install" />
</exec>
</target>
<target name="gem-test" depends="gem-setup" description="Run ruby gem tests">
<exec executable="${ruby.cmd}" dir="${basedir}/src.ruby/mpxj" failonerror="true">
<arg line="exec rspec spec" />
</exec>
</target>
<target name="gem-deploy" depends="gem-setup" description="Deploy rubygem to rubygems.org">
<exec executable="${ruby.cmd}" dir="${basedir}/src.ruby/mpxj" failonerror="true">
<arg line="exec rake build release:rubygem_push" />
</exec>
</target>
<target name="gem-copy" depends="gem-setup" description="Copy gem to a local directory">
<copy todir="//VBOXSVR/Downloads/mpxj.gem">
<fileset dir="${basedir}/src.ruby/mpxj" includes="**" />
</copy>
</target>
<!-- For deploy efficiency, assumes that the maven-install target has been run -->
<target name="python-setup" depends="init" description="Build jars required by python package and copy to correct location">
<copy file="${basedir}/mpxj.jar" todir="${basedir}/src.python/mpxj/mpxj/lib"/>
<copy todir="${basedir}/src.python/mpxj/mpxj/lib">
<fileset dir="${lib.dir}" includes="*.jar" />
</copy>
<copy todir="${basedir}/src.python/mpxj/legal">
<fileset dir="${basedir}/legal" includes="*" />
</copy>
</target>
<!-- Ensure build is installed: py -m pip install - -upgrade build -->
<target name="python-build" depends="python-setup" description="Build python package">
<exec executable="${python.cmd}" dir="${basedir}/src.python/mpxj" failonerror="true">
<arg line="-m build" />
</exec>
</target>
<target name="python-copy" depends="python-build" description="Copy python package to a local directory">
<copy todir="//VBOXSVR/Downloads">
<fileset dir="${basedir}/src.python/mpxj/dist" includes="*.gz" />
</copy>
</target>
<target name="python-deploy-test" depends="python-build" description="Deploy python package to pypitest">
<exec executable="${python.cmd}" dir="${basedir}/src.python/mpxj" failonerror="true">
<arg line="-m twine upload -r pypitest dist/*" />
</exec>
</target>
<!-- Ensure twine is installed py -m pip install twine -->
<target name="python-deploy" depends="python-build" description="Deploy python package to pypi">
<exec executable="${python.cmd}" dir="${basedir}/src.python/mpxj" failonerror="true">
<arg line="-m twine upload -r pypi dist/*" />
</exec>
</target>
<target name="xjc" depends="init" description="Rebuild source generated by JAXB">
<property name="classes.dir" value="${basedir}/target/classes" />
<!-- Copy in schemas not included with MPXJ -->
<copy file="${env.MPXJ_SCHEMA_DIR}/conceptdraw/document-corrected.xsd" toDir="${basedir}/jaxb"/>
<copy file="${env.MPXJ_SCHEMA_DIR}/mspdi/mspdi_pj15-corrected.xsd" toDir="${basedir}/jaxb"/>
<copy file="${env.MPXJ_SCHEMA_DIR}/pmxml/p6v2312-p6apibo-corrected.xsd" toDir="${basedir}/jaxb"/>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b pm-binding.xjb -p net.sf.mpxj.primavera.schema p6v2312-p6apibo-corrected.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b mspdi-binding.xjb -p net.sf.mpxj.mspdi.schema mspdi_pj15-corrected.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b mrproject.xjb -p net.sf.mpxj.planner.schema mrproject-0.6.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b phoenix-4-binding.xjb -p net.sf.mpxj.phoenix.schema.phoenix4 phoenix-4.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b phoenix-5-binding.xjb -p net.sf.mpxj.phoenix.schema.phoenix5 phoenix-5.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b ganttproject-binding.xjb -p net.sf.mpxj.ganttproject.schema ganttproject-2.8.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b conceptdraw-binding.xjb -p net.sf.mpxj.conceptdraw.schema document-corrected.xsd" />
</exec>
<exec executable="${xjc.cmd}" dir="${basedir}/jaxb" failonerror="true">
<arg line="-classpath ${classes.dir} -d ${basedir}/src/main/java -b gantt-designer-binding.xjb -p net.sf.mpxj.ganttdesigner.schema gantt-designer.xsd" />
</exec>
<!-- Remove schemas not included with MPXJ -->
<delete file="${basedir}/jaxb/document-corrected.xsd"/>
<delete file="${basedir}/jaxb/mspdi_pj15-corrected.xsd"/>
<delete file="${basedir}/jaxb/p6v2312-p6apibo-corrected.xsd"/>
</target>
<target name="ikvm-init" depends="init">
<property name="mpxj.snk" value="${basedir}/src.net/mpxj.snk"/>
<property name="ikvm.working.dir" value="${basedir}/ikvm.tmp" />
</target>
<target name="ikvm-net45-init" depends="ikvm-init">
<property name="lib.net45.dir" value="${basedir}/src.net/lib/net45" />
<property name="poi.net45.dll" value="${lib.net45.dir}\${poi.jar}.dll" />
<property name="commons-collections.net45.dll" value="${lib.net45.dir}\${commons-collections.jar}.dll" />
<property name="commons-io.net45.dll" value="${lib.net45.dir}\${commons-io.jar}.dll" />
<property name="commons-math.net45.dll" value="${lib.net45.dir}\${commons-math.jar}.dll" />
<property name="log4j-api.net45.dll" value="${lib.net45.dir}\${log4j-api.jar}.dll" />
<property name="rtfparserkit.net45.dll" value="${lib.net45.dir}\${rtfparserkit.jar}.dll" />
<property name="sqlite-jdbc.net45.dll" value="${lib.net45.dir}\${sqlite-jdbc.jar}.dll" />
<property name="jsoup.net45.dll" value="${lib.net45.dir}\${jsoup.jar}.dll" />
<property name="commons-lang3.net45.dll" value="${lib.net45.dir}\${commons-lang3.jar}.dll" />
<property name="commons-logging.net45.dll" value="${lib.net45.dir}\${commons-logging.jar}.dll" />
<property name="jackcess.net45.dll" value="${lib.net45.dir}\${jackcess.jar}.dll" />
<property name="jakarta.activation.net45.dll" value="${lib.net45.dir}\${jakarta.activation.jar}.dll" />
<property name="jakarta.xml.bind-api.net45.dll" value="${lib.net45.dir}\${jakarta.xml.bind-api.jar}.dll" />
<property name="istack-commons-runtime.net45.dll" value="${lib.net45.dir}\${istack-commons-runtime.jar}.dll" />
<property name="txw2.net45.dll" value="${lib.net45.dir}\${txw2.jar}.dll" />
<property name="jaxb-core.net45.dll" value="${lib.net45.dir}\${jaxb-core.jar}.dll" />
<property name="jaxb-runtime.net45.dll" value="${lib.net45.dir}\${jaxb-runtime.jar}.dll" />
<property name="junit.net45.dll" value="${lib.net45.dir}\junit.dll" />
<property name="mpxj.net45.dll" value="${lib.net45.dir}\mpxj.dll" />
<property name="mpxj-test.net45.dll" value="${lib.net45.dir}\mpxj-test.dll" />
<property name="mpxj-for-vb.net45.dll" value="${lib.net45.dir}\mpxj-for-vb.dll" />
<property name="mpxj-for-csharp.net45.dll" value="${lib.net45.dir}\mpxj-for-csharp.dll" />
<property name="mpxj-utilities.net45.dll" value="${lib.net45.dir}\MpxjUtilities.dll" />
<available file="${ikvmc.net45.cmd}" property="ikvm.net45.available" />
<available file="${tlbexp.net45.cmd}" property="tlbexp.available" />
<condition property="dotnet.available">
<and>
<available file="dotnet.exe" filepath="${env.Path}" property="dotnet.available" />
<isset property="ikvm.net45.available"/>
</and>
</condition>
</target>
<target name="ikvm-nca31-init" depends="ikvm-init">
<property name="lib.nca31.dir" value="${basedir}/src.net/lib/netcoreapp3.1" />
<property name="poi.nca31.dll" value="${lib.nca31.dir}\${poi.jar}.dll" />
<property name="commons-collections.nca31.dll" value="${lib.nca31.dir}\${commons-collections.jar}.dll" />
<property name="commons-io.nca31.dll" value="${lib.nca31.dir}\${commons-io.jar}.dll" />
<property name="commons-math.nca31.dll" value="${lib.nca31.dir}\${commons-math.jar}.dll" />
<property name="log4j-api.nca31.dll" value="${lib.nca31.dir}\${log4j-api.jar}.dll" />
<property name="rtfparserkit.nca31.dll" value="${lib.nca31.dir}\${rtfparserkit.jar}.dll" />
<property name="sqlite-jdbc.nca31.dll" value="${lib.nca31.dir}\${sqlite-jdbc.jar}.dll" />
<property name="jsoup.nca31.dll" value="${lib.nca31.dir}\${jsoup.jar}.dll" />
<property name="commons-lang3.nca31.dll" value="${lib.nca31.dir}\${commons-lang3.jar}.dll" />
<property name="commons-logging.nca31.dll" value="${lib.nca31.dir}\${commons-logging.jar}.dll" />
<property name="jackcess.nca31.dll" value="${lib.nca31.dir}\${jackcess.jar}.dll" />
<property name="jakarta.activation.nca31.dll" value="${lib.nca31.dir}\${jakarta.activation.jar}.dll" />
<property name="jakarta.xml.bind-api.nca31.dll" value="${lib.nca31.dir}\${jakarta.xml.bind-api.jar}.dll" />
<property name="istack-commons-runtime.nca31.dll" value="${lib.nca31.dir}\${istack-commons-runtime.jar}.dll" />
<property name="txw2.nca31.dll" value="${lib.nca31.dir}\${txw2.jar}.dll" />
<property name="jaxb-core.nca31.dll" value="${lib.nca31.dir}\${jaxb-core.jar}.dll" />
<property name="jaxb-runtime.nca31.dll" value="${lib.nca31.dir}\${jaxb-runtime.jar}.dll" />
<property name="junit.nca31.dll" value="${lib.nca31.dir}\junit.dll" />
<property name="mpxj.nca31.dll" value="${lib.nca31.dir}\mpxj.dll" />
<property name="mpxj-test.nca31.dll" value="${lib.nca31.dir}\mpxj-test.dll" />
<property name="mpxj-for-vb.nca31.dll" value="${lib.nca31.dir}\mpxj-for-vb.dll" />
<property name="mpxj-for-csharp.nca31.dll" value="${lib.nca31.dir}\mpxj-for-csharp.dll" />
<property name="mpxj-utilities.nca31.dll" value="${lib.nca31.dir}\MpxjUtilities.dll" />
<available file="${ikvmc.nca31.cmd}" property="ikvm.nca31.available" />
<condition property="dotnet.available">
<and>
<available file="dotnet.exe" filepath="${env.Path}" property="dotnet.available" />
<isset property="ikvm.nca31.available"/>
</and>
</condition>
</target>
<target name="ikvm-net45-compile" depends="ikvm-net45-init" description="Compile everything ready for use with IKVM" if="ikvm.net45.available">
<property name="ikvm.src.dir" value="${ikvm.working.dir}/src" />
<property name="ikvm.src.test.dir" value="${ikvm.working.dir}/src.test" />
<property name="ikvm.classes.dir" value="${ikvm.working.dir}/classes" />
<property name="ikvm.classes.test.dir" value="${ikvm.working.dir}/classes.test" />
<property name="ikvm.lib.dir" value="${ikvm.working.dir}/lib" />
<!-- Extract the target JVM version from pom.xml -->
<loadfile encoding="UTF-8" property="target-jvm-version" srcFile="${basedir}/pom.xml" >
<filterchain>
<tokenfilter>
<containsregex
pattern="(\s*<target>)(.+)(</target>\s*)"
replace="\2" />
</tokenfilter>
<striplinebreaks />
</filterchain>
</loadfile>
<delete dir="${ikvm.working.dir}" />
<mkdir dir="${ikvm.src.dir}" />
<mkdir dir="${ikvm.src.test.dir}" />
<mkdir dir="${ikvm.classes.dir}" />
<mkdir dir="${ikvm.classes.test.dir}" />
<mkdir dir="${ikvm.lib.dir}" />
<exec executable="${ikvmstub.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-out:${ikvm.lib.dir}/mscorlib.jar mscorlib" />
</exec>
<copy todir="${ikvm.src.dir}">
<fileset dir="${basedir}/src/main/java" includes="**" />
</copy>
<copy todir="${ikvm.src.test.dir}">
<fileset dir="${basedir}/src/test/java">
<exclude name="**/CustomerDataTestCharacterEscapeHandler*"/>
</fileset>
</copy>
<replace dir="${ikvm.src.dir}" token="public class " value="import cli.System.Runtime.InteropServices.*;${line.separator}@ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)${line.separator}public class ">
<include name="**/*.java" />
<exclude name="**/schema/*.java" />
<exclude name="**/schema/phoenix*/*.java" />
<exclude name="**/FieldMap.java" />
</replace>
<replace dir="${ikvm.src.dir}" token="public final class " value="import cli.System.Runtime.InteropServices.*;${line.separator}@ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)${line.separator} public final class ">
<include name="**/*.java" />
</replace>
<replace dir="${ikvm.src.dir}" token="public interface " value="import cli.System.Runtime.InteropServices.*;${line.separator}@ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)${line.separator} public interface ">
<include name="**/*.java" />
<exclude name="**/UniversalProjectReader.java" />
</replace>
<replace dir="${ikvm.src.dir}" token="class ProjectEntity" value="import cli.System.Runtime.InteropServices.*;${line.separator}@ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)${line.separator}public class ProjectEntity">
<include name="**/ProjectEntity.java" />
</replace>
<replace dir="${ikvm.src.dir}" token="public enum " value="import cli.System.Runtime.InteropServices.*;${line.separator}@ClassInterfaceAttribute.Annotation(ClassInterfaceType.__Enum.AutoDual)${line.separator}public enum ">
<include name="**/*.java" />
</replace>
<replace dir="${ikvm.src.dir}" token="final class XsdDuration" value="public final class XsdDuration">
<include name="**/mspdi/XsdDuration.java" />
</replace>
<javac srcdir="${ikvm.src.dir}" destdir="${ikvm.classes.dir}" classpath="${classpath}:${poifs.classpath}:${rtfparserkit.classpath}:${sqlite-jdbc.classpath}:${jsoup.classpath}:${commons-lang3.classpath}::${commons-logging.classpath}:${jackcess.classpath}:${jakarta.activation.classpath}:${jakarta.xml.bind-api.classpath}:${istack-commons-runtime.classpath}:${txw2.classpath}:${jaxb-core.classpath}:${jaxb-runtime.classpath}:${ikvm.lib.dir}/mscorlib.jar" debug="on" source="${target-jvm-version}" target="${target-jvm-version}" includeantruntime="false" excludes="net/sf/mpxj/explorer/**">
<compilerarg line="-encoding cp1252" />
</javac>
<javac srcdir="${ikvm.src.test.dir}" destdir="${ikvm.classes.test.dir}" classpath="${classpath}:${ikvm.classes.dir}:${poifs.classpath}:${rtfparserkit.classpath}:${sqlite-jdbc.classpath}:${jsoup.classpath}:${commons-lang3.classpath}:${commons-logging.classpath}:${jackcess.classpath}:${jakarta.activation.classpath}:${jakarta.xml.bind-api.classpath}:${istack-commons-runtime.classpath}:${txw2.classpath}:${jaxb-core.classpath}:${jaxb-runtime.classpath}:${junit.classpath}:${ikvm.lib.dir}/mscorlib.jar" debug="on" source="${target-jvm-version}" target="${target-jvm-version}" includeantruntime="false">
<compilerarg line="-encoding cp1252" />
</javac>
<jar jarfile="${ikvm.working.dir}/mpxj.jar">
<fileset dir="${ikvm.classes.dir}"/>
<fileset dir="${basedir}/src/main/resources"/>
</jar>
<jar jarfile="${ikvm.working.dir}/mpxj-test.jar">
<fileset dir="${ikvm.classes.test.dir}"/>
</jar>
</target>
<target name="ikvm-nca31-compile" depends="ikvm-nca31-init" description="Compile everything ready for use with IKVM" if="ikvm.nca31.available">
<property name="ikvm.src.dir" value="${ikvm.working.dir}/src" />
<property name="ikvm.src.test.dir" value="${ikvm.working.dir}/src.test" />
<property name="ikvm.classes.dir" value="${ikvm.working.dir}/classes" />
<property name="ikvm.classes.test.dir" value="${ikvm.working.dir}/classes.test" />
<property name="ikvm.lib.dir" value="${ikvm.working.dir}/lib" />
<!-- Extract the target JVM version from pom.xml -->
<loadfile encoding="UTF-8" property="target-jvm-version" srcFile="${basedir}/pom.xml" >
<filterchain>
<tokenfilter>
<containsregex
pattern="(\s*<target>)(.+)(</target>\s*)"
replace="\2" />
</tokenfilter>
<striplinebreaks />
</filterchain>
</loadfile>
<delete dir="${ikvm.working.dir}" />
<mkdir dir="${ikvm.src.dir}" />
<mkdir dir="${ikvm.src.test.dir}" />
<mkdir dir="${ikvm.classes.dir}" />
<mkdir dir="${ikvm.classes.test.dir}" />
<mkdir dir="${ikvm.lib.dir}" />
<exec executable="${ikvmstub.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-out:${ikvm.lib.dir}/mscorlib.jar mscorlib" />
</exec>
<copy todir="${ikvm.src.dir}">
<fileset dir="${basedir}/src/main/java" includes="**" />
</copy>
<copy todir="${ikvm.src.test.dir}">
<fileset dir="${basedir}/src/test/java">
<exclude name="**/CustomerDataTestCharacterEscapeHandler*"/>
</fileset>
</copy>
<replace dir="${ikvm.src.dir}" token="final class XsdDuration" value="public final class XsdDuration">
<include name="**/mspdi/XsdDuration.java" />
</replace>
<javac srcdir="${ikvm.src.dir}" destdir="${ikvm.classes.dir}" classpath="${classpath}:${poifs.classpath}:${rtfparserkit.classpath}:${sqlite-jdbc.classpath}:${jsoup.classpath}:${commons-lang3.classpath}:${commons-logging.classpath}:${jackcess.classpath}:${jakarta.activation.classpath}:${jakarta.xml.bind-api.classpath}:${istack-commons-runtime.classpath}:${txw2.classpath}:${jaxb-core.classpath}:${jaxb-runtime.classpath}:${ikvm.lib.dir}/mscorlib.jar" debug="on" source="${target-jvm-version}" target="${target-jvm-version}" includeantruntime="false" excludes="net/sf/mpxj/explorer/**">
<compilerarg line="-encoding cp1252" />
</javac>
<javac srcdir="${ikvm.src.test.dir}" destdir="${ikvm.classes.test.dir}" classpath="${classpath}:${ikvm.classes.dir}:${poifs.classpath}:${rtfparserkit.classpath}:${sqlite-jdbc.classpath}:${jsoup.classpath}:${commons-lang3.classpath}:${commons-logging.classpath}:${jackcess.classpath}:${jakarta.activation.classpath}:${jakarta.xml.bind-api.classpath}:${istack-commons-runtime.classpath}:${txw2.classpath}:${jaxb-core.classpath}:${jaxb-runtime.classpath}:${junit.classpath}:${ikvm.lib.dir}/mscorlib.jar" debug="on" source="${target-jvm-version}" target="${target-jvm-version}" includeantruntime="false">
<compilerarg line="-encoding cp1252" />
</javac>
<jar jarfile="${ikvm.working.dir}/mpxj.jar">
<fileset dir="${ikvm.classes.dir}"/>
<fileset dir="${basedir}/src/main/resources"/>
</jar>
<jar jarfile="${ikvm.working.dir}/mpxj-test.jar">
<fileset dir="${ikvm.classes.test.dir}"/>
</jar>
</target>
<target name="ikvm-net45-dll" depends="ikvm-net45-compile" description="Build .net DLLs" if="ikvm.net45.available">
<java classname="net.sf.mpxj.ikvm.MapFileGenerator" failonerror="true">
<arg value="${ikvm.working.dir}/mpxj.jar" />
<arg value="${ikvm.working.dir}/ikvm-remap-vb.xml" />
<arg value="False" />
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${ikvm.working.dir}/mpxj.jar" />
<pathelement location="${junit.classpath}" />
<pathelement location="${poifs.classpath}" />
<pathelement location="${rtfparserkit.classpath}" />
<pathelement location="${sqlite-jdbc.classpath}" />
<pathelement location="${jsoup.classpath}" />
<pathelement location="${commons-lang3.classpath}" />
<pathelement location="${commons-logging.classpath}" />
<pathelement location="${jackcess.classpath}" />
<pathelement location="${jakarta.activation.classpath}" />
<pathelement location="${jakarta.xml.bind-api.classpath}" />
<pathelement location="${istack-commons-runtime.classpath}" />
<pathelement location="${txw2.classpath}" />
<pathelement location="${jaxb-core.classpath}" />
<pathelement location="${jaxb-runtime.classpath}" />
</classpath>
</java>
<java classname="net.sf.mpxj.ikvm.MapFileGenerator" failonerror="true">
<arg value="${ikvm.working.dir}/mpxj.jar" />
<arg value="${ikvm.working.dir}/ikvm-remap-csharp.xml" />
<arg value="True" />
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${ikvm.working.dir}/mpxj.jar" />
<pathelement location="${junit.classpath}" />
<pathelement location="${poifs.classpath}" />
<pathelement location="${rtfparserkit.classpath}" />
<pathelement location="${sqlite-jdbc.classpath}" />
<pathelement location="${jsoup.classpath}" />
<pathelement location="${commons-lang3.classpath}" />
<pathelement location="${commons-logging.classpath}" />
<pathelement location="${jackcess.classpath}" />
<pathelement location="${jakarta.activation.classpath}" />
<pathelement location="${jakarta.xml.bind-api.classpath}" />
<pathelement location="${istack-commons-runtime.classpath}" />
<pathelement location="${txw2.classpath}" />
<pathelement location="${jaxb-core.classpath}" />
<pathelement location="${jaxb-runtime.classpath}" />
</classpath>
</java>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-collections.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${basedir}/../poifs/target/${commons-collections.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-io.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${basedir}/../poifs/target/${commons-io.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-math.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${basedir}/../poifs/target/${commons-math.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${log4j-api.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${basedir}/../poifs/target/${log4j-api.jar}.jar" />
</exec>
<!-- POI >= 5.0.0 won't compile as-is using IKVM. Instead we use poifs which is a cut down
version of POI which removes the parts we don't use and avoids Java language constructs
which IKVM doesn't like. https://github.com/joniles/poifs -->
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -nowarn:0117 -out:${poi.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${commons-collections.net45.dll} -reference:${commons-io.net45.dll} -reference:${commons-math.net45.dll} -reference:${log4j-api.net45.dll} ${basedir}/../poifs/target/${poifs.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${rtfparserkit.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${rtfparserkit.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${sqlite-jdbc.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${sqlite-jdbc.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jsoup.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${jsoup.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-lang3.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${commons-lang3.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-logging.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${commons-logging.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jackcess.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${commons-lang3.net45.dll} -reference:${commons-logging.net45.dll} ${lib.dir}\${jackcess.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jakarta.activation.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${jakarta.activation.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jakarta.xml.bind-api.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${jakarta.activation.net45.dll} ${lib.dir}\${jakarta.xml.bind-api.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${istack-commons-runtime.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${istack-commons-runtime.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${txw2.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${istack-commons-runtime.net45.dll} ${lib.dir}\${txw2.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jaxb-core.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${jakarta.xml.bind-api.net45.dll} -reference:${txw2.net45.dll} ${lib.dir}\${jaxb-core.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jaxb-runtime.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${jakarta.xml.bind-api.net45.dll} -reference:${txw2.net45.dll} -reference:${jaxb-core.net45.dll} -reference:${istack-commons-runtime.net45.dll} -reference:${jakarta.activation.net45.dll} ${lib.dir}\${jaxb-runtime.jar}.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -nowarn:0100 -nowarn:0111 -nowarn:0105 -out:${junit.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 ${lib.dir}\${hamcrest.jar}.jar ${lib.dir}\${junit.jar}.jar" />
</exec>
<!-- Generate the original unmapped DLL -->
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${poi.net45.dll} -reference:${rtfparserkit.net45.dll} -reference:${sqlite-jdbc.net45.dll} -reference:${jsoup.net45.dll} -reference:${jackcess.net45.dll} -reference:${jakarta.xml.bind-api.net45.dll} -reference:${jaxb-runtime.net45.dll} -reference:mscorlib.dll ${ikvm.working.dir}\mpxj.jar" />
</exec>
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj-test.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -reference:${poi.net45.dll} -reference:${rtfparserkit.net45.dll} -reference:${sqlite-jdbc.net45.dll} -reference:${jsoup.net45.dll} -reference:${jackcess.net45.dll} -reference:${jakarta.xml.bind-api.net45.dll} -reference:${jaxb-runtime.net45.dll} -reference:${mpxj.net45.dll} -reference:${junit.net45.dll} -reference:mscorlib.dll ${ikvm.working.dir}\mpxj-test.jar" />
</exec>
<!-- Generate a mapped DLL for VB, avoids name clashes due to VB's case insensitivity -->
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj-for-vb.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -remap:${ikvm.working.dir}/ikvm-remap-vb.xml -reference:${poi.net45.dll} -reference:${rtfparserkit.net45.dll} -reference:${sqlite-jdbc.net45.dll} -reference:${jsoup.net45.dll} -reference:${jackcess.net45.dll} -reference:${jakarta.xml.bind-api.net45.dll} -reference:${jaxb-runtime.net45.dll} -reference:mscorlib.dll ${ikvm.working.dir}\mpxj.jar" />
</exec>
<!-- Generate a mapped DLL for C# and other .Net languages -->
<exec executable="${ikvmc.net45.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj-for-csharp.net45.dll} -target:library -keyfile:${mpxj.snk} -version:${current.version}.0 -remap:${ikvm.working.dir}/ikvm-remap-csharp.xml -reference:${poi.net45.dll} -reference:${rtfparserkit.net45.dll} -reference:${sqlite-jdbc.net45.dll} -reference:${jsoup.net45.dll} -reference:${jackcess.net45.dll} -reference:${jakarta.xml.bind-api.net45.dll} -reference:${jaxb-runtime.net45.dll} -reference:mscorlib.dll -reference:system.dll ${ikvm.working.dir}\mpxj.jar" />
</exec>
<!-- Export a Type Library (TLB) for each assembly. This step will fail if the assemblies are in the GAC! -->
<apply executable="${tlbexp.net45.cmd}" parallel="false" relative="true" dir="${lib.net45.dir}" failifexecutionfails="true">
<arg value="/nologo"/>
<arg value="/silence:000017CE"/>
<arg value="/silence:001311D9"/>
<arg value="/silence:80131178"/>
<arg value="/silence:0013117F"/>
<arg value="/silence:8013117D"/>
<arg value="/silence:801311B0"/>
<arg value="/silence:80131172"/>
<srcfile />
<fileset dir="${lib.net45.dir}">
<include name="**/*.dll" />
<exclude name="**/ikvm-native*.dll" />
</fileset>
</apply>
<!-- Generate a batch file which installs the assemblies in the GAC -->
<echo file="${lib.net45.dir}\mpxj-gac-install.bat" message="@echo off${line.separator}echo This batch file installs the DLLs required to use MPXJ into the GAC${line.separator}pause${line.separator}"/>
<apply executable="cmd.exe" parallel="false" relative="true">
<arg value="/c" />
<srcfile prefix="echo gacutil /i " />
<arg value=">> ${lib.net45.dir}\mpxj-gac-install.bat" />
<fileset dir="${lib.net45.dir}">
<include name="*.dll" />
</fileset>
</apply>
<replace file="${lib.net45.dir}\mpxj-gac-install.bat" token='" "' value="" />
<!-- Generate a batch file which removes the assemblies from the GAC -->
<echo file="${lib.net45.dir}\mpxj-gac-uninstall.bat" message="@echo off${line.separator}echo This batch file uninstalls the DLLs required to use MPXJ from the GAC${line.separator}pause${line.separator}"/>
<apply executable="cmd.exe" parallel="false" relative="true" addsourcefile="false">
<arg value="/c" />
<targetfile prefix="echo gacutil /u " />
<arg value=">> ${lib.net45.dir}\mpxj-gac-uninstall.bat" />
<fileset dir="${lib.net45.dir}">
<include name="**/*.dll" />
</fileset>
<mapper type="glob" from="*.dll" to="*"/>
</apply>
<replace file="${lib.net45.dir}\mpxj-gac-uninstall.bat" token='" "' value="" />
<!-- Generate a batch file to register the assemblies -->
<echo file="${lib.net45.dir}\mpxj-register-assemblies.bat" message="@echo off${line.separator}echo This batch file registers the .Net assemblies used by MPXJ so that they can be called from COM${line.separator}pause${line.separator}"/>
<apply executable="cmd.exe" parallel="false" relative="true">
<arg value="/c" />
<srcfile prefix="echo regasm " />
<arg value=">> ${lib.net45.dir}\mpxj-register-assemblies.bat" />
<fileset dir="${lib.net45.dir}">
<include name="**/*.dll" />
</fileset>
</apply>
<replace file="${lib.net45.dir}\mpxj-register-assemblies.bat" token='" "' value="" />
<!-- Generate a batch file to unregister the assemblies -->
<echo file="${lib.net45.dir}\mpxj-unregister-assemblies.bat" message="@echo off${line.separator}echo This batch file deregisters the .Net assemblies used by MPXJ so that they are no longer available to be called from COM${line.separator}pause${line.separator}"/>
<apply executable="cmd.exe" parallel="false" relative="true">
<arg value="/c" />
<srcfile prefix="echo regasm /u " />
<arg value=">> ${lib.net45.dir}\mpxj-unregister-assemblies.bat" />
<fileset dir="${lib.net45.dir}">
<include name="**/*.dll" />
</fileset>
</apply>
<replace file="${lib.net45.dir}\mpxj-unregister-assemblies.bat" token='" "' value="" />
<delete dir="${ikvm.working.dir}" />
</target>
<target name="ikvm-nca31-dll" depends="ikvm-nca31-compile" description="Build .net DLLs" if="ikvm.nca31.available">
<java classname="net.sf.mpxj.ikvm.MapFileGenerator" failonerror="true">
<arg value="${ikvm.working.dir}/mpxj.jar" />
<arg value="${ikvm.working.dir}/ikvm-remap-vb.xml" />
<arg value="False" />
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${ikvm.working.dir}/mpxj.jar" />
<pathelement location="${junit.classpath}" />
<pathelement location="${poifs.classpath}" />
<pathelement location="${rtfparserkit.classpath}" />
<pathelement location="${sqlite-jdbc.classpath}" />
<pathelement location="${jsoup.classpath}" />
<pathelement location="${commons-lang3.classpath}" />
<pathelement location="${commons-logging.classpath}" />
<pathelement location="${jackcess.classpath}" />
<pathelement location="${jakarta.activation.classpath}" />
<pathelement location="${jakarta.xml.bind-api.classpath}" />
<pathelement location="${istack-commons-runtime.classpath}" />
<pathelement location="${txw2.classpath}" />
<pathelement location="${jaxb-core.classpath}" />
<pathelement location="${jaxb-runtime.classpath}" />
</classpath>
</java>
<java classname="net.sf.mpxj.ikvm.MapFileGenerator" failonerror="true">
<arg value="${ikvm.working.dir}/mpxj.jar" />
<arg value="${ikvm.working.dir}/ikvm-remap-csharp.xml" />
<arg value="True" />
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${ikvm.working.dir}/mpxj.jar" />
<pathelement location="${junit.classpath}" />
<pathelement location="${poifs.classpath}" />
<pathelement location="${rtfparserkit.classpath}" />
<pathelement location="${sqlite-jdbc.classpath}" />
<pathelement location="${jsoup.classpath}" />
<pathelement location="${commons-lang3.classpath}" />
<pathelement location="${commons-logging.classpath}" />
<pathelement location="${jackcess.classpath}" />
<pathelement location="${jakarta.activation.classpath}" />
<pathelement location="${jakarta.xml.bind-api.classpath}" />
<pathelement location="${istack-commons-runtime.classpath}" />
<pathelement location="${txw2.classpath}" />
<pathelement location="${jaxb-core.classpath}" />
<pathelement location="${jaxb-runtime.classpath}" />
</classpath>
</java>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-collections.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}/../poifs/target/${commons-collections.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-io.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}/../poifs/target/${commons-io.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-math.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}/../poifs/target/${commons-math.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${log4j-api.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}/../poifs/target/${log4j-api.jar}.jar" />
</exec>
<!-- POI >= 5.0.0 won't compile as-is using IKVM. Instead we use poifs which is a cut down
version of POI which removes the parts we don't use and avoids Java language constructs
which IKVM doesn't like. https://github.com/joniles/poifs -->
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -nowarn:0117 -out:${poi.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${commons-collections.nca31.dll} -reference:${commons-io.nca31.dll} -reference:${commons-math.nca31.dll} -reference:${log4j-api.nca31.dll} ${basedir}/../poifs/target/${poifs.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${rtfparserkit.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}\lib\${rtfparserkit.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jsoup.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}\lib\${jsoup.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-lang3.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}\lib\${commons-lang3.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${commons-logging.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}\lib\${commons-logging.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jackcess.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${commons-lang3.nca31.dll} -reference:${commons-logging.nca31.dll} ${basedir}\lib\${jackcess.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${istack-commons-runtime.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}\lib\${istack-commons-runtime.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${txw2.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${istack-commons-runtime.nca31.dll} ${basedir}\lib\${txw2.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jakarta.activation.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${basedir}\lib\${jakarta.activation.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jakarta.xml.bind-api.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${jakarta.activation.nca31.dll} ${basedir}\lib\${jakarta.xml.bind-api.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jaxb-core.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${jakarta.xml.bind-api.nca31.dll} -reference:${txw2.nca31.dll} ${basedir}\lib\${jaxb-core.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${jaxb-runtime.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${jakarta.xml.bind-api.nca31.dll} -reference:${txw2.nca31.dll} -reference:${jaxb-core.nca31.dll} -reference:${istack-commons-runtime.nca31.dll} -reference:${jakarta.activation.nca31.dll} ${basedir}\lib\${jaxb-runtime.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -nowarn:0100 -nowarn:0111 -nowarn:0105 -out:${junit.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll ${lib.dir}\${hamcrest.jar}.jar ${lib.dir}\${junit.jar}.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0111 -nowarn:0100 -nowarn:0003 -out:${sqlite-jdbc.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:System.Console.dll ${lib.dir}\${sqlite-jdbc.jar}.jar" />
</exec>
<!-- Generate the original unmapped DLL -->
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${poi.nca31.dll} -reference:${rtfparserkit.nca31.dll} -reference:${sqlite-jdbc.nca31.dll} -reference:${jsoup.nca31.dll} -reference:${jackcess.nca31.dll} -reference:${jakarta.xml.bind-api.nca31.dll} -reference:${jaxb-runtime.nca31.dll} -reference:mscorlib.dll ${ikvm.working.dir}\mpxj.jar" />
</exec>
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj-test.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${poi.nca31.dll} -reference:${rtfparserkit.nca31.dll} -reference:${sqlite-jdbc.nca31.dll} -reference:${jsoup.nca31.dll} -reference:${jackcess.nca31.dll} -reference:${jakarta.xml.bind-api.nca31.dll} -reference:${jaxb-runtime.nca31.dll} -reference:${mpxj.nca31.dll} -reference:${junit.nca31.dll} -reference:mscorlib.dll ${ikvm.working.dir}\mpxj-test.jar" />
</exec>
<!-- Generate a mapped DLL for VB, avoids name clashes due to VB's case insensitivity -->
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj-for-vb.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -remap:${ikvm.working.dir}/ikvm-remap-vb.xml -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${poi.nca31.dll} -reference:${rtfparserkit.nca31.dll} -reference:${sqlite-jdbc.nca31.dll} -reference:${jsoup.nca31.dll} -reference:${jackcess.nca31.dll} -reference:${jakarta.xml.bind-api.nca31.dll} -reference:${jaxb-runtime.nca31.dll} -reference:mscorlib.dll ${ikvm.working.dir}\mpxj.jar" />
</exec>
<!-- Generate a mapped DLL for C# and other .Net languages -->
<exec executable="${ikvmc.nca31.cmd}" dir="${basedir}" failonerror="true">
<arg line="-nowarn:0003 -out:${mpxj-for-csharp.nca31.dll} -target:library -key:mpxj-key -version:${current.version}.0 -remap:${ikvm.working.dir}/ikvm-remap-csharp.xml -reference:System.Runtime.dll -reference:System.Runtime.Extensions.dll -reference:System.Threading.dll -reference:System.Threading.Thread.dll -reference:${poi.nca31.dll} -reference:${rtfparserkit.nca31.dll} -reference:${sqlite-jdbc.nca31.dll} -reference:${jsoup.nca31.dll} -reference:${jackcess.nca31.dll} -reference:${jakarta.xml.bind-api.nca31.dll} -reference:${jaxb-runtime.nca31.dll} -reference:mscorlib.dll -reference:system.dll ${ikvm.working.dir}\mpxj.jar" />
</exec>
<delete dir="${ikvm.working.dir}" />
</target>
<target name="vs-net45-dll" depends="ikvm-net45-dll" description="Build .Net DLLs using Visual Studio" if="dotnet.available">
<delete includeemptydirs="true">
<fileset dir="${basedir}/src.net/utilities" defaultexcludes="false">
<include name="bin" />
<include name="obj" />
</fileset>
</delete>
<exec executable="dotnet" dir="${basedir}" failonerror="true">
<arg line="build src.net/utilities/MpxjUtilities.net45.csproj" />
</exec>
<copy file="src.net/utilities/bin/Debug/net45/MpxjUtilities.dll" tofile="${mpxj-utilities.net45.dll}"/>
</target>
<target name="vs-nca31-dll" depends="ikvm-nca31-dll" description="Build .Net DLLs using Visual Studio" if="dotnet.available">
<delete includeemptydirs="true">
<fileset dir="${basedir}/src.net/utilities" defaultexcludes="false">
<include name="bin" />
<include name="obj" />
</fileset>
</delete>
<exec executable="dotnet" dir="${basedir}" failonerror="true">
<arg line="build src.net/utilities/MpxjUtilities.nca31.csproj" />
</exec>
<copy file="src.net/utilities/bin/Debug/netcoreapp3.1/MpxjUtilities.dll" tofile="${mpxj-utilities.nca31.dll}"/>
</target>
<target name="archive" depends="maven-install,ikvm-nca31-dll,vs-nca31-dll,ikvm-net45-dll,vs-net45-dll,gem-source,changelog,releasenotes" description="Create library files"/>
<target name="distribute" depends="archive,dotnet-clean,nuget-package" description="Create distribution">
<zip zipfile="${distribution}">
<zipfileset dir="${basedir}" prefix="mpxj" excludes="target/**, dist/**" />
</zip>
</target>
<target name="dist-clean" depends="init" description="Clean up distribution folder">
<delete dir="${dist.dir}" />
</target>
<target name="temp-clean" depends="init" description="Clean up temporary files">
<delete>
<fileset dir="${basedir}" includes="**/*~" defaultexcludes="no" />
</delete>
</target>
<target name="dotnet-clean" depends="ikvm-init" description="Clean up .Net build files">
<delete includeemptydirs="true">
<fileset dir="${basedir}/src.net" defaultexcludes="false">
<include name="**/bin/**" />
<include name="**/obj/**" />
<include name="**/.vs/**" />
<include name="**/*.suo" />
<include name="**/*.user" />
</fileset>
</delete>
<delete dir="${ikvm.working.dir}" />
</target>
<target name="gem-clean" depends="init" description="Clean up Ruby files">
<delete dir="${basedir}/src.ruby/mpxj/doc" />
<delete dir="${basedir}/src.ruby/mpxj/legal" />
<delete dir="${basedir}/src.ruby/mpxj/pkg" />
<delete dir="${basedir}/src.ruby/mpxj/Gemfile.lock" />
<delete includeemptydirs="true">
<fileset dir="${basedir}/src.ruby/mpxj" defaultexcludes="false">
<include name="**/*.jar" />
</fileset>
</delete>
</target>
<target name="python-clean" depends="init" description="Clean up python files">
<delete dir="${basedir}/src.python/mpxj/build" />
<delete dir="${basedir}/src.python/mpxj/dist" />
<delete dir="${basedir}/src.python/mpxj/mpxj.egg-info" />
<delete dir="${basedir}/src.python/mpxj/legal" />
<delete dir="${basedir}/src.python/mpxj/mpxj/lib" />
<mkdir dir="${basedir}/src.python/mpxj/mpxj/lib" />
</target>
<target name="clean" depends="init, temp-clean, dotnet-clean, gem-clean, python-clean, maven-clean" description="Clean up all files">
<delete file="${basedir}/mpxj.jar" />
<delete file="${basedir}/mpxj-test.jar" />
<delete>
<fileset dir="${basedir}/src.net/lib">
<include name="**/*.tlb"/>
<include name="**/*.bat"/>
<include name="**/*.dll"/>
<exclude name="**/ikvm-native*.dll"/>
<exclude name="**/IKVM.*.dll"/>
</fileset>
</delete>
<delete>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</delete>
</target>
<target name="maven-clean" depends="init" description="Cleans the maven directory">
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="clean" />
</exec>
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">
<arg line="-f ${basedir}/pom.tests.xml clean" />
</exec>
</target>
<!-- Ensure mkdocs-material is installed: py -m pip install - -upgrade mkdocs-material -->
<target name="site-build" depends="changelog, mkdocs-site-build, maven-site-build, readme-build" description="Produce site content"/>
<target name="mkdocs-site-build" depends="init" description="Execute mkdocs to produce site content">
<property name="docs.dir" value="${basedir}/docs" />
<copy file="${basedir}/CHANGELOG.md" tofile="${basedir}/mkdocs/docs/CHANGELOG.md"/>
<exec executable="${python.cmd}" dir="${basedir}/mkdocs" failonerror="true">
<arg line="-m mkdocs build -d ${docs.dir}" />
</exec>
<delete file="${basedir}/docs/sitemap.xml" />
<delete file="${basedir}/docs/sitemap.xml.gz" />
<echo file="${docs.dir}/CNAME" append="false">www.mpxj.org</echo>
</target>
<target name="maven-site-build" depends="init" description="Execute maven to produce site content">
<exec executable="${maven.cmd}" dir="${basedir}" failonerror="true">