-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
2119 lines (1914 loc) · 94.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
<!--
$Id$
Notes:
This script builds the Centric Suite
The easiest way to get started is to run "ant deploy"
The build process will instruct you to have several environment variables
and to customize the build.properties. The build will fail until all
installation conditions are met.
Do not edit master.properties in this folder, a copy will be
made by the installation and you will be notified of the file to modify.
The build process needs write access to the destination web-app folder and
the fileLibrary configured in Concourse Suite Community Edition
-->
<project name="Concourse Suite Community Edition" default="usage" basedir=".">
<!-- enable environment variables -->
<property environment="env"/>
<!-- computed properties -->
<property name="fs" value="${file.separator}"/>
<property name="lf" value="${line.separator}"/>
<property name="base.dir" value="${basedir}"/>
<property name="bin.dir" value="${base.dir}${fs}bin"/>
<property name="doc.dir" value="${base.dir}${fs}doc"/>
<property name="lib.dir" value="${base.dir}${fs}lib"/>
<property name="src.dir" value="${base.dir}${fs}src"/>
<property name="src.classes.dir" value="${src.dir}${fs}java"/>
<property name="src.web.dir" value="${src.dir}${fs}web"/>
<property name="src.sql.dir" value="${src.dir}${fs}sql"/>
<property name="build.dir" value="${base.dir}${fs}build"/>
<property name="build.lib.dir" value="${build.dir}${fs}lib"/>
<property name="build.classes.dir" value="${build.dir}${fs}classes"/>
<property name="build.jsp.dir" value="${build.dir}${fs}jsp"/>
<property name="build.jspclasses.dir" value="${build.dir}${fs}jspclasses"/>
<property name="build.sql.dir" value="${build.dir}${fs}sql"/>
<property name="build.docs.dir" value="${build.dir}${fs}docs"/>
<property name="build.pref.dir" value="${build.dir}${fs}pref"/>
<property name="pref.dir" value="${base.dir}${fs}pref"/>
<property name="dist.dir" value="${base.dir}${fs}dist"/>
<property name="unittests.src.dir" value="${src.dir}${fs}testcases"/>
<property name="unittests.build.dir" value="${build.dir}${fs}testcases"/>
<property name="unittests.build.classes.dir" value="${unittests.build.dir}${fs}classes"/>
<property name="unittests.build.lib.dir" value="${unittests.build.dir}${fs}lib"/>
<property name="unittests.reports.dir" value="${unittests.build.dir}${fs}results"/>
<!-- Typical usage -->
<target name="usage">
<echo message="Further instructions will appear if settings are missing"/>
<echo message=""/>
<echo message="ant deploy: compile, build, copy, and generate web application (production)"/>
<echo message="ant dev: same as deploy, but doesn't do a clean compile (development)"/>
<echo message="ant installdb: create tables, insert base records and permissions into new database"/>
<echo message=" install.database: just create the tables"/>
<echo message=" install.help: just install the help contents"/>
<echo message="ant upgradedb: upgrades database with a specified script file"/>
<echo message="ant docs: generate JavaDocs for all packages"/>
<echo message="ant test: compile deployed JSPs to check for errors"/>
<echo message="ant war: generate a .war file for manual deployment"/>
<echo message="ant clean: delete the temporary build folder used by the install"/>
<echo message="ant ws: registers web services with apache axis webapp"/>
</target>
<!-- Environment variables must be set before continuing -->
<target name="init.environment">
<tstamp>
<format property="date.short" pattern="yyyyMMdd-HHmmss"/>
</tstamp>
<tstamp>
<format property="date.long" pattern="yyyy-MM-dd hh:mm:ss aa"/>
</tstamp>
<!-- log the build -->
<record name="${base.dir}/build.log" append="no"/>
</target>
<!-- See if Apache Axis is available for Web Services -->
<target name="init.axis" depends="init.axis.exists, init.axis.missing" if="AXIS_HOME">
<echo message="Apache Axis: Web Service Provider Present. Centric Web Services will be available."/>
</target>
<target name="init.axis.exists">
<property file="${base.dir}/home.properties"/>
<condition property="AXIS_HOME" value="${env.AXIS_HOME}">
<available file="${env.AXIS_HOME}"/>
</condition>
</target>
<target name="init.axis.missing" unless="AXIS_HOME">
<echo>
Apache Axis: Web Service Provider Missing. Centric Web Services will not
be available.
Please refer to the readme file for instructions on enabling web services.
</echo>
</target>
<!-- See if servlet API file exists -->
<target name="init.servlet.type" depends="init.environment">
<condition property="TYPE.CATALINA">
<equals arg1="${WEBSERVER.TYPE}" arg2="catalina"/>
</condition>
<condition property="TYPE.WEBLOGIC">
<equals arg1="${WEBSERVER.TYPE}" arg2="weblogic"/>
</condition>
<condition property="TYPE.GERONIMO">
<equals arg1="${WEBSERVER.TYPE}" arg2="geronimo"/>
</condition>
<condition property="TYPE.WEBSPHERE">
<equals arg1="${WEBSERVER.TYPE}" arg2="websphere"/>
</condition>
<condition property="TYPE.JBOSS">
<equals arg1="${WEBSERVER.TYPE}" arg2="jboss"/>
</condition>
</target>
<!-- Tomcat 4 -->
<target name="init.servlet4.exists" depends="init.environment" if="TYPE.CATALINA">
<available file="${CATALINA_HOME}/common/lib/servlet.jar" property="build.servlet4.present"/>
</target>
<target name="init.servlet4.set" depends="init.servlet4.exists" if="build.servlet4.present">
<property name="servletJar" value="${CATALINA_HOME}${fs}common${fs}lib${fs}servlet.jar"/>
<echo message="Web Server: Tomcat 4.x"/>
</target>
<!-- Tomcat 5.x -->
<target name="init.servlet5.exists" depends="init.environment" if="TYPE.CATALINA">
<available file="${CATALINA_HOME}/common/lib/servlet-api.jar" property="build.servlet5.present"/>
</target>
<target name="init.servlet5.set" depends="init.servlet5.exists" if="build.servlet5.present">
<property name="servletJar" value="${CATALINA_HOME}${fs}common${fs}lib${fs}servlet-api.jar"/>
<property name="jspJar" value="${CATALINA_HOME}${fs}common${fs}lib${fs}jsp-api.jar"/>
<property name="namingJar" value="${CATALINA_HOME}${fs}common${fs}lib${fs}naming-resources.jar"/>
<echo message="Web Server: Tomcat 5.x"/>
</target>
<!-- Tomcat 6.x -->
<target name="init.servlet6.exists" depends="init.environment" if="TYPE.CATALINA">
<available file="${CATALINA_HOME}/lib/servlet-api.jar" property="build.servlet6.present"/>
</target>
<target name="init.servlet6.set" depends="init.servlet6.exists" if="build.servlet6.present">
<property name="servletJar" value="${CATALINA_HOME}${fs}lib${fs}servlet-api.jar"/>
<property name="jspJar" value="${CATALINA_HOME}${fs}lib${fs}jsp-api.jar"/>
<property name="namingJar" value="${CATALINA_HOME}${fs}lib${fs}catalina.jar"/>
<echo message="Web Server: Tomcat 6.x"/>
</target>
<!-- Weblogic -->
<target name="init.weblogic.exists" depends="init.environment" if="TYPE.WEBLOGIC">
<available file="${WEBLOGIC_HOME}${fs}server${fs}lib${fs}weblogic.jar" property="build.weblogic.present"/>
</target>
<target name="init.weblogic.set" depends="init.weblogic.exists" if="build.weblogic.present">
<property name="servletJar" value="${WEBLOGIC_HOME}${fs}server${fs}lib${fs}weblogic.jar"/>
<property name="jspJar" value="${WEBLOGIC_HOME}${fs}server${fs}lib${fs}weblogic.jar"/>
<echo message="Web Server: WebLogic"/>
</target>
<!-- Geronimo 1.0 -->
<target name="init.geronimo10.exists" depends="init.environment" if="TYPE.GERONIMO">
<available file="${GERONIMO_HOME}/repository/org.apache.geronimo.specs/jars/geronimo-servlet_2.4_spec-1.0.jar" property="build.geronimo10.present"/>
</target>
<target name="init.geronimo10.set" depends="init.geronimo10.exists" if="build.geronimo10.present">
<property name="servletJar" value="${GERONIMO_HOME}/repository/org.apache.geronimo.specs/jars/geronimo-servlet_2.4_spec-1.0.jar"/>
<property name="jspJar" value="${GERONIMO_HOME}/repository/org.apache.geronimo.specs/jars/geronimo-jsp_2.0_spec-1.0.jar"/>
<property name="namingJar" value="${GERONIMO_HOME}/repository/tomcat/jars/naming-resources-5.5.9.jar"/>
<echo message="Web Server: Geronimo 1.0"/>
</target>
<!-- Geronimo 1.1 -->
<target name="init.geronimo11.exists" depends="init.environment" if="TYPE.GERONIMO">
<available file="${GERONIMO_HOME}/repository/org/apache/geronimo/specs/geronimo-servlet_2.4_spec/1.0.1/geronimo-servlet_2.4_spec-1.0.1.jar" property="build.geronimo11.present"/>
</target>
<target name="init.geronimo11.set" depends="init.geronimo11.exists" if="build.geronimo11.present">
<property name="servletJar" value="${GERONIMO_HOME}/repository/org/apache/geronimo/specs/geronimo-servlet_2.4_spec/1.0.1/geronimo-servlet_2.4_spec-1.0.1.jar"/>
<property name="jspJar" value="${GERONIMO_HOME}/repository/org/apache/geronimo/specs/geronimo-jsp_2.0_spec/1.0.1/geronimo-jsp_2.0_spec-1.0.1.jar"/>
<available file="${GERONIMO_HOME}/repository/tomcat/naming-resources/5.5.15/naming-resources-5.5.15.jar" property="namingJar" value="${GERONIMO_HOME}/repository/tomcat/naming-resources/5.5.15/naming-resources-5.5.15.jar"/>
<available file="${GERONIMO_HOME}/repository/tomcat/naming-resources/5.5.15-142/naming-resources-5.5.15-142.jar" property="namingJar" value="${GERONIMO_HOME}/repository/tomcat/naming-resources/5.5.15-142/naming-resources-5.5.15-142.jar"/>
<echo message="Web Server: Geronimo 1.1+"/>
</target>
<!-- JBoss -->
<target name="init.jboss24.exists" depends="init.environment" if="TYPE.JBOSS">
<available file="${JBOSS_HOME}/server/all/lib/javax.servlet.jar" property="build.jboss24.present"/>
</target>
<target name="init.jboss24.set" depends="init.jboss24.exists" if="build.jboss24.present">
<property name="servletJar" value="${JBOSS_HOME}/server/all/lib/javax.servlet.jar"/>
<property name="jspJar" value="${JBOSS_HOME}/server/all/lib/javax.servlet.jsp.jar"/>
<property name="namingJar" value="${JBOSS_HOME}/server/all/deploy/jbossweb-tomcat55.sar/naming-resources.jar"/>
<echo message="Web Server: JBoss using Servlet 2.4 API"/>
</target>
<!-- IBM WebSphere -->
<target name="init.websphere.exists" depends="init.environment" if="TYPE.WEBSPHERE">
<available file="${WEBSPHERE_HOME}{fs}lib{fs}j2ee.jar" property="build.websphere.present"/>
</target>
<target name="init.websphere.set" depends="init.websphere.exists" if="TYPE.WEBSPHERE">
<property name="servletJar" value="${WEBSPHERE_HOME}/lib/j2ee.jar"/>
<echo message="Servlet jar: ${servletJar}"/>
<echo message="Web Server: WebSphere"/>
</target>
<!-- See where the build.properties file exists -->
<target name="init.buildfile.exists">
<property file="${base.dir}/home.properties"/>
<condition property="CENTRIC_HOME" value="${env.CENTRIC_HOME}">
<available file="${env.CENTRIC_HOME}"/>
</condition>
<condition property="CENTRIC_FILELIBRARY" value="${env.CENTRIC_FILELIBRARY}">
<available file="${env.CENTRIC_FILELIBRARY}"/>
</condition>
<fail unless="CENTRIC_HOME">Initialization aborted
SOLUTION:
Either...
A. Use the home.properties file for this instance...
1. Create a file called "home.properties" in this directory with the
CENTRIC_HOME property:
CENTRIC_HOME=/path/to/apache-tomcat/webapps/centric
2. Create the directory and make sure file permissions are correct.
or...
B. Use environment variables
1. Create an environment variable CENTRIC_HOME which points to Tomcat's
Concourse Suite Community Edition webapp directory.
Ex. "export CENTRIC_HOME=/path/to/apache-tomcat/webapps/centric"
Ex. "Using System in Control Panel set CENTRIC_HOME=c:\Program
Files\Apache Software Foundation\Tomcat 5.5\webapps"
2. Create the directory and make sure file permissions are correct.
</fail>
<fail unless="CENTRIC_FILELIBRARY">Initialization aborted
SOLUTION:
Either...
A. Use the home.properties file for this instance...
1. Create a file called "home.properties" in this directory with the
CENTRIC_FILELIBRARY property:
CENTRIC_FILELIBRARY=/var/lib/centric_crm/fileLibrary
CENTRIC_FILELIBRARY=/opt/centric_crm/fileLibrary
CENTRIC_FILELIBRARY=/Library/Application\ Support/CentricCRM/fileLibrary"
CENTRIC_FILELIBRARY=c:\CentricCRM\fileLibrary"
2. Create the directory and make sure file permissions are correct.
or...
B. Use environment variables
1. Create an environment variable CENTRIC_FILELIBRARY which points to
Concourse Suite Community Edition's target fileLibrary.
The fileLibrary should be separate from CENTRIC_HOME because it contains
custom files for Concourse Suite Community Edition.
Ex. "export CENTRIC_FILELIBRARY=/var/lib/centric_crm/fileLibrary"
Ex. "export CENTRIC_FILELIBRARY=/Library/Application\
Support/CentricCRM/fileLibrary"
Ex. "Using System in Control Panel set
CENTRIC_FILELIBRARY=c:\CentricCRM\fileLibrary"
2. Create the directory and make sure file permissions are correct.
</fail>
<property name="build.config.filename" value="${CENTRIC_FILELIBRARY}/build.properties"/>
<condition property="build.config.present">
<and>
<isset property="build.config.filename"/>
<available file="${build.config.filename}" type="file"/>
</and>
</condition>
<available file="${base.dir}/lib/activation-1.1.jar" property="build.lib.present"/>
</target>
<target name="init.buildfile.type" depends="init.buildfile.exists" unless="build.config.present">
<echo message="Setting up the build.properties file for the first time..."/>
</target>
<target name="init.home.setup" depends="init.buildfile.type" unless="build.config.war">
<!-- Check the current directory for a CENTRIC_HOME, else use the global variable -->
<mkdir dir="${CENTRIC_HOME}/WEB-INF"/>
<mkdir dir="${CENTRIC_FILELIBRARY}"/>
</target>
<!-- Create the properties file if not exists -->
<target name="init.buildfile.create" depends="init.buildfile.exists, init.buildfile.type, init.home.setup" unless="build.config.present">
<copy file="${base.dir}/master.properties" tofile="${build.config.filename}" overwrite="false"/>
<available file="${build.config.filename}" property="build.config.present"/>
</target>
<!-- Load the properties for this system, stop here if not found -->
<target name="init.loadproperties" depends="init.buildfile.create">
<!-- IF src build.properties is newer than build.properties, abort now and have user update -->
<uptodate property="build.config.uptodate" srcfile="${base.dir}/master.properties" targetfile="${build.config.filename}"/>
<fail unless="build.config.uptodate">Initialization aborted
The build.properties file might be out of date.
Compare and update the site copy with the source template, making any
necessary changes.
Site File: ${build.config.filename}
Source Template: master.properties
</fail>
<loadproperties srcFile="${build.config.filename}">
<filterchain>
<filterreader classname="org.apache.tools.ant.filters.StripLineComments">
<param type="comment" value="#"/>
</filterreader>
</filterchain>
</loadproperties>
<fail unless="build.lib.present">Initialization aborted
SOLUTION:
Download the 3rd-party libraries and make sure they are available at
${lib.dir}${fs}, these are available as a separate download
</fail>
<fail unless="WEBSERVER.TYPE">Initialization aborted
SOLUTION:
Uncomment and edit the WEBSERVER.TYPE property in the build.properties
file:
${build.config.filename}
</fail>
<!-- Use the environment variable if available -->
<condition property="CATALINA_HOME" value="${env.CATALINA_HOME}">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="catalina"/>
<available file="${env.CATALINA_HOME}"/>
</and>
</condition>
<condition property="SERVLET_CONTAINER_EXISTS">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="catalina"/>
<available file="${CATALINA_HOME}"/>
</and>
</condition>
<!-- Use the environment variable if available -->
<condition property="WEBLOGIC_HOME" value="${env.WEBLOGIC_HOME}">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="weblogic"/>
<available file="${env.WEBLOGIC_HOME}"/>
</and>
</condition>
<condition property="SERVLET_CONTAINER_EXISTS">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="weblogic"/>
<available file="${WEBLOGIC_HOME}"/>
</and>
</condition>
<!-- Use the environment variable if available -->
<condition property="WEBSPHERE_HOME" value="${env.WEBSPHERE_HOME}">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="websphere"/>
<available file="${env.WEBSPHERE_HOME}"/>
</and>
</condition>
<condition property="SERVLET_CONTAINER_EXISTS">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="websphere"/>
<available file="${WEBSPHERE_HOME}"/>
</and>
</condition>
<!-- Use the environment variable if available -->
<condition property="GERONIMO_HOME" value="${env.GERONIMO_HOME}">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="geronimo"/>
<available file="${env.GERONIMO_HOME}"/>
</and>
</condition>
<condition property="SERVLET_CONTAINER_EXISTS">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="geronimo"/>
<available file="${GERONIMO_HOME}"/>
</and>
</condition>
<!-- Use the environment variable if available -->
<condition property="JBOSS_HOME" value="${env.JBOSS_HOME}">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="jboss"/>
<available file="${env.JBOSS_HOME}"/>
</and>
</condition>
<condition property="SERVLET_CONTAINER_EXISTS">
<and>
<equals arg1="${WEBSERVER.TYPE}" arg2="jboss"/>
<available file="${JBOSS_HOME}"/>
</and>
</condition>
<fail>Initialization aborted
<condition>
<and>
<not>
<isset property="SERVLET_CONTAINER_EXISTS"/>
</not>
<equals arg1="${WEBSERVER.TYPE}" arg2="catalina"/>
</and>
</condition>
SOLUTION:
Either...
1. Create a file called "home.properties" in this directory with the
CATALINA_HOME property:
CATALINA_HOME=/path/to/apache-tomcat
or...
2. Create an environment variable CATALINA_HOME which points to Tomcat's
directory.
Ex. "export CATALINA_HOME=/path/to/apache-tomcat"
Ex. "Using System in Control Panel set CATALINA_HOME=c:\Program
Files\Apache Software Foundation\Tomcat 5.5"
</fail>
<fail>Initialization aborted
<condition>
<and>
<not>
<isset property="SERVLET_CONTAINER_EXISTS"/>
</not>
<equals arg1="${WEBSERVER.TYPE}" arg2="weblogic"/>
</and>
</condition>
SOLUTION:
Either...
1. Create a file called "home.properties" in this directory with the
WEBLOGIC_HOME property:
WEBLOGIC_HOME=/path/to/weblogic
or...
2. Create an environment variable WEBLOGIC_HOME which points to WebLogic's
directory.
Ex. "export WEBLOGIC_HOME=/path/to/weblogic"
Ex. "Using System in Control Panel set WEBLOGIC_HOME=c:\bea\weblogic92"
</fail>
<fail>Initialization aborted
<condition>
<and>
<not>
<isset property="SERVLET_CONTAINER_EXISTS"/>
</not>
<equals arg1="${WEBSERVER.TYPE}" arg2="websphere"/>
</and>
</condition>
SOLUTION:
Either...
1. Create a file called "home.properties" in this directory with the
WEBSPHERE_HOME property:
WEBSPHERE_HOME=/path/to/websphere
or...
2. Create an environment variable WEBSPHERE_HOME which points to
Websphere's
directory.
Ex. "export WEBSPHERE_HOME=/path/to/websphere"
Ex. "Using System in Control Panel set WEBSPHERE_HOME=c:\ibm\websphere"
</fail>
<fail>Initialization aborted
<condition>
<and>
<not>
<isset property="SERVLET_CONTAINER_EXISTS"/>
</not>
<equals arg1="${WEBSERVER.TYPE}" arg2="geronimo"/>
</and>
</condition>
SOLUTION:
Either...
1. Create a file called "home.properties" in this directory with the
GERONIMO_HOME property:
GERONIMO_HOME=/path/to/apache-geronimo or /path/to/ibm/websphere-ce
or...
2. Create an environment variable GERONIMO_HOME which points to Geronimo's
directory.
Ex. "export GERONIMO_HOME=/path/to/apache-geronimo or
/path/to/ibm/websphere-ce"
Ex. "Using System in Control Panel set GERONIMO_HOME=c:\Program
Files\IBM\WebSphere"
</fail>
<fail>Initialization aborted
<condition>
<and>
<not>
<isset property="SERVLET_CONTAINER_EXISTS"/>
</not>
<equals arg1="${WEBSERVER.TYPE}" arg2="jboss"/>
</and>
</condition>
SOLUTION:
Either...
1. Create a file called "home.properties" in this directory with the
JBOSS_HOME property:
JBOSS_HOME=/path/to/jboss
or...
2. Create an environment variable JBOSS_HOME which points to JBoss's
directory.
Ex. "export JBOSS_HOME=/path/to/jboss"
Ex. "Using System in Control Panel set JBOSS_HOME=c:\Program Files\JBoss"
</fail>
<fail unless="build.config.present">Initialization aborted
SOLUTION: Make sure this directory has permissions to write files, since
the build.properties file was not created at ${build.config.filename}
</fail>
<fail unless="PROPERTIES">Initialization aborted
SOLUTION: Edit the properties file at ${build.config.filename}, make sure
to uncomment the PROPERTIES parameter at the top of the file
</fail>
<!-- temporarily default locale to system locale -->
<condition property="LOCALE.NAME" value="${SYSTEM.LANGUAGE}">
<isset property="SYSTEM.LANGUAGE"/>
</condition>
<fail unless="LOCALE.NAME">Initialization aborted
SOLUTION: Edit the properties file at ${build.config.filename}, make sure
to configure the SYSTEM.LANGUAGE parameter in this file
</fail>
</target>
<!-- Copy the common jars -->
<target name="init.classpath.uptodate" unless="build.config.war">
<mkdir dir="${CENTRIC_HOME}/WEB-INF/lib"/>
<copy todir="${CENTRIC_HOME}/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<!-- Configure classpath as both object and a property -->
<target name="init.classpath"
depends="init.classpath.uptodate,init.servlet.type,init.servlet6.set,init.servlet4.set,init.servlet5.set,init.weblogic.set,init.geronimo10.set,init.geronimo11.set,init.jboss24.set,init.websphere.set">
<path id="cfs2.classpath">
<pathelement location="${servletJar}"/>
<pathelement location="${jspJar}"/>
<pathelement location="${namingJar}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<property name="CLASSPATH" refid="cfs2.classpath"/>
<echo message="Class Dir: ${servletJar}"/>
</target>
<!-- Prepare ant for processing -->
<target name="init" depends="init.loadproperties,init.classpath,init.axis" description="Verify system environment needed by install">
<!-- Default properties if not otherwise specified in build.properties -->
<property name="DEBUG" value="true"/>
<property name="DEBUGLEVEL" value="lines,vars,source"/>
<property name="build.config.filename" value="${base.dir}/build.properties"/>
<property name="build.config.present" value="ERROR: UNDEFINED"/>
<property name="SYSTEM.LANGUAGE" value=""/>
<!-- Gatekeeper database -->
<property name="GATEKEEPER.APPCODE" value=""/>
<property name="GATEKEEPER.DBTYPE" value=""/>
<property name="GATEKEEPER.DRIVER" value=""/>
<property name="GATEKEEPER.URL" value=""/>
<property name="GATEKEEPER.USER" value=""/>
<property name="GATEKEEPER.PASSWORD" value=""/>
<!-- Additional sites/databases -->
<property name="SITE.APPCODE" value=""/>
<property name="SITE.DBTYPE" value=""/>
<property name="SITE.DRIVER" value=""/>
<property name="SITE.URL" value=""/>
<property name="SITE.APPEND" value=""/>
<property name="SITE.USER" value=""/>
<property name="SITE.PASSWORD" value=""/>
<!-- External Servers -->
<property name="MAILSERVER" value="127.0.0.1"/>
<property name="FAXSERVER" value="127.0.0.1"/>
<!-- Begin output -->
<echo message="Project: ${ant.project.name}"/>
<echo message="Date: ${date.long}"/>
<echo message="User: ${user.name}"/>
<echo message="System: ${os.name} ${os.arch} ${os.version}"/>
<echo message="Ant version: ${ant.version}"/>
<echo message="Java version: ${java.version}"/>
<echo message="Container Type: ${WEBSERVER.TYPE}"/>
<echo message="Source path: ${base.dir}"/>
<echo message="Destination path: ${CENTRIC_HOME}"/>
<echo message="Properties file: ${build.config.filename}"/>
<echo message="File Library path: ${CENTRIC_FILELIBRARY}"/>
<echo message="Locale: ${LOCALE.NAME}"/>
</target>
<target name="taskdef.upgradeDatabase" depends="init">
<taskdef name="upgradeDatabase" classname="org.aspcfs.ant.tasks.UpgradeDatabaseTask">
<classpath>
<fileset dir="${build.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
</target>
<target name="taskdef.jasper" depends="init">
<taskdef name="compileJasperReport" classname="net.sf.jasperreports.ant.JRAntCompileTask">
<classpath>
<fileset dir="${build.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
</target>
<!-- See if files are up-to-date so only new files are installed during development -->
<target name="classes.prepare" depends="init" unless="build.config.war">
<uptodate property="classes.uptodate">
<srcfiles dir="${src.classes.dir}" includes="**/*.java log4j.properties"/>
<mapper type="merge" to="${CENTRIC_HOME}/WEB-INF/lib/aspcfs.jar"/>
</uptodate>
</target>
<!-- Check to see if previously compiled classes should be deleted -->
<target name="compile.checkdelete" depends="init">
<condition property="compile.donotdelete">
<isset property="classes.uptodate"/>
</condition>
<condition property="compile.donotdelete">
<and>
<not>
<isset property="classes.uptodate"/>
</not>
<isset property="compile.donotdelete.property"/>
</and>
</condition>
</target>
<target name="compile.delete" depends="init,compile.checkdelete" unless="compile.donotdelete">
<!-- Get rid of any classes in the source dir that shouldn't be there -->
<delete>
<fileset dir="${src.classes.dir}" includes="**/*.class"/>
</delete>
<delete dir="${build.classes.dir}"/>
<mkdir dir="${build.classes.dir}"/>
</target>
<!-- Compile the Java source code -->
<target name="compile" description="Compile all .java source files" depends="init,compile.delete" unless="classes.uptodate">
<!-- Compile the code -->
<echo message="Setting memory to 168m for compile"/>
<javac srcdir="${src.classes.dir}" destdir="${build.classes.dir}" verbose="off" deprecation="off" fork="true" memoryInitialSize="168m" memoryMaximumSize="168m" debug="${DEBUG}" debuglevel="${DEBUGLEVEL}">
<classpath>
<path refid="cfs2.classpath"/>
</classpath>
</javac>
<!-- copy log4j file properties-->
<copy todir="${build.classes.dir}">
<fileset dir="${src.classes.dir}">
<include name="log4j.properties"/>
</fileset>
</copy>
</target>
<!-- Generate the .jar files -->
<target name="jar" depends="init" unless="classes.uptodate">
<delete dir="${build.lib.dir}"/>
<mkdir dir="${build.lib.dir}"/>
<!-- darkhorseventures.jar -->
<jar jarfile="${build.lib.dir}/darkhorseventures.jar" basedir="${build.classes.dir}" includes="com/darkhorseventures/**/*.class"/>
<!-- isavvix.jar -->
<jar jarfile="${build.lib.dir}/isavvix.jar" basedir="${build.classes.dir}" includes="com/isavvix/**/*.class"/>
<!-- Novacoast.jar -->
<jar jarfile="${build.lib.dir}/Novacoast.jar" basedir="${build.classes.dir}" includes="com/Novacoast/**/*.class"/>
<!-- zeroio-iteam.jar -->
<jar jarfile="${build.lib.dir}/zeroio-iteam.jar" basedir="${build.classes.dir}" includes="com/zeroio/**/*.class"/>
<!-- aspcfs.jar -->
<jar jarfile="${build.lib.dir}/aspcfs.jar" basedir="${build.classes.dir}" includes="org/aspcfs/**/*.class log4j.properties"/>
<!-- jcrontab.jar -->
<jar jarfile="${build.lib.dir}/jcrontab.jar" basedir="${build.classes.dir}" includes="org/jcrontab/**/*.class"/>
<!-- webdav.jar -->
<copy todir="${build.classes.dir}/org/apache/catalina/servlets">
<fileset dir="${src.classes.dir}/org/apache/catalina/servlets">
<include name="LocalStrings.properties"/>
</fileset>
</copy>
<jar jarfile="${build.lib.dir}/webdav.jar" basedir="${build.classes.dir}" includes="org/apache/**/*.class,org/apache/**/*.properties"/>
</target>
<target name="build" description="Create .jar files for compiled classes" depends="init,compile,jar">
<mkdir dir="${build.lib.dir}"/>
</target>
<!-- Delete outdated files -->
<target name="deploy.delete" description="Removes outdated files from web application" unless="build.config.war">
<delete verbose="true">
<fileset dir="${CENTRIC_HOME}" includesfile="${base.dir}/build.cleanup"/>
</delete>
</target>
<target name="deploy.copy.axis" if="AXIS_HOME">
<!-- Copy the .jars, to axis webapp if axis info present -->
<copy todir="${AXIS_HOME}/WEB-INF/lib">
<fileset dir="${build.lib.dir}">
<include name="aspcfs.jar"/>
<include name="darkhorseventures.jar"/>
<include name="zeroio-iteam.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="deploy.copy" unless="build.config.war">
<!-- Copy the About This Software reference file -->
<copy file="${base.dir}/pref/cfs/source/readme-libraries.txt"
todir="${CENTRIC_HOME}/WEB-INF"/>
<!-- Copy the .jars, only if new -->
<copy todir="${CENTRIC_HOME}/WEB-INF/lib">
<fileset dir="${build.lib.dir}">
<include name="*.jar"/>
</fileset>
</copy>
<!-- Copy the web data, only if new -->
<copy todir="${CENTRIC_HOME}">
<fileset dir="${src.web.dir}/jsp">
<include name="**"/>
</fileset>
</copy>
<copy todir="${CENTRIC_HOME}">
<fileset dir="${src.web.dir}/html">
<include name="**"/>
</fileset>
</copy>
<copy todir="${CENTRIC_HOME}">
<fileset dir="${src.web.dir}">
<include name="images/**"/>
<include name="javascript/**"/>
<include name="css/**"/>
</fileset>
</copy>
<!-- Copy the configuration files -->
<copy todir="${CENTRIC_HOME}/WEB-INF" verbose="true">
<fileset dir="${src.web.dir}/WEB-INF">
<include name="*.xml"/>
<include name="*.tld"/>
<exclude name="web.xml"/>
</fileset>
</copy>
<!-- Copy the object mappings file -->
<copy file="${pref.dir}/cfs/transfer/import-mappings.xml"
todir="${CENTRIC_HOME}/WEB-INF" verbose="true"/>
<!-- Copy the default preference files -->
<mkdir dir="${CENTRIC_HOME}/WEB-INF/setup/init/"/>
<copy todir="${CENTRIC_HOME}/WEB-INF/setup/init/" verbose="true">
<fileset dir="${pref.dir}/cfs/system">
<include name="*.xml"/>
</fileset>
</copy>
<!-- Copy the dictionary files -->
<mkdir dir="${CENTRIC_HOME}/WEB-INF/languages"/>
<copy todir="${CENTRIC_HOME}/WEB-INF/languages">
<fileset dir="${src.dir}/languages">
<include name="*.xml"/>
</fileset>
</copy>
<mkdir dir="${CENTRIC_HOME}/javascript/languages"/>
<copy todir="${CENTRIC_HOME}/javascript/languages">
<fileset dir="${src.dir}/languages">
<include name="*.js"/>
</fileset>
</copy>
<!-- Copy the font files-->
<mkdir dir="${CENTRIC_HOME}/WEB-INF/fonts"/>
<copy todir="${CENTRIC_HOME}/WEB-INF/fonts">
<fileset dir="${src.dir}/fonts">
<include name="*.ttf"/>
</fileset>
</copy>
</target>
<target name="deploy.jasper.check" depends="init" unless="build.config.war">
<uptodate property="deploy.jasper.uptodate">
<srcfiles dir="${src.dir}/jasper_reports" includes="*.xml"/>
<mapper type="merge" to="${CENTRIC_HOME}/WEB-INF/reports/accounts_type.jasper"/>
</uptodate>
</target>
<target name="deploy.jasper.status.war" if="build.config.war">
<property name="deploy.jasper.uptodate" value="true"/>
</target>
<target name="deploy.jasper.status" depends="deploy.jasper.check,taskdef.jasper,deploy.jasper.status.war" unless="deploy.jasper.uptodate">
<echo message="Installing JasperReport files"/>
<!-- Copy the jasperreports, only if new -->
<copy todir="${CENTRIC_HOME}/WEB-INF/reports">
<fileset dir="${src.dir}/jasper_reports">
<include name="*.xml"/>
</fileset>
</copy>
<!-- The old .jasper file must be removed when a new .xml is copied -->
<delete>
<fileset dir="${CENTRIC_HOME}/WEB-INF/reports" includes="*.jasper"/>
</delete>
<!-- Compile the reports -->
<compileJasperReport srcdir="${CENTRIC_HOME}/WEB-INF/reports" destdir="${CENTRIC_HOME}/WEB-INF/reports"/>
</target>
<target name="deploy.jasper" depends="deploy.jasper.status" unless="build.config.war">
</target>
<!-- See if there is an updated file to merge -->
<target name="deploy.merge.prepare" unless="build.config.war">
<!-- Generate a new CENTRIC_HOME web.xml if any of the following: -->
<!-- 1. cvs web.xml is newer than CENTRIC_HOME web.xml -->
<!-- 2. build.properties is newer than the installed web.xml -->
<!-- 3. Any of the CENTRIC_HOME xml or tld files are newer than CENTRIC_HOME web.xml -->
<condition property="deploy.merge.uptodate">
<and>
<available file="${CENTRIC_HOME}/WEB-INF/web.xml"/>
<available file="${build.config.filename}"/>
<uptodate srcfile="${src.web.dir}/WEB-INF/web.xml" targetfile="${CENTRIC_HOME}/WEB-INF/web.xml"/>
<uptodate srcfile="${build.config.filename}" targetfile="${CENTRIC_HOME}/WEB-INF/web.xml"/>
<uptodate targetfile="${CENTRIC_HOME}/WEB-INF/web.xml">
<srcfiles dir="${CENTRIC_HOME}/WEB-INF" includes="*.xml,*.tld" excludes="web.xml"/>
</uptodate>
</and>
</condition>
</target>
<target name="deploy.merge.status" if="build.config.war">
<property name="deploy.merge.uptodate" value="true"/>
</target>
<!-- Merge meta-data with build.properties, only if changed so reload doesn't kick in -->
<target name="deploy.status" depends="deploy.merge.prepare, deploy.merge.status" unless="deploy.merge.uptodate">
<echo message="Installing web.xml configuration file"/>
<copy file="${src.web.dir}/WEB-INF/web.xml" todir="${CENTRIC_HOME}/WEB-INF" overwrite="true"/>
<replace file="${CENTRIC_HOME}/WEB-INF/web.xml" token="@KEYSTORE@" value="${CENTRIC_FILELIBRARY}${fs}keystore"/>
</target>
<target name="deploy.merge" depends="deploy.status" unless="build.config.war">
</target>
<!-- Log the deployment process to the web-app folder -->
<target name="log.deploy" depends="init.loadproperties" unless="build.config.war">
<mkdir dir="${CENTRIC_HOME}/WEB-INF/logs"/>
<record name="${CENTRIC_HOME}/WEB-INF/logs/deploy-${date.short}.log" append="no"/>
</target>
<target name="log.upgradedb" depends="init.loadproperties" unless="build.config.war">
<mkdir dir="${CENTRIC_HOME}/WEB-INF/logs"/>
<record name="${CENTRIC_HOME}/WEB-INF/logs/upgradedb-${date.short}.log" append="no"/>
</target>
<target name="log.installdb" depends="init.loadproperties" unless="build.config.war">
<mkdir dir="${CENTRIC_HOME}/WEB-INF/logs"/>
<record name="${CENTRIC_HOME}/WEB-INF/logs/installdb-${date.short}.log" append="no"/>
</target>
<!-- Check if keyfile exists -->
<target name="keyfile.exists" depends="init" unless="build.config.war">
<available file="${CENTRIC_FILELIBRARY}/keystore" property="keyfile.present"/>
</target>
<target name="keyfile.status" if="build.config.war">
<property name="keyfile.present" value="true"/>
</target>
<!-- Generate SSL keyfile for new system -->
<target name="keyfile.create" depends="keyfile.exists,keyfile.status" unless="keyfile.present">
<echo message="Self-signed SSL certificate will be placed at ${CENTRIC_FILELIBRARY}/keystore"/>
<genkey alias="centric_crm" keystore="${CENTRIC_FILELIBRARY}/keystore" storepass="centric_crm" storetype="JKS" keyalg="RSA" keysize="1024" validity="${KEYSTORE.VALIDITY}">
<dname>
<param name="CN" value="${KEYSTORE.COMMONNAME}"/>
<param name="OU" value="${KEYSTORE.ORGANIZATIONALUNIT}"/>
<param name="O" value="${KEYSTORE.ORGANIZATION}"/>
<param name="L" value="${KEYSTORE.CITY}"/>
<param name="ST" value="${KEYSTORE.STATE}"/>
<param name="C" value="${KEYSTORE.COUNTRY}"/>
</dname>
</genkey>
<!-- Prepare a CSR to get signed
keytool -certreq -keyalg RSA -alias centric_crm -file ${CENTRIC_FILELIBRARY}/domain.csr -keystore ${CENTRIC_FILELIBRARY}/keystore
-->
<!-- Import the signed certificates
keytool -import -trustcacerts -alias root -file GTECyberTrustRoot.crt -keystore ${CENTRIC_FILELIBRARY}/keystore
keytool -import -trustcacerts -alias comodo -file ComodoSecurityServicesCA.crt -keystore ${CENTRIC_FILELIBRARY}/keystore
keytool -import -trustcacerts -alias centric_crm -file domain.crt -keystore ${CENTRIC_FILELIBRARY}/keystore
-->
<!-- Export the certificate for a client app to use
keytool -export -alias centric_crm -file ${CENTRIC_FILELIBRARY}/domain.cert -keystore ${CENTRIC_FILELIBRARY}/keystore
-->
</target>
<target name="keyfile" depends="keyfile.create" unless="build.config.war">
</target>
<!-- Copy all data to the web-app folder and finalize any items -->
<target name="deploy"
description="Compile, build, copy, and configure web application"
depends="log.deploy,classes.prepare,build,keyfile,deploy.delete,deploy.copy,deploy.copy.axis,deploy.merge,deploy.jasper,war.create">
</target>
<target name="dev.configure">
<property name="compile.donotdelete.property" value="true"/>
<property name="DEBUG" value="true"/>
<property name="DEBUGLEVEL" value="lines,vars,source"/>
</target>
<target name="dev" description="Deploy without deleting previously compiled source" depends="dev.configure,deploy">
</target>
<!-- Generate .java/.class files out of the web-app .jsps -->
<target name="test" depends="init,deploy" description="Compile deployed JSPs to check for errors">
<delete dir="${build.jsp.dir}"/>
<delete dir="${build.jspclasses.dir}"/>
<echo message=""/>
<echo message="Converting JSPs to Class files..."/>
<mkdir dir="${build.jsp.dir}"/>
<java classname="org.apache.jasper.JspC" fork="yes" failonerror="yes">
<classpath>
<path refid="cfs2.classpath"/>
<pathelement location="${env.ANT_HOME}/lib/ant.jar"/>
<fileset dir="${CATALINA_HOME}${fs}common${fs}lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${CATALINA_HOME}${fs}server${fs}lib">
<include name="*.jar"/>
</fileset>
</classpath>
<arg line="-v -d ${build.jsp.dir}
-l -s
-webapp ${CENTRIC_HOME} "/>
</java>
<echo message=""/>
<echo message="Compiling JSP Class files..."/>
<mkdir dir="${build.jspclasses.dir}"/>
<javac srcdir="${build.jsp.dir}" destdir="${build.jspclasses.dir}" verbose="off" deprecation="on">
<classpath>
<path refid="cfs2.classpath"/>
<fileset dir="${CATALINA_HOME}${fs}common${fs}lib">
<include name="*.jar"/>
</fileset>
<pathelement
location="${CENTRIC_HOME}/WEB-INF/lib/darkhorseventures.jar"/>
<pathelement location="${CENTRIC_HOME}/WEB-INF/lib/aspcfs.jar"/>
<pathelement location="${CENTRIC_HOME}/WEB-INF/lib/zeroio-iteam.jar"/>
<pathelement location="${CENTRIC_HOME}/WEB-INF/lib/isavvix.jar"/>
<pathelement location="${CENTRIC_HOME}/WEB-INF/lib/Novacoast.jar"/>
<pathelement location="${CENTRIC_HOME}/WEB-INF/lib/jcrontab.jar"/>
<pathelement location="${CENTRIC_HOME}/WEB-INF/lib/webdav.jar"/>
</classpath>
<include name="**/*.java"/>
<exclude name="**/*finclude_jsp.java"/>
<exclude name="**/*fheader_005finclude*_jsp.java"/>
<exclude name="**/*layout_005f*_jsp.java"/>
<exclude name="**/*fmenu_jsp.java"/>
<exclude name="**/*frelationships_*fview2_jsp.java"/>
</javac>
</target>