forked from svn2github/fleXive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1476 lines (1314 loc) · 78.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
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="flexive" default="all" basedir="." xmlns:artifact="urn:maven-artifact-ant" xmlns:antlr="urn:antlr-ant">
<!-- ========================== properties ========================== -->
<property name="product" value="flexive3"/>
<property file="build.properties"/>
<property file="flexive.properties"/>
<property name="flexive.basedir" value="${basedir}"/>
<import file="build.shared-properties.xml"/>
<import file="build.global-properties.xml"/>
<property name="resources.ui.jsf.dir" value="${flexive.base.ui.jsf.dir}/resources"/>
<property name="resources.ui.shared.dir" value="${flexive.base.ui.shared.dir}/resources"/>
<property name="build.framework.classes.dir" value="${flexive.base.build.dir}/framework/classes"/>
<property name="build.ui.classes.dir" value="${flexive.base.build.dir}/ui/classes"/>
<property name="build.ui.shared.classes.dir" value="${flexive.base.build.dir}/ui/sharedclasses"/>
<property name="build.ui.components.dir" value="${flexive.base.build.dir}/ui-components"/>
<property name="build.ui.jar.dir" value="${flexive.base.build.dir}/ui/jar"/>
<property name="build.ui.meta.dir" value="${flexive.base.build.dir}/ui/jar/WEB-INF"/>
<property name="build.ui.components.meta.dir" value="${flexive.base.build.dir}/ui/jar/components/WEB-INF"/>
<property name="build.ui.jar.libs.dir" value="${flexive.base.build.dir}/ui/libs"/>
<property name="build.ear.libs.dir" value="${flexive.base.build.dir}/lib"/>
<property name="build.war.standalone.libs.dir" value="${flexive.base.build.dir}/ui/backend-standalone/lib"/>
<property name="build.storages.dir" value="${flexive.base.build.dir}/storages"/>
<property name="build.onlylocal.src.dir" value="${flexive.build.framework.dir}/onlylocal-src"/>
<property name="build.onlylocal.classes.dir" value="${flexive.build.framework.dir}/onlylocal-classes"/>
<property name="shared.meta.dir" value="${flexive.build.framework.jar.dir}/shared.meta"/>
<property name="database.src.dir" value="${flexive.build.framework.sqlResources.dir}"/>
<property name="database.classpathref" value="classpath.build.framework"/>
<property name="web.ui.dojo.baseName" value="dojo-flexive"/>
<property name="web.ui.yui.version" value="2.9.0"/>
<property name="flexive.dist" value="flexive-${flexive.version}"/>
<property name="invalid.path" value="${flexive.base.build.dir}/temp"/>
<property name="merge.ui.jsf.dir" value="${flexive.base.ui.jsf.dir}/resources/merge"/>
<property name="sqlparser.jar" value="flexive-sqlParser.jar"/>
<property name="extractor.jar" value="flexive-extractor.jar"/>
<property name="extractor-audio.jar" value="flexive-extractor-audio.jar"/>
<property name="extractor-documents.jar" value="flexive-extractor-documents.jar"/>
<property name="extractor-video.jar" value="flexive-extractor-video.jar"/>
<property name="flatstorage.jar" value="flexive-flatstorage.jar"/>
<property name="ejb-interfaces-onlylocal.jar" value="flexive-ejb-interfaces-local.jar"/>
<property name="ejb-interfaces-all.jar" value="flexive-ejb-interfaces-all.jar"/>
<!-- check if sqlParser has been run -->
<available file="${flexive.lib.dir}/${sqlparser.jar}" property="missing.parsers"/>
<!-- javac options -->
<property name="compiler.deprecation" value="on"/>
<property name="compiler.optimize" value="on"/>
<property name="compiler.debug" value="on"/>
<property name="compiler.source" value="1.6"/>
<property name="compiler.target" value="1.6"/>
<property name="compiler.fork" value="false"/>
<!-- ========================== paths =============================== -->
<!-- classpath needed to compile the core framework -->
<path id="classpath.build.framework">
<fileset dir="${flexive.lib.dir}/jsf" includes="jsonrpc-1.0.jar"/>
<fileset dir="${flexive.lib.dir}" includes="*.jar" excludes="qdox.jar"/>
<fileset dir="${flexive.lib.dir}/text_extraction" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/xstream" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/groovy" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/mail" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/antlr" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/openejb-3.1/lib" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/audio" includes="*.jar"/>
</path>
<path id="classpath.build.jsf">
<fileset dir="${flexive.lib.dir}/jsf" includes="*.jar"/>
<fileset refid="flexive.lib.ui.ajax4jsf"/>
</path>
<path id="classpath.build.jsf2">
<fileset dir="${flexive.lib.dir}/jsf2" includes="*.jar"/>
</path>
<path id="classpath.build.plugin">
<path path="${build.framework.classes.dir}"/>
<path path="${build.ui.shared.classes.dir}"/>
<path path="${build.ui.components.dir}/jsf-shared/classes"/>
<path path="${build.ui.components.dir}/jsf-core/classes"/>
<path refid="classpath.build.framework"/>
<path refid="classpath.build.jsf"/>
<!-- Include TestNG for test runner plugin -->
<fileset dir="${flexive.lib.dir}/testNG" includes="*.jar"/>
</path>
<path id="classpath.build.plugin.jsf2">
<path path="${build.framework.classes.dir}"/>
<path path="${build.ui.shared.classes.dir}"/>
<path path="${build.ui.components.dir}/jsf-shared/classes"/>
<path path="${build.ui.components.dir}/jsf2-components/classes"/>
<path refid="classpath.build.jsf2"/>
<path refid="classpath.build.framework"/>
<!-- Include TestNG for test runner plugin -->
<fileset dir="${flexive.lib.dir}/testNG" includes="*.jar"/>
</path>
<fileset id="jar.ejb.classes" dir="${build.framework.classes.dir}">
<include name="com/flexive/ejb/**"/>
<include name="*.properties"/>
<include name="**/*.flexive"/>
<include name="**/*.sql"/>
</fileset>
<fileset id="jar.ejb.resources" dir="${flexive.resources.framework.dir}">
<include name="embeddedJBossCacheConfig.xml"/>
<include name="fxresources/**"/>
</fileset>
<fileset id="jar.core.classes" dir="${build.framework.classes.dir}">
<include name="com/flexive/core/**"/>
</fileset>
<fileset id="jar.core.resources" dir="${flexive.resources.framework.dir}">
<exclude name="**/*"/> <!-- no inclusions right now -->
</fileset>
<path id="jar.ear.libs">
<fileset dir="${flexive.lib.dir}" includes="${sqlparser.jar},${extractor.jar},${extractor-documents.jar},${extractor-audio.jar},${extractor-video.jar},${flatstorage.jar},cglib*.jar,fxStream.jar,commons-io-1.1.jar,sanselan.jar,quartz*.jar,PDFRenderer.jar,commons-*.jar,jbosscache-core.jar,jgroups.jar,jboss-common-core-42-compat.jar,urlrewrite-*.jar,guava*.jar,jsr173_1.0_api.jar,jtidy.jar,mime-util*,slf4j*,icepdf-core.jar"/>
<fileset dir="${flexive.lib.dir}/groovy" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/audio" includes="*.jar"/>
<fileset dir="${build.ui.jar.dir}" includes="*.jar" excludes="flexive-plugin-jsf-testrunner.jar,flexive-plugin-jsf-*,flexive-plugin-jsf2-*,flexive-backend.jar,flexive-plugin-jsf-newsletter.jar"/>
<fileset dir="${flexive.lib.dir}/antlr" includes="antlr-runtime-*.jar"/>
<fileset dir="${build.ui.jar.dir}">
<!-- only include the testrunner plugin if target test.package.ear was invoked -->
<include name="flexive-plugin-jsf-testrunner.jar" if="package.testNG"/>
</fileset>
<fileset dir="${flexive.lib.dir}/xstream" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/mail" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/text_extraction" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}/jsf" includes="jsonrpc-1.0.jar"/>
</path>
<!-- ========================== tasks / macros ====================== -->
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="classpath.build.framework"/>
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="classpath.build.framework"/>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant"
classpathref="classpath.build.framework" />
<typedef resource="org/apache/tools/ant/antlr/antlib.xml"
uri="urn:antlr-ant" classpathref="classpath.build.framework"/>
<!-- ========================== imports ============================= -->
<import file="build.tests.xml"/>
<import file="build.javadoc.xml"/>
<import file="build.macros.xml"/>
<import file="${flexive.base.framework.dir}/storages/H2/build.xml"/>
<!-- ========================== targets ============================= -->
<target name="init" unless="init.done">
<echo>Java version: ${ant.java.version}</echo>
<groovy src="buildTasks.groovy"/>
<groovy>
void setParam(String name) {
try {
properties['database.'+name] = properties['database.'+properties['database.vendor']+'.'+name]
} catch(Exception e) {
if(!properties['database.vendor'])
println "Please specify a database vendor in build.properties! Missing entry: [database.vendor]!"
else
println "Failed to set parameter [database.$name]: Missing entry [database.${properties['database.vendor']}.$name] in build.properties?"
ant.fail("Could not configure database settings!")
}
}
//setup database properties based on the selected database vendor
setParam('host')
setParam('port')
setParam('username')
setParam('password')
setParam('database.division')
setParam('database.config')
setParam('database.test')
setParam('schema.division')
setParam('schema.config')
setParam('schema.test')
setParam('url.base')
setParam('url.parameters')
</groovy>
<!-- Ensure init is called only once because the groovy task cannot be redefined -->
<property name="init.done" value="true"/>
</target>
<target name="clean" description="Clean everything but parsers">
<delete dir="${flexive.base.build.dir}"/>
<delete dir="${base.reports.dir}"/>
<delete dir="${flexive.dist.dir}"/>
</target>
<target name="clean.all" depends="clean.parsers" description="Clean everything">
<delete dir="${flexive.base.build.dir}"/>
<delete dir="${base.reports.dir}"/>
</target>
<target name="jsf.no.shared" description="Disables the sharing of JSF libraries in the EAR lib folder (useful for mixing JSF1 and JSF2 applications).">
<echo>Disabled sharing of JSF libs</echo>
<property name="jsf.noshared" value="1"/>
</target>
<target name="preinit.filesets">
<path id="__jsflibs">
<fileset dir="${flexive.lib.dir}/jsf" includes="*.jar" excludes="jsf-api.jar, jsf-impl.jar,el-*.jar,*-src.jar,jstl*, portlet.jar, jsonrpc*"/>
<fileset refid="flexive.lib.ui.ajax4jsf"/>
<fileset dir="${build.ui.jar.dir}" includes="flexive-plugin-jsf-*,flexive-backend.jar" excludes="flexive-plugin-jsf2-core.jar,flexive-plugin-jsf-shared.jar,flexive-plugin-jsf-testrunner.jar,flexive-plugin-jsf-newsletter.jar"/>
</path>
<path id="__jsflibs.shared">
<fileset dir="${build.ui.jar.dir}" includes="flexive-plugin-jsf-shared.jar"/>
</path>
</target>
<target name="init.filesets.jsfshared" depends="preinit.filesets" unless="jsf.noshared">
<!-- Include JSF1 dependencies in EAR lib folder -->
<path id="jar.ear.jsflibs">
<path refid="__jsflibs"/>
<path refid="__jsflibs.shared"/>
</path>
<!-- Don't include JSF1 dependencies in WAR lib folder -->
<path id="jar.war.jsflibs"/>
</target>
<target name="init.filesets.jsfstandalone" if="jsf.noshared">
<!-- Don't include JSF1 libraries in EAR lib folder -->
<path id="jar.ear.jsflibs">
<path refid="__jsflibs.shared"/>
</path>
<!-- Include JSF1 dependencies in WAR lib folder -->
<path id="jar.war.jsflibs" refid="__jsflibs"/>
</target>
<target name="init.filesets.jsf" depends="init.filesets.jsfshared, init.filesets.jsfstandalone"/>
<target name="redeploy.web.jboss" depends="init" description="Redeploy web files to JBoss">
<groovy>
File jbossDir = null
boolean isJBoss5 = false;
new File(properties['deploy.ear.path']+"/../tmp/deploy").eachFileMatch(~/.*flexive.ear-contents.*/) { dir ->
if( jbossDir == null ) {
jbossDir = dir
}
}
if( jbossDir == null ) {
//search in JBoss 5.x deployments
new File(properties['deploy.ear.path']+"/../tmp").eachFile() { dir ->
if(!dir.isDirectory())
return
File war = new File(dir.getAbsolutePath()+File.separatorChar+"flexive.war")
if( war.exists() ) {
if( jbossDir == null ) {
jbossDir = war
isJBoss5 = true
} else
if( war.lastModified() > jbossDir.lastModified() )
jbossDir = war
}
}
}
if( jbossDir == null )
ant.fail(message:"No JBoss webdeployment found!")
println "Redeploying web files to [$jbossDir] ..."
properties['dir.deploy.jboss'] = jbossDir
if( isJBoss5 ) {
ant.copy(todir:(jbossDir.absolutePath+"/adm"), verbose:true) {
fileset(dir:properties['basedir']+"/src/ui/jsf-backend/web/adm")
}
ant.copy(todir:(jbossDir.absolutePath+"/pub"), verbose:true) {
fileset(dir:properties['basedir']+"/src/ui/jsf-backend/web/pub")
}
ant.copy(todir:(jbossDir.absolutePath+"/WEB-INF"), verbose:true) {
fileset(dir:properties['basedir']+"/src/ui/jsf-backend/resources/WEB-INF")
}
} else {
ant.copy(todir:(jbossDir.absolutePath+"/flexive-exp.war/adm"), verbose:true) {
fileset(dir:properties['basedir']+"/src/ui/jsf-backend/web/adm")
}
ant.copy(todir:(jbossDir.absolutePath+"/flexive-exp.war/pub"), verbose:true) {
fileset(dir:properties['basedir']+"/src/ui/jsf-backend/web/pub")
}
ant.copy(todir:(jbossDir.absolutePath+"/flexive-exp.war/WEB-INF"), verbose:true) {
fileset(dir:properties['basedir']+"/src/ui/jsf-backend/resources/WEB-INF")
}
}
</groovy>
</target>
<target name="prepare" description="Prepare build directory structures" depends="init,init.filesets.jsf">
<groovy>
def file = properties.basedir+File.separatorChar+"build.properties"
if( !new File(file).exists() ) {
ant.fail(message:"Please create a customized ${file} file from build.properties.sample.")
}
rawVersion = org.apache.tools.ant.Main.class.getPackage().getImplementationVersion()
if( rawVersion != null ) {
antVersion = rawVersion.split("\\.")
int major = Integer.valueOf(antVersion[0])
int minor = Integer.valueOf(antVersion[1])
if( major == 1 && minor >= 7 ) {
//version 1.7+ is ok
} else if( major > 1 ) {
//v2+ should be ok as well
} else {
ant.fail(message:"Ant version 1.7 or higher is required! You are using version ${org.apache.tools.ant.Main.class.getPackage().getImplementationVersion()}!")
}
}
</groovy>
<mkdir dir="${build.framework.classes.dir}"/>
<mkdir dir="${build.ui.classes.dir}"/>
<mkdir dir="${build.ui.shared.classes.dir}"/>
<mkdir dir="${flexive.build.framework.jar.dir}"/>
<mkdir dir="${build.ui.jar.dir}"/>
<mkdir dir="${build.storages.dir}"/>
<mkdir dir="${invalid.path}"/>
<javac-call srcdir="${flexive.src.framework.dir}"
destdir="${build.framework.classes.dir}"
includes="com/flexive/tools/**/*.java"
excludes="com/flexive/tools/db/**">
<classpath refid="classpath.build.framework"/>
</javac-call>
<jar jarfile="${flexive.build.framework.jar.dir}/flexive-ant.jar">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/tools/ant/**/*"/>
<include name="com/flexive/tools/*"/>
</fileset>
</jar>
<jar jarfile="${flexive.build.framework.jar.dir}/openUrl.jar">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/tools/OpenUrl*"/>
</fileset>
<manifest>
<attribute name="Class-Path" value="extlib/h2.jar"/>
<attribute name="Main-Class" value="com.flexive.tools.OpenUrl"/>
</manifest>
</jar>
<taskdef name="applicationDescriptorBuilder"
classname="com.flexive.tools.ant.ApplicationDescriptorBuilderTask"
classpath="${flexive.build.framework.jar.dir}/flexive-ant.jar"/>
<taskdef name="scriptIndexBuilder"
classname="com.flexive.tools.ant.ScriptIndexBuilderTask"
classpath="${flexive.build.framework.jar.dir}/flexive-ant.jar"/>
<taskdef name="makeMessages"
classname="com.flexive.tools.ant.MakeMessagesTask"
classpath="${flexive.build.framework.jar.dir}/flexive-ant.jar"/>
<taskdef name="svnVersion"
classname="com.flexive.tools.ant.SubversionVersionTask"
classpath="${flexive.build.framework.jar.dir}/flexive-ant.jar"/>
</target>
<target name="all" description="Clean and rebuild everything" depends="jar.all,jar.ear">
</target>
<!-- safety fallback that generates the parsers if they are missing -->
<target name="check.parsers" unless="missing.parsers" description="Check if SQL and HTML parsers have been built yet">
<echo message="Compiling and packaging SQL/HTML parser..."/>
<antcall target="gen.parsers"/>
</target>
<target name="clean.parsers" depends="init">
<delete dir="${build.framework.classes.dir}/com/flexive/sqlParser"/>
<delete file="${flexive.src.framework.dir}/com/flexive/sqlParser/ParseException.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/sqlParser/SimpleCharStream.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/sqlParser/SQL.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/sqlParser/SQLConstants.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/sqlParser/SQLTokenManager.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/sqlParser/Token.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/HtmlExtractorParser.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/HtmlExtractorParserConstants.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/HtmlExtractorParserTokenManager.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/ParseException.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/SimpleCharStream.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/Token.java"/>
<delete file="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/TokenMgrError.java"/>
<safeDelete file="${flexive.lib.dir}/${sqlparser.jar}"/>
<safeDelete file="${flexive.lib.dir}/${extractor.jar}"/>
<safeDelete file="${flexive.lib.dir}/${extractor-documents.jar}"/>
<safeDelete file="${flexive.lib.dir}/${extractor-audio.jar}"/>
<safeDelete file="${flexive.lib.dir}/${extractor-video.jar}"/>
</target>
<target name="gen.parsers" depends="clean.parsers, prepare" description="Generate SQL and HTML parsers">
<javacc
target="${flexive.src.framework.dir}/com/flexive/sqlParser/Parser.jj"
javacchome="${flexive.lib.dir}"
outputdirectory="${flexive.src.framework.dir}/com/flexive/sqlParser"
/>
<javacc
target="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/htmlParser.jj"
javacchome="${flexive.lib.dir}"
outputdirectory="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor"
/>
<javac-call srcdir="${flexive.src.framework.dir}" includes="com/flexive/shared/**,com/flexive/sqlParser/**,com/flexive/extractor/**" destdir="${build.framework.classes.dir}">
<classpath refid="classpath.build.framework"/>
</javac-call>
<jar jarfile="${flexive.lib.dir}/${sqlparser.jar}">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/sqlParser/**"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="com.flexive.sqlParser.consoleTest"/>
</manifest>
</jar>
<jar jarfile="${flexive.lib.dir}/${extractor.jar}">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/extractor/DocumentParser*"/>
<include name="com/flexive/extractor/HtmlExtractor*"/>
<include name="com/flexive/extractor/htmlExtractor/**"/>
</fileset>
</jar>
<jar jarfile="${flexive.lib.dir}/${extractor-documents.jar}">
<fileset dir="${flexive.resources.framework.dir}/extractor-documents-resources" includes="**/*"/>
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/extractor/**"/>
<exclude name="com/flexive/extractor/HtmlExtractor*"/>
<exclude name="com/flexive/extractor/htmlExtractor/***"/>
<exclude name="com/flexive/extractor/audio/**"/>
</fileset>
</jar>
<jar jarfile="${flexive.lib.dir}/${extractor-audio.jar}">
<fileset dir="${flexive.resources.framework.dir}/extractor-audio-resources" includes="**/*"/>
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/extractor/audio/**"/>
</fileset>
</jar>
<jar jarfile="${flexive.lib.dir}/${extractor-video.jar}">
<fileset dir="${flexive.resources.framework.dir}/extractor-video-resources" includes="**/*"/>
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/extractor/video/**"/>
</fileset>
</jar>
</target>
<target name="htmlParserStandalone" depends="clean.parsers, prepare">
<javacc
target="${flexive.src.framework.dir}/com/flexive/extractor/htmlExtractor/htmlParser.jj"
javacchome="${flexive.lib.dir}"
outputdirectory="flexive.src.framework.dirwork.dir}/com/flexive/extractor/htmlExtractor"
/>
<javac-call
srcdir="${flexive.src.framework.dir}"
includes="**/htmlExtractor/**"
destdir="${build.framework.classes.dir}">
<classpath refid="classpath.build.framework"/>
</javac-call>
<jar jarfile="${flexive.lib.dir}/${extractor.jar}">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/extractor/htmlExtractor/**"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="com.flexive.extractor.htmlExtractor.consoleTest"/>
</manifest>
</jar>
</target>
<target name="compile.framework"
depends="prepare, check.parsers, compile.framework.parsers, compile.framework.main"
description="Compile the complete core framework"/>
<target name="compile.framework.main">
<javac-call
srcdir="${flexive.src.framework.dir}"
destdir="${build.framework.classes.dir}"
excludes="**/sqlParser/**,**/extractor/**">
<classpath refid="classpath.build.framework"/>
</javac-call>
</target>
<target name="compile.framework.parsers" description="Compiles the parsers embedded in the core framework">
<antlr:antlr3 target="${flexive.src.framework.cmisparser.dir}/CmisSql.g">
<classpath refid="classpath.build.framework"/>
</antlr:antlr3>
</target>
<target name="jar.framework" depends="jar.framework.shared, jar.ejb, jar.storages" description="Package the complete core framework"/>
<target name="jar.framework.shared.prepare">
<uptodate property="jar.framework.shared.skip" targetfile="${flexive.build.framework.jar.dir}/flexive-shared.jar">
<srcfiles dir="${shared.meta.dir}" includes="**/*"/>
<srcfiles dir="${basedir}" includes="flexive.properties"/>
<srcfiles dir="${build.framework.classes.dir}" includes="com/flexive/shared/**"/>
</uptodate>
</target>
<target name="jar.framework.shared" depends="compile.framework,jar.framework.shared.prepare" unless="jar.framework.shared.skip" description="Package the shared part of the framework">
<tstamp>
<format property="build.time" pattern="yyyy/MM/dd HH:mm" unit="hour"/>
</tstamp>
<svnVersion property="build.number"/>
<delete dir="${shared.meta.dir}"/>
<mkdir dir="${shared.meta.dir}"/>
<copy file="${basedir}/flexive.properties" tofile="${shared.meta.dir}/flexive.properties" overwrite="true"/>
<replaceBuildProperties file="${shared.meta.dir}/flexive.properties" buildNumber="${build.number}" buildTime="${build.time}"/>
<makeMessages srcDir="${flexive.resources.framework.dir}/messages" dest="${shared.meta.dir}/FxExceptionMessages" srcPrefix="Ex"/>
<makeMessages srcDir="${flexive.resources.framework.dir}/messages" dest="${shared.meta.dir}/FxSharedMessages" srcPrefix="FxSharedMessages"/>
<makeMessages srcDir="${flexive.resources.framework.dir}/messages" dest="${shared.meta.dir}/Enum" srcPrefix="Enum"/>
<makeMessages srcDir="${flexive.resources.framework.dir}/messages" dest="${shared.meta.dir}/History" srcPrefix="History"/>
<emma enabled="${emma.enabled}">
<instr instrpath="${build.framework.classes.dir}"
mode="overwrite"
merge="false"
metadatafile="${coverage.dir}/coverage.em">
<filter value="+com.flexive.shared.*"/>
</instr>
</emma>
<jar jarfile="${flexive.build.framework.jar.dir}/flexive-shared.jar" keepcompression="true">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/shared/**"/>
<exclude name="com/flexive/shared/interfaces/**"/>
</fileset>
<zipfileset dir="${shared.meta.dir}" includes="FxExceptionMessages*.properties, FxSharedMessages*.properties, Enum*.properties, History*.properties, flexive.properties"/>
</jar>
<!-- Create default interfaces file -->
<jar jarfile="${flexive.build.framework.jar.dir}/${ejb-interfaces-all.jar}" keepcompression="true">
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/shared/interfaces/**"/>
</fileset>
</jar>
</target>
<target name="compile.ui.shared" depends="jar.framework.shared" description="Compile the shared UI classes">
<javac-call
srcdir="${flexive.src.ui.shared.dir}"
destdir="${build.ui.shared.classes.dir}"
>
<classpath refid="classpath.build.framework"/>
<classpath>
<path path="${build.framework.classes.dir}"/>
</classpath>
</javac-call>
<makeMessages srcDir="${resources.ui.jsf.dir}/messages" dest="${build.ui.meta.dir}/ApplicationMessages"/>
</target>
<target name="compile.ui" depends="compile.ui.shared,jar.jsf.components" description="Compiles the flexive backend UI">
<property name="merge.ui.dir" value="${build.ui.jar.dir}/merge"/>
<delete dir="${merge.ui.dir}"/>
<echo message="Compiling JSF"/>
<javac-call
srcdir="${flexive.src.ui.jsf.dir}"
destdir="${build.ui.classes.dir}"
>
<classpath>
<path path="${build.framework.classes.dir}"/>
<path path="${build.ui.shared.classes.dir}"/>
<fileset dir="${build.ui.jar.dir}" includes="*.jar"/>
</classpath>
<classpath refid="classpath.build.framework"/>
<classpath refid="classpath.build.jsf"/>
</javac-call>
</target>
<target name="jar.ui" depends="compile.ui,jar.jsf.components">
<jar jarfile="${build.ui.jar.dir}/flexive-backend.jar">
<fileset dir="${build.ui.classes.dir}">
<include name="com/flexive/war/**/*"/>
<include name="org/apache/myfaces/webapp/filter/**/*"/>
</fileset>
<fileset dir="${build.ui.meta.dir}">
<include name="ApplicationMessages*.properties"/>
</fileset>
</jar>
<jar jarfile="${build.ui.jar.dir}/flexive-web-shared.jar">
<fileset dir="${build.ui.shared.classes.dir}">
</fileset>
</jar>
<!--emma enabled="${emma.enabled}">
<instr
instrpath="${build.ui.jar.dir}/flexive-backend.jar"
mode="overwrite"
merge="true"
metadatafile="${coverage.dir}/coverage.em">
<filter value="+com.flexive.war.*" />
</instr>
</emma>
<emma enabled="${emma.enabled}">
<instr
instrpath="${build.ui.jar.dir}/flexive-web-shared.jar"
mode="overwrite"
merge="true"
metadatafile="${coverage.dir}/coverage.em">
<filter value="+com.flexive.war.*" />
</instr>
</emma-->
<mkdir dir="${build.ui.jar.libs.dir}"/>
<copy todir="${build.ui.jar.libs.dir}">
<path refid="jar.war.jsflibs"/>
</copy>
<war warfile="${flexive.base.build.dir}/ui/flexive.war" webxml="${resources.ui.jsf.dir}/web.xml" keepcompression="yes">
<!-- jsp,html,.. files -->
<fileset dir="${flexive.web.ui.shared.dir}">
<include name="**/*"/>
</fileset>
<fileset dir="${flexive.web.ui.jsf.dir}">
<include name="**/*"/>
</fileset>
<!-- JSF resources -->
<zipfileset dir="${resources.ui.jsf.dir}/WEB-INF" prefix="WEB-INF">
<include name="faces-config.xml"/>
<include name="flexive-admin.taglib.xml"/>
<include name="flexive_jsf.tld"/>
<include name="templates/**/*"/>
</zipfileset>
<!-- richfaces skins -->
<zipfileset dir="${resources.ui.jsf.dir}/WEB-INF" prefix="WEB-INF/classes">
<include name="flexive.skin.properties"/>
</zipfileset>
<!-- include dojo from ZIP file, install in /pub/js/dojo -->
<zipfileset src="${flexive.base.ui.shared.dir}/resources/lib/dojo/${web.ui.dojo.baseName}Navigation.zip" prefix="pub/js/dojoNavigation">
<include name="*"/>
<include name="src/**/*"/>
</zipfileset>
<!-- include EditArea from ZIP file, install in /adm/js/edit_area -->
<zipfileset src="${resources.ui.jsf.dir}/lib/edit_area.zip" prefix="adm/js/"
includes="**/*">
</zipfileset>
<!-- include beans.xml -->
<zipfileset prefix="WEB-INF" dir="${flexive.resources.framework.dir}" includes="beans.xml"/>
<lib dir="${build.ui.jar.libs.dir}" includes="**/*"/>
</war>
</target>
<target name="jar.ui.standalone" depends="jar.interfaces.onlylocal,jar.ui"
description="Packages the backend for standalone deployment in a JavaEE Web Profile Container">
<mkdir dir="${build.war.standalone.libs.dir}"/>
<copy todir="${build.war.standalone.libs.dir}">
<path refid="jar.ear.libs"/>
<path refid="jar.ear.jsflibs"/>
</copy>
<copy file="${flexive.base.build.dir}/ui/flexive.war" tofile="${flexive.base.build.dir}/ui/flexive-standalone.war"/>
<jar jarfile="${flexive.base.build.dir}/ui/flexive-standalone.war" update="true">
<zipfileset prefix="WEB-INF/lib" dir="${flexive.build.framework.jar.dir}" includes="*.jar"
excludes="${sqlparser.jar},${htmlparser.jar},richfaces*.jar,${ejb-interfaces-all.jar}"/>
<zipfileset prefix="WEB-INF/lib" dir="${build.war.standalone.libs.dir}" includes="*.jar"/>
</jar>
</target>
<target name="jar.core.prepare">
<uptodate targetfile="${flexive.build.framework.jar.dir}/flexive-core.jar" property="jar.core.skip">
<srcfiles refid="jar.core.classes"/>
<srcfiles refid="jar.core.resources"/>
</uptodate>
</target>
<target name="jar.core" depends="compile.framework, jar.core.prepare" unless="jar.core.skip">
<jar jarfile="${flexive.build.framework.jar.dir}/flexive-core.jar">
<fileset refid="jar.core.classes"/>
<fileset refid="jar.core.resources"/>
</jar>
<emma enabled="${emma.enabled}">
<instr
instrpath="${flexive.build.framework.jar.dir}/flexive-core.jar"
mode="overwrite"
merge="true"
metadatafile="${coverage.dir}/coverage.em">
<filter excludes="*Test*" />
<filter value="+com.flexive.core.*" />
</instr>
</emma>
</target>
<target name="jar.ejb.prepare">
<uptodate targetfile="${flexive.build.framework.jar.dir}/flexive-ejb.jar" property="jar.ejb.skip">
<srcfiles refid="jar.ejb.classes"/>
<srcfiles refid="jar.ejb.resources"/>
</uptodate>
</target>
<target name="jar.ejb" depends="compile.framework, jar.ejb.prepare, jar.core" unless="jar.ejb.skip">
<scriptIndexBuilder indexFile="${build.framework.classes.dir}/fxresources/scripts/runonce/scriptindex.flexive"
scriptDir="${flexive.resources.framework.dir}/fxresources/scripts/runonce"/>
<scriptIndexBuilder indexFile="${build.framework.classes.dir}/fxresources/scripts/startup/scriptindex.flexive"
scriptDir="${flexive.resources.framework.dir}/fxresources/scripts/startup"/>
<scriptIndexBuilder indexFile="${build.framework.classes.dir}/fxresources/scripts/library/scriptindex.flexive"
scriptDir="${flexive.resources.framework.dir}/fxresources/scripts/library"/>
<scriptIndexBuilder indexFile="${build.framework.classes.dir}/fxresources/binaries/thumbs/resourceindex.flexive"
scriptDir="${flexive.resources.framework.dir}/fxresources/binaries/thumbs"/>
<jar jarfile="${flexive.build.framework.jar.dir}/flexive-ejb.jar">
<fileset refid="jar.ejb.classes"/>
<fileset refid="jar.ejb.resources"/>
<zipfileset prefix="META-INF" dir="${flexive.resources.framework.dir}" includes="beans.xml"/>
</jar>
<emma enabled="${emma.enabled}">
<instr
instrpath="${flexive.build.framework.jar.dir}/flexive-ejb.jar"
mode="overwrite"
merge="true"
metadatafile="${coverage.dir}/coverage.em">
<filter excludes="*Test*" />
<filter value="+com.flexive.ejb.beans.*" />
</instr>
</emma>
</target>
<target name="jar.interfaces.onlylocal" depends="jar.ejb.prepare, jar.framework">
<!-- Create dummy interfaces that disable the remote ones for EJB Lite deployment -->
<copy todir="${build.onlylocal.src.dir}">
<fileset dir="${flexive.src.framework.dir}" includes="com/flexive/shared/interfaces/**"/>
</copy>
<replace dir="${build.onlylocal.src.dir}" token="@Remote" value=""/>
<javac-call srcdir="${build.onlylocal.src.dir}" destdir="${build.onlylocal.classes.dir}">
<classpath refid="classpath.build.framework"/>
<classpath>
<fileset dir="${flexive.build.framework.jar.dir}" includes="*.jar"/>
</classpath>
</javac-call>
<!-- Create marker file to indicate that only local interfaces are packaged -->
<echo file="${build.onlylocal.classes.dir}/flexive-ejb-interfaces-onlylocal.properties">
</echo>
<jar file="${flexive.build.framework.jar.dir}/${ejb-interfaces-onlylocal.jar}">
<fileset dir="${build.onlylocal.classes.dir}" includes="**"/>
</jar>
</target>
<target name="jar.dbsetup" depends="jar.framework.shared">
<javac-call srcdir="${flexive.src.framework.dir}"
destdir="${build.framework.classes.dir}"
includes="com/flexive/tools/db/**/*.java">
<classpath refid="classpath.build.framework"/>
</javac-call>
<jar jarfile="${flexive.build.framework.jar.dir}/flexive-dbsetup.jar">
<manifest>
<attribute name="Class-Path" value="flexive-shared.jar flexive-ejb.jar flexive-core.jar"/>
<attribute name="Main-Class" value="com.flexive.tools.db.DBSetup"/>
</manifest>
<fileset dir="${build.framework.classes.dir}">
<include name="com/flexive/tools/db/**/*"/>
</fileset>
</jar>
</target>
<target name="jar.storages" depends="jar.ejb,jar.dbsetup,jar.h2.storedprocedures">
<groovy>
new File(properties['flexive.base.framework.dir']+"/storages").eachDir() { File dir ->
if(dir.name.startsWith(".")) //skip .svn
return
m = project.createTask("buildStorage")
m.setDynamicAttribute("vendor", dir.name)
m.setDynamicAttribute("srcdir", dir.absolutePath)
m.setDynamicAttribute("builddir", properties['build.storages.dir']+"/"+dir.name)
m.setDynamicAttribute("classpathref", "classpath.build.plugin")
m.setDynamicAttribute("jarfile", properties['flexive.build.framework.jar.dir']+"/flexive-storage-"+dir.name+".jar")
m.perform()
}
</groovy>
</target>
<target name="jar.tests" depends="tests.compile.all">
<jar file="${flexive.build.framework.jar.dir}/flexive-tests.jar">
<fileset dir="${tests.classes.dir}" includes="com/flexive/tests/**/*"/>
</jar>
</target>
<!--<target name="jar.all" depends="jar.framework, jar.ui, jar.tests"/>-->
<target name="jar.all" depends="jar.framework, jar.storages, jar.ui"/>
<target name="jar.ear" depends="prepare" description="Assemble flexive.ear">
<mkdir dir="${flexive.drop.dir}"/>
<applicationDescriptorBuilder dropDir="${flexive.drop.dir}" destFile="${flexive.base.build.dir}/application.xml" srcFile="${resources.ui.shared.dir}/application.xml"/>
<jar jarfile="${flexive.build.framework.jar.dir}/flexive-drop-resources.jar">
<fileset file="${flexive.drop.dir}/drops.archives"/>
</jar>
<copy todir="${build.ear.libs.dir}">
<fileset dir="${flexive.build.framework.jar.dir}" includes="*.jar" excludes="${sqlparser.jar},${htmlparser.jar},*-ejb.jar,${ejb-interfaces-onlylocal.jar},richfaces*.jar"/>
<fileset dir="${flexive.drop.dir}" includes="*.jar" excludes="*-ejb.jar,*.war,*.par"/>
<path refid="jar.ear.libs"/>
<!-- Shared libraries -->
<path refid="jar.ear.jsflibs"/>
<fileset dir="${flexive.lib.dir}/testNG">
<!-- include testNG only if target test.package.ear was invoked -->
<include name="testng*jar" if="package.testNG"/>
</fileset>
</copy>
<!-- Create manifest classpath -->
<manifestclasspath property="ear.classpath" jarfile="${flexive.base.build.dir}/flexive.ear">
<classpath>
<fileset dir="${build.ear.libs.dir}" includes="**/*"/>
</classpath>
</manifestclasspath>
<jar jarfile="${flexive.base.build.dir}/flexive.ear" keepcompression="true">
<manifest >
<attribute name="Class-Path" value="${ear.classpath}"/>
<!-- JBoss 7 module dependencies -->
<attribute name="Dependencies" value="javax.faces.api, com.h2database.h2, org.jboss.common-core"/>
</manifest>
<metainf dir="${flexive.base.build.dir}">
<include name="application.xml"/>
</metainf>
<metainf dir="${flexive.base.framework.dir}/resources/jboss">
<include name="jboss-app.xml"/>
</metainf>
<metainf dir="${flexive.base.framework.dir}/resources/glassfish">
<include name="sun-application.xml"/>
</metainf>
<metainf dir="${resources.ui.shared.dir}">
<include name="geronimo-application.xml"/>
<include name="weblogic-application.xml"/>
</metainf>
<fileset dir="${flexive.build.framework.jar.dir}" includes="*-ejb.jar"/>
<fileset dir="${flexive.base.build.dir}/ui" includes="*.war"/>
<fileset dir="${flexive.drop.dir}" includes="*.war,*-ejb.jar,*.par"/>
<zipfileset prefix="lib" dir="${build.ear.libs.dir}" includes="**/*"/>
</jar>
</target>
<target name="build-deploy" depends="jar.all,jar.ear,deploy" description="Build the application and deploy flexive to an application server"/>
<target name="deploy" depends="jar.ear" description="Build a current EAR and deploy flexive to an application server">
<echo message="Deploying ${flexive.edition} ${flexive.version} ..."/>
<echo message="Warning: if you did run tests previously, call target 'clean' first or the applicationserver will fail due to EMMA dependencies!"/>
<copy file="${flexive.base.build.dir}/flexive.ear" toDir="${deploy.ear.path}" overwrite="true" failonerror="true"/>
</target>
<target name="db.noupdate" description="Skip db updates">
<property name="db.noupdate" value="1"/>
<echo message="Skipping database update!"/>
</target>
<target name="db.defaults" depends="init" description="Use default schema/database values for db.update and db.update.config">
<property name="db.config" value="${database.database.config}"/>
<property name="schema.config" value="${database.schema.config}"/>
<property name="db.division" value="${database.database.division}"/>
<property name="schema.division" value="${database.schema.division}"/>
</target>
<target name="db.update.config" description="Update config database" depends="init, jar.dbsetup, jar.storages" unless="db.noupdate">
<echo taskname="flexive">Setting up configuration database for vendor ${database.vendor} ... (this can be changed in build.properties)</echo>
<input taskname="flexive" addproperty="db.config" defaultvalue="${database.database.config}"
message="Please enter the configuration database (will be created if it does not exist):"/>
<input taskname="flexive" addproperty="schema.config" defaultvalue="${database.schema.config}"
message="Please enter the configuration schema you want to create or reset:"/>
<java fork="true" classname="com.flexive.tools.db.DBSetup" failonerror="true">
<classpath>
<path path="${flexive.build.framework.dir}/classes"/>
<fileset dir="${flexive.build.framework.jar.dir}" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}" includes="*.jar, groovy/*.jar"/>
</classpath>
<arg value="${database.vendor}"/>
<arg value="${db.config}"/>
<arg value="${schema.config}"/>
<arg value="config"/>
<arg value="true"/>
<arg value="true"/>
<arg value="false"/>
<arg value="${database.username}"/>
<arg value="${database.password}"/>
<arg value="${database.url.base}"/>
<arg value="${database.url.parameters}"/>
</java>
</target>
<target name="db.update.division" description="Update division database" depends="init, jar.dbsetup, jar.storages" unless="db.noupdate">
<echo taskname="flexive">Setting up division database for vendor ${database.vendor} ... (this can be changed in build.properties)</echo>
<input taskname="flexive" addproperty="db.division" defaultvalue="${database.database.division}"
message="Please enter the division database (will be created if it does not exist):"/>
<input taskname="flexive" addproperty="schema.division" defaultvalue="${database.schema.division}"
message="Please enter the division schema you want to create or reset:"/>
<java fork="true" classname="com.flexive.tools.db.DBSetup" failonerror="true">
<classpath>
<path path="${flexive.build.framework.dir}/classes"/>
<fileset dir="${flexive.build.framework.jar.dir}" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}" includes="*.jar, groovy/*.jar"/>
</classpath>
<arg value="${database.vendor}"/>
<arg value="${db.division}"/>
<arg value="${schema.division}"/>
<arg value="division"/>
<arg value="true"/>
<arg value="true"/>
<arg value="false"/>
<arg value="${database.username}"/>
<arg value="${database.password}"/>
<arg value="${database.url.base}"/>
<arg value="${database.url.parameters}"/>
</java>
</target>
<target name="db.update" description="Update config and division database" depends="db.update.config, db.update.division" unless="db.noupdate"/>
<target name="db.update.test" description="Update test database (configuration database has to exist!)" depends="init, jar.dbsetup, jar.storages" unless="db.noupdate">
<echo taskname="flexive">[fleXive] is using ${database.vendor} database settings... (this can be changed in build.properties)</echo>
<java fork="true" classname="com.flexive.tools.db.DBSetup" failonerror="true">
<classpath>
<path refid="build.classpath.testng"/>
<path path="${flexive.build.framework.dir}/classes"/>
<fileset dir="${flexive.build.framework.jar.dir}" includes="*.jar"/>
<fileset dir="${flexive.lib.dir}" includes="*.jar, groovy/*.jar"/>
</classpath>
<!--jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"/-->
<arg value="${database.vendor}"/>
<arg value="${database.database.test}"/>
<arg value="${database.schema.test}"/>
<arg value="division"/>
<arg value="true"/>
<arg value="true"/>
<arg value="false"/>
<arg value="${database.username}"/>
<arg value="${database.password}"/>
<arg value="${database.url.base}"/>
<arg value="${database.url.parameters}"/>
</java>
</target>
<target name="db.flatstorage.create" depends="init">
<input taskname="flexive" addproperty="flatstorage.url" defaultValue="${database.url.base}flexive"
message="Connection URL:"/>
<input taskname="flexive" addproperty="flatstorage.schema" defaultValue="${database.schema.division}"
message="Database schema:"/>
<input taskname="flexive" addproperty="flatstorage.tableName" defaultValue="FX_FLAT_STORAGE"
message="Table name:"/>
<input taskname="flexive" addproperty="flatstorage.nstring" defaultValue="20"
message="STRING columns:"/>
<input taskname="flexive" addproperty="flatstorage.ntext" defaultValue="10"
message="TEXT columns:"/>
<input taskname="flexive" addproperty="flatstorage.nbigint" defaultValue="10"
message="BIGINT columns:"/>
<input taskname="flexive" addproperty="flatstorage.ndouble" defaultValue="10"
message="DOUBLE columns:"/>
<input taskname="flexive" addproperty="flatstorage.nselect" defaultValue="10"
message="SELECT/BOOLEAN columns:"/>
<createFlatStorage jar="${flexive.lib.dir}/flexive-flatstorage.jar"
lib="${flexive.build.framework.jar.dir}"
extlib="lib"
connectionurl="${flatstorage.url}"
schema="${flatstorage.schema}"
tablename="${flatstorage.tableName}"
user="${database.username}"
password="${database.password}"
nstring="${flatstorage.nstring}"
ntext="${flatstorage.ntext}"
nbigint="${flatstorage.nbigint}"
ndouble="${flatstorage.ndouble}"
nselect="${flatstorage.nselect}"
/>
</target>
<target name="examples">
<ant antfile="${basedir}/src/examples/helloworld/build.xml" inheritAll="false"/>
<ant antfile="${basedir}/src/examples/products/build.xml" inheritAll="false"/>
<ant antfile="${basedir}/src/examples/tutorial01-documentstore/build.xml" inheritAll="false"/>
<ant antfile="${basedir}/src/examples/announcement-submission/build.xml" inheritAll="false"/>
</target>
<target name="dist.prepare">
<delete dir="${flexive.dist.dir}"/>
<mkdir dir="${flexive.dist.dir}"/>
<mkdir dir="${flexive.dist.apps.dir}"/>
<mkdir dir="${flexive.dist.apps.disabled.dir}"/>
<echo file="${flexive.dist.apps.disabled.dir}/README.txt">Use this directory for flexive applications that should not be included in flexive.ear.</echo>
</target>
<target name="dist" depends="jar.all,jar.interfaces.onlylocal,jar.jsf2.components,dist.prepare,tests.package.dist,dist.srcOnly,dist.assemble,examples,dist.package" description="Build a distribution of all jars, wars and ears">
</target>
<target name="dist.assemble">
<svnVersion property="dist.build.number"/>
<groovy>
properties['dist.bin.file'] = properties['flexive.dist'].replaceAll("@@build.number@@", properties['dist.build.number'])+"-bin.zip"
properties['dist.bin-all.file'] = properties['flexive.dist'].replaceAll("@@build.number@@", properties['dist.build.number'])+"-bin-all.zip"
</groovy>
<!-- Create flexive distribution -->
<copy file="${flexive.lib.dir}/${sqlparser.jar}" tofile="${flexive.dist.lib.dir}/${sqlparser.jar}"/>
<copy file="${flexive.lib.dir}/${extractor.jar}" tofile="${flexive.dist.lib.dir}/${extractor.jar}"/>
<copy file="${flexive.lib.dir}/${flatstorage.jar}" tofile="${flexive.dist.lib.dir}/${flatstorage.jar}"/>
<copy file="${flexive.lib.dir}/${extractor-documents.jar}" tofile="${flexive.dist.lib.dir}/${extractor-documents.jar}"/>