forked from Zimbra/zm-web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1696 lines (1483 loc) · 79.3 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
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="zm-web-client" default="war">
<import file="../zm-zcs/ant-global.xml"/>
<property name="ajax.dir" location="../zm-ajax" />
<property name="ajax.src.dir" location="${ajax.dir}/src" />
<property name="timezones.dir" location="../zm-timezones" />
<property name="timezones.build.dir" location="${timezones.dir}/build" />
<!-- Properties -->
<dirname property="this.zwc.basedir" file="${ant.file.zm-web-client}" />
<property file='${this.zwc.basedir}/build-custom.properties'/>
<property name="javac.target" value="1.8"/>
<property environment="env"/>
<property file="${this.zwc.basedir}/../ZimbraCustomerServices/${env.CUSTOMER_SKIN}/ZimbraWebClient/build-custom.properties" />
<property name="zwc.basedir" value="${this.zwc.basedir}" />
<property name="overlay.dir" value="${env.APP_OVERLAY}" />
<property name="overlay.lib.dir" value="${overlay.dir}/jars" />
<!-- default web.xml token replacements -->
<property name="webxml.zimbraAdminURL" value="/zimbraAdmin" />
<property name="webxml.zimbraMailURL" value="/" />
<property name="webxml.zimbraAdminPort" value="7071" />
<property name="webxml.zimbraMailPort" value="7070" />
<property name="webxml.zimbraMailSSLPort" value="7443" />
<property name="webxml.zimbraMailTrustedIP" value="" />
<property name="webxml.zimbraHttpDosFilterMaxRequestsPerSec" value="30" />
<property name="webxml.zimbraHttpContextPathBasedThreadPoolBalancingFilterRules" value="/service:max=10%, /soap:max=40%, /zimbra:max=40%" />
<!-- zm-taglib -->
<property name='taglib.dir' value='${this.zwc.basedir}/../zm-taglib'/>
<property name="jsdoctoolkit.version" value="2.4.0"/>
<property name="jsdoctoolkit.dir" location="${build.tmp.dir}/jsdoc_toolkit-${jsdoctoolkit.version}/jsdoc-toolkit" />
<property name="jsdoc.dir" location="${this.zwc.basedir}/jsdoc" />
<property name="jsdoc.templates.dir" location="${jsdoc.dir}/templates" />
<!-- NOTE: These dirs need to stay RELATIVE paths for overlay purposes! -->
<property name="src.dir" value="src" />
<property name='web.dir' value='WebRoot'/>
<property name='js.dir' value='${web.dir}/js'/>
<property name='jsp.dir' value='${web.dir}/public'/>
<property name='template.dir' value='${web.dir}/templates'/>
<property name='docs.dir' value='${zwc.basedir}/docs'/>
<property name='img.dir' value='${web.dir}/img'/>
<property name='webinf.dir' value='${web.dir}/WEB-INF'/>
<!-- output dirs relative to application being built -->
<property name='build.dir' value='${zwc.basedir}/build'/>
<property name='build.classes.dir' value='${build.dir}/classes'/>
<property name='build.web.dir' value='${build.dir}/WebRoot'/>
<property name='build.css.dir' value='${build.web.dir}/css'/>
<property name='build.js.dir' value='${build.web.dir}/js'/>
<property name='build.template.dir' value='${build.web.dir}/templates'/>
<property name='build.skin.dir' value='${build.web.dir}/skins'/>
<property name='build.dist.dir' value='${build.dir}/dist'/>
<property name='build.docs.dir' value='${build.dir}/docs'/>
<property name='build.jsapi-zimbra-doc.dir' value='${build.docs.dir}/jsapi-zimbra-doc'/>
<property name='build.jsapi-inventory.dir' value='${build.docs.dir}/jsapi-inventory'/>
<property name='build.jsapi-changelog.dir' value='${build.docs.dir}/jsapi-changelog'/>
<property name='jsapi-zimbra-doc.file' value='${build.docs.dir}/jsapi-zimbra-doc.zip'/>
<property name='jsapi-inventory.file' value='${build.docs.dir}/jsapi-inventory.zip'/>
<property name='jsapi-changelog.file' value='${build.docs.dir}/jsapi-changelog.zip'/>
<property name='build.img.dir' value='${build.web.dir}/img'/>
<property name="build.css.file" value="images"/>
<property name="build.css.ext" value=".css"/>
<property name="build.css.filename" value="${build.css.file}${build.css.ext}"/>
<!-- jamming properties -->
<property name="depends.ext" value='.depends'/>
<property name="license.ext" value='.license'/>
<property name='nodebug.ext' value='.nodebug'/>
<property name="jsmin.ext" value='.min'/>
<property name="compress.ext" value='.zgz'/>
<property name='compressoutput.ext' value='.out'/>
<property name='compresserror.ext' value='.err'/>
<!-- THIRDPARTY INTEGRATION -->
<property name="3rdparty.dir" value="${build.js.dir}/ajax/3rdparty" />
<property name="modernizr.version" value="2.8.3"/>
<property name="jquery.version" value="3.5.1"/>
<property name="yui.version" value="2.9.0-alfresco-20140211"/>
<!-- TINY_MCE INTEGRATION -->
<property name="tinymce.version" value="4.9.11"/>
<property name='tinymce.dir' value='${3rdparty.dir}/tinymce'/>
<property name='tinymce.root.dir' value='tiny_mce' />
<property name='tinymce.js.dir' value='${tinymce.root.dir}/tinymce-${tinymce.version}/js/tinymce' />
<property name="tinymce.custom.dir" value="tiny_mce/custom"/>
<!-- Accepting version from variables -->
<property name="wclient.ext.patch.revision" value="1" />
<property name="wclient.ext.patch.version"
value="${zimbra.buildinfo.majorversion}.${zimbra.buildinfo.minorversion}.${zimbra.buildinfo.microversion}"/>
<!-- Paths and Filesets -->
<!-- pseudo-fileset so that targets that rely on it don't fail -->
<fileset id='customer.web.fileset' dir='${build.dir}' excludes='**'/>
<fileset id='customer.img.fileset' dir='${build.dir}' excludes='**' />
<fileset id='customer.skins.img.fileset' dir='${build.dir}' excludes='**' />
<fileset id='customer.webinf.fileset' dir='${build.dir}' excludes='**'/>
<fileset id='customer.package.fileset' dir='${build.dir}' excludes='**' />
<fileset id='customer.jsp.fileset' dir='${build.dir}' excludes='**' />
<!-- Targets -->
<target name='common'>
<condition property='build.network'>
<equals arg1="${zimbra.buildinfo.type}" arg2="NETWORK" />
</condition>
<property name='common.web.includes' value='${custom.web.includes},js/**,css/**'/>
<property name='common.web.excludes' value='${custom.web.excludes},js/*/package/**'/>
<property name='common.jsp.includes' value='${custom.jsp.includes},**'/>
<property name='common.jsp.excludes' value='${custom.jsp.excludes}'/>
<property name='common.img.includes' value='${custom.img.includes},**'/>
<property name='common.img.excludes' value='${custom.img.excludes},_*/**,**/_*,**/apple-touch-icon.png'/>
<property name='common.template.includes' value='${custom.template.includes},**/*.template'/>
<property name='common.template.excludes' value='${custom.template.excludes}'/>
<property name='common.jam.includes' value='${custom.jam.includes},**/package/*.js'/>
<property name='common.jam.excludes' value='${custom.jam.excludes},'/>
<property name='common.build.web.includes' value='${custom.build.web.includes},**'/>
<property name='common.build.web.excludes'
value='${custom.build.web.excludes},js/*${depends.ext},js/*${nodebug.ext},js/*${jsmin.ext},js/*${license.ext},js/*${compressoutput.ext}'/>
<property name='common.webinf.includes' value='${custom.webinf.includes},**'/>
<property name='common.webinf.excludes' value='${custom.webinf.excludes},web.*,lib/**'/>
</target>
<target name='client' depends='common'>
<property name='deploy.app' value='zimbra'/>
<property name='skins.dir' value='${web.dir}/skins'/>
<property name='web.includes' value='${common.web.includes},h/**,portals/**,sounds/**,test/**,yui/2.9.0-alfresco-20140211/**,qunit/**'/>
<property name='web.excludes' value='${common.web.excludes}'/>
<property name='jsp.includes' value='${common.jsp.includes}'/>
<property name='jsp.excludes' value='${common.jsp.excludes},admin.jsp'/>
<property name='img.includes' value='${common.img.includes}'/>
<property name='img.excludes' value='${common.img.excludes},admin/**'/>
<property name='template.includes' value='${common.template.includes}'/>
<property name='template.excludes' value='${common.template.excludes},admin/**'/>
<property name='jam.includes' value='${common.jam.includes}'/>
<property name='jam.excludes' value='${common.jam.excludes}'/>
<property name='build.web.includes' value='${common.build.web.includes}'/>
<property name='build.web.excludes' value='${common.build.web.excludes}'/>
<property name='webinf.includes' value='${common.webinf.includes}'/>
<property name='webinf.excludes' value='${common.webinf.excludes}'/>
</target>
<target name='jar'>
</target>
<target name='dev'>
<property name='war.compress' value='false'/>
<property name='sync.verbose' value='true'/>
</target>
<target name='prod'>
<property name='build.prod' value='true'/>
<property name='war.compress' value='true'/>
<property name='web.excludes' value='${common.web.excludes},js/zimbraAdmin/**,test/**'/>
</target>
<target name="war"
depends="init,images,styles,settings,copy-ajax,jam-files,compress"
description="Builds all dependencies and assembles the war file.">
<antcall target="assemble-war"/>
</target>
<target name="copy-ajax">
<sync todir="${build.js.dir}">
<fileset dir="${ajax.dir}/${js.dir}"/>
<preserveintarget>
<include name="**"/>
</preserveintarget>
</sync>
<sync todir="${build.dir}/keys">
<fileset dir="${ajax.dir}/${web.dir}/keys"/>
<preserveintarget>
<include name="**"/>
</preserveintarget>
</sync>
<sync todir="${build.dir}/messages">
<fileset dir="${ajax.dir}/${web.dir}/messages"/>
<preserveintarget>
<include name="**"/>
</preserveintarget>
</sync>
<antcall target="jquery" />
<antcall target="modernizr" />
<antcall target="yui" />
</target>
<target name="assemble-war" depends="webxml-package-replace, resolve" description="Assembles the war file. Assumes that all dependencies have been built. Octopus/ZimbraWebClient/build.xml calls the war target, modifies files in ZimbraWebClient/build, and then calls this target.">
<mkdir dir='${build.war.dir}'/>
<ivy:install organisation="zimbra" module="zm-taglib" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="zimbra" module="zm-ajax" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.glassfish.gmbal" module="gmbal-api-only" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.xml.bind" module="jaxb-api" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.bind" module="jaxb-impl" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.xml.ws" module="jaxws-api" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.ws" module="jaxws-rt" revision="4.0.0" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.jws" module="jsr181-api" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.ws" module="policy" revision="2.3.1" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.jvnet.staxex" module="stax-ex" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.stream.buffer" module="streambuffer" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.mina" module="mina-core" revision="2.0.4" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<war warfile="${build.war.file}" webxml='${build.dir}/web.xml'
compress='${war.compress}' duplicate="preserve">
<webinf refid='customer.webinf.fileset' />
<webinf refid="overlay.webinf.fileset" />
<webinf refid="webinf.fileset" />
<classes dir='${build.classes.dir}' excludes='**/build/**'/>
<classes refid="overlay.src.props.fileset" />
<classes refid="src.props.fileset" />
<classes refid="overlay.messages.fileset" />
<classes refid="ajax.messages.fileset" />
<classes refid="messages.fileset" />
<lib dir="${build.tmp.dir}" includes="*.jar"/>
<!-- files from build tree -->
<zipfileset dir='${build.web.dir}' includes='${build.web.includes}' excludes='${build.web.excludes}'/>
<!-- zipfileset dir='${build.web.dir}' includes='js/Modernizr_all.js${jsmin.ext}' / -->
<zipfileset dir='${build.web.dir}' includes='js/Boot_all.js${jsmin.ext}' />
<!-- primary files from source trees -->
<zipfileset refid='customer.web.fileset'/>
<zipfileset refid="overlay.web.fileset" />
<zipfileset refid="web.fileset" />
<zipfileset refid="customer.jsp.fileset" prefix="public"/>
<zipfileset refid="overlay.jsp.fileset" prefix='public'/>
<zipfileset refid="jsp.fileset" prefix='public'/>
<zipfileset refid="overlay.img.fileset" prefix='img'/>
<zipfileset refid="img.fileset" prefix='img'/>
<zipfileset refid='overlay.skins.fileset' prefix='skins' />
<zipfileset refid='skins.fileset' prefix='skins' />
</war>
<!-- Delete tmp folder that may have been left over, e.g.: older versions of same libs -->
<delete dir="${build.tmp.dir}"/>
</target>
<target name='sync' depends='resolve,copy-ajax,tinymce,templates'>
<!-- NOTE: Keep order in sync with list of war filesets. -->
<copy todir='${webapp.dir}/WEB-INF' verbose='${sync.verbose}'>
<fileset refid="webinf.fileset" />
<fileset refid="overlay.webinf.fileset" />
<fileset refid='customer.webinf.fileset' />
</copy>
<copy todir='${webapp.dir}/WEB-INF/classes' verbose='${sync.verbose}'>
<fileset refid="src.props.fileset" />
<fileset refid="overlay.src.props.fileset" />
<fileset refid="ajax.messages.fileset" />
<fileset refid="messages.fileset" />
<fileset refid="overlay.messages.fileset" />
<fileset dir='${build.classes.dir}' excludes='**/build/**'/>
</copy>
<ivy:install organisation="zimbra" module="zm-taglib" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.glassfish.gmbal" module="gmbal-api-only" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.xml.bind" module="jaxb-api" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.bind" module="jaxb-impl" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.xml.ws" module="jaxws-api" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.ws" module="jaxws-rt" revision="4.0.0" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.jws" module="jsr181-api" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.ws" module="policy" revision="2.3.1" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.jvnet.staxex" module="stax-ex" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.sun.xml.stream.buffer" module="streambuffer" revision="2.2.6" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.mina" module="mina-core" revision="2.0.4" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar"/>
<copy todir="${webapp.dir}/WEB-INF/lib">
<fileset dir="${build.tmp.dir}">
<include name="*.jar"/>
</fileset>
</copy>
<delete dir="${build.tmp.dir}"/>
<taskdef name="jscopy"
classname="com.zimbra.webClient.build.JSCopyTask"
classpathref="class.path"
/>
<!-- primary files from source trees -->
<jscopy todir='${webapp.dir}' verbose='${sync.verbose}'>
<fileset refid="web.fileset" />
<fileset refid="overlay.web.fileset" />
<fileset refid='customer.web.fileset'/>
</jscopy>
<jscopy todir='${webapp.dir}/public' verbose='${sync.verbose}'>
<fileset refid="jsp.fileset" />
<fileset refid="overlay.jsp.fileset" />
<fileset refid="customer.jsp.fileset" />
</jscopy>
<copy todir='${webapp.dir}/img' verbose='${sync.verbose}'>
<fileset refid="img.fileset" />
<fileset refid="overlay.img.fileset" />
</copy>
<jscopy todir='${webapp.dir}/skins' verbose='${sync.verbose}'>
<fileset refid="skins.fileset" />
<fileset refid="overlay.skins.fileset" />
</jscopy>
<!-- files from build tree -->
<jscopy todir='${webapp.dir}' verbose='${sync.verbose}'>
<fileset dir='${build.web.dir}' excludes='${build.web.excludes}'/>
</jscopy>
<!-- replace web.xml tokens -->
<antcall target='webxml-package-replace' />
<copy tofile="${webapp.dir}/WEB-INF/web.xml" file='${build.dir}/web.xml' verbose='${sync.verbose}'/>
<antcall target='webxml-deploy-replace'/>
</target>
<target name='init' depends='resolve,client,dev,customer-init'>
<!-- properties based on props set in client/admin/prod/dev targets -->
<property name='deploy.server' value='jetty'/>
<property name='build.war.dir' value='${build.dist.dir}/${deploy.server}/webapps'/>
<property name='build.war.file' value='${build.war.dir}/${deploy.app}.war'/>
<property name='deploy.dir' value='/opt/zimbra/${deploy.server}/webapps'/>
<property name='webapp.dir' value='${deploy.dir}/${deploy.app}'/>
<property name='webapp.file' value='${deploy.dir}/${deploy.app}.war'/>
<condition property='build.prod.value' value='true' else='false'>
<isset property="build.prod"/>
</condition>
<!-- deployment properties -->
<tstamp/>
<!-- TODO: Does the production build set this before calling Ant? -->
<condition property="zimbra.buildinfo.version" value="0.0">
<not>
<isset property="${zimbra.buildinfo.version}"/>
</not>
</condition>
<condition property="zimbra.buildinfo.release" value="${user.name}">
<not>
<isset property="${zimbra.buildinfo.release}"/>
</not>
</condition>
<condition property="zimbra.buildinfo.date" value="${DSTAMP}-${TSTAMP}">
<not>
<isset property="${zimbra.buildinfo.date}"/>
</not>
</condition>
<condition property="zimbra.buildinfo.host" value="${zimbra.server.hostname}">
<not>
<isset property="${zimbra.buildinfo.host}"/>
</not>
</condition>
<!-- common filesets -->
<fileset id="src.props.fileset" dir='${ajax.src.dir}' includes='**/*.properties' />
<fileset id="overlay.src.props.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${src.dir}' includes='**/*.properties' />
<fileset id="web.fileset" dir='${web.dir}' includes='${web.includes}' excludes='${web.excludes},${customer.web.files}' />
<fileset id="overlay.web.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${web.dir}' includes='${web.includes}' excludes='${web.excludes},${customer.web.files}' />
<fileset id="jsp.fileset" dir='${jsp.dir}' includes='${jsp.includes}' excludes='${jsp.excludes}' />
<fileset id="overlay.jsp.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${jsp.dir}' includes='${jsp.includes}' excludes='${jsp.excludes}' />
<fileset id="img.fileset" dir='${img.dir}' includes='${img.includes}' excludes='${img.excludes}' />
<fileset id="overlay.img.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${img.dir}' includes='${img.includes}' excludes='${img.excludes}' />
<fileset id="messages.fileset" dir='${web.dir}' includes='messages/**,keys/**' />
<fileset id="ajax.messages.fileset" dir='${build.dir}' includes='messages/**,keys/**' />
<fileset id="overlay.messages.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${web.dir}' includes='messages/**,keys/**' />
<fileset id="webinf.fileset" dir='${webinf.dir}' includes='${webinf.includes}' excludes='${webinf.excludes},${customer.webinf.files}' />
<fileset id="overlay.webinf.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${webinf.dir}' includes='${webinf.includes}' excludes='${webinf.excludes},${customer.webinf.files}' />
<fileset id="skins.fileset" dir='${skins.dir}' excludes='*/img/**/_*/**' />
<fileset id="overlay.skins.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${skins.dir}' excludes='*/img/**/_*/**' />
<fileset id="template.fileset" dir='${template.dir}' includes='**/*.template' />
<fileset id="overlay.template.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${template.dir}' includes='**/*.template' />
<fileset id="package.fileset" dir='${js.dir}' includes='${jam.includes}' excludes='${jam.excludes}' />
<fileset id="ajax.package.fileset" dir='${build.js.dir}' includes='${jam.includes}' excludes='${jam.excludes}' />
<fileset id="overlay.package.fileset" erroronmissingdir="false"
dir='${overlay.dir}/${js.dir}' includes='${jam.includes}' excludes='${jam.excludes}' />
<!-- build dir initialization -->
<property name='properties.file' value='${build.dir}/build.properties'/>
<mkdir dir='${build.dir}'/>
<if>
<or>
<not>
<available file='${properties.file}'/>
</not>
<isset property='build.prod'/>
</or>
<then>
<propertyfile file="${properties.file}">
<entry key="build.number" type="int" default="1" operation="+" pattern="00000"/>
<entry key="build.date" type="date" value="now" pattern="yyyy-MM-dd HH:mm:ss"/>
<entry key="build.simpleDate" type="date" value="now" pattern="yyMMddHHmmss"/>
<entry key="date.format" value="yyyyMMddHHmmss"/>
</propertyfile>
<property file="${properties.file}"/>
</then>
<else>
<tstamp>
<format property="build.simpleDate" pattern="yyMMddHHmmss" />
</tstamp>
</else>
</if>
</target>
<target name='customer-init' if='env.CUSTOMER_SKIN'>
<if><not>
<isset property='build.ajax'/>
</not>
<then>
<property name='customer.dir' value='../ZimbraCustomerServices/${env.CUSTOMER_SKIN}'/>
<property name='customer.web.dir' value='${customer.dir}/ZimbraWebClient/WebRoot'/>
<property name='customer.jsp.dir' value='${customer.web.dir}/public'/>
<property name='customer.img.dir' value='${customer.web.dir}/img' />
<property name='customer.skin.dir' value='${customer.web.dir}/skins'/>
<property name='customer.portal.dir' value='${customer.web.dir}/portals'/>
<property name='customer.zimlet.dir' value='${customer.dir}/Zimlet'/>
<property name='customer.webinf.dir' value='${customer.web.dir}/WEB-INF' />
<property name="customer.build.dir" value="${customer.web.dir}/../build" />
<if><available file='${customer.web.dir}' />
<then>
<fileset id='customer.web.fileset'
dir='${customer.web.dir}'
includes='${custom.web.includes},h/**,skins/**,portals/**,js/**'
excludes='${custom.web.excludes},**/*.template'
/>
<pathconvert property='customer.web.files' refid='customer.web.fileset' pathsep=','>
<regexpmapper from="^.*/WebRoot/(.*)$$" to="\1"/>
</pathconvert>
</then>
</if>
<if><and>
<!-- NOTE: We require build.prod being set for this because
they override the main images which could confuse
developers. -->
<isset property="build.prod" />
<available file='${customer.img.dir}' />
</and>
<then>
<fileset id='customer.img.fileset' dir='${customer.img.dir}' excludes='_sourceimages/**' />
<pathconvert property='customer.img.files' refid='customer.img.fileset' pathsep=','>
<regexpmapper from="^.*/WebRoot/img/(.*)$$" to="\1"/>
</pathconvert>
</then>
</if>
<if><available file='${customer.skin.dir}' />
<then>
<fileset id='customer.skins.img.fileset' dir='${customer.web.dir}'
includes='skins/*/img/**' excludes='skins/*/img/_sourceimages/**'
/>
</then>
</if>
<if><available file='${customer.webinf.dir}' />
<then>
<fileset id='customer.webinf.fileset'
dir='${customer.webinf.dir}' includes='tags/**,tlds/**'
/>
<pathconvert property='customer.webinf.files' refid='customer.webinf.fileset' pathsep=','>
<regexpmapper from="^.*/WebRoot/WEB-INF/(.*)$$" to="\1"/>
</pathconvert>
</then>
</if>
<if><available file='${customer.web.dir}/js' />
<then>
<fileset id='customer.package.fileset'
dir='${customer.web.dir}/js'
includes='*/packages/*.js,*/package/*.js'
/>
</then>
</if>
<if><available file='${customer.jsp.dir}' />
<then>
<fileset id='customer.jsp.fileset'
dir='${customer.jsp.dir}'
includes='**'
/>
</then>
</if>
</then>
</if>
</target>
<target name='templates'>
<property name='templates.done' value='${build.dir}/templates.done'/>
<dependset>
<srcfileset refid="template.fileset" />
<srcfileset refid="overlay.template.fileset" />
<srcfileset dir='${skins.dir}' includes='**/*.template'/>
<targetfileset dir='${build.template.dir}' includes='**/*.template.js'/>
<targetfileset dir='${build.classes.dir}/messages/AjxTemplateMsg*.properties' />
<targetfilelist dir='.' files="${templates.done}"/>
</dependset>
<if>
<and>
<isset property="env.CUSTOMER_SKIN"/>
<available file='${customer.skin.dir}' />
<not>
<isset property='build.ajax'/>
</not>
</and>
<then>
<dependset>
<srcfileset dir='${customer.skin.dir}' includes='**/*.template'/>
<targetfileset dir='${build.web.dir}' includes='skins/**/*.template.js'/>
<targetfilelist dir='.' files="${templates.done}"/>
</dependset>
</then>
</if>
<if>
<not>
<available file='${templates.done}'/>
</not>
<then>
<taskdef name='template'
classname='com.zimbra.kabuki.tools.templates.TemplateTask'
classpathref='class.path'
/>
<antcall target="templates-generate">
<param name="srcdir" value="${template.dir}" />
<param name="gendir" value="${build.template.dir}" />
<param name="destdir" value="${build.classes.dir}/messages" />
<param name="authoritative" value="false" />
</antcall>
<antcall target="templates-generate">
<param name="srcdir" value="${overlay.dir}/${template.dir}" />
<param name="gendir" value="${build.template.dir}" />
<param name="destdir" value="${build.classes.dir}/messages" />
<param name="authoritative" value="false" />
</antcall>
<dirset id="skin.dirs" dir="${skins.dir}" includes="*" excludes="_*" />
<pathconvert property="skin.names" refid="skin.dirs" pathsep=",">
<flattenmapper />
</pathconvert>
<for list="${skin.names}" param="name">
<sequential>
<antcall target="templates-generate">
<param name="srcdir" value="${skins.dir}/@{name}" />
<param name="gendir" value="${build.skin.dir}/@{name}" />
<param name="destdir" value="${build.web.dir}/skins/@{name}/messages" />
<param name="authoritative" value="true" />
</antcall>
</sequential>
</for>
<antcall target="customer-templates"/>
<touch file="${templates.done}"/>
</then>
</if>
</target>
<target name='templates-generate'>
<echo>srcdir: ${srcdir}, gendir: ${gendir}, destdir: ${destdir}, authoritative: ${authoritative}</echo>
<template destdir='${gendir}' authoritative="${authoritative}">
<fileset dir='${srcdir}' erroronmissingdir="false"
includes='${template.includes}' excludes='**/*_*.template,${template.excludes}' />
</template>
<template destdir='${gendir}' format="properties">
<fileset dir='${srcdir}' erroronmissingdir="false"
includes='**/*_*.template' excludes='${template.excludes}' />
</template>
<fileset id='templates-generate.fileset' erroronmissingdir="false"
dir='${srcdir}' includes='**/*_*.template' />
<pathconvert property='locids' refid='templates-generate.fileset' pathsep=','>
<regexpmapper from="^.*/.*?_(.*).template" to="\1" />
</pathconvert>
<for list="${locids}" param="locid">
<sequential>
<if><not><isset property="templates.@{locid}" /></not>
<then>
<property name="templates.@{locid}" value="true" />
<concat destfile="${destdir}/AjxTemplateMsg_@{locid}.properties" fixlastline="yes">
<fileset dir="${gendir}" includes="**/*_@{locid}.template.properties" />
</concat>
</then>
</if>
</sequential>
</for>
</target>
<target name='customer-templates' if='env.CUSTOMER_SKIN'>
<if>
<and>
<available file='${customer.skin.dir}' />
<not>
<isset property='build.ajax'/>
</not>
</and>
<then>
<dirset id='skins.dirset' dir='${customer.skin.dir}' includes='*'/>
<pathconvert property="skins.list" refid="skins.dirset" pathsep=",">
<flattenmapper/>
</pathconvert>
<for list='${skins.list}' param='name'>
<sequential>
<antcall target="templates-generate">
<param name="srcdir" value="${customer.skin.dir}/@{name}" />
<param name="gendir" value="${build.web.dir}/skins/@{name}" />
<param name="destdir" value="${build.web.dir}/skins/@{name}/messages" />
<param name="authoritative" value="true" />
</antcall>
</sequential>
</for>
</then>
</if>
</target>
<target name='i18n' >
<property name='i18n.msgs.dir' value='${build.classes.dir}/messages'/>
<property name='i18n.msgs.file' value='${i18n.msgs.dir}/I18nMsg.properties'/>
<dependset>
<srcfileset dir='${src.dir}' includes='**/i18n/GenerateData*.java'/>
<targetfilelist dir='.' files='${i18n.msgs.file}'/>
</dependset>
<if>
<not>
<available file='${i18n.msgs.file}'/>
</not>
<then>
<taskdef name='i18n'
classname='com.zimbra.kabuki.tools.i18n.GenerateDataTask'
classpath='${build.classes.dir}'
/>
<mkdir dir='${i18n.msgs.dir}'/>
<i18n destdir='${i18n.msgs.dir}'/>
<i18n destdir='${i18n.msgs.dir}' basename='L10nMsg' client='false' server='true'/>
</then>
</if>
</target>
<target name='keys-check'>
<taskdef name='keycheck'
classname='com.zimbra.kabuki.tools.i18n.CompareKeysTask'
classpath='${build.classes.dir}'
/>
<keycheck dir='${web.dir}' verbose='${keys-check-verbose}'>
<keyfile basename='/keys/AjxKeys' />
<keyfile basename='/keys/ZmKeys' />
</keycheck>
</target>
<target name='images' depends='images-init'>
<mkdir dir='${build.img.dir}' />
<mkdir dir='${build.skin.dir}' />
<!-- merge base images -->
<antcall target='images-merge'>
<param name='srcdir' value='${img.dir}' />
<param name='destdir' value='${build.img.dir}' />
<param name='csspath' value='@AppContextPath@/img/' />
</antcall>
<!-- merge skin images -->
<antcall target="images-skins">
<param name="skin.dir" value="${skins.dir}" />
</antcall>
<if><available file="${customer.skin.dir}" />
<then>
<antcall target="images-skins">
<param name="skin.dir" value="${customer.skin.dir}" />
</antcall>
</then>
</if>
</target>
<target name="images-skins">
<dirset id='this.build.skins.dirset' dir='${skin.dir}' includes='*' excludes="_*" />
<pathconvert property='this.build.skins.files' refid='this.build.skins.dirset' pathsep=','>
<flattenmapper />
</pathconvert>
<echo>DEBUG skin files: ${this.build.skins.files}</echo>
<for list='${this.build.skins.files}' param='skinname'>
<sequential>
<mkdir dir='${skin.dir}/@{skinname}/img'/>
<if><available file='${skin.dir}/@{skinname}/img' type='dir' />
<then>
<antcall target="images-merge">
<param name='srcdir' value='${skin.dir}/@{skinname}/img' />
<param name='destdir' value='${build.skin.dir}/@{skinname}/img' />
<!-- NOTE: @AppContextPath@ needs to be escaped here because -->
<!-- NOTE: it is used within a for loop which treats @xyz@ as -->
<!-- NOTE: property replacements for each iteration. -->
<param name='csspath' value='@@AppContextPath@/skins/@{skinname}/img/' />
</antcall>
</then>
</if>
</sequential>
</for>
</target>
<target name='images-merge'>
<!-- delete output files if files changed -->
<dependset>
<srcfileset dir='${srcdir}' includes='*/**' />
<targetfileset dir='${destdir}' includes='${build.css.file}*.css,${build.css.file}*.js' />
</dependset>
<!-- merge images, if needed -->
<if><not><available file='${destdir}/${build.css.filename}' /></not>
<then>
<mkdir dir="${destdir}" />
<!-- default locale images -->
<imagemerge destdir='${destdir}' disable='true'
cssfile='${build.css.filename}' csspath='${csspath}'
spacerimagespath='${this.zwc.basedir}/WebRoot/img/zimbra/'
jsfile='${build.css.filename}.js'>
<dirset dir='${srcdir}' includes='*' excludes='?*_??,?*_??_??' />
</imagemerge>
<!-- <replace token="@jsVersion@" value="${build.simpleDate}" file='${destdir}/${build.css.filename}'/> Moved to SkinResources servlet -->
<!-- other locale images -->
<dirset id='this.images.l10n.dirset' dir='${srcdir}' includes='?*_??,?*_??_??' />
<pathconvert property='this.images.l10n.locales' refid='this.images.l10n.dirset' pathsep=','>
<regexpmapper from="^.*/.*?_(.*)" to="\1" />
</pathconvert>
<for list='${this.images.l10n.locales}' param='locale'>
<sequential>
<if><not><available file="${destdir}/${build.css.file}_@{locale}${build.css.ext}" /></not>
<then>
<imagemerge destdir='${destdir}' disable='true'
cssfile='${build.css.file}_@{locale}${build.css.ext}'
csspath='${csspath}'
spacerimagespath='${this.zwc.basedir}/WebRoot/img/zimbra/'
jsfile='${build.css.filename}.js'>
<dirset dir='${srcdir}' includes='?*_@{locale}' />
</imagemerge>
<!-- <replace token="@jsVersion@" value="${build.simpleDate}"
file='${destdir}/${build.css.file}_@{locale}${build.css.ext}'
/> Moved to SkinResources servlet -->
</then>
</if>
</sequential>
</for>
</then>
</if>
</target>
<target name='images-init' >
<taskdef name='imagemerge'
classname='com.zimbra.kabuki.tools.img.ImageMergerTask'
classpathref='class.path'
/>
<taskdef name='imagesort'
classname='com.zimbra.kabuki.tools.img.ImageSortTask'
classpathref='class.path'
/>
</target>
<target name='build-skin-images' depends='images-init,build-skin-images-init'
if='skin-images-present'>
<property name='build.this.skin.dir' value='${build.web.dir}/skins/${skindir}/img'/>
<mkdir dir="${build.this.skin.dir}"/>
<delete file='${build.this.skin.dir}/${build.css.filename}'/>
<echo/>
<echo message='Merging images for skin ${skindir}'/>
<echo/>
<imagemerge destdir='${build.this.skin.dir}'
cssfile='${build.css.filename}' csspath='@AppContextPath@/skins/${skindir}/img/'
spacerimagespath='${this.zwc.basedir}/WebRoot/img/zimbra/'
jsfile='${build.css.filename}.js'>
<dirset dir='${skinbasedir}/skins/${skindir}' includes='img/**'/>
</imagemerge>
<!-- <replace token="@jsVersion@" value="${build.simpleDate}" file='${build.this.skin.dir}/${build.css.filename}'/> Moved to SkinResources servlet -->
</target>
<target name='build-skin-images-init'>
<condition property="skin-images-present">
<or>
<isset property='images.force'/>
<available file="${skinbasedir}/skins/${skindir}/img" type="dir"/>
</or>
</condition>
</target>
<target name='package-skin' depends='prod,templates,images' if='env.CUSTOMER_SKIN'>
<fail unless="skinname">Must specify skinname property.</fail>
<property name='dist.skin.dir' value='${build.dir}/skins'/>
<fileset id='customer.img.fileset' dir='${build.web.dir}' excludes='**' />
<if><available file='${customer.img.dir}' />
<then>
<fileset id='customer.img.fileset' dir='${build.web.dir}' includes='img/**' />
</then>
</if>
<mkdir dir='${dist.skin.dir}'/>
<zip destfile='${dist.skin.dir}/${skinname}.zip'>
<fileset refid="customer.img.fileset" />
<fileset dir='${customer.web.dir}'
includes='skins/${skinname}/**'
excludes='skins/${skinname}/img/_sourceimages/**'
/>
<fileset dir='${build.web.dir}' includes='skins/${skinname}/**'/>
<fileset dir='${customer.web.dir}' includes='portals/${skinname}/**'/>
<fileset dir='${customer.web.dir}' includes='${custom.web.jsp.includes},h/**,js/**'/>
<fileset dir='${customer.web.dir}' includes='WEB-INF/**'/>
</zip>
</target>
<target name='styles'>
<property name='styles.dir' value='${build.web.dir}/css'/>
<mkdir dir='${styles.dir}'/>
<copy todir='${styles.dir}' flatten='true'>
<fileset dir='${js.dir}' includes='**/style/*.css'/>
</copy>
</target>
<target name='settings' depends='init'>
<if>
<and>
<not>
<isset property='build.ajax'/>
</not>
</and>
<then>
<property name='settings.dir' value='${build.js.dir}/zimbraMail/share/model'/>
<property name='settings.file' value='${settings.dir}/ZmSettings.js'/>
<mkdir dir='${settings.dir}'/>
<copy todir='${settings.dir}' flatten='true'>
<fileset dir='${js.dir}' includes='**/ZmSettings.js'/>
</copy>
<replace file="${settings.file}" token="@buildVersion@" value="${zimbra.buildinfo.version}"/>
<replace file="${settings.file}" token="@buildRelease@" value="${zimbra.buildinfo.release}"/>
<replace file="${settings.file}" token="@buildDateTime@" value="${DSTAMP}-${TSTAMP}"/>
</then>
</if>
</target>
<target name='jam-files' depends='tinymce,templates'>
<property name='jam.jsp.dir' value='${build.web.dir}/public/jsp'/>
<mkdir dir='${build.js.dir}'/>
<mkdir dir='${jam.jsp.dir}'/>
<copy todir='${build.js.dir}' flatten='true'>
<fileset refid='package.fileset' />
<fileset refid='ajax.package.fileset' />
<fileset refid='overlay.package.fileset' />
<fileset refid='customer.package.fileset' />
</copy>
<taskdef name="packagedependset"
classname="com.zimbra.webClient.build.PackageDependSetTask"
classpathref='class.path'
/>
<taskdef name="jammer"
classname="com.zimbra.webClient.build.PackageJammerTask"
classpathref='class.path'
/>
<fileset id='jam-files.fileset' dir='${build.js.dir}' includes='*.js' excludes='*_all.js'/>
<pathconvert property="jam-files.list" refid="jam-files.fileset" pathsep=','>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.js" to="*"/>
</chainedmapper>
</pathconvert>
<!-- NOTE: This has to be done in a separate target call so that
the property values are isolated from each other. -->
<foreach target='jam-file' list='${jam-files.list}' param='arg'/>
</target>
<target name='jam-file'>
<fail message='This target cannot be called directly.' unless='arg'/>
<property name='jam.file' value='${build.js.dir}/${arg}_all.js'/>
<property name='jsp.file' value='${build.web.dir}/public/jsp/${arg}.jsp'/>
<property name='appcache.file' value='${build.js.dir}/${arg}.appcache'/>
<property name='depends.file' value='${jam.file}${depends.ext}'/>
<packagedependset>
<srcdependslist dir='.' files='${depends.file}'/>
<targetfilelist dir='.' files='${jam.file}'/>
<targetfilelist dir='.' files='${jsp.file}'/>
</packagedependset>
<if>
<available file="${depends.file}"/>
<then>
<files includesfile="${depends.file}" />
<uptodate targetfile="${jam.file}" property="jam.uptodate">
<srcresources>
<files includesfile="${depends.file}" />
</srcresources>
</uptodate>
</then>
</if>
<if>
<not>
<equals arg1="${jam.uptodate}" arg2="true" />
</not>
<then>
<condition property='wrap' value='false' else='true'>
<!-- or>
<equals arg1='${arg}' arg2='Boot'/>
<equals arg1='${arg}' arg2='Modernizr'/>
</or -->
<equals arg1='${arg}' arg2='Boot'/>
</condition>
<property name='jam.template.dir' value='${build.template.dir}'/>
<!-- package template includes -->
<property name="jam.template.Admin.includes" value="admin/**" />
<property name="jam.template.Ajax.includes" value="dwt/**" />
<property name="jam.template.CalendarCore.includes" value="calendar/**" />
<property name="jam.template.ContactsCore.includes" value="abook/**" />
<property name="jam.template.IM.includes" value="im/**" />
<property name="jam.template.ImportExport.includes" value="data/**" />
<property name="jam.template.MailCore.includes" value="mail/**" />
<property name="jam.template.PreferencesCore.includes" value="prefs/**" />
<property name="jam.template.Startup1_2.includes" value="dwt/**,zimbra/**,share/**" />
<property name="jam.template.TasksCore.includes" value="tasks/**" />
<property name="jam.template.Voicemail.includes" value="voicemail/**" />
<property name="jam.template.Zimbra.includes" value="zimbra/**" />
<property name="jam.template.Chat.includes" value="chat/**" />
<!-- template fileset -->
<if><isset property="jam.template.${arg}.includes" />
<then>
<propertycopy property="jam.template.includes" from="jam.template.${arg}.includes"
override="true" silent="true" />
<var name="jam.template.excludes" value="**/*_*" />
<if><isset property="jam.template.${arg}.excludes" />
<then>
<propertycopy property="jam.template.excludes" from="jam.template.${arg}.excludes"
override="true" silent="true" />
</then>
</if>
<patternset id='jam.template.fileset'
includes='${jam.template.includes}' excludes='${jam.template.excludes}' />
</then>
<else>
<patternset id='jam.template.fileset' excludes='**'/>
</else>
</if>
<jammer jsDestFile='${jam.file}' htmlDestFile='${jsp.file}' appCacheDestFile='${appcache.file}'
dependsFile='${depends.file}' output='all'
basepath='<%=contextPath%>/js/'
extension='.js?v=<%=vers%>'>
<prefix output='html'><![CDATA[<%@ page import="com.zimbra.cs.taglib.bean.BeanUtils" %>
<%
String contextPath = request.getContextPath();
if (contextPath.equals("/")) contextPath = "";
String vers = (String) request.getAttribute("version");
vers = BeanUtils.cook(vers);
String ext = (String) request.getAttribute("fileExtension");
ext = BeanUtils.cook(ext);
%>]]></prefix>
<!-- NOTE: order is important; need to find generated files first -->
<src dir='${customer.web.dir}/js'/>
<src dir='${build.js.dir}'/>
<src dir='${build.template.dir}'/>
<src dir="${overlay.dir}/${js.dir}" />
<src dir='${js.dir}'/>
<filelist dir='${build.js.dir}' files='${arg}.js' wrap='${wrap}'/>