parallel connection testing: avoid deadlocks – preload drivers + better exception handling and logging
1 <?xml version="1.0" encoding="UTF-8"?>
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
4 *** EDIT ../build.xml INSTEAD ***
6 For the purpose of easier reading the script
7 is divided into following sections:
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="jdbc-dk-driver-impl">
23 <fail message="Please build using Ant 1.8.0 or higher.">
26 <antversion atleast="1.8.0"/>
30 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
32 ======================
33 INITIALIZATION SECTION
34 ======================
36 <target name="-pre-init">
37 <!-- Empty placeholder for easier customization. -->
38 <!-- You can override this target in the ../build.xml file. -->
40 <target depends="-pre-init" name="-init-private">
41 <property file="nbproject/private/config.properties"/>
42 <property file="nbproject/private/configs/${config}.properties"/>
43 <property file="nbproject/private/private.properties"/>
45 <target depends="-pre-init,-init-private" name="-init-user">
46 <property file="${user.properties.file}"/>
47 <!-- The two properties below are usually overridden -->
48 <!-- by the active platform. Just a fallback. -->
49 <property name="default.javac.source" value="1.4"/>
50 <property name="default.javac.target" value="1.4"/>
52 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
53 <property file="nbproject/configs/${config}.properties"/>
54 <property file="nbproject/project.properties"/>
56 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
57 <property name="platform.java" value="${java.home}/bin/java"/>
58 <available file="${manifest.file}" property="manifest.available"/>
59 <condition property="splashscreen.available">
62 <equals arg1="${application.splash}" arg2="" trim="true"/>
64 <available file="${application.splash}"/>
67 <condition property="main.class.available">
69 <isset property="main.class"/>
71 <equals arg1="${main.class}" arg2="" trim="true"/>
75 <condition property="profile.available">
77 <isset property="javac.profile"/>
78 <length length="0" string="${javac.profile}" when="greater"/>
79 <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
82 <condition property="do.archive">
85 <istrue value="${jar.archive.disabled}"/>
87 <istrue value="${not.archive.disabled}"/>
90 <condition property="do.mkdist">
92 <isset property="do.archive"/>
93 <isset property="libs.CopyLibs.classpath"/>
95 <istrue value="${mkdist.disabled}"/>
99 <condition property="do.archive+manifest.available">
101 <isset property="manifest.available"/>
102 <istrue value="${do.archive}"/>
105 <condition property="do.archive+main.class.available">
107 <isset property="main.class.available"/>
108 <istrue value="${do.archive}"/>
111 <condition property="do.archive+splashscreen.available">
113 <isset property="splashscreen.available"/>
114 <istrue value="${do.archive}"/>
117 <condition property="do.archive+profile.available">
119 <isset property="profile.available"/>
120 <istrue value="${do.archive}"/>
123 <condition property="have.tests">
125 <available file="${test.src.dir}"/>
128 <condition property="have.sources">
130 <available file="${src.conf.dir}"/>
131 <available file="${src.dir}"/>
132 <available file="${src.sql-dk.dir}"/>
135 <condition property="netbeans.home+have.tests">
137 <isset property="netbeans.home"/>
138 <isset property="have.tests"/>
141 <condition property="no.javadoc.preview">
143 <isset property="javadoc.preview"/>
144 <isfalse value="${javadoc.preview}"/>
147 <property name="run.jvmargs" value=""/>
148 <property name="run.jvmargs.ide" value=""/>
149 <property name="javac.compilerargs" value=""/>
150 <property name="work.dir" value="${basedir}"/>
151 <condition property="no.deps">
153 <istrue value="${no.dependencies}"/>
156 <property name="javac.debug" value="true"/>
157 <property name="javadoc.preview" value="true"/>
158 <property name="application.args" value=""/>
159 <property name="source.encoding" value="${file.encoding}"/>
160 <property name="runtime.encoding" value="${source.encoding}"/>
161 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
163 <isset property="javadoc.encoding"/>
165 <equals arg1="${javadoc.encoding}" arg2=""/>
169 <property name="javadoc.encoding.used" value="${source.encoding}"/>
170 <property name="includes" value="**"/>
171 <property name="excludes" value=""/>
172 <property name="do.depend" value="false"/>
173 <condition property="do.depend.true">
174 <istrue value="${do.depend}"/>
176 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
177 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
179 <isset property="endorsed.classpath"/>
181 <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
185 <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
186 <isset property="profile.available"/>
188 <condition else="false" property="jdkBug6558476">
190 <matches pattern="1\.[56]" string="${java.specification.version}"/>
196 <property name="javac.fork" value="${jdkBug6558476}"/>
197 <property name="jar.index" value="false"/>
198 <property name="jar.index.metainf" value="${jar.index}"/>
199 <property name="copylibs.rebase" value="true"/>
200 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
201 <condition property="junit.available">
203 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
204 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
207 <condition property="testng.available">
208 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
210 <condition property="junit+testng.available">
212 <istrue value="${junit.available}"/>
213 <istrue value="${testng.available}"/>
216 <condition else="testng" property="testng.mode" value="mixed">
217 <istrue value="${junit+testng.available}"/>
219 <condition else="" property="testng.debug.mode" value="-mixed">
220 <istrue value="${junit+testng.available}"/>
223 <target name="-post-init">
224 <!-- Empty placeholder for easier customization. -->
225 <!-- You can override this target in the ../build.xml file. -->
227 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
228 <fail unless="src.conf.dir">Must set src.conf.dir</fail>
229 <fail unless="src.dir">Must set src.dir</fail>
230 <fail unless="src.sql-dk.dir">Must set src.sql-dk.dir</fail>
231 <fail unless="test.src.dir">Must set test.src.dir</fail>
232 <fail unless="build.dir">Must set build.dir</fail>
233 <fail unless="dist.dir">Must set dist.dir</fail>
234 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
235 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
236 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
237 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
238 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
239 <fail unless="dist.jar">Must set dist.jar</fail>
241 <target name="-init-macrodef-property">
242 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
243 <attribute name="name"/>
244 <attribute name="value"/>
246 <property name="@{name}" value="${@{value}}"/>
250 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
251 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
252 <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
253 <attribute default="${build.classes.dir}" name="destdir"/>
254 <attribute default="${javac.classpath}" name="classpath"/>
255 <attribute default="${javac.processorpath}" name="processorpath"/>
256 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
257 <attribute default="${includes}" name="includes"/>
258 <attribute default="${excludes}" name="excludes"/>
259 <attribute default="${javac.debug}" name="debug"/>
260 <attribute default="${empty.dir}" name="sourcepath"/>
261 <attribute default="${empty.dir}" name="gensrcdir"/>
262 <element name="customize" optional="true"/>
264 <property location="${build.dir}/empty" name="empty.dir"/>
265 <mkdir dir="${empty.dir}"/>
266 <mkdir dir="@{apgeneratedsrcdir}"/>
267 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
269 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
274 <path path="@{classpath}"/>
276 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
277 <compilerarg line="${javac.profile.cmd.line.arg}"/>
278 <compilerarg line="${javac.compilerargs}"/>
279 <compilerarg value="-processorpath"/>
280 <compilerarg path="@{processorpath}:${empty.dir}"/>
281 <compilerarg line="${ap.processors.internal}"/>
282 <compilerarg line="${annotation.processing.processor.options}"/>
283 <compilerarg value="-s"/>
284 <compilerarg path="@{apgeneratedsrcdir}"/>
285 <compilerarg line="${ap.proc.none.internal}"/>
291 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
292 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
293 <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
294 <attribute default="${build.classes.dir}" name="destdir"/>
295 <attribute default="${javac.classpath}" name="classpath"/>
296 <attribute default="${javac.processorpath}" name="processorpath"/>
297 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
298 <attribute default="${includes}" name="includes"/>
299 <attribute default="${excludes}" name="excludes"/>
300 <attribute default="${javac.debug}" name="debug"/>
301 <attribute default="${empty.dir}" name="sourcepath"/>
302 <attribute default="${empty.dir}" name="gensrcdir"/>
303 <element name="customize" optional="true"/>
305 <property location="${build.dir}/empty" name="empty.dir"/>
306 <mkdir dir="${empty.dir}"/>
307 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
309 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
314 <path path="@{classpath}"/>
316 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
317 <compilerarg line="${javac.profile.cmd.line.arg}"/>
318 <compilerarg line="${javac.compilerargs}"/>
324 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
325 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
326 <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
327 <attribute default="${build.classes.dir}" name="destdir"/>
328 <attribute default="${javac.classpath}" name="classpath"/>
330 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
332 <path path="@{classpath}"/>
337 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
338 <attribute default="${build.classes.dir}" name="destdir"/>
340 <fail unless="javac.includes">Must set javac.includes</fail>
341 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
343 <filelist dir="@{destdir}" files="${javac.includes}"/>
345 <globmapper from="*.java" to="*.class"/>
347 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
348 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
350 <files includesfile="${javac.includesfile.binary}"/>
353 <fileset file="${javac.includesfile.binary}"/>
358 <target if="${junit.available}" name="-init-macrodef-junit-init">
359 <condition else="false" property="nb.junit.batch" value="true">
361 <istrue value="${junit.available}"/>
363 <isset property="test.method"/>
367 <condition else="false" property="nb.junit.single" value="true">
369 <istrue value="${junit.available}"/>
370 <isset property="test.method"/>
374 <target name="-init-test-properties">
375 <property name="test.binaryincludes" value="<nothing>"/>
376 <property name="test.binarytestincludes" value=""/>
377 <property name="test.binaryexcludes" value=""/>
379 <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
380 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
381 <attribute default="${includes}" name="includes"/>
382 <attribute default="${excludes}" name="excludes"/>
383 <attribute default="**" name="testincludes"/>
384 <attribute default="" name="testmethods"/>
385 <element name="customize" optional="true"/>
387 <property name="junit.forkmode" value="perTest"/>
388 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
389 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
391 <propertyref prefix="test-sys-prop."/>
392 <mapper from="test-sys-prop.*" to="*" type="glob"/>
394 <formatter type="brief" usefile="false"/>
395 <formatter type="xml"/>
396 <jvmarg value="-ea"/>
402 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
403 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
404 <attribute default="${includes}" name="includes"/>
405 <attribute default="${excludes}" name="excludes"/>
406 <attribute default="**" name="testincludes"/>
407 <attribute default="" name="testmethods"/>
408 <element name="customize" optional="true"/>
410 <property name="junit.forkmode" value="perTest"/>
411 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
412 <batchtest todir="${build.test.results.dir}">
413 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
414 <filename name="@{testincludes}"/>
416 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
417 <filename name="${test.binarytestincludes}"/>
421 <propertyref prefix="test-sys-prop."/>
422 <mapper from="test-sys-prop.*" to="*" type="glob"/>
424 <formatter type="brief" usefile="false"/>
425 <formatter type="xml"/>
426 <jvmarg value="-ea"/>
432 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
433 <target if="${testng.available}" name="-init-macrodef-testng">
434 <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
435 <attribute default="${includes}" name="includes"/>
436 <attribute default="${excludes}" name="excludes"/>
437 <attribute default="**" name="testincludes"/>
438 <attribute default="" name="testmethods"/>
439 <element name="customize" optional="true"/>
441 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
442 <isset property="test.method"/>
444 <union id="test.set">
445 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
446 <filename name="@{testincludes}"/>
449 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
450 <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="jdbc-dk-driver" testname="TestNG tests" workingDir="${work.dir}">
451 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
453 <propertyref prefix="test-sys-prop."/>
454 <mapper from="test-sys-prop.*" to="*" type="glob"/>
461 <target name="-init-macrodef-test-impl">
462 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
463 <attribute default="${includes}" name="includes"/>
464 <attribute default="${excludes}" name="excludes"/>
465 <attribute default="**" name="testincludes"/>
466 <attribute default="" name="testmethods"/>
467 <element implicit="true" name="customize" optional="true"/>
469 <echo>No tests executed.</echo>
473 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
474 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
475 <attribute default="${includes}" name="includes"/>
476 <attribute default="${excludes}" name="excludes"/>
477 <attribute default="**" name="testincludes"/>
478 <attribute default="" name="testmethods"/>
479 <element implicit="true" name="customize" optional="true"/>
481 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
483 </j2seproject3:junit>
487 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
488 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
489 <attribute default="${includes}" name="includes"/>
490 <attribute default="${excludes}" name="excludes"/>
491 <attribute default="**" name="testincludes"/>
492 <attribute default="" name="testmethods"/>
493 <element implicit="true" name="customize" optional="true"/>
495 <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
497 </j2seproject3:testng>
501 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
502 <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
503 <attribute default="${includes}" name="includes"/>
504 <attribute default="${excludes}" name="excludes"/>
505 <attribute default="**" name="testincludes"/>
506 <attribute default="" name="testmethods"/>
508 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
511 <path path="${run.test.classpath}"/>
513 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
514 <jvmarg line="${run.jvmargs}"/>
515 <jvmarg line="${run.jvmargs.ide}"/>
517 </j2seproject3:test-impl>
521 <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
522 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
523 <attribute default="${includes}" name="includes"/>
524 <attribute default="${excludes}" name="excludes"/>
525 <attribute default="**" name="testincludes"/>
526 <attribute default="" name="testmethods"/>
527 <element name="customize" optional="true"/>
529 <property name="junit.forkmode" value="perTest"/>
530 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
531 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
533 <propertyref prefix="test-sys-prop."/>
534 <mapper from="test-sys-prop.*" to="*" type="glob"/>
536 <formatter type="brief" usefile="false"/>
537 <formatter type="xml"/>
538 <jvmarg value="-ea"/>
539 <jvmarg line="${debug-args-line}"/>
540 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
546 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
547 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
548 <attribute default="${includes}" name="includes"/>
549 <attribute default="${excludes}" name="excludes"/>
550 <attribute default="**" name="testincludes"/>
551 <attribute default="" name="testmethods"/>
552 <element name="customize" optional="true"/>
554 <property name="junit.forkmode" value="perTest"/>
555 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
556 <batchtest todir="${build.test.results.dir}">
557 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
558 <filename name="@{testincludes}"/>
560 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
561 <filename name="${test.binarytestincludes}"/>
565 <propertyref prefix="test-sys-prop."/>
566 <mapper from="test-sys-prop.*" to="*" type="glob"/>
568 <formatter type="brief" usefile="false"/>
569 <formatter type="xml"/>
570 <jvmarg value="-ea"/>
571 <jvmarg line="${debug-args-line}"/>
572 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
578 <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
579 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
580 <attribute default="${includes}" name="includes"/>
581 <attribute default="${excludes}" name="excludes"/>
582 <attribute default="**" name="testincludes"/>
583 <attribute default="" name="testmethods"/>
584 <element implicit="true" name="customize" optional="true"/>
586 <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
588 </j2seproject3:junit-debug>
592 <target if="${testng.available}" name="-init-macrodef-testng-debug">
593 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
594 <attribute default="${main.class}" name="testClass"/>
595 <attribute default="" name="testMethod"/>
596 <element name="customize2" optional="true"/>
598 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
599 <isset property="test.method"/>
601 <condition else="-suitename jdbc-dk-driver -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
602 <matches pattern=".*\.xml" string="@{testClass}"/>
604 <delete dir="${build.test.results.dir}" quiet="true"/>
605 <mkdir dir="${build.test.results.dir}"/>
606 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
609 <jvmarg value="-ea"/>
610 <arg line="${testng.debug.mode}"/>
611 <arg line="-d ${build.test.results.dir}"/>
612 <arg line="-listener org.testng.reporters.VerboseReporter"/>
613 <arg line="${testng.cmd.args}"/>
615 </j2seproject3:debug>
619 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
620 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
621 <attribute default="${main.class}" name="testClass"/>
622 <attribute default="" name="testMethod"/>
623 <element implicit="true" name="customize2" optional="true"/>
625 <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
627 </j2seproject3:testng-debug>
631 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
632 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
633 <attribute default="${includes}" name="includes"/>
634 <attribute default="${excludes}" name="excludes"/>
635 <attribute default="**" name="testincludes"/>
636 <attribute default="" name="testmethods"/>
637 <attribute default="${main.class}" name="testClass"/>
638 <attribute default="" name="testMethod"/>
640 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
643 <path path="${run.test.classpath}"/>
645 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
646 <jvmarg line="${run.jvmargs}"/>
647 <jvmarg line="${run.jvmargs.ide}"/>
649 </j2seproject3:test-debug-impl>
653 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
654 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
655 <attribute default="${includes}" name="includes"/>
656 <attribute default="${excludes}" name="excludes"/>
657 <attribute default="**" name="testincludes"/>
658 <attribute default="" name="testmethods"/>
659 <attribute default="${main.class}" name="testClass"/>
660 <attribute default="" name="testMethod"/>
662 <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
665 <propertyref prefix="test-sys-prop."/>
666 <mapper from="test-sys-prop.*" to="*" type="glob"/>
669 </j2seproject3:testng-debug-impl>
673 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
675 pre NB7.2 profiling section; consider it deprecated
677 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
678 <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
679 <!-- Empty placeholder for easier customization. -->
680 <!-- You can override this target in the ../build.xml file. -->
682 <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
683 <!-- Empty placeholder for easier customization. -->
684 <!-- You can override this target in the ../build.xml file. -->
686 <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
687 <macrodef name="resolve">
688 <attribute name="name"/>
689 <attribute name="value"/>
691 <property name="@{name}" value="${env.@{value}}"/>
694 <macrodef name="profile">
695 <attribute default="${main.class}" name="classname"/>
696 <element name="customize" optional="true"/>
698 <property environment="env"/>
699 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
700 <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
701 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
702 <jvmarg value="${profiler.info.jvmargs.agent}"/>
703 <jvmarg line="${profiler.info.jvmargs}"/>
704 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
705 <arg line="${application.args}"/>
707 <path path="${run.classpath}"/>
710 <propertyref prefix="run-sys-prop."/>
711 <mapper from="run-sys-prop.*" to="*" type="glob"/>
718 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
719 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
720 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
723 end of pre NB7.2 profiling section
725 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
726 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
727 <attribute default="${main.class}" name="name"/>
728 <attribute default="${debug.classpath}" name="classpath"/>
729 <attribute default="" name="stopclassname"/>
731 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
733 <path path="@{classpath}"/>
738 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
739 <attribute default="${build.classes.dir}" name="dir"/>
742 <fileset dir="@{dir}" includes="${fix.classes}">
743 <include name="${fix.includes}*.class"/>
749 <target name="-init-debug-args">
750 <property name="version-output" value="java version "${ant.java.version}"/>
751 <condition property="have-jdk-older-than-1.4">
753 <contains string="${version-output}" substring="java version "1.0"/>
754 <contains string="${version-output}" substring="java version "1.1"/>
755 <contains string="${version-output}" substring="java version "1.2"/>
756 <contains string="${version-output}" substring="java version "1.3"/>
759 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
760 <istrue value="${have-jdk-older-than-1.4}"/>
762 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
763 <os family="windows"/>
765 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
766 <isset property="debug.transport"/>
769 <target depends="-init-debug-args" name="-init-macrodef-debug">
770 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
771 <attribute default="${main.class}" name="classname"/>
772 <attribute default="${debug.classpath}" name="classpath"/>
773 <element name="customize" optional="true"/>
775 <java classname="@{classname}" dir="${work.dir}" fork="true">
776 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
777 <jvmarg line="${debug-args-line}"/>
778 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
779 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
780 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
781 <jvmarg line="${run.jvmargs}"/>
782 <jvmarg line="${run.jvmargs.ide}"/>
784 <path path="@{classpath}"/>
787 <propertyref prefix="run-sys-prop."/>
788 <mapper from="run-sys-prop.*" to="*" type="glob"/>
795 <target name="-init-macrodef-java">
796 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
797 <attribute default="${main.class}" name="classname"/>
798 <attribute default="${run.classpath}" name="classpath"/>
799 <attribute default="jvm" name="jvm"/>
800 <element name="customize" optional="true"/>
802 <java classname="@{classname}" dir="${work.dir}" fork="true">
803 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
804 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
805 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
806 <jvmarg line="${run.jvmargs}"/>
807 <jvmarg line="${run.jvmargs.ide}"/>
809 <path path="@{classpath}"/>
812 <propertyref prefix="run-sys-prop."/>
813 <mapper from="run-sys-prop.*" to="*" type="glob"/>
820 <target name="-init-macrodef-copylibs">
821 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
822 <attribute default="${manifest.file}" name="manifest"/>
823 <element name="customize" optional="true"/>
825 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
826 <pathconvert property="run.classpath.without.build.classes.dir">
827 <path path="${run.classpath}"/>
828 <map from="${build.classes.dir.resolved}" to=""/>
830 <pathconvert pathsep=" " property="jar.classpath">
831 <path path="${run.classpath.without.build.classes.dir}"/>
835 <replacestring from=" " to="%20"/>
837 <globmapper from="*" to="lib/*"/>
840 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
841 <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
842 <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
844 <attribute name="Class-Path" value="${jar.classpath}"/>
851 <target name="-init-presetdef-jar">
852 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
853 <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
854 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
858 <target name="-init-ap-cmdline-properties">
859 <property name="annotation.processing.enabled" value="true"/>
860 <property name="annotation.processing.processors.list" value=""/>
861 <property name="annotation.processing.processor.options" value=""/>
862 <property name="annotation.processing.run.all.processors" value="true"/>
863 <property name="javac.processorpath" value="${javac.classpath}"/>
864 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
865 <condition property="ap.supported.internal" value="true">
867 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
871 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
872 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
873 <isfalse value="${annotation.processing.run.all.processors}"/>
875 <condition else="" property="ap.proc.none.internal" value="-proc:none">
876 <isfalse value="${annotation.processing.enabled}"/>
879 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
880 <property name="ap.cmd.line.internal" value=""/>
882 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
888 <target name="-deps-jar-init" unless="built-jar.properties">
889 <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
890 <delete file="${built-jar.properties}" quiet="true"/>
892 <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
893 <echo level="warn" message="Cycle detected: jdbc-dk-driver was already built"/>
895 <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
896 <mkdir dir="${build.dir}"/>
897 <touch file="${built-jar.properties}" verbose="false"/>
898 <property file="${built-jar.properties}" prefix="already.built.jar."/>
899 <antcall target="-warn-already-built-jar"/>
900 <propertyfile file="${built-jar.properties}">
901 <entry key="${basedir}" value=""/>
904 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
905 <target depends="init" name="-check-automatic-build">
906 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
908 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
909 <antcall target="clean"/>
911 <target depends="init,deps-jar" name="-pre-pre-compile">
912 <mkdir dir="${build.classes.dir}"/>
914 <target name="-pre-compile">
915 <!-- Empty placeholder for easier customization. -->
916 <!-- You can override this target in the ../build.xml file. -->
918 <target if="do.depend.true" name="-compile-depend">
919 <pathconvert property="build.generated.subdirs">
920 <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
924 <j2seproject3:depend srcdir="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}:${build.generated.subdirs}"/>
926 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
927 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
928 <copy todir="${build.classes.dir}">
929 <fileset dir="${src.conf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
930 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
931 <fileset dir="${src.sql-dk.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
934 <target if="has.persistence.xml" name="-copy-persistence-xml">
935 <mkdir dir="${build.classes.dir}/META-INF"/>
936 <copy todir="${build.classes.dir}/META-INF">
937 <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
940 <target name="-post-compile">
941 <!-- Empty placeholder for easier customization. -->
942 <!-- You can override this target in the ../build.xml file. -->
944 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
945 <target name="-pre-compile-single">
946 <!-- Empty placeholder for easier customization. -->
947 <!-- You can override this target in the ../build.xml file. -->
949 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
950 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
951 <j2seproject3:force-recompile/>
952 <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}"/>
954 <target name="-post-compile-single">
955 <!-- Empty placeholder for easier customization. -->
956 <!-- You can override this target in the ../build.xml file. -->
958 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
964 <target depends="init" name="-pre-pre-jar">
965 <dirname file="${dist.jar}" property="dist.jar.dir"/>
966 <mkdir dir="${dist.jar.dir}"/>
968 <target name="-pre-jar">
969 <!-- Empty placeholder for easier customization. -->
970 <!-- You can override this target in the ../build.xml file. -->
972 <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
973 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
974 <touch file="${tmp.manifest.file}" verbose="false"/>
976 <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
977 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
978 <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
980 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
981 <manifest file="${tmp.manifest.file}" mode="update">
982 <attribute name="Main-Class" value="${main.class}"/>
985 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
986 <manifest file="${tmp.manifest.file}" mode="update">
987 <attribute name="Profile" value="${javac.profile}"/>
990 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
991 <basename file="${application.splash}" property="splashscreen.basename"/>
992 <mkdir dir="${build.classes.dir}/META-INF"/>
993 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
994 <manifest file="${tmp.manifest.file}" mode="update">
995 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
998 <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
999 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
1000 <echo level="info">To run this application from the command line without Ant, try:</echo>
1001 <property location="${dist.jar}" name="dist.jar.resolved"/>
1002 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
1004 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
1005 <j2seproject1:jar manifest="${tmp.manifest.file}"/>
1006 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1007 <property location="${dist.jar}" name="dist.jar.resolved"/>
1008 <pathconvert property="run.classpath.with.dist.jar">
1009 <path path="${run.classpath}"/>
1010 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1012 <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
1013 <isset property="main.class.available"/>
1015 <condition else="debug" property="jar.usage.level" value="info">
1016 <isset property="main.class.available"/>
1018 <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
1020 <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
1022 <fileset file="${tmp.manifest.file}"/>
1025 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
1026 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
1027 <target name="-post-jar">
1028 <!-- Empty placeholder for easier customization. -->
1029 <!-- You can override this target in the ../build.xml file. -->
1031 <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1032 <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
1038 <target depends="init,compile" description="Run a main class." name="run">
1041 <arg line="${application.args}"/>
1043 </j2seproject1:java>
1045 <target name="-do-not-recompile">
1046 <property name="javac.includes.binary" value=""/>
1048 <target depends="init,compile-single" name="run-single">
1049 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1050 <j2seproject1:java classname="${run.class}"/>
1052 <target depends="init,compile-test-single" name="run-test-with-main">
1053 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1054 <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1061 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1062 <j2seproject1:nbjpdastart name="${debug.class}"/>
1064 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1065 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1067 <target depends="init,compile" name="-debug-start-debuggee">
1068 <j2seproject3:debug>
1070 <arg line="${application.args}"/>
1072 </j2seproject3:debug>
1074 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1075 <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
1076 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
1078 <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
1079 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1080 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1081 <j2seproject3:debug classname="${debug.class}"/>
1083 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1084 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1085 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1086 <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1088 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1089 <target depends="init" name="-pre-debug-fix">
1090 <fail unless="fix.includes">Must set fix.includes</fail>
1091 <property name="javac.includes" value="${fix.includes}.java"/>
1093 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1094 <j2seproject1:nbjpdareload/>
1096 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1103 pre NB7.2 profiler integration
1105 <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1106 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1109 <path path="${run.classpath}"/>
1114 <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
1115 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
1116 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1119 <path path="${run.classpath}"/>
1122 <profile classname="${profile.class}"/>
1124 <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
1125 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1128 <path path="${run.classpath}"/>
1131 <profile classname="sun.applet.AppletViewer">
1133 <arg value="${applet.url}"/>
1137 <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1138 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1141 <path path="${run.test.classpath}"/>
1144 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1145 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1146 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1147 <jvmarg line="${profiler.info.jvmargs}"/>
1148 <test name="${profile.class}"/>
1150 <path path="${run.test.classpath}"/>
1153 <propertyref prefix="test-sys-prop."/>
1154 <mapper from="test-sys-prop.*" to="*" type="glob"/>
1156 <formatter type="brief" usefile="false"/>
1157 <formatter type="xml"/>
1161 end of pre NB72 profiling section
1163 <target if="netbeans.home" name="-profile-check">
1164 <condition property="profiler.configured">
1166 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1167 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1171 <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1173 <antcall target="run"/>
1175 <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
1176 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1178 <antcall target="run-single"/>
1180 <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
1181 <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
1182 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1184 <antcall target="test-single"/>
1186 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
1187 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1189 <antcal target="run-test-with-main"/>
1191 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
1192 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1194 <antcall target="run-applet"/>
1201 <target depends="init" if="have.sources" name="-javadoc-build">
1202 <mkdir dir="${dist.javadoc.dir}"/>
1203 <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
1205 <isset property="endorsed.classpath.cmd.line.arg"/>
1207 <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
1211 <condition else="" property="bug5101868workaround" value="*.java">
1212 <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
1214 <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
1216 <path path="${javac.classpath}"/>
1218 <fileset dir="${src.conf.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1219 <filename name="**/*.java"/>
1221 <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1222 <filename name="**/*.java"/>
1224 <fileset dir="${src.sql-dk.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1225 <filename name="**/*.java"/>
1227 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1228 <include name="**/*.java"/>
1229 <exclude name="*.java"/>
1231 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
1233 <copy todir="${dist.javadoc.dir}">
1234 <fileset dir="${src.conf.dir}" excludes="${excludes}" includes="${includes}">
1235 <filename name="**/doc-files/**"/>
1237 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1238 <filename name="**/doc-files/**"/>
1240 <fileset dir="${src.sql-dk.dir}" excludes="${excludes}" includes="${includes}">
1241 <filename name="**/doc-files/**"/>
1243 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1244 <include name="**/doc-files/**"/>
1248 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1249 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1251 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
1253 =========================
1254 TEST COMPILATION SECTION
1255 =========================
1257 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1258 <mkdir dir="${build.test.classes.dir}"/>
1260 <target name="-pre-compile-test">
1261 <!-- Empty placeholder for easier customization. -->
1262 <!-- You can override this target in the ../build.xml file. -->
1264 <target if="do.depend.true" name="-compile-test-depend">
1265 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1267 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1268 <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
1269 <copy todir="${build.test.classes.dir}">
1270 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1273 <target name="-post-compile-test">
1274 <!-- Empty placeholder for easier customization. -->
1275 <!-- You can override this target in the ../build.xml file. -->
1277 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1278 <target name="-pre-compile-test-single">
1279 <!-- Empty placeholder for easier customization. -->
1280 <!-- You can override this target in the ../build.xml file. -->
1282 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1283 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1284 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1285 <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
1286 <copy todir="${build.test.classes.dir}">
1287 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1290 <target name="-post-compile-test-single">
1291 <!-- Empty placeholder for easier customization. -->
1292 <!-- You can override this target in the ../build.xml file. -->
1294 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1296 =======================
1297 TEST EXECUTION SECTION
1298 =======================
1300 <target depends="init" if="have.tests" name="-pre-test-run">
1301 <mkdir dir="${build.test.results.dir}"/>
1303 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1304 <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
1306 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1307 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1309 <target depends="init" if="have.tests" name="test-report"/>
1310 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1311 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1312 <target depends="init" if="have.tests" name="-pre-test-run-single">
1313 <mkdir dir="${build.test.results.dir}"/>
1315 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1316 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1317 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1319 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1320 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1322 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
1323 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1324 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1325 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1326 <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1328 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1329 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1331 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
1333 =======================
1334 TEST DEBUGGING SECTION
1335 =======================
1337 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1338 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1339 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1341 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1342 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1343 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1344 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1346 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1347 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1349 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1350 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1351 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1352 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1354 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1356 =========================
1357 APPLET EXECUTION SECTION
1358 =========================
1360 <target depends="init,compile-single" name="run-applet">
1361 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1362 <j2seproject1:java classname="sun.applet.AppletViewer">
1364 <arg value="${applet.url}"/>
1366 </j2seproject1:java>
1369 =========================
1370 APPLET DEBUGGING SECTION
1371 =========================
1373 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
1374 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1375 <j2seproject3:debug classname="sun.applet.AppletViewer">
1377 <arg value="${applet.url}"/>
1379 </j2seproject3:debug>
1381 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
1387 <target name="-deps-clean-init" unless="built-clean.properties">
1388 <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
1389 <delete file="${built-clean.properties}" quiet="true"/>
1391 <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
1392 <echo level="warn" message="Cycle detected: jdbc-dk-driver was already built"/>
1394 <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
1395 <mkdir dir="${build.dir}"/>
1396 <touch file="${built-clean.properties}" verbose="false"/>
1397 <property file="${built-clean.properties}" prefix="already.built.clean."/>
1398 <antcall target="-warn-already-built-clean"/>
1399 <propertyfile file="${built-clean.properties}">
1400 <entry key="${basedir}" value=""/>
1403 <target depends="init" name="-do-clean">
1404 <delete dir="${build.dir}"/>
1405 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1407 <target name="-post-clean">
1408 <!-- Empty placeholder for easier customization. -->
1409 <!-- You can override this target in the ../build.xml file. -->
1411 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1412 <target name="-check-call-dep">
1413 <property file="${call.built.properties}" prefix="already.built."/>
1414 <condition property="should.call.dep">
1417 <isset property="already.built.${call.subproject}"/>
1419 <available file="${call.script}"/>
1423 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
1424 <ant antfile="${call.script}" inheritall="false" target="${call.target}">
1426 <propertyref prefix="transfer."/>
1427 <mapper from="transfer.*" to="*" type="glob"/>