forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
911 lines (748 loc) · 26.8 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
<?xml version="1.0"?>
<project name="portal" basedir="." default="compile" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-common.xml" />
<target name="all">
<antcall target="clean" />
<antcall target="start" />
<antcall target="deploy" />
</target>
<target name="clean">
<ant dir="classes" target="clean" inheritAll="false" />
<ant dir="portal-service" target="clean" inheritAll="false" />
<ant dir="util-bridges" target="clean" inheritAll="false" />
<ant dir="util-java" target="clean" inheritAll="false" />
<ant dir="util-slf4j" target="clean" inheritAll="false" />
<ant dir="util-taglib" target="clean" inheritAll="false" />
<ant dir="portal-impl" target="clean" inheritAll="false" />
<ant dir="portal-pacl" target="clean" inheritAll="false" />
<ant dir="osgi/bootstrap" target="clean" inheritAll="false" />
<ant dir="portal-web" target="clean" inheritAll="false" />
<ant dir="sql" target="clean" inheritAll="false" />
<delete dir="${doc.dir}" />
<delete>
<fileset dir="." includes="*.ear,*.jar,*.war,*.zip" />
</delete>
<delete includeemptydirs="true" failonerror="false">
<fileset
dir="${app.server.bin.dir}"
includes="*.log*"
/>
</delete>
<delete failonerror="false">
<fileset
dir="${liferay.home}/data/hsql"
includes="${database.name}.*"
/>
</delete>
<delete dir="${module.framework.base.dir}" />
<delete dir="test-coverage" />
<if>
<equals arg1="${app.server.type}" arg2="glassfish" />
<then>
<delete dir="${app.server.instance.dir}/applications/liferay-portal" />
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="tomcat" />
<then>
<delete failonerror="false">
<fileset
dir="${app.server.dir}/conf/Catalina/localhost"
includes="*-hook.xml,*-portlet.xml"
/>
</delete>
<ant dir="support-tomcat" target="clean" inheritAll="false" />
</then>
</if>
<delete failonerror="false">
<fileset
dir="${app.server.classes.portal.dir}"
includes="portal-*.properties,system-*.properties"
/>
</delete>
<delete includeemptydirs="true" failonerror="false">
<fileset
dir="${app.server.deploy.dir}"
includes="*-ext/**,*-ext.war/**,*-hook/**,*-hook.war/**,*-layouttpl/**,*-layouttpl.war/**,*-portlet/**,*-portlet.war/**,*-theme/**,*-theme.war/**,*-web/**,*-web.war/**"
/>
</delete>
<delete failonerror="false">
<fileset
dir="${app.server.lib.global.dir}"
excludes="${jdbc.drivers}"
/>
</delete>
<delete failonerror="false">
<fileset
dir="${app.server.lib.portal.dir}"
excludes="${jdbc.drivers}"
/>
</delete>
<if>
<equals arg1="${clean.log.dir}" arg2="true" />
<then>
<delete dir="${app.server.log.dir}" />
</then>
</if>
<if>
<not>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<antelope:endswith string="${app.server.portal.dir}" with="/portal-web/docroot" />
</and>
</not>
<then>
<delete dir="${app.server.portal.dir}" />
<delete file="${app.server.portal.dir}" />
</then>
</if>
<if>
<equals arg1="${clean.temp.dir}" arg2="true" />
<then>
<delete dir="${app.server.temp.dir}" />
</then>
</if>
<if>
<equals arg1="${clean.work.dir}" arg2="true" />
<then>
<delete dir="${app.server.work.dir}" />
</then>
</if>
<antcall target="print-current-time" />
</target>
<target name="compile">
<ant dir="portal-service" target="compile" inheritAll="false" />
<ant dir="util-bridges" target="compile" inheritAll="false" />
<ant dir="util-java" target="compile" inheritAll="false" />
<ant dir="util-slf4j" target="compile" inheritAll="false" />
<ant dir="util-taglib" target="compile" inheritAll="false" />
<ant dir="portal-impl" target="compile" inheritAll="false" />
<ant dir="portal-pacl" target="compile" inheritAll="false" />
<ant dir="osgi/bootstrap" target="deploy" inheritAll="false" />
</target>
<target name="deploy">
<if>
<or>
<equals arg1="${app.server.type}" arg2="glassfish" />
<equals arg1="${app.server.type}" arg2="websphere" />
</or>
<then>
<delete dir="${app.server.portal.dir}" />
<delete file="${app.server.portal.dir}" />
</then>
</if>
<if>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<not>
<available file="${app.server.tomcat.classes.global.dir}/catalina.jar" />
</not>
</and>
<then>
<fail>
.
Tomcat is not installed in ${app.server.tomcat.dir}. If you already have Tomcat
installed, make sure the property "$${app.server.tomcat.dir}" points to your
Tomcat installation. If you wish to automatically install Tomcat into
${app.server.tomcat.dir}, then run "ant -buildfile build-dist.xml unzip-tomcat".
</fail>
</then>
</if>
<ant dir="portal-service" target="deploy" inheritAll="false" />
<ant dir="util-bridges" target="deploy" inheritAll="false" />
<ant dir="util-java" target="deploy" inheritAll="false" />
<ant dir="util-slf4j" target="deploy" inheritAll="false" />
<ant dir="util-taglib" target="deploy" inheritAll="false" />
<ant dir="portal-impl" target="deploy" inheritAll="false" />
<ant dir="portal-pacl" target="deploy" inheritAll="false" />
<ant dir="portal-web" target="deploy" inheritAll="false" />
<copy todir="${liferay.home}/data/hsql">
<fileset dir="sql">
<include name="${database.name}.properties" />
<include name="${database.name}.script" />
</fileset>
</copy>
<antcall target="deploy-properties" />
<copy todir="${app.server.lib.global.dir}">
<fileset dir="lib/development" includes="hsql.jar,jtds.jar,junit.jar,mysql.jar,postgresql.jar" />
<fileset dir="lib/global" />
</copy>
<if>
<isset property="jdbc.drivers.optional.dir" />
<then>
<copy todir="${app.server.lib.global.dir}">
<fileset
dir="${jdbc.drivers.optional.dir}"
includes="${jdbc.drivers}"
/>
</copy>
</then>
</if>
<copy todir="${app.server.lib.portal.dir}">
<fileset dir="lib/portal" />
</copy>
<if>
<and>
<equals arg1="${app.server.type}" arg2="geronimo" />
<equals arg1="${app.server.geronimo.version}" arg2="2.2.1" />
<not>
<available file="${app.server.geronimo.dir}/repository/org/apache/geronimo/specs/geronimo-el_2.2_spec/1.0.3/geronimo-el_2.2_spec-1.0.3.jar" />
</not>
</and>
<then>
<mkdir dir="${app.server.geronimo.dir}/repository/org/apache/geronimo/specs/geronimo-el_2.2_spec/1.0.3" />
<get
dest="${app.server.geronimo.dir}/repository/org/apache/geronimo/specs/geronimo-el_2.2_spec/1.0.3/geronimo-el_2.2_spec-1.0.3.jar"
src="http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-el_2.2_spec/1.0.3/geronimo-el_2.2_spec-1.0.3.jar"
verbose="true"
/>
<concat
append="true"
destfile="${app.server.geronimo.dir}/var/config/artifact_aliases.properties"
>
org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.2/jar=org.apache.geronimo.specs/geronimo-el_2.2_spec/1.0.3/jar
</concat>
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="jboss" />
<then>
<if>
<equals arg1="${app.server.jboss.major.version}" arg2="5" />
<then>
<loadfile property="run.conf.content" srcfile="${app.server.bin.dir}/run.conf" />
<antelope:stringutil string="${run.conf.content}" property="run.conf.content.index">
<indexof string="-Dfile.encoding=UTF-8" fromindex="0" />
</antelope:stringutil>
<if>
<equals arg1="${run.conf.content.index}" arg2="-1" />
<then>
<echo file="${app.server.bin.dir}/run.conf" append="true">
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.vfs.forceVfsJar=true -Dorg.jboss.logging.Log4jService.catchSystemOut=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"</echo>
</then>
</if>
<loadfile property="run.conf.bat.content" srcfile="${app.server.bin.dir}/run.conf.bat" />
<antelope:stringutil string="${run.conf.bat.content}" property="run.conf.bat.content.index">
<indexof string="-Dfile.encoding=UTF-8" fromindex="0" />
</antelope:stringutil>
<if>
<equals arg1="${run.conf.bat.content.index}" arg2="-1" />
<then>
<replace file="${app.server.bin.dir}/run.conf.bat">
<replacetoken><![CDATA[:JAVA_OPTS_SET]]></replacetoken>
<replacevalue><![CDATA[set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.vfs.forceVfsJar=true -Dorg.jboss.logging.Log4jService.catchSystemOut=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
:JAVA_OPTS_SET]]></replacevalue>
</replace>
</then>
</if>
<replace file="${app.server.deploy.dir}/jbossweb.sar/server.xml">
<replacetoken><![CDATA[redirectPort="8443" />]]></replacetoken>
<replacevalue><![CDATA[redirectPort="8443" URIEncoding="UTF-8" />]]></replacevalue>
</replace>
<move
failonerror="false"
file="${app.server.dir}/common/lib/hibernate-validator.jar"
tofile="${app.server.dir}/common/lib/hibernate-validator.jar.bak"
/>
<move
failonerror="false"
file="${app.server.dir}/common/lib/slf4j-jboss-logging.jar"
tofile="${app.server.dir}/common/lib/slf4j-jboss-logging.jar.bak"
/>
<delete>
<fileset
dir="${app.server.lib.portal.dir}"
includes="jaxrpc.jar,log4j.jar,stax.jar,xercesImpl.jar,xml-apis.jar"
/>
</delete>
</then>
<else>
<if>
<not>
<available file="${app.server.lib.global.dir}/module.xml" />
</not>
<then>
<copy
file="tools/servers/jboss/modules/module.xml"
tofile="${app.server.lib.global.dir}/module.xml"
/>
</then>
</if>
<delete>
<fileset
dir="${app.server.lib.portal.dir}"
includes="eclipselink.jar"
/>
</delete>
</else>
</if>
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="jetty" />
<then>
<if>
<not>
<available file="${app.server.dir}/contexts/root.xml" />
</not>
<then>
<copy
file="tools/servers/jetty/contexts/root.xml"
tofile="${app.server.dir}/contexts/root.xml"
/>
</then>
</if>
<copy todir="${app.server.lib.global.dir}">
<fileset
dir="lib/development"
includes="activation.jar,jta.jar,mail.jar,persistence.jar"
/>
</copy>
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="jonas" />
<then>
<delete>
<fileset
dir="${app.server.lib.portal.dir}"
includes="equinox.jar,osgi.core.jar,xalan.jar,xercesImpl.jar,xml-apis.jar"
/>
</delete>
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="resin" />
<then>
<copy todir="${app.server.lib.global.dir}">
<fileset
dir="lib/development"
includes="saxpath.jar"
/>
</copy>
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="tomcat" />
<then>
<if>
<not>
<available file="${app.server.dir}/conf/Catalina/localhost/${app.server.tomcat.portal.context}.xml" />
</not>
<then>
<copy
file="tools/servers/tomcat/conf/Catalina/localhost/ROOT.xml"
tofile="${app.server.dir}/conf/Catalina/localhost/${app.server.tomcat.portal.context}.xml"
overwrite="true"
/>
</then>
</if>
<ant dir="support-tomcat" target="deploy" inheritAll="false" />
<copy todir="${app.server.lib.endorsed.dir}" flatten="true">
<fileset
dir="lib"
includes="${endorsed.libraries}"
/>
</copy>
<if>
<not>
<equals arg1="${app.server.tomcat.lib.portal.dir}" arg2="${app.server.tomcat.lib.global.dir}" />
</not>
<then>
<delete failonerror="false">
<fileset
dir="${app.server.lib.portal.dir}"
includes="ccpp.jar"
/>
</delete>
</then>
</if>
<copy todir="${app.server.lib.global.dir}">
<fileset
dir="lib/development"
includes="activation.jar,jms.jar,jta.jar,mail.jar,persistence.jar"
/>
</copy>
<copy todir="${app.server.temp.dir}/liferay/com/liferay/portal/deploy/dependencies">
<fileset
dir="lib/development"
includes="resin.jar,script-10.jar"
/>
</copy>
<delete>
<fileset
dir="${app.server.lib.portal.dir}"
includes="tomcat-juli.jar"
/>
</delete>
</then>
</if>
<mkdir dir="${app.server.log.dir}" />
<mkdir dir="${app.server.temp.dir}" />
<mkdir dir="${app.server.work.dir}" />
<if>
<or>
<equals arg1="${app.server.type}" arg2="glassfish" />
<equals arg1="${app.server.type}" arg2="websphere" />
</or>
<then>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<jar
basedir="${app.server.portal.dir}"
jarfile="${tstamp.value}"
/>
<delete dir="${app.server.portal.dir}" />
<move file="${tstamp.value}" tofile="${app.server.portal.dir}" />
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="websphere" />
<then>
<exec dir="${app.server.websphere.bin.dir}" executable="/bin/sh" os="${os.unix}">
<arg line="startServer.sh server1" />
</exec>
<exec dir="${app.server.websphere.bin.dir}" executable="cmd.exe" os="${os.windows}">
<arg line="/c startServer.bat server1" />
</exec>
<echo>Installing liferay-portal.war.</echo>
<echo file="wsadmin.py">
def isAppInstalled(appName):
appNames = AdminApp.list()
if len(appNames) > 0:
for curAppName in appNames.split('\n'):
curAppName = curAppName.rstrip()
if curAppName.find(appName) >= 0:
return 1
return 0
if isAppInstalled('DefaultApplication'):
print AdminApp.uninstall('DefaultApplication')
print AdminConfig.save()
appManager = AdminControl.queryNames('type=ApplicationManager,process=server1,*')
if isAppInstalled('liferay-portal'):
print AdminControl.invoke(appManager, 'stopApplication', 'liferay-portal')
print AdminApp.update('liferay-portal', 'app', '[-contents ${app.server.websphere.instance.dir}/wsadmin-deploy/liferay-portal.war -contextroot / -operation update]')
else:
print AdminApp.install('${app.server.websphere.instance.dir}/wsadmin-deploy/liferay-portal.war', '[-appname liferay-portal -contextroot /]')
print AdminConfig.save()
print AdminControl.invoke(appManager, 'startApplication', 'liferay-portal')
</echo>
<exec dir="${app.server.websphere.bin.dir}" executable="/bin/sh" os="${os.unix}">
<arg line="wsadmin.sh -f ${basedir}/wsadmin.py" />
</exec>
<exec dir="${app.server.websphere.bin.dir}" executable="cmd.exe" os="${os.windows}">
<arg line="/c wsadmin.bat -f ${basedir}\wsadmin.py" />
</exec>
<delete file="wsadmin.py" />
<exec dir="${app.server.websphere.bin.dir}" executable="/bin/sh" os="${os.unix}">
<arg line="stopServer.sh server1" />
</exec>
<exec dir="${app.server.websphere.bin.dir}" executable="cmd.exe" os="${os.windows}">
<arg line="/c stopServer.bat server1" />
</exec>
</then>
</if>
<antcall target="print-current-time" />
</target>
<target name="deploy-properties">
<if>
<and>
<equals arg1="${app.server.bundled}" arg2="true" />
<equals arg1="${app.server.type}" arg2="glassfish" />
</and>
<then>
<war destfile="${app.server.glassfish.portal.dir}" update="true">
<classes dir="portal-impl/src" includes="portal-*.properties,system-*.properties" />
</war>
</then>
<else>
<copy todir="${app.server.classes.portal.dir}" overwrite="true">
<fileset dir="portal-impl/src" includes="portal-*.properties,system-*.properties" />
</copy>
</else>
</if>
</target>
<target name="dist">
<ant antfile="build-dist.xml" target="dist" inheritAll="false" />
</target>
<target name="doc">
<antcall target="dtddoc" />
<antcall target="javadoc" />
<antcall target="javadoc-all" />
<antcall target="propertiesdoc" />
<ant dir="util-taglib" target="taglibdoc" inheritAll="false" />
</target>
<target name="dtddoc">
<taskdef classname="DTDDoc.DTDDocTask" classpathref="lib.classpath" name="DTDDoc" />
<!--<antelope:stringutil string="${lp.version}" property="lp.version.dtd">
<replace regex="\." replacement="_" />
</antelope:stringutil>-->
<property name="doc.definitions.dir" value="${doc.dir}/definitions" />
<DTDDoc
destDir="${doc.definitions.dir}"
docTitle = "Liferay ${lp.version} Definitions"
showFixmeTags="false"
showHiddenTags="false"
sourceDir="${definitions.dir}"
>
<include name="liferay-*${lp.version.dtd}.dtd" />
</DTDDoc>
</target>
<target name="jar">
<ant dir="portal-service" target="jar" inheritAll="false" />
<ant dir="util-bridges" target="jar" inheritAll="false" />
<ant dir="util-java" target="jar" inheritAll="false" />
<ant dir="util-slf4j" target="jar" inheritAll="false" />
<ant dir="util-taglib" target="jar" inheritAll="false" />
<ant dir="portal-impl" target="jar" inheritAll="false" />
<ant dir="portal-pacl" target="jar" inheritAll="false" />
<ant dir="portal-web" target="war" inheritAll="false" />
<ant dir="support-tomcat" target="jar" inheritAll="false" />
</target>
<target name="javadoc">
<property name="doc.java.dir" value="${doc.dir}/javadocs" />
<mkdir dir="${doc.java.dir}" />
<javadoc
breakiterator="yes"
classpathref="project.classpath"
destdir="${doc.java.dir}"
doctitle="Liferay ${lp.version} Public API Documentation"
encoding="UTF-8"
header="<b>Liferay ${lp.version}</b>"
maxmemory="2048m"
noqualifier="java.*"
overview="portal-service/src/portal-service-overview.html"
stylesheetfile="${project.dir}/tools/javadoc.css"
useexternalfile="yes"
use="yes"
windowtitle="Liferay ${lp.version} API"
>
<doclet name="com.liferay.tools.doclets.standard.Standard" path="${project.dir}/lib/development/liferay-doclet.jar">
<param name="-linksource" />
</doclet>
<group title="Portal Services" packages="com.liferay.portal*:com.liferay.counter*:com.liferay.documentlibrary*:com.liferay.mail*" />
<group title="Portal Kernel" packages="com.liferay.portal.kernel*" />
<group title="Portlet Services" packages="com.liferay.portlet*" />
<group title="Portlet Bridges" packages="com.liferay.util.bridges*" />
<link href="http://docs.liferay.com/portlet-api/2.0/javadocs" />
<link href="http://java.sun.com/javase/6/docs/api" />
<link href="http://docs.liferay.com/portal/${lp.version.major}/javadocs" />
<packageset dir="portal-service/src" />
<packageset dir="util-bridges/src" />
<packageset dir="util-java/src" />
<packageset dir="util-slf4j/src" />
<tag name="generated" description="" />
</javadoc>
</target>
<target name="javadoc-all">
<property name="doc.java.dir" value="${doc.dir}/javadocs-all" />
<mkdir dir="${doc.java.dir}" />
<javadoc
breakiterator="yes"
classpathref="project.classpath"
destdir="${doc.java.dir}"
doctitle="Liferay ${lp.version} Internal API Documentation"
encoding="UTF-8"
header="<b>Liferay ${lp.version}</b>"
maxmemory="2048m"
noqualifier="java.*"
overview="portal-impl/src/portal-impl-overview.html"
stylesheetfile="${project.dir}/tools/javadoc.css"
useexternalfile="yes"
use="yes"
windowtitle="Liferay ${lp.version} Internal API"
>
<doclet name="com.liferay.tools.doclets.standard.Standard" path="${project.dir}/lib/development/liferay-doclet.jar">
<param name="-linksource" />
</doclet>
<group title="Portal Services" packages="com.liferay.portal.service*" />
<group title="Portlet Services" packages="com.liferay.portlet*" />
<link href="http://docs.liferay.com/portlet-api/2.0/javadocs" />
<link href="http://java.sun.com/javase/6/docs/api" />
<packageset dir="portal-impl/src" />
<packageset dir="portal-service/src" />
<packageset dir="util-bridges/src" />
<packageset dir="util-java/src" />
<packageset dir="util-slf4j/src" />
<packageset dir="util-taglib/src" />
<tag name="generated" description="ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated." />
</javadoc>
</target>
<target name="prepare-generated-files">
<ant antfile="build-dist.xml" target="prepare-generated-files" inheritAll="false" />
</target>
<target name="propertiesdoc">
<property name="properties.dest.dir" value="${doc.dir}/propertiesdoc" />
<delete dir="${properties.dest.dir}" />
<mkdir dir="${properties.dest.dir}" />
<antcall target="propertiesdoc-cmd">
<param name="properties.dest.dir" value="${properties.dest.dir}" />
<param name="properties.file" value="definitions/liferay-plugin-package_6_1_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 6.1 Properties" />
<param name="properties.toc" value="true" />
</antcall>
<antcall target="propertiesdoc-cmd">
<param name="properties.dest.dir" value="${properties.dest.dir}" />
<param name="properties.file" value="definitions/liferay-plugin-package_6_2_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 6.2 Properties" />
<param name="properties.toc" value="true" />
</antcall>
<antcall target="propertiesdoc-cmd">
<param name="properties.dest.dir" value="${properties.dest.dir}" />
<param name="properties.file" value="portal-impl/src/portal.properties" />
<param name="properties.title" value="Portal Properties" />
<param name="properties.toc" value="true" />
</antcall>
<antcall target="propertiesdoc-cmd">
<param name="properties.dest.dir" value="${properties.dest.dir}" />
<param name="properties.file" value="portal-impl/src/system.properties" />
<param name="properties.title" value="System Properties" />
<param name="properties.toc" value="true" />
</antcall>
<java
classname="com.liferay.portal.tools.propertiesdoc.PropertiesDocIndexBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<arg value="properties.dir=${doc.dir}/propertiesdoc" />
</java>
</target>
<target name="propertiesdoc-cmd">
<java
classname="com.liferay.portal.tools.propertiesdoc.PropertiesDocBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<arg value="properties.dest.dir=${properties.dest.dir}" />
<arg value="properties.file=${properties.file}" />
<arg value="properties.title=${properties.title}" />
<arg value="properties.toc=${properties.toc}" />
</java>
</target>
<target name="record-svn-revision">
<exec dir="${project.dir}" executable="cmd.exe" os="${os.windows}" outputproperty="svn.info.output">
<arg line="/c svn info" />
</exec>
<script classpathref="project.classpath" language="beanshell">
String svnInfoOutput = project.getProperty("svn.info.output");
int x = svnInfoOutput.indexOf("Revision: ");
x = svnInfoOutput.indexOf(" ", x);
int y = svnInfoOutput.indexOf("Node ", x);
String revision = svnInfoOutput.substring(x, y).trim();
project.setProperty("svn.info.revision", revision);
</script>
<echo file="svn-revision">Revision: ${svn.info.revision}
Username: ${svn.username}
Password: ${svn.password}
Portal: ${lp.source.dir}
Plugins: ${lp.plugins.dir}</echo>
</target>
<target name="setup-jrebel">
<echo file="${app.server.lib.global.dir}/rebel.xml"><![CDATA[<?xml version="1.0"?>
<application
xmlns="http://www.zeroturnaround.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd"
>
<classpath>
<dir name="${basedir}/portal-service/classes" />
</classpath>
</application>]]></echo>
<echo file="${app.server.classes.portal.dir}/rebel.xml"><![CDATA[<?xml version="1.0"?>
<application
xmlns="http://www.zeroturnaround.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd"
>
<classpath>
<dir name="${basedir}/osgi/bootstrap/classes" />
<dir name="${basedir}/portal-impl/classes" />
<dir name="${basedir}/portal-pacl/classes" />
<dir name="${basedir}/util-java/classes" />
<dir name="${basedir}/util-bridges/classes" />
<dir name="${basedir}/util-taglib/classes" />
<dir name="${basedir}/util-slf4j/classes" />
</classpath>
<web>
<link target="/">
<dir name="${basedir}/portal-web/docroot/" />
</link>
</web>
</application>]]></echo>
<loadfile failonerror="false" property="system-ext.properties.content" srcfile="portal-impl/src/system-ext.properties" />
<if>
<not>
<contains string="${system-ext.properties.content}" substring="liferay.lib.portal.dir" />
</not>
<then>
<echo
append="true"
file="portal-impl/src/system-ext.properties"
>
liferay.lib.portal.dir=${app.server.lib.portal.dir}
</echo>
<copy
file="portal-impl/src/system-ext.properties"
overwrite="true"
tofile="portal-impl/classes/system-ext.properties"
/>
</then>
</if>
</target>
<target name="sort-xml-attributes">
<java
classname="com.liferay.portal.tools.XMLAttributesSorter"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Xmx512m" />
<jvmarg value="-Xss2048k" />
<arg value="sort.xml.file.name=${sort.xml.file.name}" />
</java>
</target>
<target name="start">
<antcall target="compile" />
<ant dir="util-taglib" target="jar" inheritAll="false" />
<ant dir="sql" target="build-db" inheritAll="false" />
<ant dir="sql" target="rebuild-hypersonic" inheritAll="false" />
<ant dir="portal-impl" target="build-themes" inheritAll="false" />
<antcall target="jar" />
<antcall target="print-current-time" />
</target>
<target name="test">
<ant antfile="build-test.xml" target="test" inheritAll="false" />
</target>
<target name="test-integration">
<ant antfile="build-test.xml" target="test-integration" inheritAll="false" />
</target>
<target name="test-unit">
<ant antfile="build-test.xml" target="test-unit" inheritAll="false" />
</target>
<target name="update-plugins-to-svn-revision">
<loadfile property="svn.info.revision.valid" srcfile="svn-revision" />
<script classpathref="project.classpath" language="beanshell">
String svnInfoOutput = project.getProperty("svn.info.revision.valid");
int x = svnInfoOutput.indexOf("Revision: ");
x = svnInfoOutput.indexOf(" ", x);
int y = svnInfoOutput.indexOf("Username:", x);
String revision = svnInfoOutput.substring(x, y).trim();
project.setProperty("svn.info.revision", revision);
</script>
<exec dir="${lp.plugins.dir}" executable="cmd.exe" os="${os.windows}">
<arg line="/c svn --username ${svn.username} --password ${svn.password} update -r ${svn.info.revision}" />
</exec>
</target>
<target name="validate-xml">
<xmlvalidate failonerror="no">
<fileset dir="${project.dir}"
excludes="**/dependencies/**,**/ehcache/**"
includes="**/liferay-*.xml,**/web.xml"
/>
<xmlcatalog refid="dtd.catalog" />
</xmlvalidate>
</target>
</project>