forked from apache/netbeans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
2208 lines (1993 loc) · 106 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="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project name="nbbuild" default="build-nozip" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
<fail message="Please build using Ant 1.9.8 or higher.">
<condition>
<not>
<antversion atleast="1.9.8"/>
</not>
</condition>
</fail>
<import file="default.xml"/>
<!-- To make people happy who want to do `ant clean all': -->
<target name="all" depends="build,commit-validation" description="Build the IDE and run basic validation tests."/>
<target name="all-nozip" depends="build-nozip,commit-validation" description="Build the IDE (no ZIP file, unpacked) and run basic validation tests."/>
<target name="bootstrap" description="Bootstrap NetBeans-specific Ant extensions."
depends="-jdk-init,-load-build-properties">
<fail message="You need to run on JDK 8+ to build NetBeans; java.home=${java.home}">
<condition>
<matches pattern="^1\.[01234567].*" string="${java.version}"/>
</condition>
</fail>
<fail message="You need JDK 8+ to build NetBeans; nbjdk.home=${nbjdk.home} java.home=${java.home}">
<condition>
<not>
<or>
<isset property="have-jdk-1.8"/>
<isset property="have-jdk-1.9"/>
</or>
</not>
</condition>
</fail>
<property name="build.ant.classes.dir" location="${nb.build.dir}/antclasses"/>
<mkdir dir="${build.ant.classes.dir}"/>
<javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.8" target="1.8">
<classpath>
<pathelement location="${ant.core.lib}"/>
</classpath>
<include name="org/netbeans/nbbuild/extlibs/DeregisterExternalHook.java"/>
<include name="org/netbeans/nbbuild/extlibs/DownloadBinaries.java"/>
<compilerarg line="-Xlint -Xlint:-serial"/>
</javac>
<taskdef name="deregisterexternalhook" classname="org.netbeans.nbbuild.extlibs.DeregisterExternalHook" classpath="${build.ant.classes.dir}"/>
<deregisterexternalhook root=".."/>
<taskdef name="downloadbinaries" classname="org.netbeans.nbbuild.extlibs.DownloadBinaries" classpath="${build.ant.classes.dir}"/>
<taskdef name="configureproxy" classname="org.netbeans.nbbuild.extlibs.ConfigureProxy" classpath="${build.ant.classes.dir}"/>
<property name="have-downloadbinaries-task" value="true" />
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}" repos="${binaries.repos}">
<manifest dir="${nb_all}">
<include name="nbbuild/external/binaries-list"/>
<include name="platform/libs.junit4/external/binaries-list"/>
<include name="platform/javahelp/external/binaries-list"/>
</manifest>
</downloadbinaries>
<!--
nb-extra-files denotes directories/files, that are not packed for
distribution. The clusters are only used for local development/testing.
The files must not be included in distribution zip and also need to be
excluded from license analysis
-->
<property name="nb-extra-files" value="test/**,extra/**"/>
<echo message="Bootstrapping NetBeans-specific Ant extensions..."/>
<path id="bootstrap-cp">
<pathelement location="${ant.core.lib}"/>
<fileset dir="..">
<!-- For JavaHelp indexing and link checking: -->
<include name="platform/javahelp/external/jhall*.jar"/>
<!-- For json parsing -->
<include name="nbbuild/external/json-simple*.jar"/>
</fileset>
</path>
<javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.8" target="1.8">
<classpath refid="bootstrap-cp"/>
<compilerarg line="-Xlint -Xlint:-serial"/>
</javac>
<jar jarfile="${nbantext.jar}">
<fileset dir="${build.ant.classes.dir}"/>
<fileset dir="antsrc">
<exclude name="**/*.java"/>
<exclude name="**/package.html"/>
<exclude name="package-list"/>
</fileset>
<zipfileset dir="${nb_all}" includes="LICENSE" fullpath="META-INF/LICENSE"/>
<zipfileset dir="${nb_all}/nbbuild" includes="notice-stub.txt" fullpath="META-INF/NOTICE"/>
</jar>
<taskdef name="createlicensesummary" classname="org.netbeans.nbbuild.extlibs.CreateLicenseSummary" classpath="${nbantext.jar}"/>
<!-- get all json info we have on apache gitbox -->
<property name="metabuild.releasejson" value="${nb_all}/nbbuild/build/netbeansrelease.json"/>
<condition property="metabuild.jsonurl" value="https://gitbox.apache.org/repos/asf?p=netbeans-jenkins-lib.git;a=blob_plain;f=meta/netbeansrelease.json">
<not>
<isset property="metabuild.jsonurl"/>
</not>
</condition>
<configureproxy connectTo="${metabuild.jsonurl}" hostProperty="proxyHost" portProperty="proxyPort"/>
<setproxy proxyhost="${proxyHost}" proxyPort="${proxyPort}"/>
<get dest="${metabuild.releasejson}" skipexisting="false" src="${metabuild.jsonurl}" />
<!-- read info from gitinfo.properties , if present in source bundle copy gitinfo-->
<copy file="${nb_all}/nbbuild/gitinfo.properties" tofile="${nb_all}/nbbuild/build/gitinfo.properties" failonerror="false"/>
<copy file="${nb_all}/nbbuild/netbeansrelease.properties" tofile="${nb_all}/nbbuild/build/netbeansrelease.properties" failonerror="false"/>
<!-- get branches and git information as previous not overrided this will take new-->
<antcall target="getgitinformation" />
<!-- javadoc content filtering -->
<taskdef name="setjavadoc" classname="org.netbeans.nbbuild.SetApidocClustersConfig" classpath="${nbantext.jar}"/>
<property file="${nb_all}/nbbuild/build/gitinfo.properties"/>
<property file="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
<setjavadoc branch="${metabuild.branch}"/>
<echo message="Building branch: ${metabuild.branch}"/>
<property name="releasejson" value="${nb_all}/nbbuild/build/netbeansrelease.json"/>
<property name="xmlrelease" value="${nb_all}/nbbuild/build/netbeansrelease.xml"/>
<property name="propertiesrelease" value="${nb_all}/nbbuild/build/netbeansrelease.properties"/>
<taskdef name="releasejson" classname="org.netbeans.nbbuild.ReleaseJsonProperties" >
<classpath>
<pathelement location="${nbantext.jar}"/>
<fileset dir="${nb_all}/nbbuild/external">
<include name="json*.jar"/>
</fileset>
</classpath>
</taskdef>
<releasejson file="${releasejson}" xmloutput="${xmlrelease}" propertiesoutput="${propertiesrelease}" branch="${metabuild.branch}" hash="${metabuild.hash}"/>
</target>
<target name="-gitinfo.ispresent">
<available file="${nb_all}/nbbuild/build/gitinfo.properties" property="gitinfo.present" />
</target>
<target name="-git.down" unless="${gitinfo.present}" depends="-gitinfo.ispresent">
<!-- try to get information from jenkins apache multi branch build or travis -->
<taskdef name="gitbranchhash" classname="org.netbeans.nbbuild.GitBranchHash" classpath="${nbantext.jar}" />
<property environment="env"/>
<condition property="metabuild.branch" value="${env.GIT_BRANCH}" >
<isset property="env.GIT_BRANCH" />
</condition>
<condition property="metabuild.branch" value="${env.TRAVIS_BRANCH}" >
<isset property="env.TRAVIS_BRANCH" />
</condition>
<condition property="metabuild.branch" value="${metabuild.branch}" >
<isset property="metabuild.branch" />
</condition>
<condition property="metabuild.hash" value="${env.GIT_COMMIT}" >
<isset property="env.GIT_COMMIT" />
</condition>
<condition property="metabuild.hash" value="${env.TRAVIS_COMMIT}" >
<isset property="env.TRAVIS_COMMIT" />
</condition>
<condition property="metabuild.hash" value="${metabuild.hash}" >
<isset property="metabuild.hash" />
</condition>
<gitbranchhash file="." branchproperty="metabuild.branch" hashproperty="metabuild.hash" />
<condition property="metabuild.branch" value="master" >
<not>
<isset property="metabuild.branch" />
</not>
</condition>
<echo message="Processing build with branch ${metabuild.branch} and hash ${metabuild.hash}" />
<!-- if hash not present do not fail -->
<fail message="Branch not found use -Dmetabuild.branch=branchName " >
<condition>
<not>
<isset property="metabuild.branch"/>
</not>
</condition>
</fail>
<echo unless:set="metabuild.hash" file="${nb_all}/nbbuild/build/gitinfo.properties" >metabuild.branch=${metabuild.branch}</echo>
<echo if:set="metabuild.hash" file="${nb_all}/nbbuild/build/gitinfo.properties" >metabuild.branch=${metabuild.branch}
metabuild.hash=${metabuild.hash}</echo>
</target>
<target name="-git.up" if="${gitinfo.present}" depends="-gitinfo.ispresent">
<property file="${nb_all}/nbbuild/build/gitinfo.properties"/>
<echo message="Processing build with branch ${metabuild.branch} and hash ${metabuild.hash}" />
</target>
<target name="getgitinformation" depends="-git.up,-git.down" />
<target name="download-all-extbins" unless="ext.binaries.downloaded" depends="bootstrap">
<echo>Downloading external binaries (*/external/ directories)...</echo>
<!-- optionnal reporttofile used to speed resolving artefacts resolution for maven artefacts -->
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}" repos="${binaries.repos}" >
<manifest dir="${nb_all}">
<include name="**/external/binaries-list"/>
</manifest>
</downloadbinaries>
<property name="ext.binaries.downloaded" value="true"/>
</target>
<!-- create list of all maven coordinate -->
<target name="getallmavencoordinates">
<concat destfile="${nb_all}/nbbuild/build/external.info">
<fileset dir="${nb_all}" includes="**/external/binaries-list" />
<fileset dir="${nb_all}" includes="**/external/binariesembedded-list" />
<filterchain>
<!-- remove comment inline not inline -->
<tokenfilter>
<replaceregex pattern="#(.*)$" replace="" flags="gim" />
</tokenfilter>
<!-- : is sparator for maven coordinate -->
<linecontains>
<contains value=":"/>
</linecontains>
<!-- needed as separator -->
<tokenfilter>
<replacestring from=" " to=";"/>
</tokenfilter>
</filterchain>
</concat>
</target>
<target name="download-selected-extbins" unless="ext.binaries.downloaded" depends="init-module-list">
<echo>Downloading external binaries (*/external/ directories) for cluster.config=${cluster.config}...</echo>
<pathconvert property="modules.binaries-list" pathsep=",">
<path>
<dirset dir="${nb_all}" includes="nbbuild,${allmodules}"/>
</path>
<map from="${nb_all}/" to=""/>
<globmapper from="*" to="*/external/binaries-list"/>
</pathconvert>
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}" repos="${binaries.repos}">
<manifest dir="${nb_all}" includes="${modules.binaries-list}"/>
</downloadbinaries>
</target>
<target name="-check-vanilla-javac" depends="bootstrap">
<condition property="vanilla.javac.exists">
<and>
<available file="${nb_all}/nbbuild/external/vanilla-javac-api.jar" />
<available file="${nb_all}/nbbuild/external/vanilla-javac-impl.jar" />
</and>
</condition>
</target>
<target name="prepare-vanilla-javac" depends="-check-vanilla-javac" unless="vanilla.javac.exists">
<delete dir="${nb_all}/nbbuild/build/langtools" />
<mkdir dir="${nb_all}/nbbuild/build/langtools" />
<unzip src="${nb_all}/nbbuild/external/langtools-9.zip" dest="${nb_all}/nbbuild/build/langtools">
<cutdirsmapper dirs="1"/>
</unzip>
<ant antfile="${nb_all}/nbbuild/build/langtools/make/build.xml" dir="${nb_all}/nbbuild/build/langtools/" target="generate-sources">
<property name="langtools.jdk.home" value="${java.home}" />
</ant>
<mkdir dir="${nb_all}/nbbuild/build/langtools/build/nb" />
<javac srcdir="${nb_all}/nbbuild/build/langtools/src/java.compiler/share/classes:${nb_all}/nbbuild/build/langtools/src/jdk.compiler/share/classes:${nb_all}/nbbuild/build/langtools/src/jdk.jdeps/share/classes:${nb_all}/nbbuild/build/langtools/build/gensrc/jdk.compiler"
destdir="${nb_all}/nbbuild/build/langtools/build/nb"
excludes="**/module-info.java,com/sun/tools/javac/main/JavacToolProvider.java,com/sun/tools/jdeps/**,com/sun/tools/jdeprscan/**,com/sun/tools/javap/Main.java,jdk/javadoc/internal/tool/JavadocToolProvider.java,com/sun/tools/doclets/standard/Standard.java" source="1.8" target="1.8"/>
<copy todir="${nb_all}/nbbuild/build/langtools/build/nb">
<fileset dir="${nb_all}/nbbuild/build/langtools/src/java.compiler/share/classes" includes="**/*.properties"/>
<fileset dir="${nb_all}/nbbuild/build/langtools/src/jdk.compiler/share/classes" includes="**/*.properties"/>
<fileset dir="${nb_all}/nbbuild/build/langtools/src/jdk.jdeps/share/classes" includes="**/*.properties"/>
</copy>
<jar destfile="${nb_all}/nbbuild/external/vanilla-javac-api.jar" basedir="${nb_all}/nbbuild/build/langtools/build/nb" includes="javax/**,com/sun/source/**" />
<jar destfile="${nb_all}/nbbuild/external/vanilla-javac-impl.jar" basedir="${nb_all}/nbbuild/build/langtools/build/nb" excludes="javax/**,com/sun/source/**,com/sun/javadoc/**" />
</target>
<target name="init-module-list" depends="bootstrap,init-tasks,prepare-vanilla-javac">
<!-- Define modules. -->
<checkmoduleconfigs nbroot=".."/>
<resolvelist name="allmodules" path="modules.fullpath" dir="${nb_all}" list="${nb.clusters.list}"/>
<sortsuitemodules unsortedmodules="${modules.fullpath}" sortedmodulesproperty="modules.sorted"/>
</target>
<target name="init" depends="init-module-list,set-buildnumber">
<fail message="You need to have some modules checked out to build NetBeans. For example, try running the 'checkout' target.">
<condition>
<not>
<available file="../platform/core.startup/"/>
</not>
</condition>
</fail>
<taskdef name="nbmerge" classname="org.netbeans.nbbuild.NbMerge" classpath="${nbantext.jar}"/>
<taskdef name="getdependsclusters" classname="org.netbeans.nbbuild.GetDependsClusters" classpath="${nbantext.jar}"/>
<taskdef name="repeat" classname="org.netbeans.nbbuild.Repeat" classpath="${nbantext.jar}"/>
<!-- Set up automatic all-* targets: -->
<taskdef name="insert-module-all-targets" classname="org.netbeans.nbbuild.InsertModuleAllTargets" classpath="${nbantext.jar}"/>
<property name="verify.checkout" value="true"/>
<property name="init.use.clusters" value="true"/>
<insert-module-all-targets checkModules="${verify.checkout}" useclusters="${init.use.clusters}"/>
</target>
<target name="all-installer" description="Dummy target for build system compatibility"/>
<target name="update" depends="init" description="Downloads binaries from an update center">
<subant-junit target="update" failonerror="true">
<buildpath path="${modules.sorted}"/>
</subant-junit>
<antcall target="finish-build"/>
</target>
<!-- build NBMs for selected modules -->
<target name="build-nbms" depends="init,download-selected-extbins" description="Build all NBMs, all modules have to be built before proceed">
<mkdir dir="nbms" />
<property name="base.nbm.target.dir" location="nbms" />
<property name="nbms.fail.on.error" value="true"/>
<subant-junit target="nbm" failonerror="${nbms.fail.on.error}" report="${nb.build.dir}/build-nbms.xml" inheritall="false">
<buildpath path="${modules.sorted}"/>
<property name="base.nbm.target.dir" value="${base.nbm.target.dir}"/>
<property name="nbm.always.create" value="true" />
</subant-junit>
</target>
<target name="build-nonsigned-nbms" depends="init,download-selected-extbins" description="Build all NBMs, all modules have to be built before proceed">
<mkdir dir="nbms" />
<property name="base.nbm.target.dir" location="nbms" />
<property name="nbms.fail.on.error" value="true"/>
<subant-junit target="nbm-nosignature" failonerror="${nbms.fail.on.error}" report="${nb.build.dir}/build-nbms.xml" inheritall="false">
<buildpath path="${modules.sorted}"/>
<property name="base.nbm.target.dir" value="${base.nbm.target.dir}"/>
</subant-junit>
</target>
<target name="fix-dependencies" depends="init">
<pathconvert property="modules.fullpath" >
<path>
<dirset dir="${nb_all}" includes="${allmodules}" />
</path>
<mapper type="identity" />
</pathconvert>
<sortsuitemodules unsortedmodules="${modules.fullpath}" sortedmodulesproperty="modules.sorted"/>
<subant-junit target="fix-dependencies" failonerror="true">
<buildpath path="${modules.sorted}"/>
</subant-junit>
</target>
<property name="jnlp.signjar.keystore" location="${nb.build.dir}/default.keystore" />
<available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}" />
<target name="jnlp-generate-keystore" depends="init" unless="jnlp.signjar.keystore.exists" >
<property name="jnlp.signjar.alias" value="jnlp" />
<property name="jnlp.signjar.password" value="netbeans" />
<property name="jnlp.signjar.vendor" value="CN=NetBeans, OU=NetBeans, O=netbeans.org, C=US" />
<mkdir dir="${jnlp.signjar.keystore}/../" />
<echo message="Going to create default keystore in ${jnlp.signjar.keystore}" />
<genkey
alias="${jnlp.signjar.alias}"
keystore="${jnlp.signjar.keystore}"
storepass="${jnlp.signjar.password}"
dname="${jnlp.signjar.vendor}"
/>
</target>
<target name="build-jnlp" depends="init,jnlp-generate-keystore" description="Create a JNLP distribution.">
<fail message="Please build using Ant 1.8.4 or higher.">
<condition>
<not>
<antversion atleast="1.8.4"/>
</not>
</condition>
</fail>
<property name="jnlp.dest.dir" location="${nb.build.dir}/jnlp" />
<mkdir dir="${jnlp.dest.dir}" />
<makeurl property="jnlp.codebase" file="${jnlp.dest.dir}"/> <!-- fallback value unless otherwise configured -->
<property name="jnlp.fail.on.error" value="true"/>
<pathconvert property="jnlp.modules.fullpath">
<path>
<dirset dir="${nb_all}" includes="${config.jnlp.stable}"/>
</path>
<mapper type="identity"/>
</pathconvert>
<sortsuitemodules unsortedmodules="${jnlp.modules.fullpath}" sortedmodulesproperty="jnlp.modules.sorted"/>
<subant-junit target="jnlp" failonerror="${jnlp.fail.on.error}" report="${nb.build.dir}/build-all-jnlp.xml">
<buildpath path="${jnlp.modules.sorted}"/>
</subant-junit>
<taskdef name="verifyjnlp" classname="org.netbeans.nbbuild.VerifyJNLP" classpath="${nbantext.jar}"/>
<verifyjnlp report="${nb.build.dir}/verify-jnlp.xml" failonerror="jnlp.fail.on.error">
<fileset dir="${jnlp.dest.dir}" includes="*.jnlp"/>
</verifyjnlp>
</target>
<target name="build-javadoc" depends="javadoc"/>
<target name="javadoc" depends="bootstrap" description="Builds Javadoc for all NetBeans modules with some APIs">
<ant dir="javadoctools" target="build-javadoc"/>
</target>
<target name="javadoc-nb" depends="javadoc" description="Builds Javadoc and opens it in a web browser">
<nbbrowse file="${netbeans.javadoc.dir}/index.html"/>
</target>
<!-- build source zips for selected modules - useful for populating maven repository only-->
<target name="build-source-zips" depends="init" description="Builds source zips for maven repository inclusion.">
<property name="netbeans.zipped.sources.dir" location="${nb.build.dir}/source-zips" />
<subant-junit target="sources-zip" failonerror="true">
<buildpath path="${modules.sorted}"/>
</subant-junit>
</target>
<target name="check-javahelpbin" depends="init" description="Validate intermodule links in helpsets.">
<taskdef name="checkhelpsetsbin" classname="org.netbeans.nbbuild.CheckHelpSetsBin">
<classpath>
<pathelement location="${nbantext.jar}"/>
<fileset dir="${nb_all}/platform/javahelp/external">
<include name="jh*.jar"/>
</fileset>
</classpath>
</taskdef>
<checkhelpsetsbin>
<fileset dir="netbeans">
<include name="*/modules/*.jar"/>
</fileset>
</checkhelpsetsbin>
</target>
<target name="build-messaging" depends="init">
<echo message="Starting a build for NetBeans (build ${buildnum}, config '${cluster.config}') ..."/>
<echo message="Selected modules: ${modules}"/>
<echo message="OS: ${os.name} ${os.version} Locale: ${user.language}_${user.region}"/>
<echo message="Java: ${nbjdk.home}"/>
</target>
<!-- Use of nbmerge target has the effect of automatically depending on all-X for every module. -->
<!-- It also runs deltree(dir=wherever) and copydir(src=../X/netbeans,dest=wherever) to create the IDE install. -->
<target name="build-nozip" depends="init,download-selected-extbins,clean-cluster-flags,build-clusters,create-mandatory-files-for-binary,create-netbeans-import,finish-build,add-junit" description="Build the IDE but do not create a final ZIP file."/>
<target name="-check-nb-cluster" depends="init">
<condition property="has.nb.cluster">
<contains string="${nb.clusters.list}" substring="nb.cluster.nb" />
</condition>
</target>
<target name="finish-build" depends="finish-build-platform,finish-build-nb"/>
<target name="finish-build-platform" depends="init,-check-nb-cluster" unless="has.nb.cluster">
<copy file="../platform/o.n.bootstrap/readme/README-bin.txt" tofile="${netbeans.dest.dir}/README.txt" overwrite="true"/>
<fixcrlf eol="lf" srcdir="${netbeans.dest.dir}" >
<include name="${nb.cluster.platform.dir}/lib/nbexec" />
</fixcrlf>
</target>
<target name="-download-nb-windows-launchers" depends="init,-check-nb-cluster" if="has.nb.cluster">
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}" repos="${binaries.repos}">
<manifest dir="${nb_all}" includes="nb/ide.launcher/external/binaries-list"/>
</downloadbinaries>
<mkdir dir="${netbeans.dest.dir}/bin" />
<unzip src="../nb/ide.launcher/external/launcher-12.5-distribution.zip" dest="${netbeans.dest.dir}/bin">
<patternset>
<include name="netbeans*.exe"/>
</patternset>
</unzip>
</target>
<target name="finish-build-nb" depends="init,-check-nb-cluster,-download-nb-windows-launchers" if="has.nb.cluster">
<loadproperties srcFile="${clusters.list.file}" />
<mkdir dir="${netbeans.dest.dir}/bin" />
<copy file="../nb/ide.launcher/unix/netbeans" todir="${netbeans.dest.dir}/bin" />
<chmod file="${netbeans.dest.dir}/bin/netbeans" perm="ugo+rx"/>
<!-- if anybody knows better place for icons, let me know: [email protected] -->
<mkdir dir="${netbeans.dest.dir}/etc" />
<copy file="../nb/ide.launcher/netbeans.conf" todir="${netbeans.dest.dir}/etc" overwrite="true"/>
<!-- replace -->
<replace file="${netbeans.dest.dir}/etc/netbeans.conf" value="defaultvalue" propertyFile="${nb_all}/nbbuild/build/netbeansrelease.properties">
<replacefilter token="@@metabuild.RawVersion@@" property="metabuild.RawVersion"/>
<replacefilter token="@@metabuild.logcli@@" property="metabuild.logcli"/>
</replace>
<copy file="../nb/ide.launcher/netbeans.clusters" todir="${netbeans.dest.dir}/etc" overwrite="true"/>
<mkdir dir="${nb.build.dir}/license-temp" />
<concat destfile="${nb.build.dir}/license-temp/LICENSE.txt">
<filelist dir="${nb_all}/nbbuild" files="license-dialog-stub.txt" />
<filelist dir="${netbeans.dest.dir}" files="LICENSE" />
</concat>
<jar destfile="${netbeans.dest.dir}/nb/core/org-netbeans-upgrader.jar"
update="true"
compress="${build.package.compress}" >
<zipfileset dir="${nb.build.dir}/license-temp" prefix="org/netbeans/license" />
</jar>
<echo message="${netbeans.dest.dir}/${nb.cluster.platform.dir}/lib/nbexec" />
<fixcrlf eol="lf" srcdir="${netbeans.dest.dir}" >
<include name="etc/netbeans.conf" />
<include name="etc/netbeans.clusters" />
<include name="bin/netbeans" />
<include name="${nb.cluster.platform.dir}/lib/nbexec" />
</fixcrlf>
<mkdir dir="${nb.build.dir}"/>
<hgid property="hg.id" file=".."/>
<echo file="${nb.build.dir}/build_info">NetBeans dev build
------------------
Number: ${buildnumber}
Date: ${buildday}
Branding:
Branch: trunk
Tag:
Hg ID: ${hg.id}
</echo>
<mkdir dir="${netbeans.dest.dir}/${nb.cluster.nb.dir}"/>
<copy file="${nb.build.dir}/build_info" tofile="${netbeans.dest.dir}/${nb.cluster.nb.dir}/build_info" failonerror="true"/>
</target>
<target name="add-junit" if="add.junit" description="Add the JUnit plugin to the build (if -Dadd.junit=true).">
<ant dir="../libs.junit4" inheritall="false">
<property name="cluster" location="${netbeans.dest.dir}/${nb.cluster.platform.dir}"/>
</ant>
<ant dir="../junitlib" inheritall="false">
<property name="cluster" location="${netbeans.dest.dir}/${nb.cluster.java.dir}"/>
<property name="nb.cluster.platform" value="libs.junit4"/>
<property name="nb.cluster.stableuc" value=""/>
<property name="nb.cluster.experimental" value=""/>
<property name="do.not.recurse" value="true"/>
</ant>
</target>
<target name="clean-junit">
<delete dir="../libs.junit4/build" verbose="true"/>
<delete dir="../junitlib/build" verbose="true"/>
<delete verbose="true">
<fileset dir="${netbeans.dest.dir}">
<include name="*/config/Modules/org-netbeans-libs-junit4.xml"/>
<include name="*/config/Modules/org-netbeans-modules-junitlib.xml"/>
<include name="*/modules/org-netbeans-libs-junit4.jar"/>
<include name="*/modules/org-netbeans-modules-junitlib.jar"/>
<include name="*/update_tracking/org-netbeans-libs-junit4.xml"/>
<include name="*/update_tracking/org-netbeans-modules-junitlib.xml"/>
<include name="*/modules/ext/junit*"/>
<include name="*/docs/junit*"/>
</fileset>
</delete>
</target>
<target name="build" depends="build-nozip"
description="Create a complete build including a ZIP distribution (but do not try it).">
<delete file="NetBeans-${buildnum}.zip"/>
<delete file="NetBeans-${buildnum}-build-extra-data.zip"/>
<delete file="NetBeans-${buildnum}-javadoc-web.zip"/> <!-- XXX why? -->
<delete file="NetBeans-${buildnum}-javadoc.zip"/> <!-- XXX why? -->
<antcall target="zip-cluster-config" inheritall="true"/>
</target>
<target name="delete-and-merge" depends="merge-delete,merge" />
<target name="merge-delete" depends="init">
<delete dir="${netbeans.dest}" />
</target>
<target name="merge" depends="build-messaging">
<mkdir dir="${netbeans.dest.dir}"/>
<nbmerge failonerror="${stop.when.broken.modules}"
dest="${netbeans.dest}"
topdir=".."
fixedmodules="${fixedmodules}"
modules="${modules}"
builtmodulesproperty="${built.modules.property}"
targetprefix="all-"
mergedependentmodules="${merge.dependent.modules}" >
</nbmerge>
</target>
<target name="build-basic" description="Build the NetBeans Basic cluster.">
<mkdir dir="${netbeans.dest.dir}"/>
<ant dir="." target="build" inheritAll="false">
<property name="cluster.config" value="basic"/>
</ant>
</target>
<target name="test-basic" description="Test the NetBeans Basic cluster.">
<mkdir dir="${netbeans.dest.dir}"/>
<ant dir="." target="test" inheritAll="false">
<property name="cluster.config" value="basic"/>
<property name="test.type" value="test-unit"/>
<property name="test-unit-sys-prop.ignore.random.failures" value="true"/>
<property name="vanilla.javac.exists" value="true"/>
</ant>
</target>
<target name="-build-platform" depends="init">
<delete file="${netbeans.dest.dir}/nb.cluster.platform.built"/>
<delete file="${netbeans.dest.dir}/nb.cluster.harness.built"/>
<run-depend-build clusters-to-build="nb.cluster.platform,nb.cluster.harness"/>
</target>
<target name="build-platform" description="Build the NetBeans Platform (platform and harness clusters).">
<mkdir dir="${netbeans.dest.dir}"/>
<ant dir="." target="-build-platform" inheritAll="false">
<property name="cluster.config" value="platform"/>
<property name="vanilla.javac.exists" value="true"/>
</ant>
</target>
<target name="test-platform" description="Test the NetBeans Platform modules.">
<mkdir dir="${netbeans.dest.dir}"/>
<ant dir="." target="test" inheritAll="false">
<property name="cluster.config" value="platform"/>
<property name="test.type" value="test-unit"/>
<property name="test-unit-sys-prop.ignore.random.failures" value="true"/>
<property name="vanilla.javac.exists" value="true"/>
</ant>
</target>
<target name="build-cluster" depends="init">
<run-depend-build clusters-to-build="${cluster-name}"/>
</target>
<macrodef name="run-depend-build">
<attribute name="clusters-to-build"/>
<sequential>
<repeat target="build-one-cluster" name="one.cluster.name" values="@{clusters-to-build}" />
</sequential>
</macrodef>
<target name="build-clusters" depends="init">
<run-depend-build clusters-to-build="${nb.clusters.list}"/>
</target>
<target name="build-one-cluster-dependencies-check">
<condition property="${one.cluster.name}-hasNoDependencies">
<equals arg1="${one.cluster.dependencies}" arg2="" trim="true"/>
</condition>
<resolve name="test.prop" value="${one.cluster.name}-hasNoDependencies"/>
</target>
<target name="build-one-cluster-dependencies"
depends="build-one-cluster-dependencies-check"
unless="${one.cluster.name}-hasNoDependencies">
<run-depend-build clusters-to-build="${one.cluster.dependencies}"/>
</target>
<target name="build-one-cluster-check">
<condition property="${one.cluster.name}-is-built">
<available file="${netbeans.dest.dir}/${one.cluster.name}.built"/>
</condition>
<resolve name="test1.prop" value="${one.cluster.name}-is-built"/>
</target>
<target name="build-one-cluster" unless="${one.cluster.name}-is-built" depends="build-one-cluster-check">
<echo message="Building ${one.cluster.name} modules"/>
<resolve name="one-cluster-modules" value="${one.cluster.name}"/>
<resolve name="one-cluster-dependencies" value="${one.cluster.name}.depends"/>
<echo>${one-cluster-modules}</echo>
<echo>Dependencies: ${one-cluster-dependencies}</echo>
<insert-module-all-targets/> <!-- we are in a subproject, so need to reinsert the targets... XXX <antcall> and thus <repeat> apparently reparses the Ant script from disk! -->
<antcall target="build-one-cluster-dependencies" inheritAll="false">
<param name="one.cluster.dependencies" value="${one-cluster-dependencies}"/>
<param name="one.cluster.name" value="${one.cluster.name}"/>
<param name="ext.binaries.downloaded" value="true"/>
</antcall>
<mkdir dir="${netbeans.dest.dir}"/>
<nbmerge failonerror="${stop.when.broken.modules}"
dest="${netbeans.dest.dir}"
topdir="${nb_all}"
fixedmodules="${one-cluster-modules}"
builtmodulesproperty="${built.modules.property}"
targetprefix="all-"
mergedependentmodules="false">
</nbmerge>
<touch file="${netbeans.dest.dir}/${one.cluster.name}.built"/>
</target>
<target name="zip-cluster-config" depends="init">
<property name="zip.dir" location="."/>
<mkdir dir="${zip.dir}"/>
<property name="zip.name" location="${zip.dir}/NetBeans-${buildnum}-${cluster.config}.zip"/>
<resolvelist name="nb.clusters.dirs" list="${nb.clusters.list}">
<mapper type="glob" from="*" to="*.dir"/>
</resolvelist>
<pathconvert property="nb.clusters.includes" pathsep=",">
<dirset dir="${netbeans.dest.dir}" includes="${nb.clusters.dirs},etc,bin"/>
<mapper type="regexp" from=".*/([^/\\]*)" to="\1/"/>
</pathconvert>
<taskdef name="find-executables" classname="org.netbeans.nbbuild.FindExecutables" classpath="${nbantext.jar}"/>
<find-executables allmodules="${allmodules}" exeincludeproperty="nb.clusters.exe.includes"/>
<!-- package the zip file -->
<echo>${netbeans.dest.dir}</echo>
<zip destfile="${zip.name}" update="true" duplicate="preserve">
<zipfileset dir="${netbeans.dest.dir}" filemode="755" prefix="${netbeans.dest}"
includes="bin/netbeans,${nb.clusters.exe.includes}"
/>
<zipfileset
dir="${netbeans.dest.dir}" prefix="${netbeans.dest}"
includes="${nb.clusters.includes}" excludes="${nb-extra-files}"
/>
<zipfileset
dir="${netbeans.dest.dir}" prefix="${netbeans.dest}">
<include name="*.txt"/>
<include name="*.css"/>
<include name="*.html"/>
<include name="DEPENDENCIES"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="licenses/**"/>
</zipfileset>
</zip>
</target>
<target name="build-nozip-ml" depends="init-module-list" description="Build the Multilanguage IDE but do not create a final ZIP file.">
<subant target="netbeans-ml" buildpath="${modules.fullpath}">
<property name="netbeans.dest.dir" value="${netbeans.dest.dir}"/>
</subant>
</target>
<target name="build-zip-ml" depends="bootstrap,set-buildnumber,check-locales-set,build-nozip-ml"
description="Create a compleate multilanguage build including a ZIP distributions">
<fail message="Property locales must be set to reasonable value" unless="locales.is.set"/>
<echo message="nb.clusters.list is ${nb.clusters.list}"/>
<taskdef name="repeat" classname="org.netbeans.nbbuild.Repeat"
classpath="${nbantext.jar}"/>
<property name="buildnum" value="dev-${buildnumber}"/>
<repeat target="pack-one-cluster-ml" name="one.cluster.name.ml" values="${nb.clusters.list}"/>
</target>
<target name="pack-one-cluster-ml" if="one.cluster.name.ml">
<resolve name="one.cluster.dir.ml.pre" value="${one.cluster.name.ml}.dir"/>
<pathconvert property="one.cluster.dir.ml" setonempty="false">
<path path="${one.cluster.dir.ml.pre}"/>
<chainedmapper>
<filtermapper>
<replacestring from="," to="_"/>
<replacestring from="-" to="_"/>
<replacestring from="." to="_"/>
</filtermapper>
<flattenmapper/>
</chainedmapper>
</pathconvert>
<echo message="one.cluster.name.ml is ${one.cluster.name.ml}" level="verbose"/>
<echo message="one.cluster.dir.ml is ${one.cluster.dir.ml}" level="verbose"/>
<echo message="one.cluster.dir.ml.pre is ${one.cluster.dir.ml.pre}" level="verbose"/>
<mkdir dir="${nb.build.dir}/ml"/>
<delete file="${nb.build.dir}/ml/NetBeans-${one.cluster.dir.ml}-${buildnum}.zip"/>
<repeat target="pack-one-locale-for-cluster" name="one.locale" values="${locales}"/>
</target>
<target name="pack-one-locale-for-cluster" if="one.locale">
<echo message="cluster-locale is ${one.cluster.dir.ml}-${one.locale}" level="verbose"/>
<zip destfile="${nb.build.dir}/ml/NetBeans-${one.cluster.dir.ml}-${buildnum}.zip" update="true" duplicate="preserve">
<zipfileset dir="${netbeans.dest.dir}/${one.cluster.dir.ml.pre}" prefix="${netbeans.dest}">
<include name="**/locale/*_${one.locale}.*"/>
</zipfileset>
</zip>
</target>
<target name="check-locales-set">
<condition property="locales.is.set" value="true">
<and>
<isset property="locales"/>
<length string="${locales}" when="ge" length="2" trim="yes"/>
</and>
</condition>
</target>
<target name="build-nbms-ml" depends="bootstrap,set-buildnumber,init-tasks">
<taskdef name="repeat" classname="org.netbeans.nbbuild.Repeat"
classpath="${nbantext.jar}"/>
<property name="buildnum" value="dev-${buildnumber}"/>
<mkdir dir="${nb.build.dir}/ml/nbms"/>
<property name="netbeans.dest.dir.ml" location="${nb.build.dir}/ml/nbms"/>
<delete dir="${nb.build.dir}/ml/nbms"/>
<mkdir dir="${nb.build.dir}/ml/nbms"/>
<copy todir="${nb.build.dir}/ml/nbms">
<fileset dir="${nb.build.dir}/ml">
<include name="NetBeans-*-${buildnum}.zip"/>
</fileset>
</copy>
<pathconvert property="dlocales" setonempty="false">
<path path="${locales}"/>
<chainedmapper>
<filtermapper>
<replacestring from="," to="_"/>
<replacestring from="-" to="_"/>
</filtermapper>
<flattenmapper/>
</chainedmapper>
</pathconvert>
<tstamp>
<format property="spec.version" pattern="yyyy.M.d.kmm" locale="en" />
</tstamp>
<echo level="verbose" message="dlocales is ${dlocales}"/>
<echo level="verbose" message="locales is ${locales}"/>
<echo level="verbose" message="spec.version is ${spec.version}"/>
<delete file="${nb.build.dir}/ml/cluster-nbms-ml.properties"/>
<repeat target="build-one-nbm-ml" name="one.cluster.name.ml" values="${nb.clusters.list}"/>
<antcall target="build-one-nbm-ml" inheritall="false">
<param name="is.kit" value="true"/>
<param name="locales" value="${locales}"/>
<param name="dlocales" value="${dlocales}"/>
<param name="one.cluster.name.ml" value="nb.cluster.nb"/>
<param name="nb.cluster.nb" value="${nb.cluster.nb}"/>
<param name="nb.clusters.list" value="${nb.clusters.list}"/>
<param name="spec.version" value="${spec.version}"/>
<param name="netbeans.dest.dir.ml" value="${netbeans.dest.dir.ml}"/>
<param name="buildnumber" value="${buildnumber}"/>
</antcall>
<taskdef name="makeupdatedesc" classname="org.netbeans.nbbuild.MakeUpdateDesc"
classpath="${nbantext.jar}"/>
<property name="use.license.url.in.catalog" value="true"/>
<makeupdatedesc desc="nbms/catalog.xml" distbase="." uselicenseurl="${use.license.url.in.catalog}">
<fileset dir="nbms">
<include name="*.nbm"/>
<include name="*.jar"/>
</fileset>
</makeupdatedesc>
</target>
<target name="-check-ml-nbm-props">
<condition property="run.ml.nbm.build" value="true">
<and>
<isset property="locales"/>
<isset property="dlocales"/>
<isset property="one.cluster.name.ml"/>
<isset property="nb.clusters.list"/>
<isset property="spec.version"/>
<isset property="netbeans.dest.dir.ml"/>
<isset property="buildnumber"/>
</and>
</condition>
</target>
<target name="-unpack-cluster-ml-zipfile" unless="is.kit">
<unzip dest="${netbeans.dest.dir.ml}" src="${nb.build.dir}/ml/NetBeans-${cluster.package.dir}-${buildnum}.zip">
<mapper type="glob" from="netbeans/*" to="${one.cluster.dir.ml}/*"/>
</unzip>
</target>
<target name="-create-cluster-ml-nbm-metadata" unless="is.kit">
<echo file="${nb.build.dir}/ml/nbms/tmp/manifest.mf">OpenIDE-Module: ${code.name}
OpenIDE-Module-Localizing-Bundle: ${code.name.base.slashes}/Bundle.properties
OpenIDE-Module-Specification-Version: ${spec.version}
</echo>
<echo file="${nb.build.dir}/ml/nbms/classes/${code.name.base.slashes}/Bundle.properties">
OpenIDE-Module-Name=NetBeans 6.0 ${one.cluster.dir.ml} cluster localization (${locales})
OpenIDE-Module-Display-Category=Localization
OpenIDE-Module-Short-Description=NetBeans 6.0 ${one.cluster.dir.ml} cluster localization (${locales})
OpenIDE-Module-Long-Description=Delivers ${locales} localization for all modules in ${one.cluster.dir.ml} cluster of NetBeans 6.0
</echo>
</target>
<target name="-create-kit-ml-nbm-metadata" if="is.kit">
<echo file="${nb.build.dir}/ml/nbms/tmp/manifest.mf">OpenIDE-Module: ${code.name}
OpenIDE-Module-Localizing-Bundle: ${code.name.base.slashes}/Bundle.properties
OpenIDE-Module-Specification-Version: ${spec.version}
OpenIDE-Module-Module-Dependencies: ${kit.deps}
</echo>
<echo file="${nb.build.dir}/ml/nbms/classes/${code.name.base.slashes}/Bundle.properties">
OpenIDE-Module-Name=NetBeans 6.0 ${locales} localization kit
OpenIDE-Module-Display-Category=Localization
OpenIDE-Module-Short-Description=NetBeans 6.0 ${locales} localization kit
OpenIDE-Module-Long-Description=Delivers ${locales} localization of whole NetBeans 6.0
</echo>
</target>
<target name="build-one-nbm-ml" depends="init-tasks,-check-ml-nbm-props" if="run.ml.nbm.build">
<property file="${nb.build.dir}/ml/cluster-nbms-ml.properties"/>
<echo level="verbose" message="kit.deps is ${kit.deps}"/>
<echo level="verbose" message="locales is ${locales}"/>
<echo level="verbose" message="dlocales is ${dlocales}"/>
<echo level="verbose" message="nb.clusters.list is ${nb.clusters.list}"/>
<echo level="verbose" message="netbeans.dest.dir.ml is ${netbeans.dest.dir.ml}"/>
<echo level="verbose" message="spec.version is ${spec.version}"/>
<resolve name="one.cluster.dir.ml" value="${one.cluster.name.ml}.dir"/>
<pathconvert property="cluster.package.dir" setonempty="false">
<path path="${one.cluster.dir.ml}"/>
<chainedmapper>
<filtermapper>
<replacestring from="," to="_"/>
<replacestring from="-" to="_"/>
<replacestring from="." to="_"/>
</filtermapper>
<flattenmapper/>
</chainedmapper>
</pathconvert>
<delete dir="${nb.build.dir}/ml/nbms"/>
<delete dir="${netbeans.dest.dir.ml}"/>
<mkdir dir="${netbeans.dest.dir.ml}"/>
<antcall target="-unpack-cluster-ml-zipfile"/>
<property name="cluster" location="${netbeans.dest.dir.ml}/${one.cluster.dir.ml}"/>
<condition property="code.name.base" value="org.netbeans.localization.${cluster.package.dir}.${dlocales}">
<not>
<isset property="is.kit"/>
</not>
</condition>
<condition property="code.name.base" value="org.netbeans.localization.kit.${cluster.package.dir}.${dlocales}">
<isset property="is.kit"/>
</condition>
<pathconvert property="code.name.base.slashes" setonempty="false">
<path path="${code.name.base}"/>
<chainedmapper>
<flattenmapper/>
<filtermapper>
<replacestring from="." to="/"/>
</filtermapper>
</chainedmapper>
</pathconvert>
<pathconvert property="code.name.base.dashes" setonempty="false">
<path path="${code.name.base}"/>
<chainedmapper>
<flattenmapper/>
<filtermapper>
<replacestring from="." to="-"/>
</filtermapper>
</chainedmapper>
</pathconvert>
<property name="public.packages" value="${code.name.base}.*"/>
<property name="code.name" value="${code.name.base}/1"/>
<mkdir dir="${nb.build.dir}/ml/nbms/classes/${code.name.base.slashes}"/>
<mkdir dir="${nb.build.dir}/ml/nbms/tmp"/>
<antcall target="-create-cluster-ml-nbm-metadata"/>
<antcall target="-create-kit-ml-nbm-metadata"/>
<property name="is.autoload" value="false"/>
<property name="is.eager" value="false"/>
<condition property="module.jar.dir" value="modules">
<!-- set module.jar.dir property only when building kit NBM - leads to
AutoUpdate-Show-In-Client manifest attribute is set to true -->
<isset property="is.kit"/>
</condition>
<property name="module.jar" value="modules/${code.name.base.dashes}.jar"/>
<mkdir dir="${cluster}/modules"/>
<jarwithmoduleattributes jarfile="${cluster}/${module.jar}"
compress="${build.package.compress}"
index="${build.package.index}"
manifest="${nb.build.dir}/ml/nbms/tmp/manifest.mf">
<fileset dir="${nb.build.dir}/ml/nbms/classes"/>
</jarwithmoduleattributes>
<createmodulexml xmldir="${cluster}/config/Modules">
<enabled dir="${cluster}">
<include name="${module.jar}"/>
</enabled>
</createmodulexml>
<patternset id="module.files">
<!-- include name="${module.jar}"/ -->
<include name="**/*.jar"/>
<include name="config/Modules/${code.name.base.dashes}.xml"/>
</patternset>
<property name="module.files.toString" refid="module.files"/>
<echo level="verbose">Basic matching module files (${code.name.base.dashes}): ${module.files.toString}</echo>
<genlist outputfiledir="${cluster}" module="${module.jar}">
<fileset dir="${cluster}">
<patternset refid="module.files"/>
</fileset>
</genlist>
<property name="license.file.override" location="${nb.build.dir}/ml/nbms/license"/>
<property name="extra.license.files" value=""/>
<taskdef name="releasefileslicense" classname="org.netbeans.nbbuild.extlibs.ReleaseFilesLicense" classpath="${nbantext.jar}"/>
<releasefileslicense license="${license.file.override}" standardlicense="${nb_all}/nbbuild/standard-nbm-license.txt" extralicensefiles="${extra.license.files}"/>
<taskdef name="makenbm" classname="org.netbeans.nbbuild.MakeNBM" classpath="${nbantext.jar}"/>
<property name="nbm_alias" value="nb_ide"/>
<makenbm file="${nb.build.dir}/ml/${code.name.base.dashes}.nbm"
productdir="${cluster}"
module="${module.jar}"
homepage="http://translatedfiles.netbeans.org/"
distribution="http://translatedfiles.netbeans.org/"
needsrestart="true"
global="true"
targetcluster="${one.cluster.dir.ml}"
releasedate=""
moduleauthor="">
<license file="${license.file.override}"/>
<signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/>
</makenbm>
<move todir="nbms" file="${nb.build.dir}/ml/${code.name.base.dashes}.nbm"/>
<property file="${nb.build.dir}/ml/cluster-nbms-ml.properties"/>
<condition property="new.kit.deps" value="${code.name} > ${spec.version}">
<and>
<not>
<isset property="kit.deps"/>
</not>
<not>
<isset property="is.kit"/>
</not>
</and>
</condition>
<condition property="new.kit.deps" value="${kit.deps},${code.name} > ${spec.version}">
<and>
<isset property="kit.deps"/>
<not>
<isset property="is.kit"/>
</not>
</and>
</condition>
<condition property="new.kit.deps" value="${kit.deps}">
<isset property="is.kit"/>
</condition>
<propertyfile file="${nb.build.dir}/ml/cluster-nbms-ml.properties">
<entry key="kit.deps" value="${new.kit.deps}"/>
</propertyfile>
</target>