|
@@ -20,6 +20,13 @@ is divided into following sections:
|
20
|
20
|
|
21
|
21
|
-->
|
22
|
22
|
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="charliebravo-impl">
|
|
23
|
+ <fail message="Please build using Ant 1.7.1 or higher.">
|
|
24
|
+ <condition>
|
|
25
|
+ <not>
|
|
26
|
+ <antversion atleast="1.7.1"/>
|
|
27
|
+ </not>
|
|
28
|
+ </condition>
|
|
29
|
+ </fail>
|
23
|
30
|
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
24
|
31
|
<!--
|
25
|
32
|
======================
|
|
@@ -71,6 +78,7 @@ is divided into following sections:
|
71
|
78
|
<condition property="have.sources">
|
72
|
79
|
<or>
|
73
|
80
|
<available file="${src.src4.dir}"/>
|
|
81
|
+ <available file="${src.java.dir}"/>
|
74
|
82
|
<available file="${src.src3.dir}"/>
|
75
|
83
|
<available file="${src.src2.dir}"/>
|
76
|
84
|
<available file="${src.src.dir}"/>
|
|
@@ -129,6 +137,7 @@ is divided into following sections:
|
129
|
137
|
</target>
|
130
|
138
|
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
|
131
|
139
|
<fail unless="src.src4.dir">Must set src.src4.dir</fail>
|
|
140
|
+ <fail unless="src.java.dir">Must set src.java.dir</fail>
|
132
|
141
|
<fail unless="src.src3.dir">Must set src.src3.dir</fail>
|
133
|
142
|
<fail unless="src.src2.dir">Must set src.src2.dir</fail>
|
134
|
143
|
<fail unless="src.src.dir">Must set src.src.dir</fail>
|
|
@@ -154,16 +163,24 @@ is divided into following sections:
|
154
|
163
|
</target>
|
155
|
164
|
<target name="-init-macrodef-javac">
|
156
|
165
|
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
157
|
|
- <attribute default="${src.src4.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}" name="srcdir"/>
|
|
166
|
+ <attribute default="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}" name="srcdir"/>
|
158
|
167
|
<attribute default="${build.classes.dir}" name="destdir"/>
|
159
|
168
|
<attribute default="${javac.classpath}" name="classpath"/>
|
160
|
169
|
<attribute default="${includes}" name="includes"/>
|
161
|
170
|
<attribute default="${excludes}" name="excludes"/>
|
162
|
171
|
<attribute default="${javac.debug}" name="debug"/>
|
163
|
|
- <attribute default="/does/not/exist" name="sourcepath"/>
|
|
172
|
+ <attribute default="${empty.dir}" name="sourcepath"/>
|
|
173
|
+ <attribute default="${empty.dir}" name="gensrcdir"/>
|
164
|
174
|
<element name="customize" optional="true"/>
|
165
|
175
|
<sequential>
|
|
176
|
+ <property location="${build.dir}/empty" name="empty.dir"/>
|
|
177
|
+ <mkdir dir="${empty.dir}"/>
|
166
|
178
|
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
|
|
179
|
+ <src>
|
|
180
|
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
|
181
|
+ <include name="*"/>
|
|
182
|
+ </dirset>
|
|
183
|
+ </src>
|
167
|
184
|
<classpath>
|
168
|
185
|
<path path="@{classpath}"/>
|
169
|
186
|
</classpath>
|
|
@@ -173,7 +190,7 @@ is divided into following sections:
|
173
|
190
|
</sequential>
|
174
|
191
|
</macrodef>
|
175
|
192
|
<macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
|
176
|
|
- <attribute default="${src.src4.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}" name="srcdir"/>
|
|
193
|
+ <attribute default="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}" name="srcdir"/>
|
177
|
194
|
<attribute default="${build.classes.dir}" name="destdir"/>
|
178
|
195
|
<attribute default="${javac.classpath}" name="classpath"/>
|
179
|
196
|
<sequential>
|
|
@@ -279,6 +296,8 @@ is divided into following sections:
|
279
|
296
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
280
|
297
|
<jvmarg line="${debug-args-line}"/>
|
281
|
298
|
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
|
299
|
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
|
|
300
|
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
|
282
|
301
|
<jvmarg line="${run.jvmargs}"/>
|
283
|
302
|
<classpath>
|
284
|
303
|
<path path="@{classpath}"/>
|
|
@@ -295,12 +314,15 @@ is divided into following sections:
|
295
|
314
|
<target name="-init-macrodef-java">
|
296
|
315
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
297
|
316
|
<attribute default="${main.class}" name="classname"/>
|
|
317
|
+ <attribute default="${run.classpath}" name="classpath"/>
|
298
|
318
|
<element name="customize" optional="true"/>
|
299
|
319
|
<sequential>
|
300
|
320
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
|
321
|
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
|
|
322
|
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
|
301
|
323
|
<jvmarg line="${run.jvmargs}"/>
|
302
|
324
|
<classpath>
|
303
|
|
- <path path="${run.classpath}"/>
|
|
325
|
+ <path path="@{classpath}"/>
|
304
|
326
|
</classpath>
|
305
|
327
|
<syspropertyset>
|
306
|
328
|
<propertyref prefix="run-sys-prop."/>
|
|
@@ -340,12 +362,18 @@ is divided into following sections:
|
340
|
362
|
<!-- You can override this target in the ../build.xml file. -->
|
341
|
363
|
</target>
|
342
|
364
|
<target if="do.depend.true" name="-compile-depend">
|
343
|
|
- <j2seproject3:depend/>
|
|
365
|
+ <pathconvert property="build.generated.subdirs">
|
|
366
|
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
|
367
|
+ <include name="*"/>
|
|
368
|
+ </dirset>
|
|
369
|
+ </pathconvert>
|
|
370
|
+ <j2seproject3:depend srcdir="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}:${build.generated.subdirs}"/>
|
344
|
371
|
</target>
|
345
|
372
|
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
|
346
|
|
- <j2seproject3:javac/>
|
|
373
|
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
|
347
|
374
|
<copy todir="${build.classes.dir}">
|
348
|
375
|
<fileset dir="${src.src4.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
|
376
|
+ <fileset dir="${src.java.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
349
|
377
|
<fileset dir="${src.src3.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
350
|
378
|
<fileset dir="${src.src2.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
351
|
379
|
<fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
|
@@ -364,7 +392,7 @@ is divided into following sections:
|
364
|
392
|
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
|
365
|
393
|
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
366
|
394
|
<j2seproject3:force-recompile/>
|
367
|
|
- <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.src4.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}"/>
|
|
395
|
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}"/>
|
368
|
396
|
</target>
|
369
|
397
|
<target name="-post-compile-single">
|
370
|
398
|
<!-- Empty placeholder for easier customization. -->
|
|
@@ -430,11 +458,29 @@ is divided into following sections:
|
430
|
458
|
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
431
|
459
|
<echo>java -jar "${dist.jar.resolved}"</echo>
|
432
|
460
|
</target>
|
|
461
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
|
|
462
|
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
|
463
|
+ <pathconvert property="run.classpath.without.build.classes.dir">
|
|
464
|
+ <path path="${run.classpath}"/>
|
|
465
|
+ <map from="${build.classes.dir.resolved}" to=""/>
|
|
466
|
+ </pathconvert>
|
|
467
|
+ <pathconvert pathsep=" " property="jar.classpath">
|
|
468
|
+ <path path="${run.classpath.without.build.classes.dir}"/>
|
|
469
|
+ <chainedmapper>
|
|
470
|
+ <flattenmapper/>
|
|
471
|
+ <globmapper from="*" to="lib/*"/>
|
|
472
|
+ </chainedmapper>
|
|
473
|
+ </pathconvert>
|
|
474
|
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
|
|
475
|
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
|
|
476
|
+ <fileset dir="${build.classes.dir}"/>
|
|
477
|
+ </copylibs>
|
|
478
|
+ </target>
|
433
|
479
|
<target name="-post-jar">
|
434
|
480
|
<!-- Empty placeholder for easier customization. -->
|
435
|
481
|
<!-- You can override this target in the ../build.xml file. -->
|
436
|
482
|
</target>
|
437
|
|
- <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
|
|
483
|
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
|
438
|
484
|
<!--
|
439
|
485
|
=================
|
440
|
486
|
EXECUTION SECTION
|
|
@@ -454,6 +500,10 @@ is divided into following sections:
|
454
|
500
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
455
|
501
|
<j2seproject1:java classname="${run.class}"/>
|
456
|
502
|
</target>
|
|
503
|
+ <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
|
|
504
|
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
|
505
|
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
|
|
506
|
+ </target>
|
457
|
507
|
<!--
|
458
|
508
|
=================
|
459
|
509
|
DEBUGGING SECTION
|
|
@@ -462,6 +512,9 @@ is divided into following sections:
|
462
|
512
|
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
463
|
513
|
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
464
|
514
|
</target>
|
|
515
|
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
|
|
516
|
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
|
|
517
|
+ </target>
|
465
|
518
|
<target depends="init,compile" name="-debug-start-debuggee">
|
466
|
519
|
<j2seproject3:debug>
|
467
|
520
|
<customize>
|
|
@@ -479,6 +532,11 @@ is divided into following sections:
|
479
|
532
|
<j2seproject3:debug classname="${debug.class}"/>
|
480
|
533
|
</target>
|
481
|
534
|
<target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
|
|
535
|
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
|
|
536
|
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
|
537
|
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
|
|
538
|
+ </target>
|
|
539
|
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
|
482
|
540
|
<target depends="init" name="-pre-debug-fix">
|
483
|
541
|
<fail unless="fix.includes">Must set fix.includes</fail>
|
484
|
542
|
<property name="javac.includes" value="${fix.includes}.java"/>
|
|
@@ -501,6 +559,9 @@ is divided into following sections:
|
501
|
559
|
<fileset dir="${src.src4.dir}" excludes="${excludes}" includes="${includes}">
|
502
|
560
|
<filename name="**/*.java"/>
|
503
|
561
|
</fileset>
|
|
562
|
+ <fileset dir="${src.java.dir}" excludes="${excludes}" includes="${includes}">
|
|
563
|
+ <filename name="**/*.java"/>
|
|
564
|
+ </fileset>
|
504
|
565
|
<fileset dir="${src.src3.dir}" excludes="${excludes}" includes="${includes}">
|
505
|
566
|
<filename name="**/*.java"/>
|
506
|
567
|
</fileset>
|
|
@@ -513,6 +574,9 @@ is divided into following sections:
|
513
|
574
|
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
514
|
575
|
<filename name="**/*.java"/>
|
515
|
576
|
</fileset>
|
|
577
|
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
|
578
|
+ <include name="**/*.java"/>
|
|
579
|
+ </fileset>
|
516
|
580
|
</javadoc>
|
517
|
581
|
</target>
|
518
|
582
|
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
|
|
@@ -574,7 +638,7 @@ is divided into following sections:
|
574
|
638
|
<j2seproject3:junit testincludes="**/*Test.java"/>
|
575
|
639
|
</target>
|
576
|
640
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
577
|
|
- <fail if="tests.failed">Some tests failed; see details above.</fail>
|
|
641
|
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
578
|
642
|
</target>
|
579
|
643
|
<target depends="init" if="have.tests" name="test-report"/>
|
580
|
644
|
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
|
|
@@ -587,7 +651,7 @@ is divided into following sections:
|
587
|
651
|
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
588
|
652
|
</target>
|
589
|
653
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
590
|
|
- <fail if="tests.failed">Some tests failed; see details above.</fail>
|
|
654
|
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
591
|
655
|
</target>
|
592
|
656
|
<target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
593
|
657
|
<!--
|