This file is indexed.

/usr/share/netbeans/harness/common.xml is in libnb-platform-devel-java 8.1+dfsg1-7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.


The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License.  When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

Contributor(s):

The Original Software is NetBeans. The Initial Developer of the Original
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
Microsystems, Inc. All Rights Reserved.

If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
-->
<project name="projectized-common" basedir=".">

    <!-- XXX supply descriptions for the appropriate targets -->
    <!-- XXX should use namespaces for NB in-VM tasks from ant/browsetask and debuggerjpda/ant and apisupport/ant -->
    <!-- XXX move more things here from projectized.xml when possible and desirable -->

    <condition property="testcoverage.import" value="testcoverage.xml">
        <and>
            <isset property="harness.dir"/>
            <available file="testcoverage.xml" filepath="${harness.dir}"/>
        </and>
    </condition>
    <condition property="testcoverage.import" value="${netbeans.dest.dir}/harness/testcoverage.xml">
        <and>
            <isset property="netbeans.dest.dir"/>
            <available file="testcoverage.xml" filepath="${netbeans.dest.dir}/harness"/>
        </and>
    </condition>
    <property name="testcoverage.import" value="no-testcoverage.xml"/>
    <import file="${testcoverage.import}"/>
    
    <target name="-build-dir-init">
        <property name="build.dir" location="build"/>
    </target>

    <target name="basic-init" depends="common-init,-jdk-init">
        <!-- Synch the following property loads with NbModuleProject.makeEvalDefs: -->
        <property file="nbproject/private/private.properties"/>
        <property file="nbproject/project.properties"/>
        <!-- Do not try to set module.classpath here, in particular: -->
        <!-- during a clean, the ${foo/bar.dir} properties may not be set. -->
        <parseprojectxml project="." 
                         codenamebaseproperty="code.name.base"
                         codenamebasedashesproperty="code.name.base.dashes"
                         codenamebaseslashesproperty="code.name.base.slashes"
        />
        <property name="module.jar.dir" value="modules"/>
        <property name="module.jar.basename" value="${code.name.base.dashes}.jar"/>
        <property name="module.jar" value="${module.jar.dir}/${module.jar.basename}"/>
        <available property="has.javahelp" file="javahelp" type="dir"/>
        <property name="javahelp.jar.dir" value="modules/docs"/>
        <property name="javahelp.jar.basename" value="${code.name.base.dashes}.jar"/>
        <property name="javahelp.jar" value="${javahelp.jar.dir}/${javahelp.jar.basename}"/>
        <condition property="javahelp.class.path.extension" value="docs/${javahelp.jar.basename}">
            <isset property="has.javahelp"/>
        </condition>
        <property name="javac.source" value="1.4"/>
        <property name="javac.target" value="${javac.source}"/>
        <property name="javac.compilerargs" value=""/>
        <property name="module.auto.deps.xml" location="module-auto-deps.xml"/>
        <condition property="has.module.auto.deps">
            <available file="${module.auto.deps.xml}"/>
        </condition>
        <property name="jar-excludes" value="**/*.java,**/*.form,**/package.html,**/doc-files/"/>
        <property name="module.jar.verifylinkageignores" value=""/>
        <property name="cp.extra" value=""/>
        <tstamp>
            <format property="module.build.started.time" pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ"/>
        </tstamp>
        <condition property="asm.jar" value="${nbplatform.active.dir}/platform/core/asm-all-5.0.1.jar">
            <available file="${nbplatform.active.dir}/platform/core/asm-all-5.0.1.jar"/>
        </condition>
        <property name="asm.jar" location="${libs.asm.dir}/core/asm-all-5.0.1.jar"/>
    </target>

    <target name="-release.dir">
        <property name="release.dir" location="release"/>
        <condition property="has.release.dir">
            <available file="${release.dir}"/>
        </condition>
    </target>
    <target name="-release.files" depends="-release.dir" if="has.release.dir">
        <pathconvert pathsep="," property="release.files">
            <path>
                <fileset dir="${release.dir}"/>
            </path>
            <filtermapper>
                <replacestring from="${release.dir}${file.separator}" to=""/>
                <replacestring from=" " to="?"/>
            </filtermapper>
        </pathconvert>
    </target>
    <target name="files-init" depends="basic-init,-release.files">
        <property name="release.files" value=""/>
        <property name="release.files.extra" value=""/>
        <property name="extra.module.files" value=""/>
        <patternset id="module.files" includes="${release.files},${release.files.extra},${extra.module.files}">
            <include name="${module.jar}"/>
            <include name="${javahelp.jar}" if="has.javahelp"/>
            <include name="config/Modules/${code.name.base.dashes}.xml"/>
            <include name="config/ModuleAutoDeps/${code.name.base.dashes}.xml" if="has.module.auto.deps"/>
            <include name="ant/nblib/${code.name.base.dashes}.jar"/>
        </patternset>
    </target>

    <target name="-javac-init-nbjdk" depends="-jdk-preinit" if="nbjdk.valid">
        <macrodef name="custom-javac-presetdef">
            <attribute name="javacval"/>
            <sequential>
                <presetdef name="custom-javac">
                    <custom-javac executable="@{javacval}"/>
                </presetdef>
            </sequential>
        </macrodef>
    </target>

    <target name="-javac-init-bootclasspath-prepend" depends="build-init" if="bootclasspath.prepend">
        <presetdef name="nb-javac">
            <custom-javac>
                <bootclasspath>
                    <path path="${nbjdk.bootclasspath}"/>
                </bootclasspath>
                <compilerarg value="-Xbootclasspath/p:${bootclasspath.prepend}" />
            </custom-javac>
        </presetdef>
    </target>

    <target name="-javac-init-no-bootclasspath-prepend" depends="build-init" unless="bootclasspath.prepend">
        <presetdef name="nb-javac">
            <custom-javac>
                <bootclasspath>
                    <path path="${nbjdk.bootclasspath}"/>
                </bootclasspath>
            </custom-javac>
        </presetdef>
    </target>

    <target name="-javac-init" depends="build-init,-javac-init-nbjdk,-javac-init-bootclasspath-prepend,-javac-init-no-bootclasspath-prepend">
        <path id="cp">
            <pathelement path="${module.classpath}"/>
            <pathelement path="${cp.extra}"/>
        </path>
        <path id="processor.cp">
            <pathelement path="${module.processor.classpath}"/>
            <pathelement path="${cp.extra}"/>
        </path>
        <!-- Unlike ${module.classpath}, this does not use publicPackageJarDir, since processors need not be in public packages. -->
        <!-- Also needs to include transitive dependencies. -->
    </target>

    <target name="up-to-date" depends="init">
        <uptodate targetfile="${cluster}/${module.jar}" property="is.jar.uptodate">
            <srcfiles dir="${src.dir}"/>
            <srcfiles dir="nbproject">
                <include name="project.xml"/>
                <include name="project.properties"/>
            </srcfiles>
            <srcfiles dir=".">
                <include name="manifest.mf"/>
            </srcfiles>
            <srcresources>
                <path refid="cp"/>
            </srcresources>
        </uptodate>
    </target>

    <target name="update" depends="basic-init">
        <fail
            message="Please specify URL of catalog to perform the update from via -Dautoupdate.catalog.url=..."
            unless="autoupdate.catalog.url"
        />
        <autoupdate
            updatecenter="${autoupdate.catalog.url}"
            todir="${cluster}"
        >
            <modules includes="${code.name.base}"/>
        </autoupdate>
    </target>

    <target name="compile" depends="init,up-to-date" unless="is.jar.uptodate">
        <mkdir dir="${build.classes.dir}"/>
        <depend srcdir="${src.dir}" destdir="${build.classes.dir}" cache="${build.dir}/depcache">
            <classpath refid="cp"/>
        </depend>
        <property name="javac.fork" value="false"/>
        <nb-javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="${build.compiler.debug}" debuglevel="${build.compiler.debuglevel}" encoding="UTF-8"
                  deprecation="${build.compiler.deprecation}" optimize="${build.compiler.optimize}" source="${javac.source}" target="${javac.target}" includeantruntime="false"
                  fork="${javac.fork}"
        >
            <classpath refid="cp"/>
            <compilerarg line="${javac.compilerargs}"/>
            <processorpath refid="processor.cp"/>
        </nb-javac>
        <copy todir="${build.classes.dir}">
            <fileset dir="${src.dir}" excludes="${jar-excludes}"/>
        </copy>
        <processjsannotation classes="${build.classes.dir}" asm="${asm.jar}">
            <classpath refid="cp"/>
        </processjsannotation>
    </target>

    <target name="compile-single" depends="init">
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
        <mkdir dir="${build.classes.dir}"/>
        <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
            <path>
                <filelist dir="${build.classes.dir}" files="${javac.includes}"/>
            </path>
            <globmapper from="*.java" to="*.class"/>
        </pathconvert>
        <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
        <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
        <delete>
            <files includesfile="${javac.includesfile.binary}"/>
        </delete>
        <delete>
            <fileset file="${javac.includesfile.binary}"/>
        </delete>
        <nb-javac srcdir="${src.dir}" destdir="${build.classes.dir}"
                  debug="${build.compiler.debug}" deprecation="${build.compiler.deprecation}" encoding="UTF-8"
                  source="${javac.source}" target="${javac.target}" includes="${javac.includes}" optimize="${build.compiler.optimize}" includeantruntime="false">
            <classpath refid="cp"/>
            <compilerarg line="${javac.compilerargs}"/>
            <processorpath refid="processor.cp"/>
        </nb-javac>
        <processjsannotation classes="${build.classes.dir}" asm="${asm.jar}">
            <classpath refid="cp"/>
        </processjsannotation>
    </target>

    <target name="jar-prep" depends="init">
        <mkdir dir="${cluster}/${module.jar.dir}"/>
        <tstamp>
            <format property="buildnumber" pattern="yyMMdd" timezone="UTC"/>
        </tstamp>
    </target>

    <target name="jar" depends="init,compile,jar-prep" unless="is.jar.uptodate">
        <!-- This task adds some or all of: -Public-Packages, -Friends, Class-Path, -IDE-Dependencies, -Module-Dependencies, -Specification-Version, -Implementation-Version, -Build-Version, AutoUpdate-Show-In-Client -->
        <jarwithmoduleattributes jarfile="${cluster}/${module.jar}" compress="${build.package.compress}" index="${build.package.index}" manifest="${manifest.mf}" stamp="${cluster}/.lastModified">
            <fileset dir="${build.classes.dir}"/>
        </jarwithmoduleattributes>
    </target>

    <!-- Can insert extra stuff in here: -->
    <target name="netbeans-extra"/>

    <target name="-init-startlevel">
        <property name="module.startlevel" value=""/>
        <property name="check.module.startlevel" value="true"/>
    </target>

    <target name="module-xml-regular" if="is.regular" depends="-init-startlevel">
        <mkdir dir="${cluster}/config/Modules"/>
        <createmodulexml xmldir="${cluster}/config/Modules" startlevel="${module.startlevel}" strictcheck="${check.module.startlevel}">
            <enabled dir="${cluster}">
                <include name="${module.jar}"/>
            </enabled>
        </createmodulexml>
    </target>

    <target name="module-xml-autoload" if="is.autoload" depends="-init-startlevel">
        <mkdir dir="${cluster}/config/Modules"/>
        <createmodulexml xmldir="${cluster}/config/Modules" startlevel="${module.startlevel}" strictcheck="${check.module.startlevel}">
            <autoload dir="${cluster}">
                <include name="${module.jar}"/>
            </autoload>
        </createmodulexml>
    </target>

    <target name="module-xml-eager" if="is.eager" depends="-init-startlevel">
        <mkdir dir="${cluster}/config/Modules"/>
        <createmodulexml xmldir="${cluster}/config/Modules" startlevel="${module.startlevel}" strictcheck="${check.module.startlevel}">
            <eager dir="${cluster}">
                <include name="${module.jar}"/>
            </eager>
        </createmodulexml>
    </target>

    <target name="module-auto-deps" depends="basic-init" if="has.module.auto.deps">
        <mkdir dir="${cluster}/config/ModuleAutoDeps"/>
        <copy file="${module.auto.deps.xml}" tofile="${cluster}/config/ModuleAutoDeps/${code.name.base.dashes}.xml"/>
    </target>

    <target name="release" depends="files-init" if="has.release.dir">
        <mkdir dir="${cluster}"/>
        <copy todir="${cluster}" overwrite="true">
            <fileset dir="${release.dir}">
                <patternset includes="${release.files}"/>
            </fileset>
        </copy>        
    </target>

    
    <target name="chmod-executables" depends="-init-executables">
        <chmod perm="a+x">
            <fileset refid="module.executable.files"/>
        </chmod>
    </target>

    <target name="verify-class-linkage" depends="jar,release">
<!--        <verifyclasslinkage jar="${cluster}/${module.jar}" failonerror="false" ignores="${module.jar.verifylinkageignores}" maxwarnings="10">
            <classpath refid="cp"/>
            <classpath path="${nbjdk.bootclasspath}"/>
        </verifyclasslinkage>-->
    </target>

    <target name="-verify-apichanges"/><!-- just for overriding -->

    <target name="-validate-layers" depends="init">
        <parsemanifest manifest="${manifest.mf}" attribute="OpenIDE-Module-Layer" property="layer.file"/>
        <!-- DTD from sources -->
        <available file="${nb_all}/openide.filesystems/src/org/openide/filesystems/filesystem.dtd" type="file"
                   property="dtd.cp" value="${nb_all}/openide.filesystems/src"/>
        <!-- DTD from platform -->
        <pathconvert property="dtd.cp">
            <pathfileset>
                <path refid="cluster.path.id"/>
                <filename name="core/org-openide-filesystems.jar"/>
            </pathfileset>
        </pathconvert>

        <xmlvalidate warn="no"> <!--  failonerror="false" -->
            <fileset file="${src.dir}/${layer.file}" erroronmissingdir="false"/>
            <xmlcatalog classpath="${dtd.cp}">
                <dtd publicId="-//NetBeans//DTD Filesystem 1.0//EN"
                     location="org/openide/filesystems/filesystem.dtd"/>
                <dtd publicId="-//NetBeans//DTD Filesystem 1.1//EN"
                     location="org/openide/filesystems/filesystem1_1.dtd"/>
                <dtd publicId="-//NetBeans//DTD Filesystem 1.2//EN"
                     location="org/openide/filesystems/filesystem1_2.dtd"/>
            </xmlcatalog>
        </xmlvalidate>
    </target>

    <target name="-netbeans" depends="init,jar,netbeans-extra,javahelp,module-auto-deps,release,module-xml-regular,
            module-xml-autoload,module-xml-eager,chmod-executables,verify-class-linkage,
            -validate-layers,-verify-apichanges"/> 
    
    <target name="netbeans" depends="-netbeans">
        <property name="module.files.toString" refid="module.files"/>
        <echo level="verbose">Basic matching module files: ${module.files.toString}</echo>
        <genlist outputfiledir="${cluster}" module="${module.jar}">
            <fileset dir="${cluster}">
                <patternset refid="module.files"/>
            </fileset>
        </genlist>
    </target>

    <target name="-jnlp-init">
        <fail unless="jnlp.dest.dir" >
            You have to provide value to jnlp.dest.dir property!
        </fail>
        <mkdir dir="${jnlp.dest.dir}" />
        <makeurl property="jnlp.codebase" file="${jnlp.dest.dir}"/>
        <property name="jnlp.signjar.alias" value="jnlp" />
        <property name="jnlp.signjar.keystore" location="${jnlp.dest.dir}/default.keystore" />
        <property name="jnlp.signjar.password" value="netbeans" />
        <property name="jnlp.permissions" value="&lt;security&gt;&lt;all-permissions/&gt;&lt;/security&gt;"/>
        <property name="jnlp.verify.excludes" value="" />
        <!-- Oddly, <available> as a task overrides existing properties, which is not what we want here. -->
        <condition property="jnlp.sign.jars" value="true">
            <available file="${jnlp.signjar.keystore}"/>
        </condition>
        <property name="jnlp.sign.jars" value="false"/>
        <property name="jnlp.indirect.jars" value="[NOTHING]"/>
        <property name="jnlp.indirect.files" value="[NOTHING]"/>
        <property name="jnlp.generate.versions" value="false"/>
    </target>

    <target name="jnlp" depends="init,netbeans,jnlp-master,-jnlp-init" description="Builds JNLP descriptor and signs JAR files" >
        <makejnlp
            dir="${jnlp.dest.dir}"
            alias="${jnlp.signjar.alias}"
            storepass="${jnlp.signjar.password}"
            keystore="${jnlp.signjar.keystore}"
            codebase="${jnlp.codebase}"
            verify="true"
            verifyexcludes="${jnlp.verify.excludes}"
            permissions="${jnlp.permissions}"
            signjars="${jnlp.sign.jars}"
            processjarversions="${jnlp.generate.versions}"
        >
            <modules dir="${cluster}" >
                <include name="${module.jar}" />
            </modules>
            <indirectjars dir="${cluster}" includes="${jnlp.indirect.jars}"/>
            <indirectfiles dir="${cluster}" includes="${jnlp.indirect.files}"/>
        </makejnlp>
    </target>

    <target name="jnlp-master" depends="init,netbeans" if="jnlp.master.dir" >
        <property name="jnlp.master.codebase" value="" />
        <makemasterjnlp
            dir="${jnlp.master.dir}"
            codebase="${jnlp.master.codebase}"
        >
            <modules dir="${cluster}" >
                <include name="${module.jar}" />
            </modules>
        </makemasterjnlp>
    </target>


    <target name="-nbm-prompt-for-storepass" if="keystore" unless="storepass">
        <input addproperty="storepass" message="Enter password for ${keystore}:">
            <handler type="secure"/>
        </input>
    </target>

    <target name="-init-executables">
        <property name="nbm.executable.files" value="[NOTHING]"/><!-- fallback -->
        <fileset dir="${cluster}" id="module.executable.files" includes="${nbm.executable.files}"/>
    </target>

    <target name="nbm" depends="init,netbeans,-nbm-prompt-for-storepass,-init-executables" description="Build NBM archive.">
        <mkdir dir="${build.dir}"/>
        <property name="nbm.target.cluster" value=""/> <!-- fallback -->
        <property name="license.file.override" value="${license.file}"/>
        <property name="use.pack200" value="true"/>
        <property name="pack200.excludes" value=""/>
        <property name="nbm.locales" value="${locales}"/>
        <makenbm file="${build.dir}/${nbm}"
                 productdir="${cluster}"
                 module="${module.jar}"
                 homepage="${nbm.homepage}"
                 distribution="${nbm.distribution}"
                 needsrestart="${nbm.needs.restart}"
                 global="${nbm.is.global}"
                 preferredupdate="${nbm.is.preferredupdate}"
                 usepack200="${use.pack200}"
                 pack200excludes="${pack200.excludes}"
                 targetcluster="${nbm.target.cluster}"
                 releasedate="${nbm.release.date}"
                 moduleauthor="${nbm.module.author}"
                 locales="${nbm.locales}"
                 >
            <license file="${license.file.override}"/>
            <signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/>
            <updaterjar>
                <pathfileset>
                    <path refid="cluster.path.id"/>
                    <filename name="modules/ext/updater.jar"/>
                </pathfileset>
            </updaterjar>
            <executables refid="module.executable.files"/>
        </makenbm>
    </target>

    <target name="nbm-nosignature" depends="init,netbeans,-nbm-prompt-for-storepass,-init-executables" description="Build NBM archive.">
        <mkdir dir="${build.dir}"/>
        <property name="nbm.target.cluster" value=""/> <!-- fallback -->
        <property name="license.file.override" value="${license.file}"/>
        <property name="use.pack200" value="true"/>
        <property name="pack200.excludes" value=""/>
        <property name="nbm.locales" value="${locales}"/>
        <makenbm file="${build.dir}/${nbm}"
                 productdir="${cluster}"
                 module="${module.jar}"
                 homepage="${nbm.homepage}"
                 distribution="${nbm.distribution}"
                 needsrestart="${nbm.needs.restart}"
                 global="${nbm.is.global}"
                 preferredupdate="${nbm.is.preferredupdate}"
                 usepack200="${use.pack200}"
                 pack200excludes="${pack200.excludes}"
                 targetcluster="${nbm.target.cluster}"
                 releasedate="${nbm.release.date}"
                 moduleauthor="${nbm.module.author}"
                 locales="${nbm.locales}"
                 >
            <license file="${license.file.override}"/>
            <updaterjar>
                <pathfileset>
                    <path refid="cluster.path.id"/>
                    <filename name="modules/ext/updater.jar"/>
                </pathfileset>
            </updaterjar>
            <executables refid="module.executable.files"/>
        </makenbm>
    </target>

    <target name="test-preinit" depends="init"/>
    <target name="test-init" depends="init,test-preinit,test-lib-init">
        <property name="test.timeout" value="600000"/> <!-- 10min per test -->
        <property name="test.run.args" value="-ea"/>
        <property name="test.filter.trace" value="true"/>
        <condition property="test.bootclasspath.prepend.args" value="-Xbootclasspath/p:${bootclasspath.prepend}">
            <isset property="bootclasspath.prepend"/>
        </condition>
        <property name="test.bootclasspath.prepend.args" value="-Dno.netbeans.bootclasspath.prepend.needed=true"/>
        <macrodef name="test-init">
            <attribute name="test.type"/>
            <sequential>
                <property name="test.@{test.type}.dir" location="test/@{test.type}"/>
                <property name="test.@{test.type}.src.dir" location="${test.@{test.type}.dir}/src"/>
                <property name="test.@{test.type}.data.dir" location="${test.@{test.type}.dir}/data"/>
                <property name="build.test.@{test.type}.dir" location="${build.dir}/test/@{test.type}"/>
                <property name="build.test.@{test.type}.classes.dir" location="${build.test.@{test.type}.dir}/classes"/>
                <property name="build.test.@{test.type}.results.dir" location="${build.test.@{test.type}.dir}/results"/>
                <property name="build.test.@{test.type}.work.dir" location="${build.test.@{test.type}.dir}/work"/>
                <property name="test-@{test.type}-sys-prop.cluster.path.final" value="${cluster.path.final}:${cluster}"/> <!-- #153178, 176019 -->
                <property name="test.@{test.type}.cp.extra" value=""/>
                <path id="test.@{test.type}.cp">
                    <!-- Cannot use <path refid="cp"/> since that uses ${module.classpath} and we want ${module.run.classpath}: -->
                    <pathelement path="${test.@{test.type}.compile.cp}"/>
                    <pathelement path="${cp.extra}"/>
                    <pathelement location="${cluster}/${module.jar}"/>
                    <path refid="test.unit.lib.cp"/>
                    <!-- for compatibility with property based classpath-->
                    <pathelement path="${module.run.classpath}"/>
                    <pathelement path="${test.@{test.type}.cp.extra}"/>
                </path>
                <path id="test.@{test.type}.run.cp">
                    <pathelement path="${build.test.@{test.type}.classes.dir}"/>
                    <!-- Cannot use <path refid="cp"/> since that uses ${module.classpath} and we want ${module.run.classpath}: -->
                    <pathelement path="${test.@{test.type}.runtime.cp}"/>
                    <pathelement path="${cp.extra}"/>
                    <pathelement location="${cluster}/${module.jar}"/>
                    <path refid="test.unit.lib.cp"/>
                    <!-- for compatibility with property based classpath-->
                    <pathelement path="${module.run.classpath}"/>
                    <pathelement path="${test.@{test.type}.run.cp.extra}"/>
                    <pathelement path="${test.@{test.type}.cp.extra}"/>
                </path>
                <!-- path reference used in both compiler and executor -->
                <propertyset id="test.@{test.type}.properties">
                    <propertyset>
                        <propertyref prefix="test-@{test.type}-sys-prop."/>
                        <mapper type="glob" from="test-@{test.type}-sys-prop.*" to="*"/>
                    </propertyset>
                    <propertyset>
                        <propertyref name="build.test.@{test.type}.work.dir"/>
                        <mapper type="glob" from="build.test.@{test.type}.work.dir" to="nbjunit.workdir"/>
                    </propertyset>
                    <propertyset>
                        <propertyref name="test.timeout"/>
                        <mapper type="glob" from="test.timeout" to="nbjunit.hard.timeout"/>
                    </propertyset>
                    </propertyset>
                    <condition property="exists.test.@{test.type}.src.dir">
                        <and>
                            <available file="${test.@{test.type}.src.dir}" type="dir"/>
                            <not>
                                <istrue value="${disable.@{test.type}.tests}"/>
                            </not>
                        </and>
                    </condition>

            </sequential>
        </macrodef>
        <test-init test.type="unit"/>
        <test-init test.type="qa-functional"/>
    </target>

    <target name="test-build" depends="netbeans,test-dep-build,do-test-build" description="Compile and package all tests."/>

    <macrodef name="test-dep-build">
        <attribute name="test.type"/>
        <sequential>
            <sortsuitemodules unsortedmodules="${test.@{test.type}.testdep}" sortedmodulesproperty="mods.sorted" sorttests="true"/>
            <subant buildpath="${mods.sorted}" target="do-test-build" />
        </sequential>
    </macrodef>
    <target name="test-unit-dep-build" if="test.unit.testdep">
        <test-dep-build test.type="unit"/>
    </target>
    <target name="test-qa-functional-dep-build" if="test.qa-functional.testdep">
        <test-dep-build test.type="qa-functional"/>
    </target>
    <target name="test-dep-build" depends="test-unit-dep-build,test-qa-functional-dep-build"/>

    <macrodef name="do-test-build">
        <attribute name="test.type"/>
        <sequential>
            <fail >
                Missing test dependency
                Runtime classpath: ${test.@{test.type}.runtime.cp}
                Compile classpath: ${test.@{test.type}.compile.cp}
                <condition>
                    <or>
                        <contains string="${test.@{test.type}.runtime.cp}" substring="-missing-Module-Entries-:" />
                        <contains string="${test.@{test.type}.compile.cp}" substring="-missing-Module-Entries-:" />
                    </or>
                </condition>
            </fail>
            <mkdir dir="${build.test.@{test.type}.classes.dir}"/>
            <depend srcdir="${test.@{test.type}.src.dir}" destdir="${build.test.@{test.type}.classes.dir}" cache="${build.test.@{test.type}.dir}/depcache">
                <classpath refid="test.@{test.type}.cp"/>
            </depend>
            <property name="test.excludes" value=""/> <!-- # 113770 -->
            <nb-javac srcdir="${test.@{test.type}.src.dir}" destdir="${build.test.@{test.type}.classes.dir}" excludes="${test.excludes}"
                      debug="true" deprecation="${build.compiler.deprecation}" encoding="UTF-8"
                      source="${javac.source}" target="${javac.target}" optimize="${build.compiler.optimize}" includeantruntime="false">
                <classpath refid="test.@{test.type}.cp"/>
                <compilerarg line="${javac.compilerargs}"/>
                <processorpath refid="test.@{test.type}.cp"/>
            </nb-javac>
            <processjsannotation classes="${build.test.@{test.type}.classes.dir}" asm="${asm.jar}">
                <classpath refid="test.@{test.type}.cp"/>
            </processjsannotation>
            <copy todir="${build.test.@{test.type}.classes.dir}">
                <fileset dir="${test.@{test.type}.src.dir}">
                    <exclude name="**/*.java"/>
                </fileset>
            </copy>
            <delete dir="${build.test.@{test.type}.dir}/data"/>
            <copy todir="${build.test.@{test.type}.dir}">
                <fileset dir="${test.@{test.type}.dir}">
                    <include name="data/**"/>
                </fileset>
            </copy>
        </sequential>
    </macrodef>
    <target name="do-unit-test-build" depends="init,test-init" if="exists.test.unit.src.dir">
        <do-test-build test.type="unit"/>
    </target>
    <target name="do-qa-functional-test-build" depends="init,test-init" if="exists.test.qa-functional.src.dir">
        <do-test-build test.type="qa-functional"/>
    </target>
    <target name="do-test-build" depends="do-unit-test-build,do-qa-functional-test-build"/>

    <target name="compile-test-single" depends="init,test-init,jar">
        <macrodef name="compile-test-single">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
                <mkdir dir="${build.test.@{test.type}.classes.dir}"/>
                <!-- XXX consider forcing deprecation=true -->
                <!-- XXX consider deleting the .class file first to force a rebuild -->
                <depend srcdir="${test.@{test.type}.src.dir}" destdir="${build.test.@{test.type}.classes.dir}" cache="${build.test.@{test.type}.dir}/depcache">
                    <classpath refid="test.@{test.type}.cp"/>
                </depend>
                <nb-javac srcdir="${test.@{test.type}.src.dir}" destdir="${build.test.@{test.type}.classes.dir}"
                          debug="true" deprecation="${build.compiler.deprecation}" encoding="UTF-8"
                          source="${javac.source}" target="${javac.target}" includeantruntime="false" optimize="${build.compiler.optimize}" includes="${javac.includes}">
                    <classpath refid="test.@{test.type}.cp"/>
                    <compilerarg line="${javac.compilerargs}"/>
                    <processorpath refid="test.@{test.type}.cp"/>
                </nb-javac>
                <processjsannotation classes="${build.test.@{test.type}.classes.dir}" asm="${asm.jar}">
                    <classpath refid="test.@{test.type}.cp"/>
                </processjsannotation>
                <copy todir="${build.test.@{test.type}.classes.dir}">
                    <fileset dir="${test.@{test.type}.src.dir}">
                        <exclude name="**/*.java"/>
                    </fileset>
                </copy>
                <copy todir="${build.test.@{test.type}.dir}">
                    <fileset dir="${test.@{test.type}.dir}">
                        <include name="data/**"/>
                    </fileset>
                </copy>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <compile-test-single test.type="${test.type}"/>
    </target>

    <macrodef name="metaproperty">
        <attribute name="name"/>
        <attribute name="value"/>
        <sequential>
            <property name="@{name}" value="${@{value}}"/>
        </sequential>
    </macrodef>
    <macrodef name="test">
        <attribute name="test.type"/>
        <attribute name="disable.apple.ui" default="false"/>
        <sequential>
            <property name="test.config" value="default"/>
            <property name="test.config.default.includes" value="**/*Test.class"/>
            <property name="test.config.${test.config}.includes" value="NOTHING"/>
            <metaproperty name="test.includes" value="test.config.${test.config}.includes"/>
            <property name="test.config.${test.config}.excludes" value=""/>
            <metaproperty name="test.excludes" value="test.config.${test.config}.excludes"/>
            <mkdir dir="${build.test.@{test.type}.results.dir}"/>
            <condition property="test.runner" value ="testng" else="junit">
                <available classname="org.testng.annotations.Test" classpath="${test.@{test.type}.runtime.cp}"/>
            </condition>
            <antcall target="-do-${test.runner}">
                <param name="run.test.type" value="@{test.type}"/>
                <param name="disable.apple.ui" value="@{disable.apple.ui}"/>
            </antcall>
        </sequential>
    </macrodef>
    <target name="test-unit" depends="init,test-init,test-build" if="exists.test.unit.src.dir">
        <test test.type="unit" disable.apple.ui="true"/>
    </target>
    <target name="test-qa-functional" depends="init,test-init,test-build" if="exists.test.qa-functional.src.dir">
        <test test.type="qa-functional"/>
    </target>

    <target name="-do-junit" depends="test-init">
        <macrodef name="junit-impl">
            <attribute name="test.type"/>
            <attribute name="disable.apple.ui" default="false"/>
            <sequential>
                <junit showoutput="true" fork="true" failureproperty="tests.failed" errorproperty="tests.failed" filtertrace="${test.filter.trace}" tempdir="${build.test.@{test.type}.results.dir}" timeout="${test.timeout}">
                    <batchtest todir="${build.test.@{test.type}.results.dir}">
                        <fileset dir="${build.test.@{test.type}.classes.dir}" includes="${test.includes}" excludes="${test.excludes}"/>
                    </batchtest>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <!--needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-->
                    <sysproperty key="apple.awt.UIElement" value="@{disable.apple.ui}"/>
                    <formatter type="brief" usefile="false"/>
                    <formatter type="xml"/>
                </junit>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <junit-impl test.type="${run.test.type}" disable.apple.ui="${disable.apple.ui}"/>
    </target>

    <target name="-do-testng" depends="test-init">
        <macrodef name="testng-impl">
            <attribute name="test.type"/>
            <attribute name="disable.apple.ui" default="false"/>
            <sequential>
                <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="test.@{test.type}.run.cp"/>
                <testng mode="mixed"
                        failureProperty="tests.failed"
                        outputdir="${build.test.@{test.type}.results.dir}"
                        workingDir="${build.test.@{test.type}.results.dir}"
                        suitename="${code.name.base}"
			listener="org.testng.reporters.VerboseReporter"
                >
                    <classfileset dir="${build.test.@{test.type}.classes.dir}" excludes="${test.excludes}" includes="${test.includes}"/>
                    <propertyset refid="test.@{test.type}.properties"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <!-- needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-->
                    <sysproperty key="apple.awt.UIElement" value="@{disable.apple.ui}"/>
                </testng>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <testng-impl test.type="${run.test.type}" disable.apple.ui="${disable.apple.ui}"/>
    </target>

    <target name="test-generate-html" depends="-build-dir-init">
        <subant target="-test-browse-html" genericantfile="${ant.file}" inheritall="true">
            <dirset dir="${build.dir}/test" includes="*/results"/>
        </subant>
    </target>

    <target name="-do-test-generate-html">
        <junitreport todir=".">
            <fileset dir=".">
                <include name="TEST-*.xml"/>
            </fileset>
            <report format="frames" todir="html"/>
        </junitreport>
        <makeurl file="${basedir}/html/index.html" property="test.report.url"/>
        <echo>

            Report URL: ${test.report.url}
        </echo>
    </target>

    <target name="-test-browse-html" if="netbeans.home" depends="-do-test-generate-html">
        <nbbrowse file="html/index.html"/>
    </target>
    <target name="test" depends="test-unit,test-qa-functional"/>

    <target name="test-single" depends="init,test-init,test-build">
        <macrodef name="test-single">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="test.includes">Must set test.includes</fail>
                <property name="run.jvmargs.ide" value=""/> 
                <mkdir dir="${build.test.@{test.type}.results.dir}"/>
                <condition property="test.runner" value ="testng" else="junit">
                    <available classname="org.testng.annotations.Test" classpath="${test.@{test.type}.runtime.cp}"/>
                </condition>
                <condition property="is.test.suite" value ="-suite" else="">
                    <contains string="${test.includes}" substring=".xml"/>
                </condition>
                <antcall target="-do-${test.runner}-single${is.test.suite}">
                    <param name="test.type" value="@{test.type}"/>
                </antcall>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <property name="run.args.ide" value=""/>
        
        <test-single test.type="${test.type}"/>
    </target>

    <target name="-do-junit-single" depends="test-init">
        <macrodef name="junit-impl">
            <attribute name="test.type"/>
            <sequential>
                <junit showoutput="true" fork="true" failureproperty="tests.failed" errorproperty="tests.failed" filtertrace="${test.filter.trace}" tempdir="${build.test.@{test.type}.results.dir}" timeout="${test.timeout}">
                    <batchtest todir="${build.test.@{test.type}.results.dir}">
                        <fileset dir="${test.@{test.type}.src.dir}" includes="${test.includes}"/>
                    </batchtest>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <jvmarg line="${test.run.args}"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${run.args.ide}"/>
                    <jvmarg line="${run.jvmargs.ide}"/>
                    <formatter type="brief" usefile="false"/>
                    <formatter type="xml"/>
                </junit>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <junit-impl test.type="${test.type}" />
    </target>

    <target name="-do-testng-single" depends="test-init">
        <macrodef name="testng-impl">
            <attribute name="test.type"/>
            <sequential>
                <fileset id="testng.test" dir="${test.@{test.type}.src.dir}" includes="${test.includes}"/>
                <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="test.@{test.type}.run.cp"/>
                <testng  mode="mixed"
                         classfilesetref="testng.test"
                         failureProperty="tests.failed"
                         outputdir="${build.test.@{test.type}.results.dir}"
                         workingDir="${build.test.@{test.type}.results.dir}"
                         suitename="${code.name.base}"
			 listener="org.testng.reporters.VerboseReporter"
                >
                    <propertyset refid="test.@{test.type}.properties"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <!-- needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-->
                    <sysproperty key="apple.awt.UIElement" value="@{disable.apple.ui}"/>
                </testng>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <testng-impl test.type="${test.type}"/>
    </target>

    <target name="-do-testng-single-suite" depends="test-init">
        <macrodef name="testng-impl">
            <attribute name="test.type"/>
            <sequential>
                <fileset id="testng.test" dir="${test.@{test.type}.src.dir}" includes="${test.includes}"/>
                <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="test.@{test.type}.run.cp"/>
                <testng  mode="mixed"
                         xmlfilesetref="testng.test"
                         failureProperty="tests.failed"
                         outputdir="${build.test.@{test.type}.results.dir}"
                         workingDir="${build.test.@{test.type}.results.dir}"
                         suitename="${code.name.base}"
			 listener="org.testng.reporters.VerboseReporter"
                >
                    <propertyset refid="test.@{test.type}.properties"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <!-- needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-->
                    <sysproperty key="apple.awt.UIElement" value="@{disable.apple.ui}"/>
                </testng>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <testng-impl test.type="${test.type}"/>
    </target>

    <target name="do-debug-test-single" depends="test-init">
        <macrodef name="do-debug-test-single">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="test.class">Must set test.class</fail>
                <mkdir dir="${build.test.@{test.type}.results.dir}"/>
                <condition property="test.runner" value ="testng" else="junit">
                    <available classname="org.testng.annotations.Test" classpath="${test.@{test.type}.runtime.cp}"/>
                </condition>
                <condition property="is.test.suite" value ="-suite" else="">
                    <matches pattern="([a-zA-Z_$][a-zA-Z\d_$]*\.)*xml$" string="${test.class}"/>
                </condition>
                <antcall target="-do-${test.runner}-debug-single${is.test.suite}">
                    <param name="test.type" value="@{test.type}"/>
                </antcall>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <do-debug-test-single test.type="${test.type}"/>
    </target>

    <target name="-do-junit-debug-single" depends="test-init">
        <macrodef name="junit-impl">
            <attribute name="test.type"/>
            <sequential>
                <property name="test.report.file" location="${build.test.@{test.type}.results.dir}/TEST-${test.class}.xml"/>
                <delete file="${test.report.file}"/>
                <touch file="${test.report.file}" verbose="false"/>   <!-- must exist, otherwise the XML formatter would fail -->
                <condition property="test.methods.line" value="methods=${test.methods}" else="">
                    <isset property="test.methods"/>
                </condition>
                <java fork="true" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner">
                    <jvmarg value="-Xdebug"/>
                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
                    <jvmarg line="${test.run.args}"/>
                    <classpath>
                        <path refid="test.@{test.type}.run.cp"/>
                        <fileset dir="${ant.home}" includes="patches/*.jar"/>
                        <pathelement location="${ant.home}/lib/ant.jar"/>
                        <pathelement location="${ant.home}/lib/ant-junit.jar"/>
                        <pathelement location="${ant.home}/lib/ant-junit4.jar"/>
                    </classpath>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <arg value="${test.class}"/>
                    <arg value="showoutput=true"/>
                    <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
                    <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
                    <arg line="${test.methods.line}"/>
                </java>
            </sequential>
        </macrodef>
        <junit-impl test.type="${test.type}" />
    </target>

    <target name="-do-testng-debug-single" depends="test-init">
        <macrodef name="testng-impl">
            <attribute name="test.type"/>
            <sequential>
                <condition property="testng.args.line" value="-methods ${test.class}.${test.methods}" else="-testclass ${test.class}">
                    <isset property="test.methods"/>
                </condition>
                <!-- XXX: Consider debugging using testng task itself      -->
                <!-- TestNG is running in forkMode="once"                  -->
                <!-- therefore results while debugging single class/method -->
                <!-- can be different from running all tests at once       -->
                <java classname="org.testng.TestNG" fork="true">
                    <jvmarg value="-Xdebug"/>
                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
                    <jvmarg line="${test.run.args}"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <jvmarg value="-ea"/>
                    <arg line="-mixed"/>
                    <arg line="-d ${build.test.@{test.type}.results.dir}"/>
                    <arg line="-listener org.testng.reporters.VerboseReporter"/>
                    <arg line="-suitename ${code.name.base}"/>
                    <arg line="-testname ${test.class}"/>
                    <arg line="${testng.args.line}"/>
                </java>
                <!--
                <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="test.@{test.type}.run.cp"/>
                <testng mode="mixed" methods="${testng.methods}" failureProperty="tests.failed" outputdir="${build.test.@{test.type}.results.dir}" workingDir="${build.test.@{test.type}.results.dir}">
                    <classfileset dir="${build.test.@{test.type}.classes.dir}" excludes="${test.excludes}" includes="**/*Test.class"/>
                    <propertyset refid="test.@{test.type}.properties"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <jvmarg value="-Xdebug"/>
                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
                </testng>
                -->
            </sequential>
        </macrodef>
        <testng-impl test.type="${test.type}"/>
    </target>

    <target name="-do-testng-debug-single-suite" depends="test-init">
        <macrodef name="testng-impl">
            <attribute name="test.type"/>
            <sequential>
                <fileset id="testng.test" dir="${test.@{test.type}.src.dir}" includes="${test.class}"/>
                <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="test.@{test.type}.run.cp"/>
                <testng  mode="mixed"
                         xmlfilesetref="testng.test"
                         failureProperty="tests.failed"
                         outputdir="${build.test.@{test.type}.results.dir}"
                         workingDir="${build.test.@{test.type}.results.dir}"
                         suitename="${code.name.base}"
			 listener="org.testng.reporters.VerboseReporter"
                >
                    <propertyset refid="test.@{test.type}.properties"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <jvmarg value="-Xdebug"/>
                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
                    <!-- needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-->
                    <sysproperty key="apple.awt.UIElement" value="@{disable.apple.ui}"/>
                </testng>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <testng-impl test.type="${test.type}"/>
    </target>

    <target name="debug-test-single" depends="init,test-init,test-build,do-debug-test-single"/>

    <target name="debug-test-single-nb" depends="init,test-init,test-build,-jdk-presetdef-nbjpdastart" if="netbeans.home">
        <macrodef name="debug-test-single-nb">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="test.class">Must set test.class</fail>
                <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="${test.class}">
                    <classpath>
                        <path refid="test.@{test.type}.run.cp"/>
                        <!-- Permit extra sources to be searched even if they are not in the actual CP. -->
                        <!-- Used e.g. from ant/test/unit since some tests use dynamic loading: -->
                        <pathelement path="${test.@{test.type}.debug.cp.extra}"/>
                    </classpath>
                </nbjpdastart>
                <antcall target="do-debug-test-single"/>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <debug-test-single-nb test.type="${test.type}"/>
    </target>
    
    <target name="test-method" depends="init,test-init,test-build">
        <macrodef name="test-method">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="test.class">Must set test.class</fail>
                <fail unless="test.methods">Must set test.methods</fail>
                <property name="run.jvmargs.ide" value=""/>
                <mkdir dir="${build.test.@{test.type}.results.dir}"/>
                <condition property="test.runner" value ="testng" else="junit">
                    <available classname="org.testng.annotations.Test" classpath="${test.@{test.type}.runtime.cp}"/>
                </condition>
                <antcall target="-do-${test.runner}-testmethod">
                    <param name="test.type" value="@{test.type}"/>
                </antcall>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <test-method test.type="${test.type}"/>
    </target>
    
    <target name="-do-junit-testmethod" depends="test-init">
        <macrodef name="junit-impl">
            <attribute name="test.type"/>
            <sequential>
                <junit showoutput="true" fork="true" failureproperty="tests.failed" errorproperty="tests.failed" filtertrace="${test.filter.trace}" tempdir="${build.test.@{test.type}.results.dir}" timeout="${test.timeout}">
                    <test name="${test.class}" methods="${test.methods}" todir="${build.test.@{test.type}.results.dir}"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <jvmarg line="${test.run.args}"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${run.jvmargs.ide}"/>
                    <formatter type="brief" usefile="false"/>
                    <formatter type="xml"/>
                </junit>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <junit-impl test.type="${test.type}" />
    </target>

    <target name="-do-testng-testmethod" depends="test-init">
        <macrodef name="testng-impl">
            <attribute name="test.type"/>
            <sequential>
                <taskdef name="testng" classname="org.testng.TestNGAntTask" classpathref="test.@{test.type}.run.cp"/>
                <testng mode="mixed"
                        methods="${test.class}.${test.methods}"
                        failureProperty="tests.failed"
                        outputdir="${build.test.@{test.type}.results.dir}"
                        workingDir="${build.test.@{test.type}.results.dir}"
                        suitename="${code.name.base}"
			listener="org.testng.reporters.VerboseReporter"
                >
                    <propertyset refid="test.@{test.type}.properties"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <jvmarg line="${test.run.args}"/>
                    <!-- needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-->
                    <sysproperty key="apple.awt.UIElement" value="@{disable.apple.ui}"/>
                </testng>
                <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <testng-impl test.type="${test.type}"/>
    </target>

    <target name="run-test-main"  depends="init,test-init,test-build">
        <macrodef name="tjava">
            <attribute name="test.type"/>
            <element name="customize" optional="true"/>
            <sequential>
                <fail unless="main.class">Must set main.class.</fail>
                <property name="run.jvmargs.ide" value=""/>
                <mkdir dir="${build.test.@{test.type}.results.dir}"/>
                <java classname="${main.class}" dir="${build.test.@{test.type}.results.dir}" fork="true">
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <jvmarg line="${test.run.args}"/>
                    <jvmarg line="${run.args.ide}"/>
                    <jvmarg line="${run.jvmargs.ide}"/>
                    <customize/>
                </java>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/> <!-- compatibility -->
        <property name="run.args.ide" value=""/> <!-- default -->
        <tjava test.type="${test.type}"/>
    </target>

    <target name="do-debug-test-main" depends="test-init">
        <macrodef name="do-debug-test-main">
            <attribute name="test.type"/>
            <element name="customize" optional="true"/>
            <sequential>
                <fail unless="main.class">Must set main.class.</fail>
                <mkdir dir="${build.test.@{test.type}.results.dir}"/>
                <java fork="true" classname="${main.class}">
                    <jvmarg value="-Xdebug"/>
                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
                    <jvmarg line="${test.run.args}"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <customize/>
                </java>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <do-debug-test-main test.type="${test.type}"/>
    </target>

    <target name="debug-test-main-nb" depends="init,test-init,test-build,-jdk-presetdef-nbjpdastart" if="netbeans.home">
        <macrodef name="debug-test-main-nb">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="main.class">Must set main.class</fail>
                <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="${main.class}">
                    <classpath>
                        <path refid="test.@{test.type}.run.cp"/>
                        <!-- Permit extra sources to be searched even if they are not in the actual CP. -->
                        <!-- Used e.g. from ant/test/unit since some tests use dynamic loading: -->
                        <pathelement path="${test.@{test.type}.debug.cp.extra}"/>
                    </classpath>
                </nbjpdastart>
                <antcall target="do-debug-test-main"/>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <debug-test-main-nb test.type="${test.type}"/>
    </target>
    
    <target name="-pre-debug-fix" depends="init">
        <fail unless="fix.class">Must set fix.class to e.g. org/netbeans/modules/foo/Bar</fail>
        <property name="javac.includes" value="${fix.class}.java"/>
    </target>
    <target name="debug-fix-nb" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
        <nbjpdareload>
            <fileset includes="${fix.class}*.class" dir="${build.classes.dir}"/>
        </nbjpdareload>
    </target>
    <target name="debug-fix-test-nb" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
        <macrodef name="debug-fix-test-nb">
            <attribute name="test.type"/>
            <sequential>
                <nbjpdareload>
                    <fileset includes="${fix.class}*.class" dir="${build.test.@{test.type}.classes.dir}"/>
                </nbjpdareload>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <debug-fix-test-nb test.type="${test.type}"/>
    </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>

    <target name="-profile-test-single-nb-pre72" depends="init,test-init,test-build,-jdk-presetdef-nbprofiledirect" if="profiler.info.jvmargs.agent">
        <macrodef name="profile-test-single-nb">
            <attribute name="test.type"/>
            <sequential>
                <fail unless="profile.class">Must set profile.class</fail>
                <mkdir dir="${build.test.@{test.type}.results.dir}"/>
                <nbprofiledirect
                    jvmargsproperty="profiler.jvmargs"
                >
                    <classpath refid="test.@{test.type}.run.cp"/>
                </nbprofiledirect>
                <junit showoutput="true" fork="true" failureproperty="tests.failed" errorproperty="tests.failed" filtertrace="${test.filter.trace}" tempdir="${build.test.@{test.type}.results.dir}">
                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
                    <jvmarg line="${profiler.info.jvmargs}"/>
                    <test name="${profile.class}" todir="${build.test.@{test.type}.results.dir}"/>
                    <classpath refid="test.@{test.type}.run.cp"/>
                    <jvmarg value="${test.bootclasspath.prepend.args}"/>
                    <syspropertyset refid="test.@{test.type}.properties"/>
                    <jvmarg line="${test.run.args}"/>
                    <formatter type="brief" usefile="false"/>
                    <formatter type="xml"/>
                </junit>
                <fail if="tests.failed">Some tests failed; see details above.</fail>
            </sequential>
        </macrodef>
        <property name="test.type" value="unit"/>
        <profile-test-single-nb test.type="${test.type}"/>
    </target>

    <target name="profile-test-single-nb" depends="-profile-check,init,test-init,test-build,-profile-test-single-nb-pre72" if="profiler.configured" unless="profiler.info.jvmargs.agent">        
        <startprofiler/>
        <antcall target="test-single"/>
    </target>
    
    <target name="profile-test-main-nb" depends="-profile-check,init,test-init,test-build" if="profiler.configured" unless="profiler.info.jvmargs.agent">
        <startprofiler/>
        <antcall target="run-test-main"/>
    </target>

    <target name="-javadoc-init" depends="init">
        <!-- #71884: default Javadoc title and header -->
        <loadproperties srcFile="${manifest.mf}" prefix="mf.">
            <filterchain>
                <replaceregex pattern="[\n\r]+ ([^ ][^\n\r]*)"
                            replace="\1"
                            flags="g"
                            byline="false"/>
            </filterchain>
        </loadproperties>
        <property file="${src.dir}/${mf.OpenIDE-Module-Localizing-Bundle}" prefix="bundle."/>
        <condition property="javadoc.title" value="${bundle.OpenIDE-Module-Name}">
            <isset property="bundle.OpenIDE-Module-Name"/>
        </condition>
        <property name="javadoc.title" value="${code.name.base.dashes}"/> <!-- fallback -->
        <condition property="mf.OpenIDE-Module-Specification-Version" value="${spec.version.base}"> <!-- fallback -->
            <isset property="spec.version.base"/>
        </condition>
        <property name="mf.OpenIDE-Module" value="${code.name.base.dashes}"/> <!-- fallback -->
        <property name="mf.OpenIDE-Module-Implementation-Version" value=""/> <!-- fallback -->
        <property name="javadoc.header" value="${mf.OpenIDE-Module} ${mf.OpenIDE-Module-Specification-Version} ${mf.OpenIDE-Module-Implementation-Version}"/>
    </target>

    <target name="arch" depends="init" description="Process an arch.xml, creating it if it does not yet exist.">
        <fail unless="javadoc.arch">You must define e.g. javadoc.arch=$${basedir}/arch.xml in project.properties</fail>
        <mkdir dir="${build.dir}"/>
        <property name="arch.output.html" location="${build.dir}/arch.html"/>
        <property name="arch.generate" value="true"/>
        <arch answers="${javadoc.arch}" output="${arch.output.html}"
              project="nbproject/project.xml"
        />
    </target>

    <target name="-arch-nb-check"> <!-- #67438: might not yet exist, if arch file newly generated as skeleton -->
        <condition property="-arch-nb-run">
            <and>
                <isset property="netbeans.home"/>
                <available file="${arch.output.html}"/>
            </and>
        </condition>
    </target>
    <target name="arch-nb" depends="init,arch,-arch-nb-check" if="-arch-nb-run" description="Process an arch.xml, creating it if it does not yet exist, and display the result.">
        <nbbrowse file="${arch.output.html}"/>
    </target>

    <target name="-testuserdir-delete-init" depends="files-init">
        <property name="test.user.dir" location="${build.dir}/testuserdir"/>
        <property name="test.user.dir.lock" location="${test.user.dir}/lock"/>
        <condition property="app.running">
            <islocked file="${test.user.dir.lock}"/>
        </condition> 
    </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="Delete testing user directory (if the application is not running); clears any saved settings etc."/>

    <target name="clean" depends="files-init,testuserdir-delete">
        <delete failonerror="false" includeemptydirs="true">
            <fileset dir="${build.classes.dir}" />
            <fileset dir="${build.dir}">
                <exclude name="testuserdir/"/>
            </fileset>
        </delete>
        <delete dir="${netbeans.javadoc.dir}/${code.name.base.dashes}"/>
        <delete file="${netbeans.javadoc.dir}/${code.name.base.dashes}.zip"/>
        <delete includeemptydirs="true" failonerror="false"> <!-- #59457: OK if cluster does not exist currently -->
            <fileset dir="${cluster}">
                <patternset refid="module.files"/>
                <exclude name="config/Modules/${code.name.base.dashes}.xml" if="${do.not.clean.module.config.xml}"/>
            </fileset>
        </delete>
        <delete file="${cluster}/update_tracking/${code.name.base.dashes}.xml"/>
        <delete file="${netbeans.dest.dir}/${module.cluster.name}.built" failonerror="false"/>
    </target>

    <target name="fix-dependencies" depends="basic-init" description="Removes unused compilation dependencies on other modules.">
        <property name="build.compiler.deprecation" value="false" />
        <property name="fix.dependencies.modules" value=""/>
        <fixdependencies antfile="../../build.xml" buildtarget="netbeans" cleantarget="clean" failonerror="true" sanitycheck="false" moduleFilter="${fix.dependencies.modules}" strip="false">
            <replace codenamebase="org.openide" addcompiletime="true" >
                <module codenamebase="org.openide.filesystems" spec="6.2"/>
                <module codenamebase="org.openide.util" spec="6.2"/>
                <module codenamebase="org.openide.util.enumerations" spec="6.2"/>
                <module codenamebase="org.openide.modules" spec="6.2"/>
                <module codenamebase="org.openide.nodes" spec="6.2"/>
                <module codenamebase="org.openide.explorer" spec="6.2"/>
                <module codenamebase="org.openide.awt" spec="6.2"/>
                <module codenamebase="org.openide.dialogs" spec="6.2"/>
                <module codenamebase="org.openide.compat" spec="6.2"/>
                <module codenamebase="org.openide.options" spec="6.2"/>
                <module codenamebase="org.openide.windows" spec="6.2"/>
                <module codenamebase="org.openide.text" spec="6.2"/>
                <module codenamebase="org.openide.actions" spec="6.2"/>
                <module codenamebase="org.openide.loaders" spec="5.3"/>
            </replace>
            <replace codenamebase="org.openide.util" addcompiletime="true" >
                <module codenamebase="org.openide.util" spec="8.0"/>
                <module codenamebase="org.openide.util.lookup" spec="8.0"/>
            </replace>
            <replace codenamebase="org.openide.nodes" addcompiletime="true" >
                <module codenamebase="org.openide.nodes" spec="7.23"/>
                <module codenamebase="org.openide.awt" spec="7.33"/>
            </replace>
            <replace codenamebase="org.openide.filesystems" addcompiletime="true" >
                <module codenamebase="org.openide.filesystems" spec="8.0"/>
                <module codenamebase="org.openide.util.lookup" spec="8.16"/>
            </replace>
            <replace codenamebase="org.openide.util" addcompiletime="true">
                <module codenamebase="org.openide.util" spec="9.0"/>
                <module codenamebase="org.openide.util.ui" spec="9.3"/>
            </replace>
            <replace codenamebase="org.openide.util" addcompiletime="true">
                <module codenamebase="org.openide.util" spec="9.3"/>
            </replace>

            <replace codenamebase="org.openide.filesystems" addcompiletime="true">
                <module codenamebase="org.openide.filesystems" spec="9.0"/>
                <module codenamebase="org.openide.filesystems.nb" spec="9.0"/>
                <module codenamebase="org.openide.filesystems.compat8" spec="9.0"/>
            </replace>
            <replace codenamebase="org.openide.execution" addcompiletime="true">
                <module codenamebase="org.openide.execution" spec="9.0"/>
                <module codenamebase="org.openide.execution.compat8" spec="9.0"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.parsing.api" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.parsing.api" release="1" spec="9.0"/>
                <module codenamebase="org.netbeans.modules.parsing.indexing" spec="9.0"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.projectuiapi" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.projectuiapi" release="1" spec="1.78"/>
                <module codenamebase="org.netbeans.modules.projectuiapi.base" release="1" spec="1.78"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.project.ant" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.project.ant" release="1" spec="1.62"/>
                <module codenamebase="org.netbeans.modules.project.ant.ui" spec="1.62"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.java.project" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.java.project" release="1" spec="1.62"/>
                <module codenamebase="org.netbeans.modules.java.project.ui" release="1" spec="1.62"/>
            </replace>
            <replace codenamebase="org.netbeans.api.xml" addcompiletime="true">
                <module codenamebase="org.netbeans.api.xml" release="1" spec="1.41"/>
                <module codenamebase="org.netbeans.api.xml.ui" release="1" spec="1.41"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.editor.lib" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.editor.lib" release="3" spec="4.0"/>
                <module codenamebase="org.netbeans.modules.editor.document" spec="1.0"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.editor.lib2" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.editor.lib2" release="1" spec="2.0"/>
                <module codenamebase="org.netbeans.modules.editor.document" spec="1.0"/>
            </replace>
            <replace codenamebase="org.netbeans.api.progress" addcompiletime="true">
                <module codenamebase="org.netbeans.api.progress" release="1" spec="1.40"/>
                <module codenamebase="org.netbeans.api.progress.nb" spec="1.40"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.java.source" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.java.source.base" spec="1.1"/>
                <module codenamebase="org.netbeans.modules.java.source" spec="0.141"/>
                <module codenamebase="org.netbeans.modules.java.source.compat8" spec="9.0"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.project.libraries" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.project.libraries" release="1" spec="1.49"/>
                <module codenamebase="org.netbeans.modules.project.libraries.ui" release="1" spec="1.49"/>
            </replace>
            <replace codenamebase="org.netbeans.modules.xml.catalog" addcompiletime="true">
                <module codenamebase="org.netbeans.modules.xml.catalog" release="2" spec="2.0"/>
                <module codenamebase="org.netbeans.modules.xml.catalog.ui" spec="1.0"/>
            </replace>
            <replace codenamebase="org.openide.loaders" addcompiletime="true">
                <module codenamebase="org.openide.loaders" spec="7.61"/>
                <module codenamebase="org.netbeans.api.templates" spec="1.0"/>
            </replace>
            <replace codenamebase="org.netbeans.core.startup" addcompiletime="true">
                <module codenamebase="org.netbeans.core.startup" release="1" spec="1.60"/>
                <module codenamebase="org.netbeans.core.startup.base" spec="1.60"/>
            </replace>
            <fileset dir="nbproject" >
                <include name="project.xml" />
            </fileset>
        </fixdependencies>
    </target>

    <target name="fix-test-dependencies" depends="basic-init" description="Moves classpath for tests from project.properties to project.xml.">
        <fixtestdeps projectXml="nbproject/project.xml"
                     propertiesFile="nbproject/project.properties"/>
    </target>

    <target name="display-coverage-report" depends="coverage-report"
            description="Creates and displays unit test coverage report for this module">
        <fail unless="testcoverage.unit.report.dir">
            Property testcoverage.unit.report.dir not set. Test coverage script may be missing in ${harness.dir}.
        </fail>
        <nbbrowse file="${testcoverage.unit.report.dir}/index.html"/>
    </target>
    
</project>