Obliczenia brydżowe (Java ME)
Jacek Kowalski
2015-08-16 67d931ba96c0e37f439940809813c5179b139bb5
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- *** GENERATED FROM project.xml - DO NOT EDIT *** -->
<project name="Brydz-impl" default="jar" basedir="..">
    <!--load-properties-->
    <target name="pre-load-properties">
        <property file="nbproject/private/private.properties"/>
        <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
        <available property="user.properties.file.exists" file="${user.properties.file}"/>
    </target>
    <target name="exists.config.active" unless="config.active">
        <echo level="warning" message="Active configuration (config.active property) is not set - using default."/>
        <property value="" name="config.active"/>
    </target>
    <target name="exists.netbeans.user" unless="netbeans.user">
        <echo level="warning" message="NetBeans IDE user directory (netbeans.user property) is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: ant-ext library home, ...). You could also open this project in the NetBeans IDE - in this case this property would be set automatically."/>
    </target>
    <target name="exists.user.properties.file" unless="user.properties.file.exists">
        <echo level="warning" message="User properties file (user.properties.file) property is not set. By specifying this property many properties required by the project will be automatically evaluated (e.g.: libraries, platforms, ...)."/>
    </target>
    <target name="load-properties" depends="pre-load-properties,exists.config.active,exists.netbeans.user,exists.user.properties.file">
        <loadproperties srcfile="nbproject/project.properties">
            <filterchain>
                <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
                <concatfilter prepend="nbproject/project.properties"/>
                <containsregex pattern="^platform.active=|^deployment.method=|^deployment.instance="/>
            </filterchain>
        </loadproperties>
        <property name="deployment.instance" value="default"/>
        <loadproperties srcfile="${user.properties.file}">
            <filterchain>
                <replaceregex pattern="^platforms\.${platform.active}\." replace="platform."/>
                <replaceregex pattern="^deployment\.${deployment.method}\.scriptfile=" replace="deployment.scriptfile="/>
                <replaceregex pattern="^deployments\.${deployment.method}\.${deployment.instance}\.([^=]+)=" replace="\1="/>
            </filterchain>
        </loadproperties>
        <loadproperties srcfile="nbproject/project.properties">
            <filterchain>
                <containsregex pattern="^configs\.${config.active}\.(.*)" replace="\1"/>
                <concatfilter prepend="nbproject/project.properties"/>
            </filterchain>
        </loadproperties>
    </target>
    <!--basic-init-->
    <target name="exists.platform.active" unless="platform.active">
        <echo level="warning" message="Active platform (platform.active property) in not set. If you set this and user.properties.file property, many properties required by the project will be automatically evaluated (e.g.: platform home, platform classpath, ...)."/>
    </target>
    <target name="exists.platform.configuration" unless="platform.configuration">
        <echo level="warning" message="Platform configuration (platform.configuration) is not set. Using default (CLDC-1.0) configuration."/>
        <property name="platform.configuration" value="CLDC-1.0"/>
    </target>
    <target name="exists.platform.profile" unless="platform.profile">
        <echo level="warning" message="Platform profile (platform.profile) is not set. Using default (MIDP-1.0) profile."/>
        <property name="platform.profile" value="MIDP-1.0"/>
    </target>
    <target name="basic-init" depends="exists.platform.active,exists.platform.configuration,exists.platform.profile">
        <fail unless="libs.j2me_ant_ext.classpath">Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-mobility-antext.jar file in the IDE installation directory.</fail>
        <fail unless="platform.home">Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location.</fail>
        <fail unless="platform.bootclasspath">Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator.</fail>
        <fail unless="src.dir">Must set src.dir</fail>
        <fail unless="build.dir">Must set build.dir</fail>
        <fail unless="dist.dir">Must set dist.dir</fail>
        <fail unless="dist.jar">Must set dist.jar</fail>
        <property name="javac.source" value="1.3"/>
        <property name="javac.target" value="1.1"/>
        <property name="javac.encoding" value="${file.encoding}"/>
        <property name="deployment.number" value="0.0.1"/>
        <property name="deployment.counter" value="000002"/>
        <condition property="no.deps">
            <istrue value="${no.dependencies}"/>
        </condition>
        <condition property="no.preprocess">
            <isfalse value="${use.preprocessor}"/>
        </condition>
        <condition property="no.javadoc.preview">
            <isfalse value="${javadoc.preview}"/>
        </condition>
        <condition property="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes},**/*Test.java,**/test,**/test/**">
            <istrue value="${filter.exclude.tests}"/>
        </condition>
        <property name="filter.excludes.evaluated" value="${filter.excludes},${filter.more.excludes}"/>
        <condition property="deployment.do.override.jarurl" value="">
            <istrue value="${deployment.override.jarurl}"/>
        </condition>
        <condition property="config.active.name" value="DefaultConfiguration">
            <length string="${config.active}" trim="true" length="0"/>
        </condition>
        <property name="config.active.name" value="${config.active}"/>
        <taskdef resource="org/netbeans/mobility/antext/defs.properties">
            <classpath>
                <pathelement path="${libs.j2me_ant_ext.classpath}"/>
            </classpath>
        </taskdef>
        <condition property="skip.deployment">
            <equals arg1="${deployment.method}" arg2="NONE" casesensitive="false" trim="true"/>
        </condition>
        <condition property="app-version.autoincrement.trigger">
            <istrue value="${app-version.autoincrement}"/>
        </condition>
        <condition property="debug.timeout" value="30000">
            <or>
                <equals arg1="${debugger.timeout}" arg2="" trim="true"/>
                <not>
                    <isset property="debugger.timeout"/>
                </not>
            </or>
        </condition>
        <property name="debug.timeout" value="${debugger.timeout}"/>
        <nb-overrideproperty name="buildsystem.baton" value="${src.dir}"/>
    </target>
    <!--cldc-init-->
    <target name="cldc-pre-init">
        <condition property="cldc-platform.trigger">
            <equals arg1="CLDC" arg2="${platform.trigger}" casesensitive="false"/>
        </condition>
    </target>
    <target name="cldc-init" depends="cldc-pre-init" if="cldc-platform.trigger">
        <property name="preverify.sources.dir" location="${build.dir}/preverifysrc"/>
        <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
        <property name="platform.device" value=""/>
        <property name="dist.jad.url" value="file://"/>
        <property name="run.cmd.options" value=""/>
        <condition property="evaluated.run.security.domain" value="">
            <isfalse value="${run.use.security.domain}"/>
        </condition>
        <property name="evaluated.run.security.domain" value="${run.security.domain}"/>
        <condition property="override.jarurl.trigger">
            <and>
                <istrue value="${cldc-platform.trigger}"/>
                <istrue value="${deployment.override.jarurl}"/>
            </and>
        </condition>
        <property name="deployment.jad" location="${dist.dir}/${dist.jad}"/>
        <property name="deployment.jar" location="${dist.dir}/${dist.jar}"/>
        <property name="deployment.dir" location="${dist.dir}"/>
        <patternset id="deployment.patternset">
            <include name="${dist.jad}"/>
            <include name="${dist.jar}"/>
        </patternset>
    </target>
    <!--cdc-init-->
    <target name="cdc-init">
        <condition property="cdc-platform.trigger">
            <equals arg1="CDC" arg2="${platform.trigger}" casesensitive="false"/>
        </condition>
        <available file="${manifest.file}" property="manifest.available"/>
        <condition property="main.class.applet">
            <equals arg1="${main.class.class}" arg2="applet" casesensitive="false"/>
        </condition>
        <condition property="main.class.xlet">
            <equals arg1="${main.class.class}" arg2="xlet" casesensitive="false"/>
        </condition>
        <condition property="manifest.available+main.class+fat.jar">
            <and>
                <isset property="manifest.available"/>
                <isset property="main.class"/>
                <istrue value="${platform.fat.jar}"/>
                <not>
                    <equals arg1="${main.class}" arg2="" trim="true"/>
                </not>
            </and>
        </condition>
        <condition property="manifest.available+main.class">
            <and>
                <isset property="manifest.available"/>
                <isset property="main.class"/>
                <isfalse value="${platform.fat.jar}"/>
                <not>
                    <equals arg1="${main.class}" arg2="" trim="true"/>
                </not>
            </and>
        </condition>
        <condition property="application.version.invalid" value="true">
            <equals arg1="${deployment.number}" arg2="" trim="true"/>
        </condition>
        <fail if="application.version.invalid" message="Property deployment.number must not be empty and must contain version in format %d.%d.%d!"/>
        <condition property="sign.jar.trigger" value="true">
            <and>
                <isset property="cdc-platform.trigger"/>
                <istrue value="${sign.enabled}"/>
            </and>
        </condition>
    </target>
    <!--semc-init-->
    <target name="semc-pre-init" if="cdc-platform.trigger">
        <condition property="semc-platform.trigger">
            <equals arg1="semc" arg2="${platform.type}" casesensitive="false"/>
        </condition>
    </target>
    <target name="semc-init" depends="semc-pre-init" if="semc-platform.trigger">
        <condition property="semc.icon.invalid" value="true">
            <or>
                <contains string="${semc.application.icon}" substring="$${"/>
                <equals arg1="${semc.application.icon}" arg2="" trim="true"/>
            </or>
        </condition>
        <condition property="no.certificateorkey" value="true">
            <or>
                <isset property="no.application.uid"/>
                <equals arg1="${semc.certificate.path}" arg2="" trim="true"/>
                <contains string="${semc.certificate.path}" substring="$${semc.certificate.path"/>
                <equals arg1="${semc.private.key.path}" arg2="" trim="true"/>
                <contains string="${semc.private.key.path}" substring="$${semc.private.key.path"/>
            </or>
        </condition>
        <property name="j9.dist" location="${build.dir}/j9/${semc.application.uid}.j9"/>
        <taskdef resource="org/netbeans/modules/j2me/cdc/project/defs.properties">
            <classpath>
                <pathelement path="${libs.cdc-ant-utils.classpath}"/>
            </classpath>
        </taskdef>
        <taskdef resource="org/netbeans/modules/j2me/cdc/project/semc/defs.properties">
            <classpath>
                <pathelement path="${libs.semc-ant-utils.classpath}"/>
            </classpath>
        </taskdef>
        <property name="deployment.dir" location="${dist.dir}"/>
        <patternset id="deployment.patternset">
            <include name="*.sis"/>
            <include name="*.SIS"/>
        </patternset>
    </target>
    <!--savaje-init-->
    <target name="savaje-pre-init" if="cdc-platform.trigger">
        <condition property="savaje-platform.trigger">
            <equals arg1="savaje" arg2="${platform.type}" casesensitive="false"/>
        </condition>
    </target>
    <target name="savaje-init" depends="savaje-pre-init" if="savaje-platform.trigger">
        <property name="savaje.application.uid" value="TBD"/>
        <condition property="savaje.bundle.base.invalid" value="true">
            <or>
                <equals arg1="${savaje.bundle.base}" arg2="" trim="true"/>
                <contains string="${savaje.bundle.base}" substring="$${savaje.bundle.base"/>
            </or>
        </condition>
        <condition property="savaje.unsupported.main" value="true">
            <or>
                <equals arg1="${main.class.applet}" arg2="true"/>
            </or>
        </condition>
        <condition property="savaje.icon.invalid" value="true">
            <or>
                <isset property="no.application.uid"/>
                <contains string="${savaje.application.icon}" substring="$${"/>
                <equals arg1="${savaje.application.icon}" arg2="" trim="true"/>
            </or>
        </condition>
        <property name="jnlp.dist" value="${build.dir}/jnlp/bundle.jnlp"/>
        <property name="deployment.dir" location="${dist.dir}"/>
        <patternset id="deployment.patternset">
            <include name="bundle.jnlp"/>
            <include name="bundle.policy"/>
            <include name="lib/*"/>
        </patternset>
    </target>
    <!--sjmc-init-->
    <target name="sjmc-pre-init" if="cdc-platform.trigger">
        <condition property="sjmc-platform.trigger">
            <equals arg1="sjmc" arg2="${platform.type}" casesensitive="false"/>
        </condition>
    </target>
    <target name="sjmc-init" depends="sjmc-pre-init" if="sjmc-platform.trigger"/>
    <!--ojec-init-->
    <target name="ojec-pre-init" if="cdc-platform.trigger">
        <condition property="ojec-platform.trigger">
            <equals arg1="ojec" arg2="${platform.type}" casesensitive="false"/>
        </condition>
    </target>
    <target name="ojec-init" depends="ojec-pre-init" if="ojec-platform.trigger"/>
    <!--cdc-hi-init-->
    <target name="cdc-hi-pre-init" if="cdc-platform.trigger">
        <condition property="cdc-hi-platform.trigger">
            <equals arg1="cdc-hi" arg2="${platform.type}" casesensitive="false"/>
        </condition>
    </target>
    <target name="cdc-hi-init" depends="cdc-hi-pre-init" if="cdc-hi-platform.trigger"/>
    <!--nokiaS80-init-->
    <target name="nokiaS80-pre-init" if="cdc-platform.trigger">
        <condition property="nokiaS80-platform.trigger">
            <equals arg1="nokiaS80" arg2="${platform.type}" casesensitive="false"/>
        </condition>
    </target>
    <target name="nokiaS80-init" depends="nokiaS80-pre-init" if="nokiaS80-platform.trigger">
        <property name="j9.dist" location="${build.dir}/j9/NOKIA.j9"/>
        <property name="manifest.build.file" location="${build.dir}/manifest.mf"/>
        <condition property="nokia.icon.invalid">
            <or>
                <contains string="${nokiaS80.application.icon}" substring="$${"/>
                <equals arg1="${nokiaS80.application.icon}" arg2="" trim="true"/>
            </or>
        </condition>
        <property name="deployment.dir" location="${dist.dir}"/>
        <patternset id="deployment.patternset">
            <include name="${dist.jar}"/>
        </patternset>
    </target>
    <!--init-->
    <target name="pre-init"/>
    <target name="post-init"/>
    <target name="init" depends="pre-init,load-properties,basic-init,cldc-init,cdc-init,semc-init,savaje-init,sjmc-init,ojec-init,cdc-hi-init,nokiaS80-init,post-init"/>
    <!--conditional clean-->
    <target name="conditional-clean-init">
        <uptodate property="no.clean.before.build" targetfile="${build.dir}/.timestamp">
            <srcfiles dir="nbproject">
                <include name="project.properties"/>
                <include name="build-impl.xml"/>
            </srcfiles>
        </uptodate>
    </target>
    <target name="conditional-clean" depends="init,conditional-clean-init" unless="no.clean.before.build" description="Clean project in case its meta information has changed.">
        <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
    </target>
    <!--deps-jar-->
    <target name="deps-jar" depends="conditional-clean" unless="no.deps"/>
    <!--preprocess-->
    <target name="pre-preprocess"/>
    <target name="do-preprocess" unless="no.preprocess">
        <fail unless="preprocessed.dir">Must set preprocessed.dir</fail>
        <property name="abilities" value=""/>
        <property name="debug.level" value="debug"/>
        <mkdir dir="${preprocessed.dir}"/>
        <echo message="ignore me" file="${build.dir}/.timestamp"/>
        <nb-prep destdir="${preprocessed.dir}" preprocessfor="${config.active.name},${abilities},DebugLevel=${debug.level}" encoding="${javac.encoding}">
            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated}"/>
        </nb-prep>
        <copy todir="${preprocessed.dir}">
            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
        </copy>
        <nb-overrideproperty name="buildsystem.baton" value="${preprocessed.dir}"/>
    </target>
    <target name="post-preprocess"/>
    <target name="preprocess" depends="deps-jar,pre-preprocess,do-preprocess,post-preprocess" description="Preprocess project sources."/>
    <!--compile-->
    <target name="pre-compile"/>
    <target name="do-compile">
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
        <mkdir dir="${build.classes.dir}"/>
        <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" destdir="${build.classes.dir}" srcdir="${buildsystem.baton}" bootclasspath="${platform.bootclasspath}" encoding="${javac.encoding}">
            <classpath>
                <path path="${libs.classpath}"/>
            </classpath>
        </javac>
        <copy todir="${build.classes.dir}">
            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
        </copy>
        <nb-overrideproperty name="buildsystem.baton" value="${build.classes.dir}"/>
    </target>
    <target name="extract-libs" description="Extracts all bundled libraries.">
        <mkdir dir="${build.classes.dir}"/>
        <nb-extract dir="${build.classes.dir}" excludeManifest="true" classpath="${libs.classpath}" excludeclasspath="${extra.classpath}"/>
    </target>
    <target name="post-compile"/>
    <target name="compile" depends="preprocess,pre-compile,extract-libs,do-compile,post-compile" description="Compile project classes."/>
    <!--compile-single-->
    <target name="pre-compile-single"/>
    <target name="do-compile-single">
        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
        <mkdir dir="${build.classes.dir}"/>
        <javac includeantruntime="false" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" debug="${javac.debug}" srcdir="${buildsystem.baton}" destdir="${build.classes.dir}" bootclasspath="${platform.bootclasspath}" includes="${javac.includes}" encoding="${javac.encoding}">
            <classpath>
                <path path="${libs.classpath}"/>
            </classpath>
        </javac>
    </target>
    <target name="post-compile-single"/>
    <target name="compile-single" depends="preprocess,pre-compile-single,do-compile-single,post-compile-single" description="Compile selected project classes."/>
    <!--proguard-->
    <target name="proguard-init" description="Up-to-date check before obfuscation.">
        <property name="obfuscation.level" value="0"/>
        <condition property="no.obfusc">
            <or>
                <equals arg1="${obfuscation.level}" arg2="0"/>
                <uptodate targetfile="${obfuscator.destjar}">
                    <srcfiles dir="${buildsystem.baton}"/>
                </uptodate>
            </or>
        </condition>
        <uptodate property="obfuscation.up-to-date" targetfile="${obfuscator.destjar}">
            <srcfiles dir="${buildsystem.baton}"/>
        </uptodate>
    </target>
    <target name="skip-obfuscation" depends="proguard-init" if="obfuscation.up-to-date">
        <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
        <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
    </target>
    <target name="proguard" depends="skip-obfuscation" description="Obfuscate project classes." unless="no.obfusc">
        <fail unless="obfuscated.classes.dir">Must set obfuscated.classes.dir</fail>
        <fail unless="obfuscator.srcjar">Must set obfuscator.srcjar</fail>
        <fail unless="obfuscator.destjar">Must set obfuscator.destjar</fail>
        <property name="obfuscator.classpath" value=""/>
        <dirname file="${obfuscator.srcjar}" property="obfuscator.srcjar.dir"/>
        <dirname file="${obfuscator.destjar}" property="obfuscator.destjar.dir"/>
        <mkdir dir="${obfuscator.srcjar.dir}"/>
        <mkdir dir="${obfuscator.destjar.dir}"/>
        <jar jarfile="${obfuscator.srcjar}" basedir="${buildsystem.baton}"/>
        <property name="obfuscation.custom" value=""/>
        <nb-obfuscate srcjar="${obfuscator.srcjar}" destjar="${obfuscator.destjar}" obfuscatorclasspath="${obfuscator.classpath}" classpath="${platform.bootclasspath}:${extra.classpath}" obfuscationLevel="${obfuscation.level}" extraScript="${obfuscation.custom}"/>
        <mkdir dir="${obfuscated.classes.dir}"/>
        <unjar src="${obfuscator.destjar}" dest="${obfuscated.classes.dir}"/>
        <nb-overrideproperty name="buildsystem.baton" value="${obfuscated.classes.dir}"/>
    </target>
    <!--obfuscate-->
    <target name="pre-obfuscate"/>
    <target name="post-obfuscate"/>
    <target name="obfuscate" depends="compile,pre-obfuscate,proguard,post-obfuscate" description="Obfuscate project classes."/>
    <!--lwuit-build-->
    <import file="lwuit.xml" optional="true"/>
    <target name="-lwuit-check">
        <condition property="lwuit.allowed">
            <and>
                <available file="nbproject/lwuit.xml"/>
                <isset property="is.mesdk_lwuit"/>
            </and>
        </condition>
    </target>
    <target name="-pre-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/>
    <target name="-lwuit-build" depends="-lwuit-check" if="lwuit.allowed">
        <antcall target="lwuit_build"/>
    </target>
    <target name="-post-lwuit-build" depends="-lwuit-check" if="lwuit.allowed"/>
    <target name="lwuit-build" depends="-lwuit-check,-pre-lwuit-build, -lwuit-build, -post-lwuit-build" if="lwuit.allowed"/>
    <!--preverify-->
    <target name="pre-preverify"/>
    <target name="do-preverify" if="cldc-platform.trigger">
        <fail unless="preverify.classes.dir">Must set preverify.classes.dir</fail>
        <mkdir dir="${preverify.sources.dir}"/>
        <copy todir="${preverify.sources.dir}">
            <fileset dir="${buildsystem.baton}" includes="**/*.class"/>
        </copy>
        <mkdir dir="${preverify.classes.dir}"/>
        <nb-preverify srcdir="${preverify.sources.dir}" destdir="${preverify.classes.dir}" classpath="${platform.bootclasspath}:${extra.classpath}" configuration="${platform.configuration}" platformhome="${platform.home}" platformtype="${platform.type}" commandline="${platform.preverifycommandline}"/>
        <copy todir="${preverify.classes.dir}">
            <fileset dir="${buildsystem.baton}" defaultexcludes="${filter.use.standard}" excludes="${filter.excludes.evaluated},${build.classes.excludes}"/>
        </copy>
        <nb-overrideproperty name="buildsystem.baton" value="${preverify.classes.dir}"/>
    </target>
    <target name="post-preverify"/>
    <target name="preverify" depends="obfuscate,lwuit-build,pre-preverify,do-preverify,post-preverify" description="Preverify project classes."/>
    <!--set-password-->
    <target name="set-password-init">
        <property name="sign.enabled" value="false"/>
        <condition property="skip-sign-keystore-password-input">
            <or>
                <isfalse value="${sign.enabled}"/>
                <and>
                    <isset property="sign.keystore"/>
                    <isset property="sign.keystore.password"/>
                    <not>
                        <equals arg1="${sign.keystore}" arg2="" trim="true"/>
                    </not>
                    <not>
                        <equals arg1="${sign.keystore.password}" arg2="" trim="true"/>
                    </not>
                </and>
            </or>
        </condition>
        <condition property="skip-sign-alias-password-input">
            <or>
                <isfalse value="${sign.enabled}"/>
                <and>
                    <isset property="sign.keystore"/>
                    <isset property="sign.alias"/>
                    <isset property="sign.alias.password"/>
                    <not>
                        <equals arg1="${sign.keystore}" arg2="" trim="true"/>
                    </not>
                    <not>
                        <equals arg1="${sign.alias}" arg2="" trim="true"/>
                    </not>
                    <not>
                        <equals arg1="${sign.alias.password}" arg2="" trim="true"/>
                    </not>
                </and>
            </or>
        </condition>
    </target>
    <target name="set-keystore-password" if="netbeans.home" unless="skip-sign-keystore-password-input">
        <nb-enter-password keystore="${sign.keystore}" passwordproperty="sign.keystore.password"/>
    </target>
    <target name="set-alias-password" if="netbeans.home" unless="skip-sign-alias-password-input">
        <nb-enter-password keystore="${sign.keystore}" keyalias="${sign.alias}" passwordproperty="sign.alias.password"/>
    </target>
    <target name="set-password" depends="set-password-init,set-keystore-password,set-alias-password"/>
    <!--create JAD-->
    <target name="add-configuration" unless="contains.manifest.configuration">
        <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
</nb-output>
        <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Configuration: ${platform.configuration}
</nb-output>
    </target>
    <target name="add-profile" unless="contains.manifest.profile">
        <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
</nb-output>
        <nb-output file="${manifest.build.file}" encoding="UTF-8" append="true">MicroEdition-Profile: ${platform.profile}
</nb-output>
    </target>
    <target name="create-jad" if="cldc-platform.trigger">
        <fail unless="dist.jad">Must set dist.jad</fail>
        <mkdir dir="${build.dir}"/>
        <dirname file="${dist.dir}/${dist.jad}" property="dist.jad.dir"/>
        <mkdir dir="${dist.jad.dir}"/>
        <condition property="evaluated.manifest.apipermissions" value="${manifest.apipermissions}">
            <not>
                <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
            </not>
        </condition>
        <condition property="evaluated.manifest.pushregistry" value="${manifest.pushregistry}">
            <not>
                <equals arg1="${platform.profile}" arg2="MIDP-1.0"/>
            </not>
        </condition>
        <condition property="contains.manifest.configuration">
            <contains substring="MicroEdition-Configuration: " string="${manifest.others}"/>
        </condition>
        <condition property="contains.manifest.profile">
            <contains substring="MicroEdition-Profile: " string="${manifest.others}"/>
        </condition>
        <property value="" name="evaluated.manifest.apipermissions"/>
        <property value="" name="evaluated.manifest.pushregistry"/>
        <property name="manifest.jad" value=""/>
        <property name="manifest.manifest" value=""/>
        <nb-output file="${dist.dir}/${dist.jad}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad}</nb-output>
        <nb-output file="${manifest.build.file}" encoding="UTF-8">${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest}</nb-output>
        <antcall target="add-configuration" inheritall="true" inheritrefs="true"/>
        <antcall target="add-profile" inheritall="true" inheritrefs="true"/>
        <property name="manifest.available" value="true"/>
    </target>
    <!--do-extra-libs-->
    <target name="do-extra-libs" if="extra.classpath">
        <property name="dist.lib.dir" value="${dist.dir}/lib"/>
        <mkdir dir="${dist.lib.dir}"/>
        <copy todir="${dist.lib.dir}">
            <path path="${extra.classpath}"/>
            <flattenmapper/>
        </copy>
    </target>
    <!--nokiaS80-manifest-->
    <target name="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger">
        <fail message="Main class is not set!">
            <condition>
                <equals arg1="${main.class}" arg2="" trim="true"/>
            </condition>
        </fail>
        <mkdir dir="${build.dir}/j9"/>
        <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
        <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
        <copy file="${manifest.file}" tofile="${manifest.build.file}" failonerror="false"/>
        <property name="manifest.available" value="true"/>
        <loadfile property="nokia.manifest.j9" srcFile="${j9.dist}"/>
    </target>
    <target name="nokiaS80-prepare-manifest" depends="nokiaS80-prepare-j9" if="nokiaS80-platform.trigger" unless="nokia.icon.invalid">
        <pathconvert property="logo.icon.name" pathsep=" ">
            <path path="${nokiaS80.application.icon}"/>
            <chainedmapper>
                <flattenmapper/>
                <globmapper from="*" to="*"/>
            </chainedmapper>
        </pathconvert>
        <copy file="${nokiaS80.application.icon}" todir="${buildsystem.baton}"/>
        <manifest file="${manifest.build.file}" mode="update">
            <attribute name="Main-Class" value="${main.class}"/>
            <attribute name="PproApp-Name" value="${application.name}"/>
            <attribute name="PproApp-Vendor" value="${application.vendor}"/>
            <attribute name="PproApp-Version" value="${deployment.number}"/>
            <attribute name="PproApp-Icon" value="${logo.icon.name}"/>
            <attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/>
        </manifest>
    </target>
    <target name="nokiaS80-prepare-manifest-no-icon" depends="nokiaS80-prepare-j9" if="nokia.icon.invalid">
        <manifest file="${manifest.build.file}" mode="update">
            <attribute name="Main-Class" value="${main.class}"/>
            <attribute name="PproApp-Name" value="${application.name}"/>
            <attribute name="PproApp-Vendor" value="${application.vendor}"/>
            <attribute name="PproApp-Version" value="${deployment.number}"/>
            <attribute name="x-ibm-pp-j9" value="${nokia.manifest.j9}"/>
        </manifest>
    </target>
    <target name="nokiaS80-create-manifest" depends="nokiaS80-prepare-j9,nokiaS80-prepare-manifest,nokiaS80-prepare-manifest-no-icon" if="nokiaS80-platform.trigger"/>
    <!--jad-jsr211-properties-->
    <target name="jad-jsr211-properties.check">
        <condition property="jad-jsr211-properties.allowed">
            <and>
                <isset property="cldc-platform.trigger"/>
                <isset property="netbeans.home"/>
                <isset property="is.mesdk_jsr211"/>
            </and>
        </condition>
    </target>
    <target name="jad-jsr211-properties" description="Updates JAD and manifest with JSR211 properties." depends="jad-jsr211-properties.check" if="jad-jsr211-properties.allowed">
        <jadjsr211properties jadfile="${dist.dir}/${dist.jad}" manifestfile="${build.dir}/${manifest.file}"/>
    </target>
    <!--semc-build-j9-->
    <target name="semc-build-j9" if="semc-platform.trigger">
        <epocpathsetter home="${platform.home}"/>
        <property name="semc.application.caps" value=""/>
        <mkdir dir="${platform.home}/epoc32/winscw/c/private/${semc.application.uid}"/>
        <mkdir dir="${build.dir}/j9"/>
        <fail message="Main class is not set!">
            <condition>
                <equals arg1="${main.class}" arg2="" trim="true"/>
            </condition>
        </fail>
        <j9builder jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" platform="${platform.type}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
    </target>
    <!--do-jar-->
    <target name="do-jar" if="manifest.available">
        <dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
        <mkdir dir="${dist.jar.dir}"/>
        <property name="manifest.build.file" location="${manifest.file}"/>
        <jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}" manifest="${manifest.build.file}" manifestencoding="UTF-8">
            <fileset dir="${buildsystem.baton}"/>
        </jar>
    </target>
    <!--do-jar-no-manifest-->
    <target name="do-jar-no-manifest" unless="manifest.available">
        <dirname file="${dist.dir}/${dist.jar}" property="dist.jar.dir"/>
        <mkdir dir="${dist.jar.dir}"/>
        <jar compress="${jar.compress}" jarfile="${dist.dir}/${dist.jar}">
            <fileset dir="${buildsystem.baton}"/>
        </jar>
    </target>
    <!--update-jad-->
    <target name="update-jad" if="cldc-platform.trigger">
        <nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${dist.jar}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/>
    </target>
    <target name="sign-jar" if="sign.jar.trigger">
        <signjar jar="${dist.dir}/${dist.jar}" alias="${sign.alias}" keystore="${sign.keystore}" storepass="${sign.keystore.password}" keypass="${sign.alias.password}"/>
    </target>
    <!--savaje-build-jnlp-->
    <target name="savaje-prepare-icon" if="savaje-platform.trigger" unless="savaje.icon.invalid">
        <pathconvert property="savaje.application.icon.name" pathsep=" ">
            <path path="${savaje.application.icon}"/>
            <chainedmapper>
                <flattenmapper/>
                <globmapper from="*" to="*"/>
            </chainedmapper>
        </pathconvert>
        <mkdir dir="${dist.dir}/lib"/>
        <copy tofile="${dist.dir}/lib/${savaje.application.icon.name}" file="${savaje.application.icon}" overwrite="true" failonerror="false"/>
    </target>
    <target name="savaje-build-jnlp" depends="savaje-prepare-icon" if="savaje-platform.trigger">
        <mkdir dir="${build.dir}/jnlp/"/>
        <taskdef resource="org/netbeans/modules/j2me/cdc/project/savaje/defs.properties">
            <classpath>
                <pathelement path="${libs.savaje-ant-utils.classpath}"/>
            </classpath>
        </taskdef>
        <jnlp dir="${build.dir}/jnlp/" file="bundle.jnlp" codebase="WTK_AGUI" distjar="lib/${dist.jar.name}" applicationicon="lib/${savaje.application.icon.name}" smallicon="${savaje.application.icon.small}" focusedicon="${savaje.application.icon.focused}" applicationtitle="${application.name}" applicationvendor="${application.vendor}" applicationDescription="${application.description}" applicationArgs="${application.args}" mainClass="${main.class}" debug="${savaje.bundle.debug}" debugport="${savaje.bundle.debug.port}">
            <fileset dir="${dist.dir}/lib"/>
        </jnlp>
        <policy file="${build.dir}/jnlp/bundle.policy" codebase="WTK_AGUI"/>
        <copy tofile="${dist.dir}/lib/classes.jar" file="${dist.dir}/${dist.jar}" overwrite="true"/>
        <copy todir="${dist.dir}" file="${build.dir}/jnlp/bundle.jnlp" overwrite="true"/>
        <copy tofile="${dist.dir}/bundle.policy" file="${build.dir}/jnlp/bundle.policy" overwrite="true"/>
        <copy todir="${dist.dir}/lib" overwrite="true" failonerror="false">
            <fileset dir="${resources.dir}"/>
        </copy>
    </target>
    <!--jar-->
    <target name="pre-jar"/>
    <target name="post-jar"/>
    <target name="jar" depends="preverify,pre-jar,set-password,create-jad,do-extra-libs,nokiaS80-create-manifest,jad-jsr211-properties,semc-build-j9,do-jar,do-jar-no-manifest,update-jad,sign-jar,savaje-build-jnlp,post-jar" description="Build jar and application descriptor."/>
    <!--override-jad-->
    <target name="override-jad" if="override.jarurl.trigger">
        <property name="deployment.jarurl" value="${dist.jar}"/>
        <nb-jad jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" url="${deployment.jarurl}" sign="${sign.enabled}" keystore="${sign.keystore}" keystorepassword="${sign.keystore.password}" alias="${sign.alias}" aliaspassword="${sign.alias.password}" encoding="UTF-8"/>
    </target>
    <!--semc-make-sis-->
    <target name="-semc-sis-init" if="semc-platform.trigger" description="Init necessary properties for SEMC platform">
        <property name="pprolauncher.dir" value="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/>
    </target>
    <target name="semc-ppro-arm" if="semc-platform.trigger" description="Builds neccessary files for semc device">
        <exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/">
            <arg value="arm"/>
            <arg value="${application.name}"/>
            <arg value="${semc.application.uid}"/>
            <arg value="${j9.dist}"/>
            <arg value="${semc.application.caps}"/>
            <env key="SDKDRIVE" value="${sdkdrive}"/>
            <env key="EPOCROOT" value="${epocroot}"/>
            <env key="Path" value="${epocpath}"/>
        </exec>
    </target>
    <target name="semc-make-sis-icon" if="semc-platform.trigger" unless="semc.icon.invalid">
        <copy file="${semc.application.icon}" tofile="${pprolauncher.dir}/${semc.application.uid}.mbm" failonerror="false"/>
    </target>
    <target name="semc-make-sis" depends="semc-ppro-arm,semc-make-sis-icon" if="semc-platform.trigger" unless="no.application.uid" description="Builds SIS file for device">
        <property name="dll.dir" location="dll"/>
        <mkdir dir="${dll.dir}"/>
        <copy todir="${pprolauncher.dir}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
        </copy>
        <copy todir="${pprolauncher.dir}">
            <fileset dir="${dll.dir}">
                <include name="**/*.dll"/>
            </fileset>
        </copy>
        <copy todir="${pprolauncher.dir}" failonerror="false">
            <fileset dir="${resources.dir}"/>
        </copy>
        <pkgmake workdir="${pprolauncher.dir}" id="${semc.application.uid}" appname="${application.name}" appicon="${semc.application.uid}.mbm" vendor="${application.vendor}" version="${deployment.number}" logo="${logo.image}" logoinstallonly="${logo.image.installonly}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
            <fileset dir="${dll.dir}">
                <include name="**/*.dll"/>
            </fileset>
            <fileset dir="${resources.dir}"/>
        </pkgmake>
        <exec executable="${platform.home}/epoc32/tools/makesis" dir="${pprolauncher.dir}">
            <arg value="-d${pprolauncher.dir}"/>
            <arg value="PProLauncher${semc.application.uid}.pkg"/>
            <arg value="${application.name}.sis"/>
            <env key="SDKDRIVE" value="${sdkdrive}"/>
            <env key="EPOCROOT" value="${epocroot}"/>
            <env key="Path" value="${epocpath}"/>
        </exec>
        <copy todir="${dist.dir}">
            <fileset dir="${pprolauncher.dir}">
                <include name="**/*.SIS"/>
                <include name="**/*.sis"/>
            </fileset>
        </copy>
    </target>
    <target name="semc-sign-sis" if="semc-platform.trigger" depends="semc-make-sis" unless="no.certificateorkey" description="Sign SIS file">
        <exec executable="${platform.home}/epoc32/tools/signsis" dir="${pprolauncher.dir}">
            <arg value="-s"/>
            <arg value="${pprolauncher.dir}/${application.name}.sis"/>
            <arg value="${pprolauncher.dir}/${application.name}-SIGNED.sis"/>
            <arg value="${semc.certificate.path}"/>
            <arg value="${semc.private.key.path}"/>
            <arg value="${semc.private.key.password}"/>
            <env key="SDKDRIVE" value="${sdkdrive}"/>
            <env key="EPOCROOT" value="${epocroot}"/>
            <env key="Path" value="${epocpath}"/>
        </exec>
        <copy todir="${dist.dir}">
            <fileset dir="${pprolauncher.dir}">
                <include name="**/*.SIS"/>
                <include name="**/*.sis"/>
            </fileset>
        </copy>
    </target>
    <target name="semc-no-sign-sis" depends="semc-make-sis" if="no.certificateorkey" unless="no.application.uid" description="Prints out only info when SIS is not signed ">
        <echo message="Signed SIS was not created! Set up path to certificate and private key in project properties!"/>
    </target>
    <target name="-pre-semc-sis" if="semc-platform.trigger" description="Customizable target called before SIS file is built"/>
    <target name="semc-sis" if="semc-platform.trigger" depends="-semc-sis-init, -pre-semc-sis, semc-sign-sis,semc-no-sign-sis, -post-semc-sis" unless="no.application.uid"/>
    <target name="-post-semc-sis" if="semc-platform.trigger" description="Customizable target called after SIS file is built"/>
    <!--increment-app-version-->
    <target name="increment-app-version" if="app-version.autoincrement.trigger">
        <propertyfile file="nbproject/private/private.properties">
            <entry key="deployment.counter" type="int" operation="+" default="2" pattern="0"/>
            <entry key="deployment.number" value="000000${deployment.counter}"/>
        </propertyfile>
        <property name="deployment.number.pattern" value="\2\3.\5\6.\8\9"/>
        <replaceregexp byline="true" file="nbproject/private/private.properties" match="^deployment.number=[0-9]*(0|([1-9]))([0-9])(0|([1-9]))([0-9])(0|([1-9]))([0-9])$" replace="deployment.number=${deployment.number.pattern}"/>
    </target>
    <!--build-->
    <target name="pre-build"/>
    <target name="post-build"/>
    <target name="build" depends="jar,pre-build,override-jad,semc-sis,increment-app-version,post-build" description="Builds final distribution of the application."/>
    <!--open-netmon-->
    <target name="netmon.check">
        <condition property="netmon.allowed">
            <and>
                <not>
                    <isset property="bdj-platform.trigger"/>
                </not>
                <isset property="netbeans.home"/>
                <isset property="is.mesdk_netmon"/>
            </and>
        </condition>
    </target>
    <target name="open-netmon" description="Open network monitor" depends="netmon.check" if="netmon.allowed">
        <opennetmon device="${platform.device}"/>
    </target>
    <!--cldc-run-->
    <target name="cldc-run" if="cldc-platform.trigger">
        <nb-run jadfile="${dist.dir}/${dist.jad}" jarfile="${dist.dir}/${dist.jar}" jadurl="${dist.jad.url}" device="${platform.device}" platformhome="${platform.home}" platformtype="${platform.type}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.runcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
    </target>
    <!--semc-run-and-debug-prepare-targets-->
    <target name="semc-icon-assembly" if="semc-platform.trigger" unless="semc.icon.invalid">
        <copy file="${semc.application.icon}" tofile="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm" failonerror="false"/>
        <iconassembly home="${platform.home}" uid="${semc.application.uid}" count="${application.icon.count}"/>
    </target>
    <target name="semc-ppro-emulator" if="semc-platform.trigger" description="Builds neccessary files for semc emulator">
        <exec executable="${platform.home}/epoc32/tools/create-ppro-app.bat" dir="${platform.home}/epoc32/tools/">
            <arg value="win32"/>
            <arg value="${application.name}"/>
            <arg value="${semc.application.uid}"/>
            <arg value="${j9.dist}"/>
            <arg value="${semc.application.caps}"/>
            <env key="SDKDRIVE" value="${sdkdrive}"/>
            <env key="EPOCROOT" value="${epocroot}"/>
            <env key="Path" value="${epocpath}"/>
        </exec>
    </target>
    <target name="semc-do-run" if="semc-platform.trigger" description="Prepare log folders, copy necessary files">
        <copy todir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
        </copy>
        <mkdir dir="${platform.home}/epoc32/winscw/c/logs/j9vm"/>
        <epocinipath file="${platform.home}/epoc32/data/epoc.ini"/>
        <exec executable="${platform.home}/epoc32/release/winscw/udeb/epoc.exe">
            <env key="SDKDRIVE" value="${sdkdrive}"/>
            <env key="EPOCROOT" value="${epocroot}"/>
            <env key="Path" value="${epocpath}"/>
        </exec>
    </target>
    <!--semc-run-->
    <target name="semc-run" depends="semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/>
    <!--savaje-run-->
    <target name="savaje-run" if="savaje-platform.trigger">
        <sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
        </sunEmulatorExec>
    </target>
    <!--sjmc-run-->
    <target name="sjmc-run" if="sjmc-platform.trigger">
        <taskdef name="sjmcEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.sjmc.SJMCToolkitEmulatorExecTask" classpath="${libs.sjmc-ant-utils.classpath}"/>
        <sjmcEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
        </sjmcEmulatorExec>
    </target>
    <!--ojec-run-->
    <target name="ojec-run" if="ojec-platform.trigger">
        <taskdef name="ojecEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.ojec.OJECToolkitEmulatorExecTask" classpath="${libs.ojec-ant-utils.classpath}"/>
        <ojecEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
        </ojecEmulatorExec>
    </target>
    <!--nokiaS80-run-->
    <target name="nokiaS80-run" if="nokiaS80-platform.trigger">
        <mkdir dir="${platform.home}/epoc32/wins/c/PP_Applications"/>
        <mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/>
        <taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/>
        <nokiaexec jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}">
            <fileset dir="${dist.dir}">
                <exclude name="javadoc/**"/>
            </fileset>
        </nokiaexec>
    </target>
    <!--cdc-hi-run-->
    <target name="-pre-cdc-hi-run" if="cdc-hi-platform.trigger"/>
    <target name="-cdc-hi-run" if="cdc-hi-platform.trigger">
        <fail message="Main class is not set!">
            <condition>
                <equals arg1="${main.class}" arg2=""/>
            </condition>
        </fail>
        <exec executable="${platform.home}/bin/emulator">
            <arg value="-cp"/>
            <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
            <arg value="-Xdevice:${platform.device}"/>
            <arg value="${run.cmd.options}"/>
            <arg value="-Xmain:${main.class}"/>
            <arg value="${application.args}"/>
        </exec>
    </target>
    <target name="-post-cdc-hi-run" if="cdc-hi-platform.trigger"/>
    <target name="cdc-hi-run" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-run, -cdc-hi-run, -post-cdc-hi-run"/>
    <!--open-profiler-->
    <target name="profiler.check">
        <condition property="profiler.allowed">
            <and>
                <not>
                    <isset property="bdj-platform.trigger"/>
                </not>
                <isset property="netbeans.home"/>
                <isset property="is.mesdk_profiler"/>
            </and>
        </condition>
    </target>
    <target name="open-profiler" description="Open profiler snapshot" depends="profiler.check" if="profiler.allowed">
        <openprofiler device="${platform.device}"/>
    </target>
    <!--run-->
    <target name="pre-run"/>
    <target name="run" depends="jar,pre-run,open-netmon,cldc-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,cdc-hi-run,open-profiler" description="Run MIDlet suite."/>
    <target name="run-no-build" depends="init,pre-run,open-netmon,cldc-run,semc-run,savaje-run,sjmc-run,ojec-run,nokiaS80-run,cdc-hi-run,open-profiler" description="Quick Run already built MIDlet suite."/>
    <!--cldc-debug-->
    <target name="cldc-debug" if="cldc-platform.trigger">
        <parallel>
            <nb-run debug="true" debugsuspend="true" debugserver="true" debuggeraddressproperty="jpda.port" platformtype="${platform.type}" platformhome="${platform.home}" device="${platform.device}" jadfile="${dist.dir}/${dist.jad}" jadurl="${dist.jad.url}" jarfile="${dist.dir}/${dist.jar}" execmethod="${run.method}" securitydomain="${evaluated.run.security.domain}" commandline="${platform.debugcommandline}" classpath="${platform.bootclasspath}:${dist.dir}/${dist.jar}" cmdoptions="${run.cmd.options}"/>
            <sequential>
                <sleep seconds="5"/>
                <antcall target="nbdebug"/>
            </sequential>
        </parallel>
    </target>
    <!--semc-debug-->
    <!--semc-build-j9-debug-->
    <target name="semc-build-j9-debug" if="semc-platform.trigger">
        <fail message="Main class is not set!">
            <condition>
                <equals arg1="${main.class}" arg2=""/>
            </condition>
        </fail>
        <j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="${semc.application.uid}" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
    </target>
    <target name="semc-debug-start" if="semc-platform.trigger">
        <nbjpdastart transport="dt_socket" addressproperty="jpda.port" name="${main.class}">
            <classpath>
                <path path="${build.classes.dir}"/>
            </classpath>
            <bootclasspath>
                <path path="${platform.bootclasspath}"/>
            </bootclasspath>
        </nbjpdastart>
    </target>
    <target name="semc-debug" depends="semc-debug-start,semc-build-j9-debug,semc-icon-assembly,semc-ppro-emulator,semc-do-run" if="semc-platform.trigger"/>
    <!--savaje-debug-->
    <target name="savaje-debug" if="savaje-platform.trigger">
        <parallel>
            <sunEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port">
                <fileset dir="${dist.dir}">
                    <exclude name="javadoc/**"/>
                </fileset>
            </sunEmulatorExec>
            <sequential>
                <sleep seconds="5"/>
                <antcall target="nbdebug"/>
            </sequential>
        </parallel>
    </target>
    <!--sjmc-debug-->
    <target name="sjmc-debug" if="sjmc-platform.trigger">
        <taskdef name="sjmcEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.sjmc.SJMCToolkitEmulatorExecTask" classpath="${libs.sjmc-ant-utils.classpath}"/>
        <parallel>
            <sjmcEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port">
                <fileset dir="${dist.dir}">
                    <exclude name="javadoc/**"/>
                </fileset>
            </sjmcEmulatorExec>
            <sequential>
                <sleep seconds="1"/>
                <antcall target="nbdebug"/>
            </sequential>
        </parallel>
    </target>
    <!--ojec-debug-->
    <target name="ojec-debug" if="ojec-platform.trigger">
        <taskdef name="ojecEmulatorExec" classname="org.netbeans.modules.j2me.cdc.project.ojec.OJECToolkitEmulatorExecTask" classpath="${libs.ojec-ant-utils.classpath}"/>
        <parallel>
            <ojecEmulatorExec home="${platform.home}" mainclass="${main.class}" args="${application.args}" jvmargs="${run.cmd.options}" device="${platform.device}" profile="${platform.profile}" xlet="${main.class.xlet}" applet="${main.class.applet}" debug="true" debuggeraddressproperty="jpda.port">
                <fileset dir="${dist.dir}">
                    <exclude name="javadoc/**"/>
                </fileset>
            </ojecEmulatorExec>
            <sequential>
                <sleep seconds="1"/>
                <antcall target="nbdebug"/>
            </sequential>
        </parallel>
    </target>
    <!--cdc-hi-debug-->
    <target name="-pre-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
    <target name="-cdc-hi-debug" if="cdc-hi-platform.trigger">
        <taskdef name="freePortRetriever" classname="org.netbeans.modules.j2me.cdc.project.savaje.FreePortRetriever" classpath="${libs.savaje-ant-utils.classpath}"/>
        <freePortRetriever debuggerPortProperty="active.debug.port"/>
        <parallel>
            <exec executable="${platform.home}/bin/emulator">
                <arg value="-cp"/>
                <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
                <arg value="-Xdevice:${platform.device}"/>
                <arg value="-Xmain:${main.class}"/>
                <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
                <arg value="-Xdebug"/>
            </exec>
            <sequential>
                <property name="debug.delay" value="500"/>
                <nb-mobility-debug address="${active.debug.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
            </sequential>
        </parallel>
    </target>
    <target name="-post-cdc-hi-debug" if="cdc-hi-platform.trigger"/>
    <target name="cdc-hi-debug" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug, -cdc-hi-debug, -post-cdc-hi-debug"/>
    <!--nokiaS80-debug-->
    <target name="nokiaS80-debug" if="nokiaS80-platform.trigger">
        <taskdef name="j9builder" classname="org.netbeans.modules.j2me.cdc.project.J9Builder" classpath="${libs.cdc-ant-utils.classpath}"/>
        <j9builder jvmargs="${run.jvmargs} -Xrunjdwp:server=n,address=${jpda.port}" mainclass="${main.class}" args="${application.args}" platform="${platform.type}" home="${platform.home}" dist="${j9.dist}" id="NOKIA" xlet="${main.class.xlet}" applet="${main.class.applet}" jarname="${dist.jar}"/>
        <mkdir dir="${platform.home}/epoc32/wins/c/logs/j9vm"/>
        <taskdef name="nokiaexec" classname="org.netbeans.modules.j2me.cdc.project.nokiaS80.NokiaEmulatorExecTask" classpath="${libs.nokiaS80-ant-utils.classpath}"/>
        <parallel>
            <nokiaexec debug="true" debuggeraddressproperty="jpda.port" jvmargs="${run.jvmargs}" mainclass="${main.class}" args="${application.args}" home="${platform.home}" device="${platform.device}" xlet="${main.class.xlet}" applet="${main.class.applet}">
                <fileset dir="${dist.dir}">
                    <exclude name="javadoc/**"/>
                </fileset>
            </nokiaexec>
            <sequential>
                <sleep seconds="10"/>
                <antcall target="nbdebug"/>
            </sequential>
        </parallel>
    </target>
    <!--debug-->
    <target name="remove-timestamp">
        <delete file="$/.timestamp"/>
    </target>
    <target name="pre-debug"/>
    <target name="debug" description="Debug project." depends="clean,jar,remove-timestamp,pre-debug,cldc-debug,semc-debug,savaje-debug,sjmc-debug,ojec-debug,cdc-hi-debug,nokiaS80-debug"/>
    <target name="nbdebug" description="Start NetBeans debugger" if="netbeans.home">
        <property name="debug.delay" value="5000"/>
        <nb-mobility-debug address="${jpda.port}" name="${app.codename}" delay="${debug.delay}" timeout="${debug.timeout}" period="2000"/>
    </target>
    <target name="debug-run-base" depends="cldc-debug-run,cdc-hi-debug-run"/>
    <target name="-pre-cldc-debug-run" if="cldc-platform.trigger"/>
    <target name="-cldc-debug-run" depends="init,jar" if="cldc-platform.trigger">
        <echo> Starting emulator with port number ${active.debug.port} </echo>
        <exec executable="${platform.home}/bin/emulator">
            <arg value="-Xdescriptor:${basedir}/${dist.dir}/${dist.jad}"/>
            <arg value="-Xdevice:${platform.device}"/>
            <arg value="-Xdebug"/>
            <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
        </exec>
    </target>
    <target name="-post-cldc-debug-run" if="cldc-platform.trigger"/>
    <target name="cldc-debug-run" if="cldc-platform.trigger" depends="-pre-cldc-debug-run, -cldc-debug-run, -post-cldc-debug-run"/>
    <target name="-pre-cdc-hi-debug-run" if="cdc-hi-platform.trigger"/>
    <target name="-cdc-hi-debug-run" depends="init,jar" if="cdc-hi-platform.trigger">
        <fail message="Main class is not set!">
            <condition>
                <equals arg1="${main.class}" arg2=""/>
            </condition>
        </fail>
        <echo> Starting emulator with port number ${active.debug.port} </echo>
        <exec executable="${platform.home}/bin/emulator">
            <arg value="-cp"/>
            <arg value="${basedir}/${dist.dir}/${dist.jar}"/>
            <arg value="-Xdevice:${platform.device}"/>
            <arg value="-Xmain:${main.class}"/>
            <arg value="-Xdebug"/>
            <arg value="-Xrunjdwp:transport=dt_socket,address=${active.debug.port},server=y,suspend=y"/>
        </exec>
    </target>
    <target name="-post-cdc-hi-debug-run" if="cdc-hi-platform.trigger"/>
    <target name="cdc-hi-debug-run" if="cdc-hi-platform.trigger" depends="-pre-cdc-hi-debug-run, -cdc-hi-debug-run, -post-cdc-hi-debug-run"/>
    <!--javadoc-->
    <target name="browse-javadoc" if="netbeans.home" unless="no.javadoc.preview">
        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
    </target>
    <target name="javadoc" depends="preprocess">
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
        <mkdir dir="${dist.javadoc.dir}"/>
        <javadoc source="${javac.source}" destdir="${dist.javadoc.dir}" bootclasspath="${platform.bootclasspath}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" encoding="${javac.encoding}" docencoding="${javac.encoding}" charset="${javac.encoding}">
            <classpath>
                <path path="${libs.classpath}"/>
            </classpath>
            <sourcepath>
                <pathelement location="${buildsystem.baton}"/>
            </sourcepath>
        </javadoc>
        <antcall target="browse-javadoc"/>
    </target>
    <!--clean and build-->
    <target name="rebuild" depends="clean,build" description="Rebuild the application."/>
    <target name="clean-timestamp">
        <delete file="${build.dir}/.timestamp"/>
    </target>
    <target name="clean-preprocessed">
        <delete dir="${preprocessed.dir}"/>
    </target>
    <target name="clean-classes">
        <delete dir="${build.classes.dir}"/>
    </target>
    <target name="clean-obfuscated">
        <delete file="${obfuscator.srcjar}"/>
        <delete file="${obfuscator.destjar}"/>
        <delete dir="${obfuscated.classes.dir}"/>
    </target>
    <target name="clean-preverified">
        <delete dir="${preverify.sources.dir}"/>
        <delete dir="${preverify.classes.dir}"/>
    </target>
    <target name="clean-manifest" if="manifest.build.file">
        <delete file="${manifest.build.file}"/>
    </target>
    <target name="clean-jar">
        <delete file="${dist.dir}/${dist.jar}"/>
    </target>
    <target name="clean-jad">
        <delete file="${dist.dir}/${dist.jad}"/>
    </target>
    <target name="clean-javadoc">
        <delete dir="${dist.javadoc.dir}"/>
    </target>
    <target name="clean-j9" if="j9.dist">
        <delete file="${j9.dist}"/>
    </target>
    <target name="clean-semc" if="semc-platform.trigger">
        <delete dir="${dist.dir}" includes="*.sis,*.SIS"/>
        <delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/win32/PProLauncher${semc.application.uid}"/>
        <delete dir="${platform.home}/epoc32/tools/ppro-custom-launcher/output/arm/PProLauncher${semc.application.uid}"/>
        <delete file="${platform.home}/epoc32/release/winscw/udeb/PProLauncher${semc.application.uid}.exe"/>
        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/>
        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/>
        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/>
        <delete file="${platform.home}/epoc32/release/winscw/udeb/z/Resource/Apps/${semc.application.uid}.mbm"/>
        <delete file="${platform.home}/epoc32/data/Z/private/10003a3f/apps/PProLauncher${semc.application.uid}_reg.rsc"/>
        <delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}.rsc"/>
        <delete file="${platform.home}/epoc32/data/Z/Resource/Apps/PProLauncher${semc.application.uid}_loc.R01"/>
        <delete dir="${platform.home}/epoc32/winscw/C/private/${semc.application.uid}"/>
    </target>
    <target name="clean-savaje" if="savaje-platform.trigger">
        <delete dir="${build.dir}/jnlp"/>
        <delete file="${dist.dir}/bundle.jnlp"/>
        <delete file="${dist.dir}/bundle.policy"/>
        <delete dir="${dist.dir}/lib"/>
    </target>
    <target name="clean-sjmc" if="sjmc-platform.trigger">
        <delete dir="${dist.dir}/lib"/>
    </target>
    <target name="clean-ojec" if="ojec-platform.trigger">
        <delete dir="${dist.dir}/lib"/>
    </target>
    <!--clean-->
    <target name="pre-clean"/>
    <target name="post-clean"/>
    <target name="-clean-configuration">
        <condition property="can.clean.config.completely">
            <not>
                <equals arg1="${config.active}" arg2="" trim="true"/>
            </not>
        </condition>
    </target>
    <target name="-clean-configuration-root" depends="-clean-configuration" if="can.clean.config.completely">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
        <available property="dist.dir.exists" file="dist"/>
        <condition property="dist.dir.empty">
            <and>
                <isset property="dist.dir.exists"/>
                <resourcecount count="0">
                    <fileset dir="dist"/>
                </resourcecount>
            </and>
        </condition>
    </target>
    <target name="-clean-default-configuration-root" depends="-clean-configuration" unless="can.clean.config.completely">
        <tempfile deleteonexit="true" property="tmp.exclude" prefix="convert"/>
        <echo file="${tmp.exclude}">${all.configurations}</echo>
        <replaceregexp file="${tmp.exclude}" match="(.)(,|$)" replace="\1/**\2" flags="g"/>
        <loadfile srcfile="${tmp.exclude}" property="exclude.pattern"/>
        <delete file="${tmp.exclude}"/>
        <delete quiet="true">
            <fileset dir="${build.dir}" excludes="${exclude.pattern}"/>
        </delete>
        <delete quiet="true">
            <fileset dir="${dist.dir}" excludes="${exclude.pattern}"/>
        </delete>
        <delete quiet="true">
            <fileset dir="${dist.dir}/lib"/>
        </delete>
        <available property="dist.dir.exists" file="dist"/>
        <condition property="dist.dir.empty">
            <and>
                <isset property="dist.dir.exists"/>
                <resourcecount count="0">
                    <fileset dir="dist"/>
                </resourcecount>
            </and>
        </condition>
    </target>
    <target name="-clean-completely" if="dist.dir.empty">
        <delete dir="build" quiet="true"/>
        <delete dir="dist" quiet="true"/>
    </target>
    <target name="do-clean" depends="pre-clean,clean-timestamp,clean-preprocessed,clean-classes,clean-obfuscated,clean-preverified,clean-manifest,clean-jar,clean-jad,clean-javadoc,clean-j9,clean-semc,clean-savaje,clean-sjmc,clean-ojec,-clean-default-configuration-root,-clean-configuration-root,-clean-completely,post-clean"/>
    <target name="clean" depends="conditional-clean" if="no.clean.before.build" description="Clean build products.">
        <antcall target="do-clean" inheritall="true" inheritrefs="true"/>
    </target>
    <!--deploy-->
    <target name="pre-deploy"/>
    <target name="do-deploy" if="deployment.method" unless="skip.deployment">
        <fail unless="deployment.scriptfile">Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment.</fail>
        <ant antfile="${deployment.scriptfile}" inheritall="true" inheritrefs="true"/>
        <antcall target="post-deploy" inheritall="true" inheritrefs="true"/>
    </target>
    <target name="post-deploy"/>
    <target name="deploy" depends="build,pre-deploy,do-deploy,post-deploy"/>
    <!--for-all-configs targets-->
    <target name="for-all-configs" depends="load-properties">
        <fail unless="libs.ant-contrib.classpath">Classpath to Ant Contrib library (libs.ant-contrib.classpath property) is not set.</fail>
        <property name="selected.configurations" value="${all.configurations}"/>
        <taskdef resource="net/sf/antcontrib/antlib.xml">
            <classpath>
                <pathelement path="${libs.ant-contrib.classpath}"/>
            </classpath>
        </taskdef>
        <for list="${selected.configurations}" param="cfg" keepgoing="true" trim="true">
            <sequential>
                <echo>Active project configuration: @{cfg}</echo>
                <antcall target="${target.to.call}" inheritall="false" inheritrefs="false">
                    <param name="config.active" value="@{cfg}"/>
                    <propertyset>
                        <propertyref name="no.deps"/>
                    </propertyset>
                </antcall>
                <property name="no.deps" value="true"/>
            </sequential>
        </for>
    </target>
    <target name="jar-all">
        <antcall target="for-all-configs">
            <param name="target.to.call" value="jar"/>
        </antcall>
    </target>
    <target name="build-all">
        <antcall target="for-all-configs">
            <param name="target.to.call" value="build"/>
        </antcall>
    </target>
    <target name="javadoc-all">
        <antcall target="for-all-configs">
            <param name="target.to.call" value="javadoc"/>
        </antcall>
    </target>
    <target name="deploy-all">
        <antcall target="for-all-configs">
            <param name="target.to.call" value="deploy"/>
        </antcall>
    </target>
    <target name="rebuild-all">
        <antcall target="for-all-configs">
            <param name="target.to.call" value="rebuild"/>
        </antcall>
    </target>
    <target name="clean-all">
        <property file="nbproject/project.properties"/>
        <fail unless="build.root.dir">Property build.root.dir is not set. By default its value should be \"build\".</fail>
        <fail unless="dist.root.dir">Property dist.root.dir is not set. By default its value should be \"dist\".</fail>
        <antcall target="for-all-configs">
            <param name="target.to.call" value="clean"/>
        </antcall>
    </target>
</project>