-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
1296 lines (1122 loc) · 62.1 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 name="alfresco"
default="build-tomcat" >
<dirname property="alfresco.basedir" file="${ant.file.alfresco}"/>
<property name="buildproperties.location" value="community"/>
<!-- ****************************************************** -->
<!-- ************ Initialisation/Configuration ************ -->
<!-- ****************************************************** -->
<import file="${alfresco.basedir}/macros.xml" />
<import file="${alfresco.basedir}/projects.xml" />
<!-- For support of the script tag, we have to choose between -->
<!-- supporting Java 1.5 or Ant 1.6, and we've opted for -->
<!-- Java 1.5. (Ant 1.6 fails to be able to load the BSF or -->
<!-- JSR-223 jars from anywhere other than the ant lib directory) -->
<fail message="Ant 1.7 or higher is required to build. ${ant.version} detected">
<!-- antversion tag not available in 1.6 which is unhelpful -->
<condition><contains string="${ant.version}" substring="1.6." /></condition>
</fail>
<fail message="Ant 1.7 or higher is required to build. ${ant.version} detected">
<condition><not><antversion atleast="1.7" /></not></condition>
</fail>
<target name="init">
<property environment="env" />
<!--
On UNIX, it's considered very poor form to dump a config file that
does not start with "." into the user's $HOME directory.
On Windows, it's a bit more debatable, but in any event Alfresco
config files should always start with "alfresco-...", so the current
prop file convention needs to be fixed no matter how you slice it.
The conditional below is intended to make the transition more graceful
until we re-work the build.
-->
<condition property = "alfresco.user.override.properties.file"
value = "${user.home}/.alfresco-user-override.properties"
else = "${user.home}/user-override.properties">
<available file = "${user.home}/.alfresco-user-override.properties"/>
</condition>
<property file = "${alfresco.user.override.properties.file}" />
<property file="${alfresco.basedir}/projects/repository/config/alfresco/version.properties" />
<property file="${alfresco.basedir}/${buildproperties.location}.properties"/>
<property file="${alfresco.basedir}/build.properties" />
<property file="${alfresco.basedir}/shared.properties" />
<echo>user.home = ${user.home}</echo>
<echo>version.number = ${version.number}</echo>
<!-- Where to get BSF/Rhino from if on Java 1.5 -->
<condition property="classpath.bsf_javascript" else=""
value="${dir.project.3rdparty.lib}/bsf-2.4.0.jar:${dir.project.3rdparty.lib}/rhino-js-1.6R7.jar:${dir.project.3rdparty.lib}/commons/commons-logging-1.1.jar">
<equals arg1="${ant.java.version}" arg2="1.5" />
</condition>
<path id="classpath.compile">
<fileset dir="${dir.project.3rdparty.lib}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${dir.projects}">
<include name="**/${dir.name.build}/${dir.name.dist}/*.jar" />
</fileset>
<fileset dir="${dir.modules}">
<include name="**/${dir.name.lib}/*.jar" />
<exclude name="wcmquickstart/wcmquickstartwebapp/**" />
<exclude name="wcmquickstart/wcmquickstartwebsite/${dir.name.build}/**" />
</fileset>
<fileset dir="${dir.modules}">
<include name="**/${dir.name.build}/${dir.name.dist}/*.jar" />
</fileset>
</path>
<!-- Extension point for overriding -->
<path id="classpath.compile.extension"/>
<path id="classpath.compile.solr">
<fileset dir="${dir.project.solr.lib}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="classpath.compile.repository-bm">
<fileset dir="${dir.project.repository-bm.lib}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="classpath.compile.system-build-test">
<fileset dir="${dir.project.system-build-test.lib}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${dir.project.repository-bm.classes}" />
</path>
<path id="classpath.unit.test">
<!--
<dirset dir="${dir.projects}">
<include name="**/${dir.name.build}/${dir.name.classes}" />
</dirset>
<pathelement location="${user.home}"/>
<pathelement location="${dir.project.datamodel.config}"/>
<pathelement location="${dir.project.repository.config}"/>
<pathelement location="${dir.project.webclient.config}"/>
<pathelement location="${dir.project.deployment.config}"/>
<pathelement location="${dir.project.remoteapi.config}"/>
<dirset dir="${dir.projects}">
<include name="**/${dir.name.source}/${dir.name.test.resources}" />
</dirset>
<fileset dir="${dir.project.3rdparty.lib}">
<include name="**/*.jar" />
</fileset>
-->
<pathelement location="${user.home}" />
<pathelement location="${dir.project.core.classes}" />
<pathelement location="${dir.project.core.src.java}" />
<pathelement location="${dir.project.datamodel.classes}" />
<pathelement location="${dir.project.catalinavirtual.classes}" />
<pathelement location="${dir.project.jlan.classes}" />
<pathelement location="${dir.project.mbeans.classes}" />
<pathelement location="${dir.project.jndi.classes}" />
<pathelement location="${dir.project.deployment.classes}" />
<pathelement location="${dir.project.remoteapi.classes}" />
<pathelement location="${dir.project.repository.classes}" />
<pathelement location="${dir.project.system-build-test.classes}" />
<pathelement location="${dir.project.wdrdeployment.classes}" />
<pathelement location="${dir.project.webframeworkcommons.classes}" />
<pathelement location="${dir.project.webclient.classes}" />
<pathelement location="${dir.project.webserviceclient.classes}" />
<pathelement location="${dir.project.3rdparty.lib}/junit-dep-4.10.jar" />
<!-- <pathelement location="${alf.build.location.data}"/> -->
<pathelement location="${dir.project.datamodel.config}" />
<pathelement location="${dir.project.repository.config}" />
<pathelement location="${dir.project.webclient.config}" />
<pathelement location="${dir.project.deployment.config}" />
<pathelement location="${dir.project.remoteapi.config}" />
<pathelement location="${dir.project.core}/${dir.name.source}/${dir.name.test.resources}" />
<pathelement location="${dir.project.remoteapi}/${dir.name.source}/${dir.name.test.resources}" />
<pathelement location="${dir.project.repository}/${dir.name.source}/${dir.name.test.resources}" />
<pathelement location="${dir.project.webclient}/${dir.name.source}/${dir.name.test.resources}" />
</path>
<!-- Add on all the 3rd party libs based on the eclipse project -->
<!-- Includes libs that are both exported and non-exported -->
<script language="javascript" classpath="${classpath.bsf_javascript}"> <![CDATA[
importClass(java.util.regex.Matcher);
importClass(java.util.regex.Pattern);
importClass(java.io.File);
importClass(java.io.FileInputStream);
importClass(java.io.InputStreamReader);
importClass(java.io.BufferedReader);
var path = project.getReference("classpath.unit.test");
var projPath = project.getProperty("dir.project.3rdparty") + "/";
var is_entry = Pattern.compile("[ \t]*\<classpathentry.*?");
//is_exported = Pattern.compile("[ \t]*\<classpathentry.*? exported=[\"\']true[\"\'][ \/].*");
var is_lib = Pattern.compile(".*? kind=[\"\']lib[\"\'][ \/].*?");
var get_path = Pattern.compile(".*? path=[\"\'](.*?)[\"\'][ \/].*?");
var f = new BufferedReader(new InputStreamReader(
new FileInputStream(new File(projPath + ".classpath"))
));
var line;
while( (line = f.readLine()) != null ) {
if( is_entry.matcher(line).matches() &&
is_lib.matcher(line).matches()) {
var m = get_path.matcher(line);
if(m.matches()) {
var this_path = m.group(1);
if(! this_path.startsWith("lib/ant-1.")) {
var pe = path.createPathElement();
pe.setLocation(new File(projPath+this_path));
}
}
}
}
]]></script>
<!-- Extension point for overriding -->
<path id="classpath.unit.test.extension"/>
<path id="classpath.javadoc">
<path refid="classpath.compile"/>
</path>
<!-- Extension point for overriding -->
<path id="classpath.javadoc.extension"/>
<patternset id="files.tests.startup">
<include name="**/RepositoryStartupTest.java" />
</patternset>
<patternset id="files.tests.intermittent">
<include name="**/org/alfresco/wcm/WCMTestSuite.java" />
<include name="**/org/alfresco/repo/domain/DomainTestSuite.java" />
<include name="**/org/alfresco/repo/publishing/WebPublishingTestSuite.java" />
</patternset>
<patternset id="files.tests">
<!-- System Build Tests (runs using embedded Jetty) -->
<exclude name="**/*SystemTest.java" />
<exclude name="**/Base*Test.java" />
<exclude name="**/Abstract*Test.java" />
<exclude name="**/RepositoryStartupTest.java" />
<exclude name="**/WCMTestSuite.java" />
<exclude name="**/org/alfresco/repo/web/scripts/publishing/PublishingRestApiTest.java" />
<include name="**/org/alfresco/repo/MiscSystemTestSuite.java" />
<!-- Exclude tests that require JodConverter/OpenOffice.org as these are hanging the build server -->
<exclude name="**/*OOoTest.java" />
<!-- Action Tests -->
<exclude name="**/org/alfresco/repo/action/**/*Test.java" />
<include name="**/org/alfresco/repo/action/ActionTestSuite.java" />
<!-- Auditable Tests -->
<exclude name="**/org/alfresco/repo/audit/**/*Test.java" />
<include name="**/org/alfresco/repo/audit/AuditTestSuite.java" />
<!-- AVM Tests -->
<exclude name="**/org/alfresco/repo/avm/**/*Test.java" />
<exclude name="**/org/alfresco/repo/avm/**/*TestP.java" />
<include name="**/org/alfresco/repo/avm/AVMTestSuite.java" />
<!-- Content Tests -->
<exclude name="**/org/alfresco/repo/content/**/*Test.java" />
<include name="**/org/alfresco/repo/content/DataModelContentTestSuite.java" />
<include name="**/org/alfresco/repo/content/ContentFullContextTestSuite.java" />
<include name="**/org/alfresco/repo/content/ContentMinimalContextTestSuite.java" />
<include name="**/org/alfresco/repo/content/metadata/xml/XmlMetadataExtracterTest.java" />
<!-- Domain Tests -->
<exclude name="**/org/alfresco/repo/domain/**/*Test.java" />
<!-- Model (Multilingual and File Folder) Tests -->
<exclude name="**/org/alfresco/repo/model/**/*Test.java" />
<include name="**/org/alfresco/repo/model/ModelTestSuite.java" />
<!-- Publishing Tests -->
<exclude name="**/org/alfresco/repo/publishing/**/*Test.java" />
<!-- Version Tests -->
<exclude name="**/org/alfresco/repo/version/**/*Test.java" />
<include name="**/org/alfresco/repo/version/VersionTestSuite.java" />
<!-- Workflow Tests -->
<exclude name="**/org/alfresco/repo/workflow/**/*Test.java" />
<include name="**/org/alfresco/repo/workflow/WorkflowTestSuite.java" />
<!-- WCM Tests -->
<exclude name="**/org/alfresco/wcm/**/*Test.java" />
<!-- Web Script Tests -->
<exclude name="**/org/alfresco/repo/web/scripts/**/*Test.java" />
<include name="**/org/alfresco/repo/web/scripts/WebScriptTestSuite.java" />
<include name="**/org/alfresco/repo/web/scripts/wcm/sandbox/AssetTest.java" />
<!-- Search Tests -->
<exclude name="**/org/alfresco/repo/search/**/*Test.java" />
<include name="**/org/alfresco/repo/search/SearchTestSuite.java" />
<!-- Security Tests -->
<!-- Note org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizerTest has its own context and runs on its own -->
<exclude name="**/org/alfresco/repo/ownable/**/*Test.java" />
<exclude name="**/org/alfresco/repo/security/authentication/**/*Test.java" />
<exclude name="**/org/alfresco/repo/security/authority/**/*Test.java" />
<exclude name="**/org/alfresco/repo/security/permissions/**/*Test.java" />
<exclude name="**/org/alfresco/repo/security/person/**/*Test.java" />
<include name="**/org/alfresco/repo/security/SecurityTestSuite.java" />
<!-- Usage Tests -->
<exclude name="**/org/alfresco/repo/usage/**/*Test.java" />
<include name="**/org/alfresco/repo/usage/UsageTestSuite.java" />
<!-- System Build Tests (runs using embedded Jetty) -->
<exclude name="**/org/alfresco/repo/RepoJetty*Test.java" />
<!-- embeds: RepoBenchmark*SystemTest -->
<include name="**/org/alfresco/repo/bm/RepoBenchmarkSystemTestSuite.java" />
<!-- embeds: SiteActivitySystemTest,WebServiceSuiteSystemTest, ... -->
<exclude name="**/org/alfresco/repo/transfer/fsr/**/*Test.java" />
<!-- Messaging facade -->
<exclude name="**/org/alfresco/repo/cluster/**/*Test.java"/>
<include name="**/org/alfresco/repo/cluster/BuildSafeTestSuite.java"/>
<!-- All other tests -->
<include name="**/*Test.java" />
</patternset>
</target>
<!-- ****************************************************** -->
<!-- ***************** Entry point targets **************** -->
<!-- ****************************************************** -->
<target name="build"
description="Performs a clean build of all projects"
depends="clean, incremental" />
<target name="incremental-webclient-depends"
description="Performs an incremental build of the dependencies of the Alfresco WAR"
depends="incremental-core,
incremental-datamodel,
incremental-jlan,
incremental-mbeans,
incremental-deployment,
incremental-repository,
incremental-wdrdeployment,
incremental-remoteapi,
incremental-webframeworkcommons,
incremental-jndi,
incremental-catalinavirtual" />
<target name="incremental"
description="Performs an incremental build of all projects"
depends="incremental-webclient-depends,
incremental-webclient,
incremental-webserviceclient,
incremental-slingshot,
incremental-webeditor,
incremental-webeditor-plugin,
incremental-solr,
incremental-file-transfer-receiver" />
<target name="distribute-amps"
description="Creates the distribution AMP file for core extensions"
depends="package-spp-extension,
package-wcmquickstart-extension,
package-wcmquickstart-share-extension,
build-wcmquickstartwebapp-war">
<!-- Copy AMPs to assembly area for installer -->
<copy todir="${dir.continuous.assemble}/amps">
<fileset dir="${dir.module.spp.dist}" includes="${file.name.amp.spp}" />
<fileset dir="${dir.module.wcmquickstart.dist}" includes="${file.name.amp.wcmquickstart}" />
<fileset dir="${dir.module.wcmquickstart-share.dist}" includes="${file.name.amp.wcmquickstart-share}" />
</copy>
<copy todir="${dir.continuous.assemble}" file="${dir.project.wcmquickstart-webapp}/target/${file.name.war.wcmquickstart-webapp}" />
<!-- Zip bundles of AMPs -->
<zip destfile="${dir.continuous.dist}/${file.name.dist.spp}.zip">
<fileset dir="${dir.module.spp.dist}" includes="${file.name.amp.spp}" />
<fileset file="${dir.module.spp}/README_spp.txt" />
</zip>
</target>
<!-- ******************** -->
<!-- ** Bundle targets ** -->
<!-- ******************** -->
<target name="build-tomcat"
description="Performs a clean build for Tomcat and deploys the Alfresco and application WAR files"
depends="clean, incremental-tomcat" />
<target name="incremental-tomcat"
description="Performs an incremental build for Tomcat and deploys the Alfresco and application WAR files"
depends="incremental-webclient-tomcat, incremental-slingshot-tomcat" />
<target name="incremental-webclient-tomcat"
description="Performs an incremental build and deployment of the Alfresco WAR"
depends="incremental-webclient-depends,
incremental-webclient,
deploy-webclient-tomcat" />
<target name="incremental-webclient-tomcat-exploded"
depends="incremental-webclient-depends,
package-webclient-jar,
deploy-webclient-tomcat-exploded" />
<target name="incremental-slingshot-tomcat"
description="Performs an incremental build and deployment of the slingshot WAR"
depends="package-webframeworkcommons-jar,
incremental-slingshot,
deploy-slingshot-tomcat" />
<target name="incremental-slingshot-tomcat-exploded"
depends="package-webframeworkcommons-jar,
package-slingshot-jar,
deploy-slingshot-tomcat-exploded,
minimize-slingshot-deployed-javascript" />
<target name="incremental-webeditor-tomcat"
description="Performs an incremental build and deployment of the Web Editor WAR"
depends="package-webframeworkcommons,
package-webeditor,
package-webeditor-plugin,
deploy-webeditor-tomcat" />
<target name="incremental-webeditor-tomcat-exploded"
depends="compile-webframeworkcommons,
compile-webeditor,
compile-webeditor-plugin,
deploy-webeditor-tomcat-exploded,
minimize-webeditor-deployed-javascript" />
<target name="package-all-webeditor"
depends="package-forms-client-jar,
package-webeditor,
package-webeditor-plugin,
package-webeditor-customersite-sample" />
<target name="generate-docs"
description="Compiles all documentation for all projects"
depends="generate-javadocs-core,
generate-javadocs-datamodel,
generate-javadocs-mbeans,
generate-javadocs-deployment,
generate-javadocs-repository,
generate-javadocs-wdrdeployment,
generate-javadocs-remoteapi,
generate-javadocs-jndi,
generate-javadocs-catalinavirtual,
generate-javadocs-webclient,
generate-taglibdocs-webclient,
generate-javadocs-webserviceclient,
generate-javadocs-jlan,
generate-javadocs-slingshot,
generate-javadocs-solr,
generate-javadocs-webframeworkcommons,
generate-javadocs-wcmquickstart-clientapi" />
<!-- ****************************************************** -->
<!-- ****************** Cleaning targets ****************** -->
<!-- ****************************************************** -->
<target name="clean"
description="Cleans everything, all projects, modules and all tomcat deployments"
depends="clean-projects, clean-modules, clean-tomcat-deployments" />
<target name="clean-projects"
description="Cleans all projects"
depends="clean-webclient-projects,
clean-slingshot-projects,
clean-webeditor-projects,
clean-webserviceclient,
clean-solr,
clean-file-transfer-receiver" />
<target name="clean-webclient-projects"
description="Cleans all projects related to the webclient project"
depends="clean-core,
clean-datamodel,
clean-jlan,
clean-mbeans,
clean-deployment,
clean-repository,
clean-wdrdeployment,
clean-remoteapi,
clean-jndi,
clean-catalinavirtual,
clean-webframeworkcommons,
clean-webclient,
clean-repository-bm,
clean-system-build-test" />
<target name="clean-slingshot-projects"
description="Cleans all projects related to the slingshot project"
depends="clean-webframeworkcommons,
clean-slingshot" />
<target name="clean-webeditor-projects"
description="Cleans all projects related to the web editor project"
depends="clean-webframeworkcommons,
clean-webeditor-plugin,
clean-webeditor,
clean-webeditor-customersite-sample" />
<target name="clean-modules"
description="Cleans all modules"
depends="clean-spp,
clean-dod5015,
clean-dod5015-share,
clean-wcmquickstart,
clean-wcmquickstart-share,
clean-wcmquickstart-clientapi,
clean-wcmquickstart-webapp" />
<target name ="clean-tomcat-deployments"
description="Cleans all Tomcat server deployments"
depends="clean-webclient-tomcat-deploy,
clean-application-tomcat-deploy,
clean-virtual-tomcat-deploy" />
<target name="clean-webclient-tomcat-deploy"
description="Cleans the Alfresco WAR from the Tomcat server"
depends="init">
<delete file="${dir.deploy.tomcat}/${file.name.war.webclient}" />
<delete dir="${dir.deploy.tomcat.webclient}"
includeEmptyDirs="true"
quiet="yes" />
</target>
<target name="clean-application-tomcat-deploy"
description="Cleans all apps from the application Tomcat server"
depends="init">
<delete file="${dir.deploy.tomcat.application}/${file.name.war.slingshot}" />
<delete dir="${dir.deploy.tomcat.application.slingshot}"
includeEmptyDirs="true" quiet="yes" />
<delete file="${dir.deploy.tomcat.application}/${file.name.war.webeditor}" />
<delete dir="${dir.deploy.tomcat.application.webeditor}"
includeEmptyDirs="true" quiet="yes" />
<delete file="${dir.deploy.tomcat.application}/${file.name.war.webeditor.sample.customersite}" />
<delete dir="${dir.deploy.tomcat.application.webeditor.sample.customersite}"
includeEmptyDirs="true" quiet="yes" />
</target>
<target name="clean-virtual-tomcat-deploy"
description="Cleans the Virtual Tomcat deployment"
depends="init">
<delete failonerror="no">
<!-- Remove old spring jar files lingering in common/lib, if any -->
<fileset dir="${home.tomcat.virtual}/common/lib" includes="spring*.jar,org.springframework*.jar"/>
<!-- Get rid of old config files -->
<fileset dir="${home.tomcat.virtual}/conf" includes="alfresco-*"/>
</delete>
</target>
<!--
<target name="clean-jboss-deploy"
description="Cleans the Alfresco application from JBoss"
depends="init">
<delete file="${dir.deploy.jboss}/${file.name.war.webclient}" />
</target>
-->
<!-- ****************************************************** -->
<!-- **************** Deployment targets ****************** -->
<!-- ****************************************************** -->
<target name="deploy-virtual-tomcat"
description="Deploys to Virtual Tomcat (the virtualization server)"
depends="init, clean-virtual-tomcat-deploy">
<deploy-virtual-tomcat location="${home.tomcat.virtual}" />
</target>
<target name="-deploy-tomcat-common" depends="init">
<available file="${home.tomcat}/common/lib" type="dir" property="tomcat5.present" />
<fail if="tomcat5.present" message="Deployment using these scripts requires Tomcat 6." />
<!-- ensure mysql drivers and xalan files are present -->
<delete>
<fileset dir="${home.tomcat}/lib"
includes="mysql-connector*"
excludes="${file.name.jar.mysql.connector}" />
<fileset dir="${home.tomcat}/lib"
includes="postgresql-*"
excludes="${file.name.jar.postgres.connector}" />
</delete>
<copy todir="${home.tomcat}/lib"
file="${dir.project.3rdparty.lib}/${dir.name.devenv}/${file.name.jar.postgres.connector}" />
<copy todir="${home.tomcat}/lib"
file="${dir.project.3rdparty.lib}/${dir.name.devenv}/${file.name.jar.mysql.connector}" />
<copy todir="${home.tomcat}/endorsed"
file="${dir.project.3rdparty.lib}/${dir.name.xalan}/${file.name.jar.xalan}" />
<copy todir="${home.tomcat}/endorsed"
file="${dir.project.3rdparty.lib}/${dir.name.xalan}/${file.name.jar.serializer}" />
<!-- enable WCM functionality -->
<copy todir="${home.tomcat}/shared/classes/alfresco/extension"
file="${dir.project.installer}/wcm-bootstrap-context.xml" />
</target>
<target name="deploy-webclient-tomcat"
description="Deploys the Alfresco WAR to Tomcat"
depends="clean-webclient-tomcat-deploy, -deploy-tomcat-common, deploy-virtual-tomcat">
<delete file="${dir.deploy.tomcat}/${file.name.war.webclient}" />
<delete dir="${dir.deploy.tomcat.webclient}"
includeEmptyDirs="true" quiet="yes" />
<!-- copy the alfresco WAR file to Tomcat's deploy folder -->
<copy todir="${dir.deploy.tomcat}"
file="${dir.project.webclient.dist}/${file.name.war.webclient}" />
</target>
<target name="deploy-webclient-tomcat-exploded"
depends="-deploy-tomcat-common">
<!-- remove the WAR, if necessary -->
<delete file="${dir.deploy.tomcat}/${file.name.war.webclient}" />
<!-- copy the class files from each project to the WEB-INF/classes folder -->
<copy todir="${dir.deploy.tomcat.webclient}/WEB-INF/classes" verbose="${copy.verbose}">
<!-- copy class files -->
<fileset dir="${dir.project.core.classes}" />
<fileset dir="${dir.project.datamodel.classes}" />
<fileset dir="${dir.project.mbeans.classes}" />
<fileset dir="${dir.project.deployment.classes}" />
<fileset dir="${dir.project.repository.classes}"
excludes="**/extension/**" />
<fileset dir="${dir.project.wdrdeployment.classes}" />
<fileset dir="${dir.project.remoteapi.classes}" />
<fileset dir="${dir.project.catalinavirtual.classes}" />
<fileset dir="${dir.project.webframeworkcommons.classes}" />
<fileset dir="${dir.project.webclient.classes}"
excludes="**/extension/**" />
<fileset dir="${dir.project.jlan.classes}" excludes="org/alfresco/config/**" />
<!-- copy config files -->
<fileset dir="${dir.project.core.src.java}"
includes="log4j.properties,logging.properties" />
<fileset dir="${dir.project.datamodel.config}"
excludes="**/extension/**" />
<fileset dir="${dir.project.repository.config}"
excludes="**/extension/**" />
<fileset dir="${dir.project.remoteapi.config}"
excludes="**/extension/**" />
<fileset dir="${dir.project.webclient.config}"
excludes="**/extension/**" />
<!-- NOTE: include dev-context.xml to allow developer overrides -->
<fileset dir="${dir.project.repository.config}"
includes="**/extension/dev-context.xml"/>
</copy>
<!-- for Share activity feed (email) notifier - overwrite dummy files -->
<copy todir="${dir.deploy.tomcat.webclient}/WEB-INF/classes/alfresco/messages" overwrite="true">
<!-- for activity messages based on activity type -->
<fileset dir="${dir.project.slingshot.config}/alfresco/site-webscripts/org/alfresco/components/dashlets"
includes="activity-list.get*.properties" />
<!-- note: remove ".get" since it seems to confuse java.util.ResourceBundle.getBundle -->
<mapper type="regexp" from="^(.*).get(.*)\.properties$$" to="\1\2.properties"/>
</copy>
<copy todir="${dir.deploy.tomcat.webclient}/WEB-INF/classes/alfresco/messages" overwrite="true">
<!-- for role.* messages -->
<fileset dir="${dir.project.slingshot.config}/alfresco/messages"
includes="slingshot*.properties" />
</copy>
<!-- copy webclient web source files i.e. JSPs, images etc. -->
<copy todir="${dir.deploy.tomcat.webclient}" verbose="${copy.verbose}">
<fileset dir="${dir.project.webclient.src.web}"
excludes="WEB-INF/jboss*.xml, WEB-INF/portlet*.xml,
WEB-INF/alfresco-object.xml" />
</copy>
<!-- copy required 3rd party libs -->
<copy todir="${dir.deploy.tomcat.webclient}/WEB-INF/lib" verbose="${copy.verbose}">
<fileset dir="${dir.project.3rdparty.lib}" includes="*.jar"
excludes="${dir.name.devenv}/**" />
<fileset dir="${dir.project.3rdparty.lib}/optional" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/jibx" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/openoffice" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/jmagick" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/commons" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/spring-surf" includes="${includes.webscriptframework.libs.spring-surf}" />
<fileset dir="${dir.project.3rdparty.lib}/jgroups" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/jbpm" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/activiti" includes="*.jar" />
<fileset dir="${dir.project.3rdparty.lib}/fop" includes="*.jar"/>
<fileset dir="${dir.project.3rdparty.lib}/abdera" includes="*.jar"/>
<fileset dir="${dir.project.3rdparty.lib}/gdata-1.45.0" includes="*.jar"/>
<fileset dir="${dir.project.3rdparty.lib}/spring-social" includes="*.jar"/>
</copy>
<!-- copy webservices files -->
<copy todir="${dir.deploy.tomcat.webclient}/WEB-INF" verbose="${copy.verbose}">
<fileset dir="${dir.project.remoteapi.src.webinf}"/>
</copy>
<copy todir="${dir.deploy.tomcat.webclient}/wsdl" verbose="${copy.verbose}">
<fileset dir="${dir.project.remoteapi.src.wsdl}" />
</copy>
<copy todir="${dir.deploy.tomcat.webclient}/WEB-INF/classes/META-INF" verbose="${copy.verbose}">
<fileset dir="${dir.project.remoteapi.src.metainf}"/>
</copy>
</target>
<target name="deploy-webclient-changes" depends="init">
<copy todir="${dir.deploy.tomcat.webclient}" verbose="${copy.verbose}">
<fileset dir="${dir.project.webclient.src.web}" excludes="WEB-INF/**" />
</copy>
</target>
<target name="deploy-slingshot-tomcat" depends="init"
description="Deploys the slingshot WAR to the application Tomcat server">
<delete file="${dir.deploy.tomcat.application}/${file.name.war.slingshot}" />
<delete dir="${dir.deploy.tomcat.application.slingshot}"
includeEmptyDirs="true" quiet="yes" />
<!-- copy the slingshot WAR file to the application Tomcat deploy folder -->
<copy todir="${dir.deploy.tomcat.application}"
file="${dir.project.slingshot.dist}/${file.name.war.slingshot}" />
</target>
<target name="deploy-slingshot-tomcat-exploded" depends="init">
<!-- remove the WAR, if necessary -->
<delete file="${dir.deploy.tomcat.application}/${file.name.war.slingshot}" />
<!-- copy all source files, ensuring slingshot project files are copied first -->
<copy todir="${dir.deploy.tomcat.application.slingshot}" verbose="${copy.verbose}">
<fileset dir="${dir.project.slingshot.src.web}" />
</copy>
<copy todir="${dir.deploy.tomcat.application.slingshot}" verbose="${copy.verbose}">
<fileset dir="${dir.project.webframeworkcommons.src.web}" excludes="WEB-INF/web.xml" />
</copy>
<!-- copy config files, ensuring slingshot project files are copied first -->
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.slingshot.config}" excludes="**/extension/**" />
</copy>
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.webframeworkcommons.config}" excludes="**/extension/**" />
</copy>
<!-- add all class files to WEB-INF/classes, ensuring slingshot project files are copied first -->
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.core.classes}" />
</copy>
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.slingshot.classes}" />
</copy>
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.jlan.classes}" />
<fileset dir="${dir.project.webframeworkcommons.classes}" />
</copy>
<!-- add all JARs to WEB-INF/lib -->
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/lib" verbose="${copy.verbose}">
<fileset dir="${dir.project.3rdparty.lib}"
includes="${includes.webscriptframework.libs} ${includes.slingshot.libs}" />
<fileset dir="${dir.project.3rdparty.lib}/optional"
includes="${includes.webscriptframework.libs.optional}" />
<fileset dir="${dir.project.3rdparty.lib}/commons"
includes="${includes.webscriptframework.libs.commons}" />
<fileset dir="${dir.project.3rdparty.lib}/spring-surf"
includes="${includes.webscriptframework.libs.spring-surf}" />
<fileset dir="${dir.project.3rdparty.lib}/abdera"
includes="${includes.webscriptframework.libs.abdera}" />
</copy>
<!-- unzip and add 3rd party javascript library -->
<unzip src="${file.zip.slingshot.yui}"
dest="${dir.deploy.tomcat.application.slingshot}" />
<!-- there seems to be a hidden __MACOSX folder in the YUI -->
<!-- distribution, remove it if present -->
<delete dir="${dir.deploy.tomcat.application.slingshot}/__MACOSX"
includeEmptyDirs="true" quiet="yes" />
<!-- Copy our yui directory to apply YUI fixes -->
<copy todir="${dir.deploy.tomcat.application.slingshot}/yui" verbose="${copy.verbose}">
<fileset dir="${dir.project.slingshot.src.web}/yui" />
</copy>
<!-- clean up previously generated properties files -->
<delete>
<fileset dir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes/alfresco/messages">
<include name="*_en.properties" />
</fileset>
<fileset dir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes/alfresco/site-webscripts">
<include name="*_en.properties" />
</fileset>
</delete>
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes/alfresco/messages">
<fileset dir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes/alfresco/messages"/>
<mapper type="regexp"
from="^([^_]*).properties$"
to="\1_en.properties"/>
</copy>
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes/alfresco/site-webscripts">
<fileset dir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes/alfresco/site-webscripts"/>
<mapper type="regexp"
from="^([^_]*).get.properties$"
to="\1.get_en.properties"/>
</copy>
</target>
<target name="minimize-slingshot-deployed-javascript" depends="init">
<echo>Merging selected Slingshot Javascript files...</echo>
<concat destfile="${dir.deploy.tomcat.application.slingshot}/js/yui-common.js" force="no">
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/utilities/utilities.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/button/button-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/container/container-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/menu/menu-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/json/json-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/selector/selector-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/datasource/datasource-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/autocomplete/autocomplete-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/paginator/paginator-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/datatable/datatable-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/history/history-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/treeview/treeview-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/cookie/cookie-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/uploader/uploader-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/calendar/calendar-min.js" />
<fileset file="${dir.deploy.tomcat.application.slingshot}/yui/resize/resize-min.js" />
<fileset file="${dir.project.slingshot.src.web}/yui/yui-patch.js" />
</concat>
<concat destfile="${dir.deploy.tomcat.application.slingshot}/js/documentlibrary-actions.js" force="no">
<fileset file="${dir.project.slingshot.src.web}/components/documentlibrary/actions.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/simple-dialog.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/documentlibrary/global-folder.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/documentlibrary/copy-move-to.js" />
<fileset file="${dir.project.slingshot.src.web}/components/people-finder/people-finder.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/documentlibrary/permissions.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/documentlibrary/aspects.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/social-publish.js" />
</concat>
<concat destfile="${dir.deploy.tomcat.application.slingshot}/js/datalist-actions.js" force="no">
<fileset file="${dir.project.slingshot.src.web}/components/data-lists/actions.js" />
<fileset file="${dir.project.slingshot.src.web}/modules/simple-dialog.js" />
</concat>
<touch file="${dir.deploy.tomcat.application.slingshot}/modules/about-share-min.js" />
<echo>Compressing Slingshot Javascript...</echo>
<minimize-javascript sourcedir="${dir.deploy.tomcat.application.slingshot}"
destdir="${dir.deploy.tomcat.application.slingshot}" />
</target>
<target name="deploy-webeditor-tomcat" depends="init"
description="Deploys the web editor WAR to the application Tomcat server">
<delete file="${dir.deploy.tomcat.application}/${file.name.war.webeditor}" />
<delete dir="${dir.deploy.tomcat.application.webeditor}"
includeEmptyDirs="true" quiet="yes" />
<!-- copy the web editor WAR file to the application Tomcat deploy folder -->
<copy todir="${dir.deploy.tomcat.application}"
file="${dir.project.webeditor.dist}/${file.name.war.webeditor}" />
</target>
<target name="deploy-webeditor-tomcat-exploded" depends="init">
<!-- remove the WAR, if necessary -->
<delete file="${dir.deploy.tomcat.application}/${file.name.war.webeditor}" />
<!-- copy all source files -->
<copy todir="${dir.deploy.tomcat.application.webeditor}" verbose="${copy.verbose}">
<fileset dir="${dir.project.webeditor.src.web}" excludes="WEB-INF/awe.tld" />
<fileset dir="${dir.project.webeditorplugin.src.web}" />
<fileset dir="${dir.project.webframeworkcommons.src.web}" excludes="WEB-INF/web.xml" />
</copy>
<!-- copy config files -->
<copy todir="${dir.deploy.tomcat.application.webeditor}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset file="${dir.project.webeditor.src.java}/log4j.properties" />
<fileset dir="${dir.project.webeditor.config}" excludes="**/extension/**" />
<fileset dir="${dir.project.webeditorplugin.config}" excludes="**/extension/**" />
<fileset dir="${dir.project.webframeworkcommons.config}" excludes="**/extension/**" />
</copy>
<!-- add all class files to WEB-INF/classes -->
<copy todir="${dir.deploy.tomcat.application.webeditor}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.webeditor.classes}" />
<fileset dir="${dir.project.webeditorplugin.classes}" />
<fileset dir="${dir.project.jlan.classes}" />
<fileset dir="${dir.project.webframeworkcommons.classes}" />
</copy>
<!-- copy forms-client-context.xml to inject form config and common properties -->
<copy todir="${dir.deploy.tomcat.application.webeditor}/WEB-INF/classes/org/springframework/extensions/surf"
file="${dir.project.webframeworkcommons.src}/plugin/forms-client-context.xml" />
<!-- add all JARs to WEB-INF/lib -->
<copy todir="${dir.deploy.tomcat.application.webeditor}/WEB-INF/lib" verbose="${copy.verbose}">
<fileset dir="${dir.project.3rdparty.lib}"
includes="${includes.webscriptframework.libs}" />
<fileset dir="${dir.project.3rdparty.lib}/optional"
includes="${includes.webscriptframework.libs.optional}" />
<fileset dir="${dir.project.3rdparty.lib}/commons"
includes="${includes.webscriptframework.libs.commons}" />
<fileset dir="${dir.project.3rdparty.lib}/spring-surf"
includes="${includes.webeditor.spring-surf}" />
<fileset dir="${dir.project.3rdparty.lib}/abdera"
includes="${includes.webscriptframework.libs.abdera}" />
</copy>
<!-- unzip and add YUI library -->
<unzip src="${file.zip.webeditor.yui}" dest="${dir.deploy.tomcat.application.webeditor}" />
</target>
<target name="deploy-webeditor-sample" depends="package-webeditor-customersite-sample-war">
<delete file="${dir.deploy.tomcat.application}/${file.name.war.webeditor.sample.customersite}" />
<copy todir="${dir.deploy.tomcat.application}"
file="${dir.project.webeditorsamples.customersite.dist}/${file.name.war.webeditor.sample.customersite}" />
</target>
<target name="deploy-webeditor-sample-exploded" depends="compile-webeditor-customersite-sample">
<delete file="${dir.deploy.tomcat.application}/${file.name.war.webeditor.sample.customersite}" />
<copy todir="${dir.deploy.tomcat.application.webeditor.sample.customersite}" verbose="${copy.verbose}">
<fileset dir="${dir.project.webeditorsamples.customersite.src.web}" />
</copy>
<copy todir="${dir.deploy.tomcat.application.webeditor.sample.customersite}/WEB-INF" verbose="${copy.verbose}">
<fileset dir="${dir.project.webeditor.src.webinf}" includes="awe.tld" />
</copy>
<copy todir="${dir.deploy.tomcat.application.webeditor.sample.customersite}/WEB-INF/lib" verbose="${copy.verbose}">
<fileset dir="${dir.project.3rdparty}/lib/commons"
includes="commons-httpclient-3.1.jar, commons-logging-1.1.1.jar, commons-codec-1.4.jar" />
<fileset dir="${dir.project.3rdparty}/lib/optional" includes="log4j-1.2.15.jar" />
<fileset dir="${dir.project.3rdparty}/lib/spring-surf"
includes="spring-webeditor-client-jsp-1.0.0.jar" />
<fileset dir="${dir.project.3rdparty}/lib" includes="json.jar" />
</copy>
<copy todir="${dir.deploy.tomcat.application.webeditor.sample.customersite}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.webeditorsamples.customersite.classes}" />
<fileset dir="${dir.project.webeditor.classes}" includes="org/alfresco/web/awe/**/*.class" />
<fileset dir="${dir.project.webeditor.src.java}" includes="log4j.properties" />
</copy>
</target>
<target name="minimize-webeditor-deployed-javascript" depends="init">
<minimize-javascript sourcedir="${dir.deploy.tomcat.application.webeditor}"
destdir="${dir.deploy.tomcat.application.webeditor}" />
</target>
<target name="deploy-fdk" depends="deploy-share-fdk, deploy-repo-fdk-exploded" />
<target name="deploy-share-fdk" depends="package-fdk-client">
<copy todir="${home.tomcat.application}/shared/lib"
file="${dir.project.fdk.client.dist}/${file.name.jar.fdk}" />
</target>
<target name="deploy-share-fdk-exploded" depends="init">
<copy todir="${dir.deploy.tomcat.application.slingshot}" verbose="${copy.verbose}">
<fileset dir="${dir.project.fdk.client.src.web}" />
</copy>
<copy todir="${dir.deploy.tomcat.application.slingshot}/WEB-INF/classes" verbose="${copy.verbose}">
<fileset dir="${dir.project.fdk.client.config}" />
</copy>
</target>
<target name="deploy-repo-fdk-exploded" depends="init">
<copy todir="${home.tomcat}/shared/classes" verbose="${copy.verbose}" overwrite="yes">
<fileset dir="${dir.project.fdk.repo.config}" includes="**/fdk-*.*" excludes="**/fdk-context.xml" />
</copy>
<copy todir="${home.tomcat}/shared/classes/alfresco/extension" verbose="${copy.verbose}" overwrite="yes">
<fileset dir="${dir.project.fdk.repo.config}/alfresco/module/org_alfresco_module_fdk"
includes="fdk-context.xml" />
</copy>
</target>
<target name="start-tomcat-webclient"
description="Starts the Alfresco Tomcat server on Windows"
depends="init">
<exec dir="${home.tomcat}/bin"
executable="cmd.exe"
spawn="true">
<arg line="/k startup.bat" />
</exec>
</target>
<target name="start-tomcat-virtual"
description="Starts the virtual Tomcat server on Windows"
depends="init">
<exec dir="${home.tomcat.virtual}/bin"
executable="cmd.exe"
spawn="true">
<arg line="/k startup.bat" />
</exec>
</target>
<target name="start-tomcat-application"
description="Starts the application Tomcat server on Windows"
depends="init">
<exec dir="${home.tomcat.application}/bin"
executable="cmd.exe"
spawn="true">
<arg line="/k startup.bat" />
</exec>
</target>
<target name="start-tomcat-webclient-debug"
description="Starts the Alfresco Tomcat server on Windows in debug mode"
depends="init">
<fail unless="env.JPDA_ADDRESS"
message="To run Tomcat in debug mode you need to setup the JPDA_ADDRESS enviornment variable"/>
<fail unless="env.JPDA_TRANSPORT"
message="To run Tomcat in debug mode you need to setup the JPDA_TRANSPORT enviornment variable"/>
<exec dir="${home.tomcat}/bin"
executable="cmd.exe"
spawn="true">
<arg line="/k catalina.bat jpda start" />
</exec>
</target>
<!--
<target name="deploy-jboss"
description="Deploys to JBoss"
depends="clean-jboss-deploy">
<copy todir="${dir.deploy.jboss}"
file="${dir.project.webclient.dist}/${file.name.war.webclient}" />
<delete>
<fileset dir="${home.jboss}/server/default/lib"
includes="mysql-connector*"
excludes="${file.name.jar.mysql.connector}" />
</delete>
<copy todir="${home.jboss}/server/default/lib"
file="${dir.project.3rdparty.lib}/${dir.name.devenv}/${file.name.jar.mysql.connector}" />
</target>
<target name="start-jboss"
description="Starts the JBoss server on Windows"
depends="init">
<exec dir="${home.jboss}/bin"
executable="cmd.exe"
spawn="true">