forked from orbeon/orbeon-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1217 lines (1073 loc) · 58.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
<!--
Copyright (C) 2004-2014 Orbeon, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU Lesser General Public License as published by the Free Software Foundation; either version
2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
-->
<project name="orbeon" default="orbeon-war" basedir="." xmlns:xdb="http://exist-db.org/ant">
<property file="build-local.properties"/>
<property name="project.name" value="orbeon"/>
<!-- set global build.root to be dir containing this file. -->
<dirname property="build.root" file="${ant.file}"/>
<property name="build.dir" location="build"/>
<property name="war.dir" value="${build.dir}/${project.name}-war"/>
<property name="war.inf" value="${war.dir}/WEB-INF"/>
<property name="war.classes" value="${war.inf}/classes"/>
<property name="war.lib" value="${war.inf}/lib"/>
<property name="rsync.dir" value="${build.dir}/rsync"/>
<property name="src.dir" location="src"/>
<property name="saxon.jar" value="saxon-9-1-0-8_orbeon_20131113.jar"/>
<property name="catalina.home" value=""/>
<!-- Expose environment variables -->
<property environment="env"/>
<!-- Scala tasks -->
<!-- http://www.scala-lang.org/node/98 -->
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<pathelement location="lib/scala-compiler-2.10.3.jar"/>
<pathelement location="lib/scala-library-2.10.3.jar"/>
<pathelement location="lib/scala-reflect-2.10.3.jar"/>
</classpath>
</taskdef>
<!-- JUnit tasks -->
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath>
<pathelement location="lib/junit-4.11-SNAPSHOT.jar"/>
<pathelement location="lib/ant-junit-1.7.1.jar"/>
</classpath>
</taskdef>
<!-- Ant task for the YUI Compressor -->
<!-- http://code.google.com/p/javaflight-code/wiki/YuiCompressorAntTask -->
<taskdef name="yui-compressor" classname="net.noha.tools.ant.yuicompressor.tasks.YuiCompressorTask">
<classpath>
<pathelement location="lib/yui-compressor-ant-task-0.5.jar"/>
<pathelement location="lib/jargs-1.0.jar"/>
<pathelement location="lib/yuicompressor-2.4.7.jar"/>
</classpath>
</taskdef>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask">
<classpath>
<pathelement location="lib/jarjar-1.3.jar"/>
</classpath>
</taskdef>
<!-- ant-contrib, for tasks like <if> -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<taskdef resource="proguard/ant/task.properties"
classpath="lib/proguard-5.0.beta2.jar"/>
<fileset id="war.libs" dir="lib">
<include name="orbeon-errorified-20130923.jar"/>
<!-- These JARs are checked in. They can be rebuilt with the jarjar target -->
<include name="xerces-2.11-orbeon.jar"/>
<include name="msv-20081113-orbeon.jar"/>
<include name="dom4j-1_6_1.jar"/>
<include name="slf4j-api-1.7.7.jar"/>
<include name="slf4j-log4j12-1.7.7.jar"/>
<include name="jcl-over-slf4j-1.7.7.jar"/>
<include name="log4j-1.2.17.jar"/>
<include name="jaxen-1_1_beta_9.jar"/>
<include name="saxpath-dev_orbeon.jar"/>
<include name="commons-beanutils-1_5.jar"/>
<include name="commons-cli-1_0.jar"/>
<include name="commons-codec-1.6.jar"/>
<include name="commons-collections-3.2.1.jar"/>
<include name="commons-digester-1_5.jar"/>
<include name="commons-discovery-0.4.jar"/>
<include name="commons-fileupload-1.2.2.jar"/>
<include name="commons-io-2.0.1.jar"/>
<include name="commons-lang3-3.1.jar"/>
<include name="commons-pool-1.6.jar"/>
<include name="commons-validator-1.4.0.jar"/>
<include name="joda-time-2.1.jar"/> <!--We don't include joda-convert-1.2.jar; it is only a compile-time dependency for Scala -->
<include name="httpclient-4.3.5.jar"/>
<!--<include name="httpclient-cache-4.1.jar"/>-->
<include name="httpcore-4.3.2.jar"/>
<include name="httpmime-4.3.5.jar"/>
<include name="apache-mime4j-0.6.jar"/>
<include name="jcifs-1.3.14.jar"/>
<include name="axis_1_2_1-axis.jar"/>
<include name="axis_1_2_1-jaxrpc.jar"/>
<include name="axis_1_2_1-saaj.jar"/>
<include name="axis_1_2_1-wsdl4j-1.5.1.jar"/>
<include name="jfreechart-1.0.9.jar"/>
<include name="jfreechart-dependency-jcommon-1.0.12.jar"/>
<include name="activation-1.1.1.jar"/>
<include name="jtidy-8.0-20060801.131059-3.jar"/>
<include name="tagsoup-1.2.jar"/>
<include name="${saxon.jar}"/>
<include name="batik-all-1_7.jar"/>
<include name="batic-dependency-xmlgraphics-commons-1.4.jar"/>
<include name="avalon-framework-4_2_0.jar"/>
<include name="fop-1_0.jar"/>
<include name="jakarta-poi*"/>
<include name="metadata-extractor-2.7.0.SNAPSHOT.jar"/>
<include name="metadata-extractor-dependency-xmpcore-5.1.2.jar"/>
<include name="castor-0_9_4_3-xml.jar"/>
<include name="exist-1_4_1_dev_orbeon_20110104.jar"/>
<include name="exist-optional-1_4_1_dev_orbeon_20110104.jar"/>
<include name="exist-modules-1_4_1_dev_orbeon_20110104.jar"/>
<include name="exist-ngram-module-1_4_1_dev_orbeon_20110104.jar"/>
<include name="exist-lucene-module-1_4_1_dev_orbeon_20110104.jar"/>
<include name="exist-dependency-antlr-2.7.7.jar"/>
<include name="exist-dependency-jgroups-all-2.2.6.jar"/>
<include name="exist-dependency-jta-1.1.jar"/>
<include name="exist-dependency-quartz-1.6.6.jar"/>
<include name="exist-dependency-stax-api-1.0.1.jar"/>
<include name="exist-dependency-ws-commons-util-1.0.2.jar"/>
<include name="exist-dependency-xmldb.jar"/>
<include name="exist-dependency-xmlrpc-client-3.1.2.jar"/>
<include name="exist-dependency-xmlrpc-common-3.1.2.jar"/>
<include name="exist-dependency-xmlrpc-server-3.1.2.jar"/>
<include name="exist-dependency-lucene-core-2.9.2.jar"/>
<include name="exist-dependency-lucene-regex-2.9.2.jar"/>
<include name="exist-dependency-resolver-1.2.jar"/>
<include name="ehcache-core-2.6.3.jar"/>
<include name="scala-library-2.10.3.jar"/>
<include name="sbinary_2.10-0.4.1.jar"/>
<include name="rhino-1.7R2.jar"/>
<include name="flying-saucer-core-9.0.2-20140523.jar"/>
<include name="flying-saucer-pdf-9.0.2-20140523.jar"/>
<include name="flying-saucer-dependency-itext-2.1.7.jar"/>
<include name="itext-bcmail-jdk14-138.jar"/>
<include name="itext-bcprov-jdk14-138.jar"/>
<include name="barcode4j-1.0.jar"/>
<include name="simplecaptcha-1.2.1.jar"/>
<include name="jms-api-1_1.jar"/>
<include name="mail-1_3_2.jar"/>
<include name="pdfbox-0_7_1.jar"/>
<!-- For directory scanner and SSH support -->
<include name="ant-1_6_5.jar"/>
<!-- For SSH support (currently in oxf:file processor) -->
<include name="ant-jsch-1_6_5.jar"/>
<include name="jsch-0.1.42.jar"/>
<!-- For the XQuery Processor -->
<include name="xqjapi.jar"/>
<include name="xqj2-0.0.1.jar"/>
<include name="exist-xqj-1.0.1.jar"/>
<!-- JSON -->
<include name="parboiled-core-1.1.4.jar"/>
<include name="parboiled-scala_2.10-1.1.4.jar"/>
<include name="spray-json_2.10-1.2.3.jar"/>
</fileset>
<target name="init">
<tstamp/>
<!--
Past version numbers:
dev-3.7.1 => released dev version
dev-post-3.7.1 => post-release nightly build
Future version numbers:
3.9.0.pre => version leading to 3.9.0
3.9.0.beta => beta for 3.9.0
3.9.0.rc1 => release candidate 1 for 3.9.0
3.9.0 => final 3.9.0
3.9.0.post => post 3.9.0
3.9.0+ => post 3.9.0
3.9.0+.acme => post 3.9.0 build for organization "acme"
3.9.0+.stable => post 3.9.0 stable branch, before a 3.9.1 maintenance release
3.9.1 => 3.9.1 maintenance release
Full version number includes a timestamp, e.g.:
3.9.0.201105152046
Suffix CE or PE is separate from the version number.
-->
<property name="version.number" value="4.9.0.pre"/>
<property name="edition" value="CE"/>
<property name="version.suffix" value=""/>
<tstamp>
<format property="time" pattern="yyyyMMddHHmm" timezone="GMT"/>
</tstamp>
<property name="release.number" value="${version.number}.${time}${version.suffix}"/>
<property name="versioned-name" value="${project.name}-${release.number}-${edition}"/>
<property name="unversioned-name" value="${project.name}-${edition}"/>
<property name="versioned-proxy-portlet-name" value="${project.name}-${release.number}-proxy-portlet"/>
<property name="unversioned-proxy-portlet-name" value="${project.name}-proxy-portlet"/>
<!-- User-friendly message -->
<echo message="Building Orbeon Forms ${release.number}"/>
<echo message="Using Ant ${ant.version}"/>
<!-- Provide custom version number to TeamCity -->
<!-- http://confluence.jetbrains.com/display/TCD4/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingBuildNumber-->
<propertyregex property="teamcity.release.number" input="${release.number}" regexp="\." replace="_"/>
<echo message="##teamcity[buildNumber '${teamcity.release.number}']"/>
<property name="examples-cli-src.dir" value="${src.dir}/examples-cli"/>
<property name="resources.dir" value="${src.dir}/resources"/>
<property name="resources-packaged.dir" value="${src.dir}/resources-packaged"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.test-classes.dir" value="${build.dir}/test-classes"/>
<property name="build.lib.dir" value="${build.dir}/lib"/>
<property name="build.distrib.dir" value="${build.dir}/distrib"/>
<property name="build.temp.dir" value="${build.dir}/temp"/>
<property name="build.doc.dir" value="${build.dir}/doc"/>
<property name="test.exist-db.dir" location="${src.dir}/resources-packaged/ops/unit-tests/exist-data"/>
<property name="jar.file" value="${build.lib.dir}/${project.name}.jar"/>
<property name="xforms-filter.jar.file" value="${build.lib.dir}/${project.name}-xforms-filter.jar"/>
<property name="cli.jar.file" value="${build.lib.dir}/${project.name}-cli.jar"/>
<property name="resources-private.jar.file" value="${build.lib.dir}/${project.name}-resources-private.jar"/>
<property name="resources-public.jar.file" value="${build.lib.dir}/${project.name}-resources-public.jar"/>
<property name="form-runner.jar.file" value="${build.lib.dir}/${project.name}-form-runner.jar"/>
<property name="form-builder.jar.file" value="${build.lib.dir}/${project.name}-form-builder.jar"/>
<property name="build.compiler" value="modern"/>
<property name="build.compiler.pedantic" value="false"/>
<property name="build.compiler.fulldepend" value="true"/>
<property name="build.debug" value="on"/>
</target>
<target name="clean" depends="init" description="Remove all generated files">
<delete dir="${build.dir}"/>
</target>
<!-- Create build dir and web application dir -->
<target name="prepare" depends="init">
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${build.lib.dir}"/>
</target>
<target name="jarjar" depends="prepare">
<!-- Xerces fat JAR -->
<jarjar jarfile="lib/xerces-2.11-orbeon.jar">
<zipfileset src="lib/src/xerces-resolver-2.11.jar">
<!-- Don't expose any services -->
<exclude name="META-INF/services/**"/>
</zipfileset>
<zipfileset src="lib/src/xerces-resolver-2.11.jar">
<!-- Don't expose any services -->
<exclude name="META-INF/services/**"/>
</zipfileset>
<zipfileset src="lib/src/xerces-xercesImpl-2.11.jar">
<!-- Don't expose any services -->
<exclude name="META-INF/services/**"/>
</zipfileset>
<rule pattern="org.apache.**" result="orbeon.apache.@1"/>
</jarjar>
<!-- MSV fat JAR -->
<jarjar jarfile="lib/msv-20081113-orbeon.jar">
<zipfileset src="lib/src/msv-20081113_orbeon_20081209.jar"/>
<zipfileset src="lib/src/msv-isorelax-20070407.jar"/>
<zipfileset src="lib/src/msv-relaxngDatatype-20070407.jar"/>
<zipfileset src="lib/src/msv-xsdlib-20070407_orbeon_20120712.jar"/>
<rule pattern="com.sun.msv.**" result="org.orbeon.msv.@1"/>
<rule pattern="com.sun.xml.**" result="org.orbeon.msv.xml.@1"/>
<rule pattern="org.iso_relax.**" result="org.orbeon.msv.iso_relax.@1"/>
<rule pattern="jp.gr.xml.relax.**" result="org.orbeon.msv.gr.xml.relax.@1"/>
<rule pattern="org.relaxng.datatype.**" result="org.orbeon.msv.relaxng.datatype.@1"/>
</jarjar>
</target>
<!-- Set classpath to compile and run the application -->
<target name="classpath" depends="prepare">
<path id="class.path">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<if>
<isset property="skip.compilation"/>
<then>
<property name="compiled.classes" value="build/orbeon-war/WEB-INF/classes"/>
</then>
<else>
<property name="compiled.classes" value="build/classes"/>
</else>
</if>
</target>
<target name="test-classpath" depends="classpath">
<path id="test.class.path">
<pathelement location="${build.classes.dir}"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
</target>
<!-- Perform string replacement in Version.scala to set version and edition -->
<target name="set-version" depends="init">
<mkdir dir="${build.dir}/src"/>
<copy todir="${build.dir}/src" file="src/main/scala/org/orbeon/oxf/common/Version.scala" overwrite="true" encoding="UTF-8">
<filterset>
<filter token="RELEASE" value="${release.number}"/>
<filter token="EDITION" value="${edition}"/>
</filterset>
</copy>
</target>
<!-- A task we use only from IntelliJ before running tests that sets the version in place in Version.scala.
The task is executed automatically by IntelliJ, which saves us from having to edit that file by hand. -->
<target name="intellij-before-make" depends="set-version">
<mkdir dir="test/src/config"/>
<copy file="build/src/Version.scala" tofile="src/main/scala/org/orbeon/oxf/common/Version.scala" overwrite="true"/>
</target>
<!-- Compile source -->
<target name="classes" depends="set-version, classpath" unless="skip.compilation">
<scalac destdir="${build.classes.dir}"
classpathref="class.path"
fork="true" encoding="utf-8" jvmargs="-Xmx700m"
addparams="-feature -language:postfixOps -language:reflectiveCalls -language:implicitConversions -language:higherKinds -language:existentials" deprecation="no">
<src path="${build.dir}/src"/> <!-- Location of the copy of Version.scala with the release/edition set -->
<src path="src/main/java"/>
<src path="src/main/scala"/>
<!-- Scala code bundled with XBL components -->
<!-- NOTE: Ideally we'd like to use a pattern instead of multiple lines, but src doesn't support patterns, and scalac doesn't support fileset child elements, only include/exclude -->
<src path="src/resources-packaged/xbl/orbeon/simple-captcha/src/scala"/>
<exclude name="org/orbeon/oxf/common/Version.scala"/>
</scalac>
<javac destdir="${build.classes.dir}"
classpathref="class.path"
debug="${build.debug}" optimize="off" target="1.5" source="1.5"
fork="true" memoryInitialSize="128m" memoryMaximumSize="400m" encoding="utf-8">
<src path="${build.dir}/src"/>
<src path="src/main/java"/>
<exclude name="org/orbeon/oxf/common/Version.java"/>
<exclude name="org/orbeon/oxf/xforms/analysis/PathMapUIDependencies.java"/>
</javac>
</target>
<!-- Compile test source -->
<target name="test-classes" depends="classes, test-classpath" unless="skip.compilation">
<mkdir dir="${build.test-classes.dir}"/>
<scalac destdir="${build.test-classes.dir}"
classpathref="test.class.path"
fork="true" encoding="utf-8" jvmargs="-Xmx700m"
addparams="-feature -language:postfixOps -language:reflectiveCalls -language:implicitConversions -language:higherKinds -language:existentials" deprecation="no">
<src path="src/test/scala"/>
<src path="src/test/java"/>
</scalac>
<javac srcdir="src/test/java" destdir="${build.test-classes.dir}"
classpathref="test.class.path" debug="on" optimize="off" target="1.5" source="1.5"
includes="**/*.java" encoding="utf-8">
</javac>
</target>
<target name="embedding-jar" depends="classes">
<local name="temp.jar"/>
<tempfile property="temp.jar" suffix=".jar" destdir="${build.temp.dir}" deleteonexit="true"/>
<proguard>
-verbose
-dontobfuscate
-dontnote
-dontwarn
-ignorewarnings
-forceprocessing
-injars ${compiled.classes}
-injars lib/commons-io-2.0.1.jar
-injars lib/commons-lang3-3.1.jar
-injars lib/commons-codec-1.6.jar
-injars lib/scala-library-2.10.3.jar
-injars lib/orbeon-errorified-20130923.jar
-injars lib/httpclient-4.3.5.jar
-injars lib/httpclient-cache-4.3.5.jar
-injars lib/httpcore-4.3.2.jar
-injars lib/httpmime-4.3.5.jar
-injars lib/jcl-over-slf4j-1.7.7.jar
-outjars ${temp.jar}(!apps/**,!forms/**,!config/**,!oxf/**,!templates/**,!META-INF/**,!xbl/**,!ops/**,!**.gif,!**.png,!**.jpg,!**.css,!**.html,!*.properties,!*.xml,!*.txt)
<!-- -outjars build/lib/check-resources.jar -->
-libraryjars ${java.home}/lib/rt.jar
-libraryjars lib/servlet-2_3-4_0_4.jar
-libraryjars lib/slf4j-api-1.7.7.jar
<!-- Seeds: servlet filter and the public API -->
-keep public class org.orbeon.oxf.fr.embedding.servlet.ServletFilter
-keep public class org.orbeon.oxf.fr.embedding.servlet.API {
public static *;
}
<!-- For HttpClient -->
-keep public class org.apache.commons.logging.impl.LogFactoryImpl {
public *;
}
-keep public class org.apache.commons.logging.impl.Jdk14Logger {
public *;
}
</proguard>
<jarjar jarfile="build/lib/orbeon-embedding.jar">
<zipfileset src="${temp.jar}"/>
<rule pattern="org.orbeon.oxf.fr.embedding.servlet.ServletFilter*" result="org.orbeon.oxf.fr.embedding.servlet.ServletFilter@1"/>
<rule pattern="org.orbeon.oxf.fr.embedding.servlet.API*" result="org.orbeon.oxf.fr.embedding.servlet.API@1"/>
<rule pattern="org.orbeon.**" result="org.orbeon.private.orbeon.@1"/>
<rule pattern="org.apache.**" result="org.orbeon.private.apache.@1"/>
<rule pattern="scala.**" result="org.orbeon.private.scala.@1"/>
</jarjar>
<delete file="${temp.jar}"/>
</target>
<target name="proxy-portlet-jar" depends="classes">
<local name="temp.jar"/>
<tempfile property="temp.jar" suffix=".jar" destdir="${build.temp.dir}" deleteonexit="true"/>
<proguard>
-verbose
-dontobfuscate
-dontnote
-dontwarn
-ignorewarnings
-forceprocessing
-injars ${compiled.classes}
-injars lib/commons-io-2.0.1.jar
-injars lib/commons-lang3-3.1.jar
-injars lib/commons-codec-1.6.jar
-injars lib/scala-library-2.10.3.jar
-injars lib/orbeon-errorified-20130923.jar
-injars lib/httpclient-4.3.5.jar
-injars lib/httpclient-cache-4.3.5.jar
-injars lib/httpcore-4.3.2.jar
-injars lib/httpmime-4.3.5.jar
-injars lib/jcl-over-slf4j-1.7.7.jar
-outjars ${temp.jar}(!apps/**,!forms/**,!config/**,!oxf/**,!templates/**,!META-INF/**,!xbl/**,!ops/**,!**.gif,!**.png,!**.jpg,!**.css,!**.html,!*.properties,!*.xml,!*.txt)
-libraryjars ${java.home}/lib/rt.jar
-libraryjars lib/servlet-2_3-4_0_4.jar
-libraryjars lib/portlet-api_2.0.jar
-libraryjars lib/slf4j-api-1.7.7.jar
<!-- Seeds: servlet filter and the public API -->
-keep public class org.orbeon.oxf.portlet.OrbeonProxyPortlet
<!-- For HttpClient -->
-keep public class org.apache.commons.logging.impl.LogFactoryImpl {
public *;
}
-keep public class org.apache.commons.logging.impl.Jdk14Logger {
public *;
}
</proguard>
<jarjar jarfile="build/lib/orbeon-proxy-portlet.jar">
<zipfileset src="${temp.jar}"/>
<rule pattern="org.orbeon.oxf.portlet.OrbeonProxyPortlet*" result="org.orbeon.oxf.portlet.OrbeonProxyPortlet@1"/>
<rule pattern="org.orbeon.**" result="org.orbeon.private.orbeon.@1"/>
<rule pattern="org.apache.**" result="org.orbeon.private.apache.@1"/>
<rule pattern="scala.**" result="org.orbeon.private.scala.@1"/>
</jarjar>
<delete file="${temp.jar}"/>
</target>
<target name="xforms-filter-jar" depends="classes">
<local name="temp.jar"/>
<tempfile property="temp.jar" suffix=".jar" destdir="${build.temp.dir}" deleteonexit="true"/>
<proguard>
-verbose
-dontobfuscate
-dontnote
-dontwarn
-ignorewarnings
-forceprocessing
-injars ${compiled.classes}
-injars lib/commons-io-2.0.1.jar
-injars lib/commons-lang3-3.1.jar
-injars lib/scala-library-2.10.3.jar
-injars lib/orbeon-errorified-20130923.jar
-outjars ${temp.jar}(!apps/**,!forms/**,!config/**,!oxf/**,!templates/**,!META-INF/**,!xbl/**,!ops/**,!**.gif,!**.png,!**.jpg,!**.css,!**.html,!*.properties,!*.xml,!*.txt)
-libraryjars ${java.home}/lib/rt.jar
-libraryjars lib/servlet-2_3-4_0_4.jar
-keep public class org.orbeon.oxf.servlet.OrbeonXFormsFilter {
public static *;
}
</proguard>
<jarjar jarfile="${xforms-filter.jar.file}">
<zipfileset src="${temp.jar}"/>
<rule pattern="org.orbeon.oxf.servlet.OrbeonXFormsFilter*" result="org.orbeon.oxf.servlet.OrbeonXFormsFilter@1"/>
<rule pattern="org.orbeon.**" result="org.orbeon.private.orbeon.@1"/>
<rule pattern="org.apache.**" result="org.orbeon.private.apache.@1"/>
<rule pattern="scala.**" result="org.orbeon.private.scala.@1"/>
</jarjar>
<delete file="${temp.jar}"/>
</target>
<!-- JARs -->
<target name="jars" depends="classes, orbeon-minify-js, embedding-jar, xforms-filter-jar">
<jar destfile="${jar.file}" compress="false">
<fileset dir="src/main/resources">
<include name="**/*.xml"/>
<include name="**/*.rng"/>
<include name="**/*.css"/>
<include name="**/*.xsd"/>
<include name="**/*.properties"/>
<include name="**/*.js"/>
</fileset>
<fileset dir="${build.classes.dir}">
<include name="**/*.class"/>
<include name="**/*.xsd"/>
<!-- These all go into separate JARs -->
<exclude name="org/orbeon/oxf/servlet/OrbeonXFormsFilter*.class"/>
<exclude name="org/orbeon/oxf/portlet/OrbeonProxyPortlet*.class"/>
<exclude name="org/orbeon/oxf/fr/embedding/servlet/ServletFilter*.class"/>
<exclude name="org/orbeon/oxf/fr/embedding/servlet/API*.class"/>
</fileset>
<fileset dir="${resources-packaged.dir}">
<include name="config/*-processors.xml"/>
<include name="*.xml"/>
</fileset>
</jar>
<property name="cli.jar.lib.dir" location="lib"/>
<pathconvert dirsep="/" pathsep=" " property="cli.jar.mf.cp" refid="war.libs">
<map from="${cli.jar.lib.dir}" to="lib"/>
</pathconvert>
<basename file="${jar.file}" property="jar.name"/>
<jar destfile="${cli.jar.file}" compress="false" >
<manifest>
<attribute name="Main-Class" value="org.orbeon.oxf.main.OPS"/>
<attribute name="Class-Path" value="lib/${jar.name} lib/${project.name}-xforms-filter.jar lib/${project.name}-resources-private.jar commons-cli-1_0.jar ${cli.jar.mf.cp}"/>
</manifest>
</jar>
<!-- Build private resources JAR -->
<jar destfile="${resources-private.jar.file}" compress="false">
<fileset dir="${resources-packaged.dir}">
<include name="xbl/**/*.xbl"/>
<include name="xbl/**/*.xsl"/>
<include name="xbl/**/*.xml"/>
<include name="ops/**"/>
<exclude name="ops/unit-tests"/>
<exclude name="ops/unit-tests/**"/>
<exclude name="ops/**/*.css"/>
<exclude name="ops/**/*.js"/>
<exclude name="ops/**/*.gif"/>
<exclude name="ops/**/*.png"/>
<exclude name="ops/**/*.ico"/>
<exclude name="ops/**/*.jpg"/>
<exclude name="ops/**/*.html"/>
<exclude name="ops/**/*.htm"/>
<exclude name="ops/**/*.htc"/>
<include name="oxf/**"/>
<include name="config/**"/>
<exclude name="config/theme"/>
<exclude name="config/theme/**"/>
<!-- We keep these in orbeon.jar -->
<exclude name="config/*-processors.xml"/>
</fileset>
</jar>
<!-- Build public resources JAR -->
<jar destfile="${resources-public.jar.file}" compress="false">
<fileset dir="${resources-packaged.dir}">
<include name="xbl/**/*.css"/>
<include name="xbl/**/*.js"/>
<include name="xbl/**/*.gif"/>
<include name="xbl/**/*.png"/>
<include name="xbl/**/*.jpg"/>
<include name="xbl/**/*.html"/>
<include name="xbl/**/*.htm"/>
<include name="xbl/**/*.xhtml"/>
<include name="xbl/**/*.htc"/>
<include name="ops/**/*.css"/>
<include name="ops/**/*.js"/>
<include name="ops/**/*.gif"/>
<include name="ops/**/*.png"/>
<include name="ops/**/*.ico"/>
<include name="ops/**/*.jpg"/>
<include name="ops/**/*.html"/>
<include name="ops/**/*.htm"/>
<include name="ops/**/*.htc"/>
<include name="config/theme/**/*.*"/>
</fileset>
<zipfileset dir="${war.dir}/WEB-INF/resources">
<include name="**/*.js"/>
<exclude name="apps/fr/style/bootstrap-src/**/*.*"/>
</zipfileset>
</jar>
<!-- Build Form Runner JAR -->
<jar destfile="${form-runner.jar.file}" compress="false">
<fileset dir="${resources.dir}">
<include name="apps/fr/**/*.*"/>
<exclude name="apps/fr/persistence/oracle/**/*.*"/>
<exclude name="apps/fr/persistence/db2/**/*.*"/>
<exclude name="apps/fr/alfresco/**/*.*"/>
<exclude name="apps/fr/print/print-pdf-template.xpl"/>
<exclude name="apps/fr/style/bootstrap-src/**/*.*"/>
</fileset>
</jar>
<!-- Build Form Builder JAR -->
<jar destfile="${form-builder.jar.file}" compress="false">
<fileset dir="${resources.dir}">
<include name="forms/orbeon/builder/**/*.*"/>
</fileset>
</jar>
</target>
<!-- WAR -->
<target name="war" depends="jars">
<echo message="war.dir: ${war.dir}"/>
<copy todir="${war.lib}">
<fileset refid="war.libs"/>
</copy>
<!-- Make sure we remove PathMap from Saxon as we have our own implementation -->
<delete file="${war.lib}/${saxon.jar}"/>
<jar destfile="${war.lib}/${saxon.jar}">
<zipfileset src="lib/${saxon.jar}" excludes="org/orbeon/saxon/expr/PathMap*.class"/>
</jar>
<copy file="${jar.file}" todir="${war.lib}"/>
<copy file="${xforms-filter.jar.file}" todir="${war.lib}"/>
<copy file="${resources-private.jar.file}" todir="${war.lib}"/>
<copy file="${resources-public.jar.file}" todir="${war.lib}"/>
<copy file="${form-runner.jar.file}" todir="${war.lib}"/>
<copy file="${form-builder.jar.file}" todir="${war.lib}"/>
<copy todir="${war.inf}">
<fileset dir="lib">
<include name="commons-cli-1_0.jar"/>
</fileset>
</copy>
<copy file="${cli.jar.file}" todir="${war.inf}"/>
<copy todir="${war.dir}/xforms-jsp">
<fileset dir="${src.dir}/examples-jsp">
<include name="**"/>
</fileset>
</copy>
</target>
<target name="war-copy-descriptors" depends="prepare">
<copy todir="${war.inf}">
<fileset dir="descriptors/orbeon-war"/>
</copy>
<echo message="Target: ${target}"/>
<xslt in="build.xml" style="descriptors/orbeon-war-web.xsl" out="${war.inf}/web.xml" force="true">
<param name="target" expression="${target}"/>
<param name="build-root" expression="${build.root}"/>
<param name="build-root" expression="${build.root}"/>
<param name="version" expression="${release.number} ${edition}"/>
<param name="edition" expression="${edition}"/>
</xslt>
</target>
<!-- WAR file -->
<target name="orbeon-war" depends="classes" description="Create exploded WAR">
<antcall target="war">
<param name="skip.compilation" value="true"/>
</antcall>
<antcall target="war-copy-descriptors">
<param name="skip.compilation" value="true"/>
<param name="target" value="devel"/>
<param name="build.root" value="${build.root}"/>
</antcall>
</target>
<target name="proxy-portlet-war" depends="proxy-portlet-jar" description="Create proxy portlet WAR">
<mkdir dir="${build.distrib.dir}"/>
<war destfile="${build.distrib.dir}/${versioned-proxy-portlet-name}.war">
<webinf dir="descriptors/proxy-portlet/WEB-INF"/>
<lib dir="${build.lib.dir}">
<include name="orbeon-proxy-portlet.jar"/>
</lib>
<lib dir="lib">
<include name="slf4j-api-1.7.7.jar"/>
<include name="slf4j-log4j12-1.7.7.jar"/>
<include name="log4j-1.2.17.jar"/>
</lib>
</war>
</target>
<target name="embedding-war" depends="embedding-jar" description="Create embedding WAR">
<mkdir dir="${build.distrib.dir}"/>
<war destfile="${build.distrib.dir}/${project.name}-${release.number}-embedding.war">
<webinf dir="descriptors/embedding/WEB-INF"/>
<lib dir="${build.lib.dir}">
<include name="orbeon-embedding.jar"/>
</lib>
<lib dir="lib">
<include name="slf4j-api-1.7.7.jar"/>
</lib>
<zipfileset dir="descriptors/embedding" prefix="">
<include name="*.jsp"/>
</zipfileset>
</war>
</target>
<target name="orbeon-auth-war" depends="classes" description="Creates Orbeon Forms orbeon-auth.war">
<mkdir dir="${build.distrib.dir}"/>
<war destfile="${build.distrib.dir}/orbeon-auth.war" webxml="descriptors/orbeon-auth-war/web.xml">
<zipfileset dir="${build.dir}/classes" prefix="WEB-INF/classes">
<include name="org/orbeon/oxf/controller/AuthorizerServlet*.class"/>
</zipfileset>
</war>
</target>
<!-- Zip sources file -->
<target name="orbeon-src" depends="prepare" description="Create Zip file with the sources">
<mkdir dir="${build.distrib.dir}"/>
<zip zipfile="${build.distrib.dir}/${versioned-name}-src.zip">
<zipfileset dir="${build.root}">
<exclude name="**/.git"/>
<exclude name="**/.git/**"/>
<exclude name="build"/>
<exclude name="build/**"/>
<exclude name="tools"/>
<exclude name="tools/**"/>
<!-- In case there were some temporary files left by the ProGuard tasks here -->
<exclude name="*.jar"/>
<!-- Not sure why JUnit outputs those here -->
<exclude name="junit*.properties"/>
<!-- Don't include a license with the source -->
<exclude name="**/license.xml"/>
</zipfileset>
</zip>
</target>
<target name="orbeon-minify-js" depends="init, classes">
<!-- Store those under ${war.dir}/WEB-INF/resources so they can be used in dev mode -->
<mkdir dir="${war.dir}/WEB-INF/resources/ops"/>
<mkdir dir="${build.dir}/js"/>
<!-- Ant task to compile CoffeeScript -->
<!-- Defined here (instead of the beginning of this file) as CoffeeScriptTask needs to be compiled first -->
<taskdef name="coffee-script" classname="org.orbeon.oxf.util.CoffeeScriptTask" >
<classpath>
<pathelement location="build/classes"/>
<pathelement location="build/orbeon-war/WEB-INF/classes"/><!-- where classes are when compiling from IntelliJ -->
<pathelement location="src/main/resources"/>
<pathelement location="lib/rhino-1.7R2.jar"/>
<pathelement location="lib/commons-fileupload-1.2.2.jar"/>
<pathelement location="lib/log4j-1.2.17.jar"/>
<pathelement location="lib/scala-library-2.10.3.jar"/>
<pathelement location="lib/orbeon-errorified-20130923.jar"/>
</classpath>
</taskdef>
<!-- Compile CoffeeScript -->
<coffee-script fromdir="${resources-packaged.dir}" todir="${build.dir}/js">
<include name="**/*.coffee"/>
</coffee-script>
<coffee-script fromdir="${resources.dir}" todir="${build.dir}/js">
<include name="**/*.coffee"/>
</coffee-script>
<!-- Copy non-minimized CoffeeScript resources -->
<copy todir="${war.dir}/WEB-INF/resources">
<fileset dir="${build.dir}/js">
<include name="**/*.js"/>
</fileset>
</copy>
<!-- Minimize compiled CoffeeScript -->
<yui-compressor warn="false" charset="UTF-8" fromdir="${build.dir}/js" todir="${war.dir}/WEB-INF/resources">
<include name="**/*.js"/>
</yui-compressor>
<!-- Minimize JavaScript-->
<yui-compressor warn="false" charset="UTF-8" fromdir="${resources-packaged.dir}/ops" todir="${war.dir}/WEB-INF/resources/ops">
<!-- Orbeon JavaScript code -->
<include name="javascript/xforms.js"/>
<include name="javascript/orbeon/**/*.js"/>
<!-- YUI file we changed -->
<include name="yui/button/button.js"/>
<include name="yui/container/container.js"/>
<include name="yui/connection/connection.js"/>
<include name="yui/treeview/treeview.js"/>
<include name="yui/examples/treeview/assets/js/TaskNode.js"/>
<include name="yui/examples/treeview/assets/js/CheckOnClickNode.js"/>
</yui-compressor>
</target>
<target name="test-expand-war" depends="orbeon-dist-war">
<!-- Uncompress WAR -->
<unzip src="${build.distrib.dir}/${versioned-name}.war" dest="${build.dir}/${project.name}-war-tomcat"/>
<!-- Copy test resources -->
<!-- TODO: We're mixing here the resources used by standalone tests and tests running in Tomcat -->
<mkdir dir="${build.dir}/${project.name}-war-tomcat/WEB-INF/resources/apps/unit-tests"/>
<copy todir="${build.dir}/${project.name}-war-tomcat/WEB-INF/resources">
<fileset dir="${src.dir}/test/resources/">
<include name="apps/unit-tests/**"/>
<include name="config/**"/>
</fileset>
</copy>
</target>
<target name="test" depends="test-expand-war, test-classes, test-classpath">
<property name="tomcat-version" value="6.0.36"/>
<parallel failonany="true">
<property name="oracle.driver" value="oracle.jdbc.OracleDriver"/>
<property name="oracle.jar" value="lib/oracle/ojdbc6_g.jar"/>
<property name="mysql.driver" value="com.mysql.jdbc.Driver"/>
<property name="mysql.jar" value="lib/mysql-connector-java-5.1.26-bin.jar"/>
<property name="sqlserver.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="sqlserver.jar" value="lib/sqljdbc4.jar"/>
<property name="postgresql.driver" value="org.postgresql.Driver"/>
<property name="postgresql.jar" value="lib/postgresql-9.3-1102.jdbc4.jar"/>
<!-- Run Tomcat -->
<sequential>
<if>
<not><isset property="skip.selenium"/></not>
<then>
<!-- Create schemas -->
<sql driver="${oracle.driver}" url="${env.ORACLE_URL}" userid="orbeon" password="${env.RDS_PASSWORD}" expandProperties="true">
<classpath><pathelement location="${oracle.jar}"/></classpath>
CREATE USER orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat IDENTIFIED BY ${env.RDS_PASSWORD};
ALTER USER orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat QUOTA UNLIMITED ON users;
GRANT CREATE SESSION TO orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat;
GRANT CREATE TABLE TO orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat;
GRANT CREATE TRIGGER TO orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat;
</sql>
<sql driver="${mysql.driver}" url="${env.MYSQL_URL}" userid="orbeon" password="${env.RDS_PASSWORD}" expandProperties="true">
<classpath><pathelement location="${mysql.jar}"/></classpath>
CREATE DATABASE orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat;
</sql>
<sql driver="${sqlserver.driver}" url="${env.SQLSERVER_URL}" userid="orbeon" password="${env.RDS_PASSWORD}" expandProperties="true">
<classpath><pathelement location="${sqlserver.jar}"/></classpath>
CREATE DATABASE orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat;
</sql>
<sql driver="${postgresql.driver}" url="${env.POSTGRESQL_URL}/orbeon" userid="orbeon" password="${env.RDS_PASSWORD}" expandProperties="true" autocommit="true">
<classpath><pathelement location="${postgresql.jar}"/></classpath>
CREATE DATABASE orbeon_${env.TRAVIS_BUILD_NUMBER}_tomcat;
</sql>
<!-- Uncompress Tomcat -->
<if>
<not><available file="build/apache-tomcat-${tomcat-version}"/></not>
<then><unzip src="lib/test/apache-tomcat-${tomcat-version}.zip" dest="build"/></then>
</if>
<!-- Put database driver in Tomcat's lib -->
<copy file="${mysql.jar}" todir="build/apache-tomcat-${tomcat-version}/lib"/>
<copy file="${oracle.jar}" todir="build/apache-tomcat-${tomcat-version}/lib"/>
<copy file="${sqlserver.jar}" todir="build/apache-tomcat-${tomcat-version}/lib"/>
<copy file="${postgresql.jar}" todir="build/apache-tomcat-${tomcat-version}/lib"/>
<!-- Put URL and passwords in Tomcat's server.xml -->
<replace file="test/catalina_base/conf/server.xml">
<replacefilter token="@RDS_PASSWORD@" value="${env.RDS_PASSWORD}"/>
<replacefilter token="@TRAVIS_BUILD_NUMBER@" value="${env.TRAVIS_BUILD_NUMBER}"/>
<replacefilter token="@ORACLE_URL@" value="${env.ORACLE_URL}"/>
<replacefilter token="@MYSQL_URL@" value="${env.MYSQL_URL}"/>
<replacefilter token="@SQLSERVER_URL@" value="${env.SQLSERVER_URL}"/>
<replacefilter token="@POSTGRESQL_URL@" value="${env.POSTGRESQL_URL}"/>
</replace>
<!-- Run -->
<java jar="build/apache-tomcat-${tomcat-version}/bin/bootstrap.jar" fork="true" taskname="tomcat">
<jvmarg value="-Dcatalina.home=build/apache-tomcat-${tomcat-version}"/>
<jvmarg value="-Dcatalina.base=test/catalina_base"/>
<jvmarg line="-server -verbosegc -Xms256m -Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true -XX:+PerfDisableSharedMem"/>
<jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=61155"/>
</java>
<delete dir="test/catalina_base/work"/>
</then>
</if>
</sequential>
<sequential>
<if>
<not><isset property="skip.selenium"/></not>
<then>
<!-- Wait for Tomcat to start -->
<waitfor maxwait="1" maxwaitunit="minute" checkevery="200">
<http url="http://localhost:8080/orbeon/home/"/>
</waitfor>
</then>
</if>
<delete dir="build/temp/test"/>
<mkdir dir="build/temp/test"/>
<delete dir="${test.exist-db.dir}"/>
<mkdir dir="${test.exist-db.dir}"/>
<!-- Run tests -->
<junit fork="true" printsummary="true" showoutput="yes" failureproperty="test.failed" logfailedtests="true">
<!-- Enable assertions -->
<jvmarg value="-ea"/>
<batchtest>
<fileset dir="${build.test-classes.dir}">
<include name="org/orbeon/oxf/**/*Test.class"/>
<exclude name="org/orbeon/oxf/client/CombinedClientTest*.class" if="skip.selenium"/>
<exclude name="org/orbeon/oxf/fr/persistence/**/*Test.class" if="skip.database"/>
</fileset>
</batchtest>
<!-- Configure resource manager -->
<sysproperty key="oxf.resources.factory" value="org.orbeon.oxf.resources.PriorityResourceManagerFactory"/>
<!-- 1: test/resources first, as we need to touch files and compile Java files there -->
<sysproperty key="oxf.resources.priority.1" value="org.orbeon.oxf.resources.FilesystemResourceManagerFactory"/>
<sysproperty key="oxf.resources.priority.1.oxf.resources.filesystem.sandbox-directory" value="src/test/resources"/>
<!-- 2: resources -->
<sysproperty key="oxf.resources.priority.2" value="org.orbeon.oxf.resources.FilesystemResourceManagerFactory"/>
<sysproperty key="oxf.resources.priority.2.oxf.resources.filesystem.sandbox-directory" value="${resources.dir}"/>
<!-- 3: resources-packaged -->
<sysproperty key="oxf.resources.priority.3" value="org.orbeon.oxf.resources.FilesystemResourceManagerFactory"/>
<sysproperty key="oxf.resources.priority.3.oxf.resources.filesystem.sandbox-directory" value="${resources-packaged.dir}"/>
<!-- 4: main/resources (associated with Java test files) -->
<sysproperty key="oxf.resources.priority.4" value="org.orbeon.oxf.resources.FilesystemResourceManagerFactory"/>
<sysproperty key="oxf.resources.priority.4.oxf.resources.filesystem.sandbox-directory" value="src/main/resources"/>
<!-- Classpath -->
<sysproperty key="oxf.resources.priority.5" value="org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory"/>
<!-- Other properties -->
<sysproperty key="oxf.resources.common.min-reload-interval" value="50"/>
<sysproperty key="oxf.test.config" value="oxf:/ops/unit-tests/tests.xml"/>
<sysproperty key="java.io.tmpdir" value="build/temp/test"/>
<!-- Some code uses the default time zone, which might different on different system, so we need to set it explicitly -->
<sysproperty key="user.timezone" value="America/Los_Angeles"/>
<!-- Getting a JDK error, per http://stackoverflow.com/a/13575810/5295 -->
<sysproperty key="java.util.Arrays.useLegacyMergeSort" value="true"/>
<classpath>
<path refid="test.class.path"/>
<pathelement location="${build.test-classes.dir}"/>
<pathelement location="${resources-private.jar.file}"/>
</classpath>
<formatter usefile="false" classname="org.orbeon.junit.LiveResultFormatter"/>
</junit>
<!-- Stop Tomcat -->
<if>
<not><isset property="skip.selenium"/></not>
<then>
<!-- Stop Tomcat -->
<java jar="build/apache-tomcat-${tomcat-version}/bin/bootstrap.jar" fork="true">