forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1575 lines (1327 loc) · 63.1 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<project basedir="." default="compile" name="portal" xmlns:antelope="antlib:ise.antelope.tasks" xmlns:artifact="antlib:org.apache.maven.artifact.ant" xmlns:if="ant:if">
<import file="build-common.xml" />
<macrodef name="clean-liferay-home">
<sequential>
<parallel failonany="true" threadcount="${parallel.thread.count}">
<delete failonerror="false" includeemptydirs="true">
<fileset
dir="${app.server.bin.dir}"
includes="*.log*"
/>
<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/**"
/>
<fileset
dir="${liferay.home}"
includes=".liferay-home"
/>
<fileset
dir="${liferay.home}/data/elasticsearch"
/>
<fileset
dir="${liferay.home}/data/hypersonic"
includes="${database.name}.*"
/>
<fileset
dir="${liferay.home}/deploy"
/>
<fileset
dir="${liferay.home}/osgi"
/>
<fileset
dir="${liferay.home}/work"
/>
</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}" failonerror="false" />
<delete failonerror="false" file="${app.server.portal.dir}" />
</then>
<else>
<delete failonerror="false">
<fileset
dir="${app.server.classes.portal.dir}"
includes="portal-*.properties,system-*.properties"
/>
<fileset
dir="${app.server.shielded-container-lib.portal.dir}"
excludes="${jdbc.drivers}"
/>
</delete>
</else>
</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>
</parallel>
</sequential>
</macrodef>
<macrodef name="setup-profile-dxp">
<attribute name="to.branch.name" />
<sequential>
<!-- build.profile-dxp.properties -->
<echo>build.profile-dxp.properties</echo>
<loadproperties prefix="working.dir" srcFile="working.dir.properties" />
<condition else="7z" property="snapshot.bundle.file.extension" value="zip">
<equals arg1="${git.working.branch.name}" arg2="7.0.x" />
</condition>
<echo file="build.profile-dxp.properties">##
## Autogenerated
##
build.profile=dxp
snapshot.bundle.base.url=${working.dir.snapshot.bundle.base.url}
snapshot.bundle.url=${working.dir.snapshot.bundle.base.url}snapshot-${git.working.branch.name}-private/latest/liferay-portal-tomcat-${git.working.branch.name}-private.${snapshot.bundle.file.extension}</echo>
<!-- release.profile-dxp.properties -->
<echo>release.profile-dxp.properties</echo>
<echo file="release.profile-dxp.properties">##
## Autogenerated
##
lp.version=${lp.version[@{to.branch.name}]}
release.info.build=${release.info.build[@{to.branch.name}]}
release.info.date=${release.info.date[@{to.branch.name}]}
release.info.name=${release.info.name[@{to.branch.name}]}
release.info.version=${release.info.version.major[@{to.branch.name}]}.${release.info.version.minor[@{to.branch.name}]}.${release.info.version.bug.fix[@{to.branch.name}]}
release.info.version.bug.fix=${release.info.version.bug.fix[@{to.branch.name}]}
release.info.version.display.name=${release.info.version.display.name[@{to.branch.name}]}
release.info.version.file.suffix=${release.info.version.file.suffix[@{to.branch.name}]}
release.info.version.major=${release.info.version.major[@{to.branch.name}]}
release.info.version.minor=${release.info.version.minor[@{to.branch.name}]}</echo>
<!-- sql/sql.profile-dxp.properties -->
<echo>sql/sql.profile-dxp.properties</echo>
<local name="portal.data.release.build.number" />
<condition else="" property="portal.data.release.build.number" value="portal.data.release.build.number=${portal.data.release.build.number[@{to.branch.name}]}">
<isset property="portal.data.release.build.number[@{to.branch.name}]" />
</condition>
<local name="portal.data.release.schema.version" />
<condition else="" property="portal.data.release.schema.version" value="portal.data.release.schema.version=${portal.data.release.schema.version[@{to.branch.name}]}">
<isset property="portal.data.release.schema.version[@{to.branch.name}]" />
</condition>
<echo file="sql/sql.profile-dxp.properties">##
## Autogenerated
##
database.types=${database.types[@{to.branch.name}]}
${portal.data.release.build.number}
${portal.data.release.schema.version}</echo>
<!-- test.profile-dxp.properties -->
<echo>test.profile-dxp.properties</echo>
<echo file="test.profile-dxp.properties">##
## Autogenerated
##
liferay.portal.branch=@{to.branch.name}
test.run.environment=EE
testray.build.type=EE Development (${liferay.portal.branch})</echo>
</sequential>
</macrodef>
<target name="all">
<if>
<not>
<or>
<equals arg1="${build.binaries.cache.dir}" arg2="" />
<available file="${project.dir}/${build.binaries.cache.dir}" type="dir" />
</or>
</not>
<then>
<property location="${project.dir}/${build.binaries.cache.dir}" name="build.binaries.cache.dir.absolute.path" />
<echo>
Please clone the repository at https://github.com/liferay/${build.binaries.cache.repository.name}
into ${build.binaries.cache.dir.absolute.path} to have a cached copy of all
Gradle dependencies used during the build.
Set the property "build.binaries.cache.dir" to an empty value to suppress this
message.
</echo>
</then>
</if>
<property name="gradle.execute.silent" value="true" />
<antcall target="clean" />
<antcall target="compile" />
<antcall target="deploy" />
</target>
<target name="baseline-current-branch">
<java
classname="com.liferay.portal.tools.GitUtil"
classpathref="project.classpath"
dir="${project.dir}/modules"
fork="true"
newenvironment="true"
outputProperty="baseline.current.branch.dirs"
resultproperty="baseline.current.branch.result"
>
<arg value="git.marker.file=bnd.bnd" />
<arg value="git.working.branch.name=${git.working.branch.name}" />
<arg value="tools.throw.main.exception=true" />
</java>
<if>
<not>
<equals arg1="${baseline.current.branch.result}" arg2="0" />
</not>
<then>
<fail>${baseline.current.branch.dirs}</fail>
</then>
</if>
<for delimiter="${line.separator}" list="${baseline.current.branch.dirs}" param="baseline.current.branch.dir">
<sequential>
<if>
<not>
<contains string="@{baseline.current.branch.dir}" substring=" " />
</not>
<then>
<propertyregex
global="true"
input="@{baseline.current.branch.dir}"
override="true"
property="baseline.current.branch.project.path"
regexp="/"
replace=":"
/>
<gradle-execute dir="${project.dir}/modules" forcedcacheenabled="false" task=":${baseline.current.branch.project.path}:baseline">
<arg value="--parallel" />
<arg value="-Dbaseline.ignoreFailures=true" />
</gradle-execute>
</then>
</if>
</sequential>
</for>
</target>
<target name="bom-all">
<echo>Manually run "ant all" or "ant snapshot-bundle" to initialize the bundle.</echo>
<setup-sdk />
<gradle-execute setupbinariescache="false" task="deployReleng">
<arg value="--build-file=${project.dir}/modules/releng.gradle" />
</gradle-execute>
</target>
<target name="clean">
<gradle-stop-daemon />
<if>
<available file="${project.dir}/.git" />
<then>
<execute>
${build.git.clean.command}
</execute>
</then>
<else>
<echo>Do not clean project because it is not in a Git repository.</echo>
</else>
</if>
<clean-liferay-home />
<print-current-time />
</target>
<target name="compile">
<setup-sdk />
<setup-libs />
<setup-nodejs-sass />
<setup-yarn />
<gradle-execute dir="modules/core" task="deploy">
<arg value="--parallel" />
<arg value="-Dbuild.profile=portal-pre" />
<arg value="-Pforced.deploy.dir=${project.dir}/tmp/lib-pre" />
</gradle-execute>
<ant dir="portal-kernel" inheritAll="false" target="install-portal-snapshot" />
<gradle-execute dir="modules/apps" task="deploy">
<arg value="--parallel" />
<arg value="-Dbuild.profile=portal-pre" />
<arg value="-Pforced.deploy.dir=${project.dir}/tmp/lib-pre" />
</gradle-execute>
<parallel failonany="true" threadcount="${parallel.thread.count}">
<ant dir="support-tomcat" inheritAll="false" target="compile" />
<ant dir="util-bridges" inheritAll="false" target="compile" />
<sequential>
<ant dir="util-java" inheritAll="false" target="compile" />
<ant dir="util-taglib" inheritAll="false" target="compile" />
</sequential>
<ant dir="util-slf4j" inheritAll="false" target="compile" />
</parallel>
<ant dir="portal-impl" inheritAll="false" target="compile" />
<ant dir="portal-test" inheritAll="false" target="compile" />
<print-current-time />
</target>
<target name="compile-test">
<ant dir="portal-impl" inheritAll="false" target="compile-test" />
<ant dir="portal-kernel" inheritAll="false" target="compile-test" />
<ant dir="portal-web" inheritAll="false" target="compile-test" />
<ant dir="util-java" inheritAll="false" target="compile-test" />
</target>
<target name="deploy">
<if>
<equals arg1="${app.server.type}" arg2="websphere" />
<then>
<delete file="${app.server.portal.war.name}" />
</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>
<ant antfile="build-dist.xml" target="unzip-tomcat" />
</then>
</if>
<ant dir="portal-kernel" inheritAll="false" target="deploy" />
<ant dir="util-bridges" inheritAll="false" target="deploy" />
<ant dir="util-java" inheritAll="false" target="deploy" />
<ant dir="util-slf4j" inheritAll="false" target="deploy" />
<ant dir="util-taglib" inheritAll="false" target="deploy" />
<ant dir="portal-impl" inheritAll="false" target="deploy" />
<ant dir="portal-test" inheritAll="false" target="deploy" />
<ant dir="portal-web" inheritAll="false" target="deploy" />
<antcall target="install-portal-snapshots" />
<touch file="${liferay.home}/.liferay-home" />
<mkdir dir="${liferay.home}/deploy" />
<ant dir="sql" inheritAll="false" target="build-db" />
<deploy-properties />
<antcall target="deploy-additional-jars" />
<antcall target="update-app-server-scripts" />
<mkdir dir="${app.server.log.dir}" />
<mkdir dir="${app.server.temp.dir}" />
<mkdir dir="${app.server.work.dir}" />
<if>
<equals arg1="${app.server.type}" arg2="websphere" />
<then>
<copy
file="${app.server.portal.dir}/WEB-INF/ibm-web-ext.xml"
tofile="${app.server.websphere.instance.dir}/config/cells/liferay-cell/applications/liferay-portal.ear/deployments/liferay-portal/liferay-portal.war/WEB-INF/ibm-web-ext.xml"
/>
</then>
</if>
<ant dir="portal-web" inheritAll="false" target="war" />
<stopwatch name="modules.stopwatch" />
<if>
<equals arg1="${build.marketplace.apps.enabled}" arg2="true" />
<then>
<gradle-execute dir="${project.dir}/modules" task="deploy">
<arg value="--parallel" />
<arg value="-Dbuild.profile=portal-pre" />
</gradle-execute>
<gradle-execute dir="${project.dir}/modules" task="deploy">
<arg value="--parallel" />
<arg value="-Dbuild.exclude.dirs=${build.exclude.dirs}" />
<arg value="-Dbuild.include.dirs=${build.include.dirs}" />
<arg value="-Dbuild.profile=${build.profile}" />
<arg value="-Dgradle.develocity.tag=portal" />
<env key="WAS_HOME" value="${app.server.websphere.dir}" />
</gradle-execute>
<if>
<equals arg1="${marker.files.lfrbuild.ci.enabled}" arg2="true" />
<then>
<sequential>
<for param="lfrbuild.file">
<fileset
dir="${project.dir}/modules"
includes="**/.lfrbuild-ci"
/>
<sequential>
<local name="lfrbuild.dir" />
<antelope:stringutil property="lfrbuild.dir" string="@{lfrbuild.file}">
<antelope:replace regex="\\" replacement="/" />
</antelope:stringutil>
<antelope:stringutil property="lfrbuild.dir" string="${lfrbuild.dir}">
<antelope:replace regex="(.+)\/\.lfrbuild-ci" replacement="$1" />
</antelope:stringutil>
<gradle-execute dir="${lfrbuild.dir}" task="deploy" />
</sequential>
</for>
</sequential>
</then>
</if>
</then>
<else>
<gradle-execute dir="${project.dir}/modules/core" task="deploy">
<arg value="--parallel" />
<arg value="-Dbuild.exclude.dirs=${build.exclude.dirs}" />
<arg value="-Dbuild.include.dirs=${build.include.dirs}" />
<arg value="-Dbuild.profile=${build.profile}" />
</gradle-execute>
<pathconvert property="build.app.server.lib.marker.files" setonempty="false">
<fileset
dir="${project.dir}/modules"
includes="**/.lfrbuild-app-server-lib"
/>
</pathconvert>
<if>
<isset property="build.app.server.lib.marker.files" />
<then>
<gradle-execute dir="${project.dir}/modules" task="deployTool">
<arg value="--parallel" />
<arg value="-Dbuild.exclude.dirs=${build.exclude.dirs}" />
<arg value="-Dbuild.include.dirs=${build.include.dirs}" />
<arg value="-Dbuild.profile=${build.profile}" />
<arg value="deployAppServerLib" />
<arg value="deployAppServerPortalFile" />
<arg value="deployConfigs" />
</gradle-execute>
</then>
<else>
<gradle-execute dir="${project.dir}/modules" task="deployTool">
<arg value="--parallel" />
<arg value="-Dbuild.exclude.dirs=${build.exclude.dirs}" />
<arg value="-Dbuild.include.dirs=${build.include.dirs}" />
<arg value="-Dbuild.profile=${build.profile}" />
<arg value="deployAppServerPortalFile" />
<arg value="deployConfigs" />
</gradle-execute>
</else>
</if>
</else>
</if>
<stopwatch action="elapsed" name="modules.stopwatch" />
<copy
file="tools/osgi-marketplace-override-README.markdown"
tofile="${liferay.home}/osgi/marketplace/override/README.markdown"
/>
<print-current-time />
</target>
<target name="deploy-additional-jars">
<copy
todir="${app.server.shielded-container-lib.portal.dir}"
>
<fileset
dir="lib/development"
includes="hsql.jar,mariadb.jar,mysql.jar,postgresql.jar"
/>
</copy>
<if>
<isset property="jdbc.drivers.optional.dir" />
<then>
<copy
todir="${app.server.shielded-container-lib.portal.dir}"
>
<fileset
dir="${jdbc.drivers.optional.dir}"
includes="${jdbc.drivers}"
/>
</copy>
</then>
</if>
<copy
todir="${app.server.shielded-container-lib.portal.dir}"
>
<fileset
dir="lib/portal"
excludes="dependencies.properties"
/>
</copy>
<if>
<or>
<equals arg1="${app.server.type}" arg2="tcserver" />
<equals arg1="${app.server.type}" arg2="tomcat" />
</or>
<then>
<if>
<equals arg1="${app.server.type}" arg2="tomcat" />
<then>
<ant dir="support-tomcat" inheritAll="false" target="deploy" />
</then>
</if>
<copy
todir="${app.server.shielded-container-lib.portal.dir}"
>
<fileset
dir="lib/development"
includes="activation.jar,mail.jar"
/>
</copy>
<if>
<equals arg1="${app.server.type}" arg2="tcserver" />
<then>
<delete>
<fileset
dir="${app.server.shielded-container-lib.portal.dir}"
includes="tomcat-juli.jar"
/>
</delete>
</then>
</if>
</then>
</if>
<if>
<equals arg1="${app.server.type}" arg2="websphere" />
<then>
<tstamp>
<format pattern="yyyyMMddkkmmssSSS" property="tstamp.value" />
</tstamp>
<jar
basedir="${app.server.portal.dir}"
jarfile="${tstamp.value}"
/>
<delete dir="${app.server.portal.dir}" />
<move
file="${tstamp.value}"
tofile="${app.server.portal.war.name}"
/>
</then>
</if>
</target>
<target name="deploy-portal-license-enterprise-app">
<property name="artifact.name" value="com.liferay.portal.license.enterprise.app" />
<gradle-execute outputproperty="jar.file" setupbinariescache="false" task="printDependencyPath">
<arg value="--build-file=${project.dir}/modules/util.gradle" />
<arg value="--quiet" />
<arg value="-Dorg.gradle.internal.launcher.welcomeMessageEnabled=false" />
<arg value="-PdependencyNotation=com.liferay:${artifact.name}:${build.portal.license.enterprise.app.module.version}" />
</gradle-execute>
<copy
file="${jar.file}"
preservelastmodified="true"
todir="${liferay.home}/osgi/static"
/>
<basename file="${jar.file}" property="file.name" />
<move
file="${liferay.home}/osgi/static/${file.name}"
tofile="${liferay.home}/osgi/static/${artifact.name}.jar"
/>
</target>
<target name="dist">
<ant antfile="build-dist.xml" inheritAll="false" target="dist" />
</target>
<target name="doc">
<antcall target="dtddoc" />
<antcall target="javadoc" />
<antcall target="propertiesdoc" />
<ant dir="util-taglib" inheritAll="false" target="taglibdoc" />
</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}"
stylesheet="${project.dir}/tools/styles/dtddoc.css"
>
<include name="liferay-*${lp.version.dtd}.dtd" />
</DTDDoc>
</target>
<target name="install-portal-snapshots">
<ant dir="portal-impl" inheritAll="false" target="install-portal-snapshot" />
<ant dir="portal-kernel" inheritAll="false" target="install-portal-snapshot" />
<ant dir="portal-test" inheritAll="false" target="install-portal-snapshot" />
<ant dir="portal-web" inheritAll="false" target="install-portal-snapshot" />
<ant dir="support-tomcat" inheritAll="false" target="install-portal-snapshot" />
<ant dir="util-bridges" inheritAll="false" target="install-portal-snapshot" />
<ant dir="util-java" inheritAll="false" target="install-portal-snapshot" />
<ant dir="util-slf4j" inheritAll="false" target="install-portal-snapshot" />
<ant dir="util-taglib" inheritAll="false" target="install-portal-snapshot" />
</target>
<target name="jar">
<ant dir="portal-kernel" inheritAll="false" target="jar" />
<ant dir="util-bridges" inheritAll="false" target="jar" />
<ant dir="util-java" inheritAll="false" target="jar" />
<ant dir="util-slf4j" inheritAll="false" target="jar" />
<ant dir="util-taglib" inheritAll="false" target="jar" />
<ant dir="portal-impl" inheritAll="false" target="jar" />
<ant dir="portal-test" inheritAll="false" target="jar" />
<ant dir="portal-web" inheritAll="false" target="war" />
<ant dir="support-tomcat" inheritAll="false" target="jar" />
</target>
<target name="javadoc">
<remake-dir dir="${doc.dir}/javadocs" />
<antcall target="javadoc-portal-cmd">
<param name="generated.description" value="" />
<param name="module.dir" value="portal-impl" />
</antcall>
<antcall target="javadoc-portal-cmd">
<param name="generated.description" value="ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated." />
<param name="module.dir" value="portal-kernel" />
</antcall>
<antcall target="javadoc-portal-cmd">
<param name="generated.description" value="" />
<param name="module.dir" value="portal-test" />
</antcall>
<antcall target="javadoc-cmd">
<param name="generated.description" value="" />
<param name="module.dir" value="util-bridges" />
</antcall>
<antcall target="javadoc-cmd">
<param name="generated.description" value="" />
<param name="module.dir" value="util-java" />
</antcall>
<antcall target="javadoc-cmd">
<param name="generated.description" value="" />
<param name="module.dir" value="util-slf4j" />
</antcall>
</target>
<target name="javadoc-cmd">
<property name="doc.java.dir" value="${doc.dir}/javadocs/${module.dir}" />
<mkdir dir="${doc.java.dir}" />
<javadoc
breakiterator="yes"
classpathref="project.classpath"
destdir="${doc.java.dir}"
doctitle="Liferay ${lp.version} ${module.dir} API"
encoding="UTF-8"
header="<b>Liferay ${lp.version} ${module.dir}</b>"
maxmemory="2048m"
noqualifier="java.*"
overview="${module.dir}/src/overview.html"
stylesheetfile="${project.dir}/tools/styles/javadoc.css"
use="yes"
useexternalfile="yes"
windowtitle="Liferay ${lp.version} ${module.dir} API"
>
<link href="http://docs.liferay.com/portlet-api/3.0/javadocs" />
<link href="http://java.sun.com/javase/6/docs/api" />
<link href="http://docs.liferay.com/portal/${lp.version.major}-latest/javadocs" />
<packageset dir="${module.dir}/src" />
<tag description="{$generated.description}" name="generated" />
</javadoc>
</target>
<target name="javadoc-portal-cmd">
<property name="doc.java.dir" value="${doc.dir}/javadocs/${module.dir}" />
<mkdir dir="${doc.java.dir}" />
<javadoc
breakiterator="yes"
classpathref="project.classpath"
destdir="${doc.java.dir}"
doctitle="Liferay ${lp.version} ${module.dir} API"
encoding="UTF-8"
header="<b>Liferay ${lp.version} ${module.dir}</b>"
maxmemory="2048m"
noqualifier="java.*"
overview="${module.dir}/src/overview.html"
stylesheetfile="${project.dir}/tools/styles/javadoc.css"
use="yes"
useexternalfile="yes"
windowtitle="Liferay ${lp.version} ${module.dir} API"
>
<group packages="com.liferay.portal.*:com.liferay.counter.*:com.liferay.mail.*" title="Portal Services" />
<group packages="com.liferay.portal.kernel.*" title="Portal Kernel" />
<group packages="com.liferay.*" title="Portlet Services" />
<link href="http://docs.liferay.com/portlet-api/3.0/javadocs" />
<link href="http://java.sun.com/javase/6/docs/api" />
<link href="http://docs.liferay.com/portal/${lp.version.major}-latest/javadocs" />
<packageset dir="${module.dir}/src" />
<tag description="{$generated.description}" name="generated" />
</javadoc>
</target>
<target name="nightly">
<fail>
.
This target has been renamed to "snapshot-bundle". Please call "snapshot-bundle" instead.
</fail>
<antcall target="snapshot-bundle" />
</target>
<target name="prepare-generated-files">
<ant antfile="build-dist.xml" inheritAll="false" target="prepare-generated-files" />
</target>
<target name="print-machine-info">
<beanshell>
<![CDATA[
import com.sun.management.OperatingSystemMXBean;
import java.lang.management.ManagementFactory;
OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean)ManagementFactory.getOperatingSystemMXBean();
project.setProperty("machine.info.arch", operatingSystemMXBean.getArch());
project.setProperty("machine.info.cores", String.valueOf(operatingSystemMXBean.getAvailableProcessors()));
project.setProperty("machine.info.os", operatingSystemMXBean.getName());
project.setProperty("machine.info.ram", String.valueOf(operatingSystemMXBean.getTotalPhysicalMemorySize() / 1073741824));
]]>
</beanshell>
<echo>${machine.info.arch}</echo>
<echo>${machine.info.cores}</echo>
<echo>${machine.info.os}</echo>
<echo>${machine.info.ram}</echo>
</target>
<target name="propertiesdoc">
<property name="properties.dest.dir" value="${doc.dir}/propertiesdoc" />
<remake-dir 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="definitions/liferay-plugin-package_7_0_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 7.0 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_7_1_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 7.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_7_2_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 7.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="definitions/liferay-plugin-package_7_3_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 7.3 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_7_4_0.properties" />
<param name="properties.title" value="Liferay Plugin Package 7.4 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="publish-portal-release">
<ant dir="portal-impl" inheritAll="false" target="publish-portal-release" />
<ant dir="portal-kernel" inheritAll="false" target="publish-portal-release" />
<ant dir="portal-test" inheritAll="false" target="publish-portal-release" />
<ant dir="portal-web" inheritAll="false" target="publish-portal-release" />
<ant dir="support-tomcat" inheritAll="false" target="publish-portal-release" />
<ant dir="util-bridges" inheritAll="false" target="publish-portal-release" />
<ant dir="util-java" inheritAll="false" target="publish-portal-release" />
<ant dir="util-slf4j" inheritAll="false" target="publish-portal-release" />
<ant dir="util-taglib" inheritAll="false" target="publish-portal-release" />
</target>
<target name="publish-workspaces">
<tstamp>
<format pattern="yyyyMMdd.kkmm" property="tstamp.value" />
</tstamp>
<execute dir="${project.dir}/workspaces">
<![CDATA[
git clean -dfqx .
]]>
</execute>
<mkdir dir="${project.dir}/dist" />
<for param="workspace.dir">
<path>
<dirset
dir="${project.dir}/workspaces"
>
<include name="${workspace.name}" />
</dirset>
</path>
<sequential>
<local name="dir.name" />
<basename file="@{workspace.dir}" property="dir.name" />
<propertyregex
global="true"
input="${dir.name}"
override="true"
property="processed.dir.name"
regexp="-"
replace="."
/>
<local name="artifact.id" />
<property name="artifact.id" value="com.${processed.dir.name}" />
<delete dir="${user.home}/.m2/repository/com/liferay/workspaces/${artifact.id}" />
<delete file="${project.dir}/dist/${artifact.id}.pom" />
<delete file="${project.dir}/dist/${artifact.id}.zip" />
<zip
destfile="${project.dir}/dist/${artifact.id}.zip"
duplicate="preserve"
>
<zipfileset
dir="@{workspace.dir}"
/>
</zip>
<artifact:pom artifactId="${artifact.id}" groupId="com.liferay.workspace" id="${artifact.id}.pom" packaging="zip" version="${tstamp.value}" />
<artifact:writepom file="dist/${artifact.id}.pom" pomRefId="${artifact.id}.pom" />
<artifact:deploy file="dist/${artifact.id}.zip">
<pom file="dist/${artifact.id}.pom" />
<remoteRepository url="https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases">
<authentication password="${sonatype.release.password}" username="${sonatype.release.username}" />
</remoteRepository>
</artifact:deploy>
</sequential>
</for>
</target>
<target name="restore-latest-artifact-version">
<ant dir="portal-impl" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="portal-kernel" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="portal-test" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="portal-web" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="support-tomcat" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="util-bridges" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="util-java" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="util-slf4j" inheritAll="false" target="restore-latest-artifact-version" />
<ant dir="util-taglib" inheritAll="false" target="restore-latest-artifact-version" />
</target>
<target name="setup-libs">
<setup-libs />
</target>
<target name="setup-nodejs-sass">
<setup-nodejs-sass />
</target>
<target name="setup-profile-dxp">
<delete dir="git-clone-profile-dxp" />