-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
533 lines (470 loc) · 29.2 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
<project name="zm-soap-harness" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<import file="../zm-zcs/ant-global.xml"/>
<property name="build.staf.dir" location="${build.dir}/staf"/>
<property name="build.staf.jars.dir" location="${build.dir}/staf/STAF-INF/jars"/>
<property name="build.staf.classes.dir" location="${build.dir}/staf/STAF-INF/classes"/>
<property name="server.jars.dir" location="${server.dir}/jars"/>
<property name="deployDir" location="${build.dir}/dist"/>
<property name="dist.dir.root" location="${deployDir}"/>
<property name="build.customauth.classes.dir" location="${build.dir}/customauth/classes"/>
<property name="build.storemanager.classes.dir" location="${build.dir}/storemanager/classes"/>
<property name="build.scalityhttpstore.classes.dir" location="${build.dir}/scalityhttpstore/classes"/>
<property name="zm-network-soap-harness.dir" location="../zm-network-soap-harness"/>
<property name="build.temp.dir" location="${build.dir}/temp"/>
<target name="jar" depends="compile" description="Creates the jar file">
<antcall target="zimbra-jar">
<param name="implementation.title" value="Zimbra QA"/>
</antcall>
</target>
<target name="compress-move">
<apply executable="gzip" failonerror="true">
<arg value="-v"/>
<fileset dir="${build.dir}" includes="*.tar"/>
</apply>
<copy todir="${dist.dir.root}" verbose="true" overwrite="true">
<fileset dir="${build.dir}" includes="*.tar.gz"/>
<mapper type="glob" from="*.tar.gz" to="*.tgz"/>
</copy>
<checksum>
<fileset dir="${dist.dir.root}">
<include name="*.tgz"/>
</fileset>
</checksum>
</target>
<target name="build-tools-setup">
<tar longfile="gnu" destfile="${build.dir}/tools.tar">
<tarfileset dir="src/bin" prefix="tools" mode="555">
<include name="**/*"/>
</tarfileset>
</tar>
</target>
<target name="build-smtp-service-file" depends="staf-jar">
<copy todir="${build.dir}">
<fileset dir="src/STAF/SMTP">
<include name="smtp.pl"/>
</fileset>
</copy>
<fixcrlf srcdir="${build.dir}" eol="lf" eof="remove" includes="*.sh" />
<tar longfile="gnu" destfile="${build.dir}/smtpservice.tar">
<tarfileset dir="${build.dir}" prefix="smtpservice/bin" mode="555">
<include name="smtp.pl"/>
</tarfileset>
<tarfileset dir="${build.staf.jars.dir}" prefix="smtpservice/bin" mode="555">
<include name="**/json-20160810.jar"/>
<include name="**/activation.jar"/>
<include name="**/commons-cli-1.2.jar"/>
<include name="**/commons-logging-1.0.3.jar"/>
<include name="**/commons-httpclient-3.1.jar"/>
<include name="**/dom4j-1.5.2.jar"/>
<include name="**/log4j-1.2.16.jar"/>
<include name="**/javamail-1.4.5.jar"/>
<include name="**/mail-1.4.5.jar"/>
</tarfileset>
</tar>
</target>
<target name="ScalityHttpStore compile" description="Create a store manager extension jar">
<mkdir dir="${build.scalityhttpstore.classes.dir}" />
<javac destdir="${build.scalityhttpstore.classes.dir}" srcdir="${src.java.dir}" debug="false" classpathref="class.path">
<include name="**/*.java" />
</javac>
</target>
<target name="ScalityHttpStore jar" depends="ScalityHttpStore compile" description="Creates jar files">
<jar manifest="conf/ZimbraExtensions/ScalityHttpStore/MANIFEST.MF" destfile="${build.dir}/ScalityHttpStore.jar" basedir="${build.scalityhttpstore.classes.dir}"/>
</target>
<target name="storemanager compile" description="Create a store manager extension jar">
<mkdir dir="${build.storemanager.classes.dir}" />
<javac destdir="${build.storemanager.classes.dir}" srcdir="${src.java.dir}" debug="false" classpathref="class.path">
<include name="**/*.java" />
</javac>
</target>
<target name="storemanager jar" depends="storemanager compile" description="Creates jar files">
<jar manifest="conf/ZimbraExtensions/StoreManager/MANIFEST.MF" destfile="${build.dir}/zimbra-extns-storemanager.jar" basedir="${build.storemanager.classes.dir}"/>
</target>
<target name="AuthExtension jar" depends="AuthExtension compile" description="Create a custom auth extension jar">
<property name="manifest" value="conf/ZimbraExtensions/CustomAuthQA/MANIFEST.MF"/>
<property name="jar.file" value="ExtensionCustomAuthQA.jar"/>
<property name="destfile" value="${build.dir}/${jar.file}"/>
<jar manifest="${manifest}" destfile="${destfile}" basedir="${build.customauth.classes.dir}"/>
</target>
<target name="AuthExtension compile" description="Create a custom auth extension jar">
<mkdir dir="${build.customauth.classes.dir}" />
<javac destdir="${build.customauth.classes.dir}" srcdir="${src.java.dir}" debug="false" classpathref="class.path">
<include name="**/*.java" />
</javac>
</target>
<target name="staf-bugreports" depends="compile" description="Creates the STAF jar file for the Bug Reports service">
<property name="build.staf.bugreports" location="${build.dir}/staf/bugreports" />
<property name="build.staf.bugreports.classes.dir" location="${build.staf.bugreports}/STAF-INF/classes"/>
<property name="build.staf.bugreports.jars.dir" location="${build.staf.bugreports}/STAF-INF/jars"/>
<copy todir="${build.staf.bugreports.classes.dir}">
<fileset dir="${build.classes.dir}" />
</copy>
<ivy:install organisation="log4j" module="apache-log4j-extras" revision="1.0" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="jaxen" module="jaxen" revision="1.1.3" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<copy todir="${build.staf.bugreports.jars.dir}">
<fileset dir="${dist.dir}">
<include name="apache-log4j-extras-1.0.jar" />
<include name="commons-cli-1.2.jar" />
<include name="dom4j-1.5.2.jar" />
<include name="jaxen-1.1.3.jar" />
<include name="log4j-1.2.16.jar" />
</fileset>
</copy>
<jar destfile="${dist.lib.dir}/zimbratestngresults.jar" basedir="${build.staf.bugreports}">
<manifest>
<attribute name="Main-Class" value="staf.Driver" />
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.bugreports.ResultsStaf" />
<attribute name="Packaged-Jars" value="apache-log4j-extras-1.0 commons-cli-1.2 dom4j-1.5.2 jaxen-1.1.3 log4j-1.2.16"/>
</section>
</manifest>
</jar>
</target>
<target name="staf-results" depends="compile" description="Creates the result service jar file">
<property name="build.staf.result.classes.dir" location="${build.dir}/staf/result/STAF-INF/classes"/>
<property name="build.staf.result.jars.dir" location="${build.dir}/staf/result/STAF-INF/jars"/>
<copy todir="${build.staf.result.classes.dir}">
<fileset dir="${build.classes.dir}"/>
</copy>
<copy todir="${build.staf.result.jars.dir}">
<fileset dir="${build.tmp.dir}">
<include name="postgresql-9.1-901.jdbc4.jar"/>
</fileset>
</copy>
<copy todir="${build.staf.result.jars.dir}">
<fileset dir="${dist.dir}">
<include name="json-20160810.jar"/>
<include name="log4j-1.2.16.jar"/>
<include name="commons-logging-1.0.3"/>
</fileset>
</copy>
<jar destfile="${dist.lib.dir}/zimbraresults.jar" basedir="${build.staf.dir}/result">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.results.ResultsCore"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.results.ResultsStaf"/>
<attribute name="Packaged-Jars" value="json-20160810 postgresql-9.1-901.jdbc4 log4j-1.2.16 commons-logging-1.0.3"/>
</section>
</manifest>
</jar>
</target>
<target name="staf-inject" depends="compile" description="Creates the inject service jar file">
<property name="build.staf.inject.classes.dir" location="${build.dir}/staf/inject/STAF-INF/classes"/>
<property name="build.staf.inject.jars.dir" location="${build.dir}/staf/inject/STAF-INF/jars"/>
<copy todir="${build.staf.inject.classes.dir}">
<fileset dir="${build.classes.dir}"/>
</copy>
<copy todir="${build.staf.inject.jars.dir}">
<fileset dir="${dist.dir}">
<include name="log4j-1.2.16.jar"/>
<include name="javamail-1.4.5.jar"/>
<include name="mail-1.4.5.jar"/>
</fileset>
</copy>
<jar destfile="${dist.lib.dir}/zimbrainject.jar" basedir="${build.staf.dir}/inject">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.inject.Driver"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.inject.INJECTStaf"/>
<attribute name="Packaged-Jars" value="zimbrainject mail-1.4.5 javamail-1.4.5 activation log4j-1.2.16"/>
</section>
</manifest>
</jar>
</target>
<target name="staf-importer" depends="compile,getJarVersion" description="Creates the inject service jar file">
<property name="build.staf.importer.classes.dir" location="${build.dir}/staf/importer/STAF-INF/classes"/>
<property name="build.staf.importer.jars.dir" location="${build.dir}/staf/importer/STAF-INF/jars"/>
<copy todir="${build.staf.importer.classes.dir}">
<fileset dir="${build.classes.dir}"/>
</copy>
<ivy:install organisation="commons-cli" module="commons-cli" revision="1.2" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="log4j" module="log4j" revision="1.2.16" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="commons-httpclient" module="commons-httpclient" revision="3.1" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="dom4j" module="dom4j" revision="1.5.2" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="commons-logging" module="commons-logging" revision="1.0.3" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="commons-codec" module="commons-codec" revision="1.7" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.json" module="json" revision="20160810" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="javax.mail" module="mail" revision="1.4.5" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="libidn" module="libidn" revision="1.24" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<copy todir="${build.staf.importer.jars.dir}">
<fileset dir="${build.tmp.dir}">
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="${build.staf.importer.jars.dir}">
<fileset dir="${dist.dir}">
<include name="commons-cli-1.2.jar"/>
<include name="log4j-1.2.16.jar"/>
<include name="commons-httpclient-3.1.jar"/>
<include name="dom4j-1.5.2.jar"/>
<include name="commons-logging-1.0.3.jar"/>
<include name="commons-codec-1.7.jar"/>
<include name="json-20160810.jar"/>
<include name="javamail-1.4.5.jar"/>
<include name="mail-1.4.5.jar"/>
<include name="libidn-1.24.jar"/>
</fileset>
</copy>
<jar destfile="${dist.lib.dir}/zimbraimporter.jar" basedir="${build.staf.dir}/importer">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.importer.Driver"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.importer.StafIntegration"/>
<attribute name="Packaged-Jars" value="commons-cli-1.2 log4j-1.2.16 commons-httpclient-3.1 dom4j-1.5.2 commons-logging-1.0.3 commons-codec-1.6 json-20160810 mail-1.4.5 javamail-1.4.5 libidn-1.24 ${zimbraJarPath}"/>
</section>
</manifest>
</jar>
</target>
<target name="staf-nunit" depends="compile" description="Creates the nunit STAF jar file">
<property name="build.staf.nunit.classes.dir" location="${build.dir}/staf/nunit/STAF-INF/classes"/>
<property name="build.staf.nunit.jars.dir" location="${build.dir}/staf/nunit/STAF-INF/jars"/>
<copy todir="${build.staf.nunit.classes.dir}">
<fileset dir="${build.classes.dir}"/>
</copy>
<ivy:install organisation="log4j" module="log4j" revision="1.2.16" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<copy todir="${build.staf.nunit.jars.dir}">
<fileset dir="${dist.dir}">
<include name="log4j-1.2.16.jar"/>
</fileset>
</copy>
<jar destfile="${dist.lib.dir}/zimbranunit.jar" basedir="${build.staf.dir}/nunit">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.nunit.Driver"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.nunit.StafService"/>
<attribute name="Packaged-Jars" value="zimbranunit log4j-1.2.16"/>
</section>
</manifest>
</jar>
</target>
<target name="gatherZimbraJars" depends="init-ivy">
<ivy:install organisation="zimbra" module="zm-native" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar" />
<ivy:install organisation="zimbra" module="zm-common" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar" />
<ivy:install organisation="zimbra" module="zm-soap" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar" />
<ivy:install organisation="zimbra" module="zm-client" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar" />
<ivy:install organisation="zimbra" module="zm-store" revision="latest.integration" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar" />
<ivy:install organisation="postgresql" module="postgresql" revision="9.1-901.jdbc4" settingsRef="dev.settings" from="chain-resolver" to="build-tmp" overwrite="true" transitive="true" type="jar" />
</target>
<target name="getJarVersion" depends="gatherZimbraJars">
<echo>${build.dir}/tmp</echo>
<fileset id="dist.contents" dir="${build.dir}/tmp" includes="*.jar"/>
<property name="prop.dist.contents" refid="dist.contents"/>
<propertyregex property="zimbraJarPath" input="${prop.dist.contents}" regexp=".jar;|.jar" replace=" " global="true" />
<echo>${zimbraJarPath}</echo>
</target>
<target name="staf-jar" depends="getJarVersion,staf-nunit,staf-importer,staf-inject,staf-results,staf-bugreports,compile,AuthExtension jar,storemanager jar, ScalityHttpStore jar" description="Creates the jar file">
<copy todir="${build.staf.classes.dir}">
<fileset dir="${build.classes.dir}"/>
</copy>
<ivy:install organisation="com.google.guava" module="guava" revision="23.0" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="ical4j" module="ical4j" revision="0.9.16-patched" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.unboundid" module="unboundid-ldapsdk" revision="2.3.5" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.httpcomponents" module="httpclient" revision="4.5.2" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.httpcomponents" module="httpasyncclient" revision="4.1.2" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.httpcomponents" module="httpcore" revision="4.4.5" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.httpcomponents" module="httpcore-nio" revision="4.4.5" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<!-- <ivy:install organisation="ant-contrib" module="ant-contrib" revision="1.0b3" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.bouncycastle" module="bcprov-jdk15" revision="1.46" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="commons-dbcp" module="commons-dbcp" revision="1.1" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="commons-fileupload" module="commons-fileupload" revision="1.2.2" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="commons-pool" module="commons-pool" revision="1.1" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="ch.ethz.ganymed" module="ganymed-ssh2" revision="build210" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.google.guava" module="guava" revision="23.0" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="ical4j" module="ical4j" revision="0.9.16-patched" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.james" module="apache-jsieve-core" revision="0.5" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.jcraft" module="jzlib" revision="1.0.7" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="jaxen" module="jaxen" revision="1.1.3" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.apache.lucene" module="lucene-core" revision="3.5.0" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="com.unboundid" module="unboundid-ldapsdk" revision="2.3.5" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.mariadb.jdbc" module="mariadb-java-client" revision="1.1.8" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite=" true" transitive="true" type="jar"/>
<ivy:install organisation="net.sourceforge.nekohtml" module="nekohtml" revision="1.9.13.1z" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="org.igniterealtime.whack" module="core" revision="2.0.0" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="xerces" module="xercesImpl" revision="2.9.1-patch-01" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/>
<ivy:install organisation="xpp3" module="xpp3" revision="1.1.3.4.O" settingsRef="dev.settings" from="chain-resolver" to="build-dist" overwrite="true" transitive="true" type="jar"/> -->
<copy todir="${build.staf.jars.dir}">
<fileset dir="${build.dir}">
<include name="ExtensionCustomAuthQA.jar"/>
<include name="zimbra-extns-storemanager.jar" />
<include name="ScalityHttpStore.jar" />
</fileset>
<fileset dir="${build.dir}/tmp">
<include name="*.jar"/>
</fileset>
<fileset dir="${dist.dir}">
<include name="json-20160810.jar"/>
<include name="ant-contrib-1.0b3.jar"/>
<include name="bcprov-jdk15-1.46.jar"/>
<include name="commons-cli-1.2.jar"/>
<include name="commons-codec-1.7.jar"/>
<include name="commons-dbcp-1.1.jar"/>
<include name="commons-fileupload-1.2.2.jar"/>
<include name="commons-httpclient-3.1.jar"/>
<include name="commons-logging-1.0.3.jar"/>
<include name="commons-pool-1.1.jar"/>
<include name="dom4j-1.5.2.jar"/>
<include name="ganymed-ssh2-build209.jar"/>
<include name="guava-23.0.jar"/>
<include name="ical4j-0.9.16-patched.jar"/>
<include name="apache-jsieve-core-0.5.jar"/>
<include name="jzlib-1.0.7.jar"/>
<include name="jaxen-1.1.3.jar"/>
<include name="log4j-1.2.16.jar"/>
<include name="lucene-3.5.0.jar"/>
<include name="unboundid-ldapsdk-2.3.5.jar"/>
<include name="mariadb-java-client-1.1.8.jar"/>
<include name="javamail-1.4.5.jar"/>
<include name="mail-1.4.5.jar"/>
<include name="nekohtml-1.9.13.1z.jar"/>
<include name="whack-2.0.0.jar"/>
<include name="xercesImpl-2.9.1-patch-01"/>
<include name="xpp3-1.1.3.4.O.jar"/>
<include name="httpclient-4.5.2.jar"/>
<include name="httpasyncclient-4.1.2.jar"/>
<include name="httpcore-4.4.5.jar"/>
<include name="httpcore-nio-4.4.5.jar"/>
</fileset>
</copy>
<jar destfile="${dist.lib.dir}/zimbrastaf.jar" basedir="${build.staf.dir}">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.soap.SoapTestMain"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.soap.StafIntegration"/>
<attribute name="Packaged-Jars" value="webservices-api webservices-rt metro-zcs-soapservice testng-6.8 guava-23.0 json-20160810 commons-codec-1.7 zimbrastore activation ical4j-0.9.16-patched mail-1.4.5 javamail-1.4.5 commons-cli-1.2 servlet-api junit-4.8.2 dom4j-1.5.2 commons-httpclient-3.1 unboundid-ldapsdk-2.3.5 commons-logging-1.0.3 log4j-1.2.16 jaxen-1.1.3 httpclient-4.5.2 httpasyncclient-4.1.2 httpcore-4.4.5 httpcore-nio-4.4.5 ${zimbraJarPath}"/>
</section>
</manifest>
</jar>
<jar destfile="${dist.lib.dir}/zimbrasmtp.jar" basedir="${build.staf.dir}">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.smtp.StafTestSMTP"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.smtp.StafTestSMTP"/>
<attribute name="Packaged-Jars" value="json-20160810 commons-codec-1.7.jar activation ical4j-0.9.16-patched mail-1.4.5 javamail-1.4.5 commons-cli-1.2 servlet-api junit-4.8.2 dom4j-1.5.2 commons-httpclient-3.1 log4j-1.2.16 jaxen-1.1.3 commons-logging-1.0.3 ${zimbraJarPath}"/>
</section>
</manifest>
</jar>
<jar destfile="${dist.lib.dir}/zimbrasample.jar" basedir="${build.staf.dir}">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.sample.StafCore"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.sample.StafMain"/>
<attribute name="Packaged-Jars" value="json-20160810 commons-codec-1.7.jar activation ical4j-0.9.16-patched mail-1.4.5 javamail-1.4.5 commons-cli-1.2 servlet-api junit-4.8.2 dom4j-1.5.2 commons-httpclient-3.1 log4j-1.2.16 jaxen-1.1.3 commons-logging-1.0.3 ${zimbraJarPath}"/>
</section>
</manifest>
</jar>
<jar destfile="${dist.lib.dir}/zimbraemail.jar" basedir="${build.staf.dir}">
<manifest>
<attribute name="Main-Class" value="com.zimbra.qa.email.INJECTCore"/>
<section name="staf/service/info">
<attribute name="Service-Class" value="com.zimbra.qa.email.INJECTStaf"/>
<attribute name="Packaged-Jars" value="json-20160810 commons-codec-1.7.jar activation ical4j-0.9.16-patched mail-1.4.5 javamail-1.4.5 commons-cli-1.2 servlet-api junit-4.8.2 dom4j-1.5.2 commons-httpclient-3.1 log4j-1.2.15 jaxen-1.1.3 commons-logging-1.0.3 ${zimbraJarPath}"/>
</section>
</manifest>
</jar>
</target>
<target name="zm-network-soap-content" description="Copies network related soap data and tests">
<mkdir dir="${build.temp.dir}"/>
<echo message="Copying network related data and tests..."/>
<!--Current set of network related changes do not need these steps to be executed in zimbraX. Hence this part has been commented.-->
<if><available file="${zm-network-soap-harness.dir}/conf/setup.sh" type="file"/>
<then><delete file="./conf/setup.sh"/></then>
</if>
<if> <available file="${zm-network-soap-harness.dir}" type="dir"/>
<then>
<copy todir="${build.temp.dir}/data">
<fileset dir="${zm-network-soap-harness.dir}/data">
<include name="**/*"/>
</fileset>
</copy>
</then>
</if>
</target>
<target name="soap-build-set-up" depends="zm-network-soap-content">
<copy todir="${build.temp.dir}/data/testmailraw">
<fileset dir="data/testmailraw" includes="**"/>
</copy>
<copy todir="${build.temp.dir}/data/soapvalidator">
<fileset dir="data/soapvalidator" includes="**"/>
</copy>
</target>
<target name="build-soap-data-file" depends="soap-build-set-up,staf-jar">
<copy todir="${build.dir}">
<fileset dir="src/bin">
<include name="runreports.sh"/>
<include name="runtmssoap.sh"/>
<include name="runreports_p.sh"/>
</fileset>
</copy>
<fixcrlf srcdir="${build.dir}" eol="lf" eof="remove" includes="*.sh" />
<tar longfile="gnu" destfile="${build.dir}/soapdata.tar">
<tarfileset dir="${build.temp.dir}/data/soapvalidator" prefix="soapvalidator/data/soapvalidator" mode="555" includes="**"/>
<tarfileset dir="${build.dir}" prefix="soapvalidator/bin" mode="555">
<include name="runreports.sh"/>
<include name="runtmssoap.sh"/>
<include name="runreports_p.sh"/>
</tarfileset>
<tarfileset dir="${build.temp.dir}/data/testmailraw" prefix="soapvalidator/data/testmailraw" mode="555" includes="**"/>
<tarfileset dir="conf" prefix="soapvalidator/conf" mode="555">
<include name="**/*"/>
</tarfileset>
<tarfileset dir="${build.staf.jars.dir}" prefix="soapvalidator/bin/jars" mode="555">
<include name="**/*.jar"/>
<exclude name="**/ExtensionCustomAuthQA.jar"/>
</tarfileset>
<tarfileset dir="${build.staf.jars.dir}" prefix="soapvalidator/build" mode="555">
<include name="**/ExtensionCustomAuthQA.jar"/>
</tarfileset>
<tarfileset dir="${build.staf.jars.dir}" prefix="soapvalidator/build" mode="555">
<include name="**/zimbra-extns-storemanager.jar"/>
</tarfileset>
<tarfileset dir="${build.staf.jars.dir}" prefix="soapvalidator/build" mode="555">
<include name="**/ScalityHttpStore.jar"/>
</tarfileset>
<tarfileset dir="${dist.lib.dir}" prefix="soapvalidator/bin" mode="555">
<include name="**/*.jar"/>
</tarfileset>
</tar>
<!-- Delete the build/tmp directory after build-->
<!-- <delete dir="${build.tmp.dir}"/> -->
</target>
<target name="build-testware-one" description="testware one" depends="build-soap-data-file" />
<target name="build-testware-two" description="testware two" depends="build-smtp-service-file" />
<target name="build-testware" description="Build soap harness testware" depends="clean,build-testware-one,build-testware-two,build-tools-setup,compress-move" />
<target name="Run-SoapTestCore" depends="compile,zm-network-soap-content" description="Run Staf Tests in non-STAF environment">
<property name="testRoot" value="build/temp/data/soapvalidator/"/>
<property name="testSuite" value="smoke"/>
<property name="testResultDir" value="."/>
<property name="testRootOption" value="f"/>
<script language="javascript">
<![CDATA[
validTestSuites = ["smoke", "sanity", "bhr", "functional"];
testSuiteArr = project.getProperty('testSuite').split(',');
testSuiteStr = "";
for(i=0; i < testSuiteArr.length; i++) {
// Check if the testSuite is valid one.
if (validTestSuites.indexOf(testSuiteArr[i]) >-1) {
testSuiteStr = testSuiteStr + " -t " + testSuiteArr[i];
}
}
project.setProperty("testSuiteList", testSuiteStr);
]]>
</script>
<echo>STAF: Executing ${testRoot} ${testSuiteList} </echo>
<java classname="com.zimbra.qa.soap.SoapTestMain" classpathref="test.class.path" fork="true" failonerror="true">
<arg line="-${testRootOption} ${testRoot} -l conf/log4j-dev.properties -p conf/global.properties -z . ${testSuiteList} -j -o ${testResultDir}"/>
</java>
</target>
<target name="Run-SoapTestSanity" depends="compile,zm-network-soap-content" description="Run Staf Tests in non-STAF environment">
<property name="testRoot" value="build/temp/data/soapvalidator/SanityTest/"/>
<echo>STAF: Executing ${testRoot}</echo>
<java classname="com.zimbra.qa.soap.SoapTestMain" classpathref="test.class.path" fork="true" failonerror="true">
<arg line="-f ${testRoot} -l conf/log4j-dev.properties -p conf/global.properties -z . -t sanity -j"/>
</java>
</target>
<target name="Execute_Tests" depends="build-init,resolve" description="Run Staf Tests in non-STAF environment">
<echo>STAF: Executing ${testRoot}</echo>
<echo>class path value ${class.path}</echo>
<java classname="com.zimbra.qa.soap.SoapTestMain" classpathref="test.class.path" fork="true" failonerror="true">
<arg line="-f ${testRoot} -l conf/log4j-dev.properties -p conf/global.properties -z . -j -k none -t ${suite}"/>
</java>
</target>
</project>