forked from apache/netbeans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
2139 lines (1928 loc) · 101 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=".">
<fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
<antversion atleast="1.8.0"/>
</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/HgExec.java"/>
<include name="org/netbeans/nbbuild/ValidateHgConfiguration.java"/>
<include name="org/netbeans/nbbuild/extlibs/DeregisterExternalHook.java"/>
<include name="org/netbeans/nbbuild/extlibs/DownloadBinaries.java"/>
<compilerarg line="-Xlint -Xlint:-serial"/>
</javac>
<taskdef name="validate-hg-configuration" classname="org.netbeans.nbbuild.ValidateHgConfiguration" classpath="${build.ant.classes.dir}"/>
<validate-hg-configuration root=".."/>
<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}"/>
<property name="have-downloadbinaries-task" value="true" />
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}">
<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>
<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"/>
</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"/>
<zipfileset dir="${nb_all}" includes="DISCLAIMER" fullpath="META-INF/DISCLAIMER"/>
</jar>
<taskdef name="createlicensesummary" classname="org.netbeans.nbbuild.extlibs.CreateLicenseSummary" classpath="${nbantext.jar}"/>
</target>
<target name="download-all-extbins" unless="ext.binaries.downloaded" depends="bootstrap">
<echo>Downloading external binaries (*/external/ directories)...</echo>
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}">
<manifest dir="${nb_all}">
<include name="**/external/binaries-list"/>
</manifest>
</downloadbinaries>
<property name="ext.binaries.downloaded" value="true"/>
</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}">
<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.javadoc/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" />
<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.javadoc/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/**,com/sun/javadoc/**" />
<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">
<echo message="Deprecated, use nbbuild/javadoctools/build.xml directly"/>
<ant dir="javadoctools" target="build-javadoc"/>
</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}/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="finish-build-nb" depends="init,-check-nb-cluster" if="has.nb.cluster">
<loadproperties srcFile="${clusters.list.file}" />
<downloadbinaries cache="${binaries.cache}" server="${binaries.server}">
<manifest dir="${nb_all}" includes="nb/ide.launcher/external/binaries-list"/>
</downloadbinaries>
<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"/>
<unzip src="../nb/ide.launcher/external/launchers-10.0.zip" dest="${netbeans.dest.dir}/bin" />
<!-- 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"/>
<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? -->
<property name="nb-extra-files" value="test/**,extra/**"/>
<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-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="permit.jdk9.builds" value="true"/>
<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"/>
</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="DISCLAIMER"/>
<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>
<target name="create-rpms-proto">
<mkdir dir="${nb.build.dir}/rpms"/>
<repeat target="create-one-rpm-proto" name="one.cluster.name" values="${clusters.list}" />
</target>
<target name="create-one-rpm-proto">
<taskdef name="setcluster" classname="org.netbeans.nbbuild.SetCluster" classpath="${nbantext.jar}"/>
<loadproperties srcFile="cluster.properties" />
<loadproperties srcFile="cluster-description.properties" />
<setcluster cluster="${one.cluster.name}" name="one.cluster.dir" />
<mkdir dir="${nb.build.dir}/rpms"/>
<resolve name="pkg.name" value="${one.cluster.name}.pkg.name"/>
<resolve name="pkg.version" value="${one.cluster.name}.pkg.version"/>
<resolve name="pkg.desc" value="${one.cluster.name}.pkg.desc"/>
<resolve name="pkg.vendor" value="${one.cluster.name}.pkg.vendor"/>
<resolve name="pkg.email" value="${one.cluster.name}.pkg.email"/>
<resolve name="pkg.rpm.name" value="${one.cluster.name}.pkg.rpm.name"/>
<resolve name="pkg.rpm.requires" value="${one.cluster.name}.pkg.rpm.requires"/>
<resolve name="pkg.rpm.group" value="${one.cluster.name}.pkg.rpm.group"/>
<resolve name="pkg.rpm.url" value="${one.cluster.name}.pkg.rpm.url"/>
<resolve name="pkg.rpm.copyright" value="${one.cluster.name}.pkg.rpm.copyright"/>
<resolve name="pkg.rpm.map" value="${one.cluster.name}.pkg.rpm.map"/>
<resolve name="pkg.rpm.prefix" value="${one.cluster.name}.pkg.rpm.prefix"/>
<echo file="${nb.build.dir}/rpms/${pkg.rpm.name}.spec">
%define global_product_version ${pkg.version}
%define global_product_release 00
%define _prefix ${pkg.rpm.prefix}
Version: %{global_product_version}
Release: %{global_product_release}
Group: ${pkg.rpm.group}
Copyright: ${pkg.rpm.copyright}
Vendor: ${pkg.vendor}
URL: ${pkg.rpm.url}
Prefix: %_prefix
AutoReqProv: no
Name: ${pkg.rpm.name}
Summary: ${pkg.name}
%description
${pkg.desc}
%files
%erpm_map ${pkg.rpm.map} nb_destdir
%dir ${pkg.rpm.map}
${pkg.rpm.map}/${one.cluster.dir}</echo>
</target>
<target name="create-svr4s-proto">
<mkdir dir="${nb.build.dir}/rpms"/>
<repeat target="create-one-svr4-proto" name="one.cluster.name" values="${clusters.list}" />
</target>
<target name="create-one-svr4-proto">
<taskdef name="setcluster" classname="org.netbeans.nbbuild.SetCluster" classpath="${nbantext.jar}"/>
<loadproperties srcFile="cluster.properties" />
<loadproperties srcFile="cluster-description.properties" />
<setcluster cluster="${one.cluster.name}" name="one.cluster.dir" />
<mkdir dir="${nb.build.dir}/svr4s"/>
<resolve name="pkg.name" value="${one.cluster.name}.pkg.name"/>
<resolve name="pkg.version" value="${one.cluster.name}.pkg.version"/>
<resolve name="pkg.desc" value="${one.cluster.name}.pkg.desc"/>
<resolve name="pkg.vendor" value="${one.cluster.name}.pkg.vendor"/>
<resolve name="pkg.email" value="${one.cluster.name}.pkg.email"/>
<resolve name="pkg.svr4.pkg" value="${one.cluster.name}.pkg.svr4.pkg"/>
<resolve name="pkg.svr4.maxinst" value="${one.cluster.name}.pkg.svr4.maxinst"/>
<resolve name="pkg.svr4.sunw_pkgvers" value="${one.cluster.name}.pkg.svr4.sunw_pkgvers"/>
<resolve name="pkg.svr4.hotline" value="${one.cluster.name}.pkg.svr4.hotline"/>
<resolve name="pkg.svr4.classes" value="${one.cluster.name}.pkg.svr4.classes"/>
<resolve name="pkg.svr4.basedir" value="${one.cluster.name}.pkg.svr4.basedir"/>
<resolve name="pkg.svr4.pkginst" value="${one.cluster.name}.pkg.svr4.pkginst"/>
<resolve name="pkg.svr4.category" value="${one.cluster.name}.pkg.svr4.category"/>
<echo file="${nb.build.dir}/svr4s/${pkg.svr4.pkg}.spec">
PKG=${pkg.svr4.pkg}
NAME=${pkg.name}
ARCH=sparc
VERSION=${pkg.version}
MAXINST=${pkg.svr4.maxinst}
CATEGORY=${pkg.svr4.category}
SUNW_PKGVERS=${pkg.svr4.sunw_pkgvers}
DESC=${pkg.desc}
VENDOR=${pkg.vendor}
HOTLINE=${pkg.svr4.hotline}
EMAIL=${pkg.email}
CLASSES=${pkg.svr4.classes}
BASEDIR=${pkg.svr4.basedir}
PKGINST=${pkg.svr4.pkginst}</echo>
</target>
<target name="-testuserdir-delete-init" depends="-load-build-properties">
<property name="test.user.dir.lock" location="${test.user.dir}/lock"/>
<available property="app.running" file="${test.user.dir.lock}"/>
</target>
<target name="-testuserdir-delete-ok" depends="-testuserdir-delete-init" unless="app.running">
<delete dir="${test.user.dir}"/>
</target>
<target name="-testuserdir-delete-fail" depends="-testuserdir-delete-init" if="app.running">
<!-- #66799: best to warn about this condition... -->
<fail>Will not delete ${test.user.dir} because ${test.user.dir.lock} still exists; kill any running process and delete lock file if necessary</fail>
</target>
<target name="testuserdir-delete" depends="-testuserdir-delete-ok,-testuserdir-delete-fail" description="Clean temporary testing user directory."/>
<target name="check-for-build" >
<available property="have-build" file="${netbeans.dest.dir}/bin/netbeans"/>
</target>
<target name="maybe-build-nozip" depends="check-for-build" unless="have-build">
<ant dir="${basedir}" target="build-nozip"/>
</target>
<target name="tryme-setup-debug-args" if="debug.port" >
<property name="debug.pause" value="y" />
<property name="debug.server" value="y" />
<property name="tryme.debug.args" value="-J-agentlib:jdwp=transport=dt_socket,suspend=${debug.pause},server=${debug.server},address=${debug.port}" />
</target>
<target name="tryme-debug" depends="-jdk-presetdef-nbjpdastart" description="Start IDE in debugger. May only be called from within IDE.">
<echo>Searching for JARs in ${netbeans.dest.dir}, this may take a moment...</echo>
<nbjpdastart name="NetBeans" addressproperty="debug.port" transport="dt_socket">
<classpath>
<fileset dir="${netbeans.dest.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</nbjpdastart>
<property name="debug.server" value="n"/>
<antcall target="tryme"/>
</target>
<target name="-profile-check" if="netbeans.home">
<condition property="profiler.configured">
<or>
<contains string="${run.args.ide}" substring="-agentpath:" casesensitive="true"/>
<contains string="${run.args.ide}" substring="-javaagent:" casesensitive="true"/>
</or>
</condition>
</target>