|
@@ -19,7 +19,14 @@ is divided into following sections:
|
19
|
19
|
- cleanup
|
20
|
20
|
|
21
|
21
|
-->
|
22
|
|
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" 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="CardGame-impl">
|
|
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="CardGame-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
|
======================
|
|
@@ -152,10 +159,18 @@ is divided into following sections:
|
152
|
159
|
<attribute default="${includes}" name="includes"/>
|
153
|
160
|
<attribute default="${excludes}" name="excludes"/>
|
154
|
161
|
<attribute default="${javac.debug}" name="debug"/>
|
155
|
|
- <attribute default="" name="sourcepath"/>
|
|
162
|
+ <attribute default="${empty.dir}" name="sourcepath"/>
|
|
163
|
+ <attribute default="${empty.dir}" name="gensrcdir"/>
|
156
|
164
|
<element name="customize" optional="true"/>
|
157
|
165
|
<sequential>
|
|
166
|
+ <property location="${build.dir}/empty" name="empty.dir"/>
|
|
167
|
+ <mkdir dir="${empty.dir}"/>
|
158
|
168
|
<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}">
|
|
169
|
+ <src>
|
|
170
|
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
|
171
|
+ <include name="*"/>
|
|
172
|
+ </dirset>
|
|
173
|
+ </src>
|
159
|
174
|
<classpath>
|
160
|
175
|
<path path="@{classpath}"/>
|
161
|
176
|
</classpath>
|
|
@@ -218,13 +233,13 @@ is divided into following sections:
|
218
|
233
|
</sequential>
|
219
|
234
|
</macrodef>
|
220
|
235
|
</target>
|
221
|
|
- <target name="-init-macrodef-nbjpda">
|
|
236
|
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
222
|
237
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
223
|
238
|
<attribute default="${main.class}" name="name"/>
|
224
|
239
|
<attribute default="${debug.classpath}" name="classpath"/>
|
225
|
240
|
<attribute default="" name="stopclassname"/>
|
226
|
241
|
<sequential>
|
227
|
|
- <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
|
|
242
|
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
|
228
|
243
|
<classpath>
|
229
|
244
|
<path path="@{classpath}"/>
|
230
|
245
|
</classpath>
|
|
@@ -235,7 +250,9 @@ is divided into following sections:
|
235
|
250
|
<attribute default="${build.classes.dir}" name="dir"/>
|
236
|
251
|
<sequential>
|
237
|
252
|
<nbjpdareload>
|
238
|
|
- <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
|
|
253
|
+ <fileset dir="@{dir}" includes="${fix.classes}">
|
|
254
|
+ <include name="${fix.includes}*.class"/>
|
|
255
|
+ </fileset>
|
239
|
256
|
</nbjpdareload>
|
240
|
257
|
</sequential>
|
241
|
258
|
</macrodef>
|
|
@@ -253,6 +270,12 @@ is divided into following sections:
|
253
|
270
|
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
|
254
|
271
|
<istrue value="${have-jdk-older-than-1.4}"/>
|
255
|
272
|
</condition>
|
|
273
|
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
|
|
274
|
+ <os family="windows"/>
|
|
275
|
+ </condition>
|
|
276
|
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
|
|
277
|
+ <isset property="debug.transport"/>
|
|
278
|
+ </condition>
|
256
|
279
|
</target>
|
257
|
280
|
<target depends="-init-debug-args" name="-init-macrodef-debug">
|
258
|
281
|
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
|
@@ -262,7 +285,9 @@ is divided into following sections:
|
262
|
285
|
<sequential>
|
263
|
286
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
264
|
287
|
<jvmarg line="${debug-args-line}"/>
|
265
|
|
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
|
|
288
|
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
|
289
|
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
|
|
290
|
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
|
266
|
291
|
<jvmarg line="${run.jvmargs}"/>
|
267
|
292
|
<classpath>
|
268
|
293
|
<path path="@{classpath}"/>
|
|
@@ -279,12 +304,15 @@ is divided into following sections:
|
279
|
304
|
<target name="-init-macrodef-java">
|
280
|
305
|
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
281
|
306
|
<attribute default="${main.class}" name="classname"/>
|
|
307
|
+ <attribute default="${run.classpath}" name="classpath"/>
|
282
|
308
|
<element name="customize" optional="true"/>
|
283
|
309
|
<sequential>
|
284
|
310
|
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
|
311
|
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
|
|
312
|
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
|
285
|
313
|
<jvmarg line="${run.jvmargs}"/>
|
286
|
314
|
<classpath>
|
287
|
|
- <path path="${run.classpath}"/>
|
|
315
|
+ <path path="@{classpath}"/>
|
288
|
316
|
</classpath>
|
289
|
317
|
<syspropertyset>
|
290
|
318
|
<propertyref prefix="run-sys-prop."/>
|
|
@@ -309,6 +337,13 @@ is divided into following sections:
|
309
|
337
|
===================
|
310
|
338
|
-->
|
311
|
339
|
<target depends="init" name="deps-jar" unless="no.deps"/>
|
|
340
|
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
|
|
341
|
+ <target depends="init" name="-check-automatic-build">
|
|
342
|
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
|
|
343
|
+ </target>
|
|
344
|
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
|
|
345
|
+ <antcall target="clean"/>
|
|
346
|
+ </target>
|
312
|
347
|
<target depends="init,deps-jar" name="-pre-pre-compile">
|
313
|
348
|
<mkdir dir="${build.classes.dir}"/>
|
314
|
349
|
</target>
|
|
@@ -317,10 +352,15 @@ is divided into following sections:
|
317
|
352
|
<!-- You can override this target in the ../build.xml file. -->
|
318
|
353
|
</target>
|
319
|
354
|
<target if="do.depend.true" name="-compile-depend">
|
320
|
|
- <j2seproject3:depend/>
|
|
355
|
+ <pathconvert property="build.generated.subdirs">
|
|
356
|
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
|
357
|
+ <include name="*"/>
|
|
358
|
+ </dirset>
|
|
359
|
+ </pathconvert>
|
|
360
|
+ <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
|
321
|
361
|
</target>
|
322
|
362
|
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
|
323
|
|
- <j2seproject3:javac/>
|
|
363
|
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
|
324
|
364
|
<copy todir="${build.classes.dir}">
|
325
|
365
|
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
326
|
366
|
</copy>
|
|
@@ -329,7 +369,7 @@ is divided into following sections:
|
329
|
369
|
<!-- Empty placeholder for easier customization. -->
|
330
|
370
|
<!-- You can override this target in the ../build.xml file. -->
|
331
|
371
|
</target>
|
332
|
|
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
|
|
372
|
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
|
333
|
373
|
<target name="-pre-compile-single">
|
334
|
374
|
<!-- Empty placeholder for easier customization. -->
|
335
|
375
|
<!-- You can override this target in the ../build.xml file. -->
|
|
@@ -337,13 +377,13 @@ is divided into following sections:
|
337
|
377
|
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
|
338
|
378
|
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
339
|
379
|
<j2seproject3:force-recompile/>
|
340
|
|
- <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
|
|
380
|
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
|
341
|
381
|
</target>
|
342
|
382
|
<target name="-post-compile-single">
|
343
|
383
|
<!-- Empty placeholder for easier customization. -->
|
344
|
384
|
<!-- You can override this target in the ../build.xml file. -->
|
345
|
385
|
</target>
|
346
|
|
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
|
386
|
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
347
|
387
|
<!--
|
348
|
388
|
====================
|
349
|
389
|
JAR BUILDING SECTION
|
|
@@ -403,11 +443,29 @@ is divided into following sections:
|
403
|
443
|
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
404
|
444
|
<echo>java -jar "${dist.jar.resolved}"</echo>
|
405
|
445
|
</target>
|
|
446
|
+ <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">
|
|
447
|
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
|
448
|
+ <pathconvert property="run.classpath.without.build.classes.dir">
|
|
449
|
+ <path path="${run.classpath}"/>
|
|
450
|
+ <map from="${build.classes.dir.resolved}" to=""/>
|
|
451
|
+ </pathconvert>
|
|
452
|
+ <pathconvert pathsep=" " property="jar.classpath">
|
|
453
|
+ <path path="${run.classpath.without.build.classes.dir}"/>
|
|
454
|
+ <chainedmapper>
|
|
455
|
+ <flattenmapper/>
|
|
456
|
+ <globmapper from="*" to="lib/*"/>
|
|
457
|
+ </chainedmapper>
|
|
458
|
+ </pathconvert>
|
|
459
|
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
|
|
460
|
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
|
|
461
|
+ <fileset dir="${build.classes.dir}"/>
|
|
462
|
+ </copylibs>
|
|
463
|
+ </target>
|
406
|
464
|
<target name="-post-jar">
|
407
|
465
|
<!-- Empty placeholder for easier customization. -->
|
408
|
466
|
<!-- You can override this target in the ../build.xml file. -->
|
409
|
467
|
</target>
|
410
|
|
- <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"/>
|
|
468
|
+ <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"/>
|
411
|
469
|
<!--
|
412
|
470
|
=================
|
413
|
471
|
EXECUTION SECTION
|
|
@@ -427,6 +485,10 @@ is divided into following sections:
|
427
|
485
|
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
428
|
486
|
<j2seproject1:java classname="${run.class}"/>
|
429
|
487
|
</target>
|
|
488
|
+ <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
|
|
489
|
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
|
490
|
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
|
|
491
|
+ </target>
|
430
|
492
|
<!--
|
431
|
493
|
=================
|
432
|
494
|
DEBUGGING SECTION
|
|
@@ -435,6 +497,9 @@ is divided into following sections:
|
435
|
497
|
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
436
|
498
|
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
437
|
499
|
</target>
|
|
500
|
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
|
|
501
|
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
|
|
502
|
+ </target>
|
438
|
503
|
<target depends="init,compile" name="-debug-start-debuggee">
|
439
|
504
|
<j2seproject3:debug>
|
440
|
505
|
<customize>
|
|
@@ -452,6 +517,11 @@ is divided into following sections:
|
452
|
517
|
<j2seproject3:debug classname="${debug.class}"/>
|
453
|
518
|
</target>
|
454
|
519
|
<target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
|
|
520
|
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
|
|
521
|
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
|
522
|
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
|
|
523
|
+ </target>
|
|
524
|
+ <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"/>
|
455
|
525
|
<target depends="init" name="-pre-debug-fix">
|
456
|
526
|
<fail unless="fix.includes">Must set fix.includes</fail>
|
457
|
527
|
<property name="javac.includes" value="${fix.includes}.java"/>
|
|
@@ -474,6 +544,9 @@ is divided into following sections:
|
474
|
544
|
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
475
|
545
|
<filename name="**/*.java"/>
|
476
|
546
|
</fileset>
|
|
547
|
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
|
548
|
+ <include name="**/*.java"/>
|
|
549
|
+ </fileset>
|
477
|
550
|
</javadoc>
|
478
|
551
|
</target>
|
479
|
552
|
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
|
|
@@ -535,7 +608,7 @@ is divided into following sections:
|
535
|
608
|
<j2seproject3:junit testincludes="**/*Test.java"/>
|
536
|
609
|
</target>
|
537
|
610
|
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
538
|
|
- <fail if="tests.failed">Some tests failed; see details above.</fail>
|
|
611
|
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
539
|
612
|
</target>
|
540
|
613
|
<target depends="init" if="have.tests" name="test-report"/>
|
541
|
614
|
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
|
|
@@ -548,7 +621,7 @@ is divided into following sections:
|
548
|
621
|
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
549
|
622
|
</target>
|
550
|
623
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
551
|
|
- <fail if="tests.failed">Some tests failed; see details above.</fail>
|
|
624
|
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
|
552
|
625
|
</target>
|
553
|
626
|
<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"/>
|
554
|
627
|
<!--
|