JDBC drivers: fix 'Unsupported URL' – drivers might be called witrh wrong URLs and then they should (according to the JavaDoc) return null instead of throwing an exception.
This problem occurred when --test-connection was testing multiple connections in parallel.
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.6"/>
50 <property name="default.javac.target" value="1.6"/>
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])|9)(\..*)?" 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 <property name="manifest.encoding" value="${source.encoding}"/>
162 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
164 <isset property="javadoc.encoding"/>
166 <equals arg1="${javadoc.encoding}" arg2=""/>
170 <property name="javadoc.encoding.used" value="${source.encoding}"/>
171 <property name="includes" value="**"/>
172 <property name="excludes" value=""/>
173 <property name="do.depend" value="false"/>
174 <condition property="do.depend.true">
175 <istrue value="${do.depend}"/>
177 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
178 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
180 <isset property="endorsed.classpath"/>
182 <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
186 <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
187 <isset property="profile.available"/>
189 <condition else="false" property="jdkBug6558476">
191 <matches pattern="1\.[56]" string="${java.specification.version}"/>
197 <condition else="false" property="javac.fork">
199 <istrue value="${jdkBug6558476}"/>
200 <istrue value="${javac.external.vm}"/>
203 <property name="jar.index" value="false"/>
204 <property name="jar.index.metainf" value="${jar.index}"/>
205 <property name="copylibs.rebase" value="true"/>
206 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
207 <condition property="junit.available">
209 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
210 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
213 <condition property="testng.available">
214 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
216 <condition property="junit+testng.available">
218 <istrue value="${junit.available}"/>
219 <istrue value="${testng.available}"/>
222 <condition else="testng" property="testng.mode" value="mixed">
223 <istrue value="${junit+testng.available}"/>
225 <condition else="" property="testng.debug.mode" value="-mixed">
226 <istrue value="${junit+testng.available}"/>
228 <property name="java.failonerror" value="true"/>
230 <target name="-post-init">
231 <!-- Empty placeholder for easier customization. -->
232 <!-- You can override this target in the ../build.xml file. -->
234 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
235 <fail unless="src.conf.dir">Must set src.conf.dir</fail>
236 <fail unless="src.dir">Must set src.dir</fail>
237 <fail unless="src.sql-dk.dir">Must set src.sql-dk.dir</fail>
238 <fail unless="test.src.dir">Must set test.src.dir</fail>
239 <fail unless="build.dir">Must set build.dir</fail>
240 <fail unless="dist.dir">Must set dist.dir</fail>
241 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
242 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
243 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
244 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
245 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
246 <fail unless="dist.jar">Must set dist.jar</fail>
248 <target name="-init-macrodef-property">
249 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
250 <attribute name="name"/>
251 <attribute name="value"/>
253 <property name="@{name}" value="${@{value}}"/>
257 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
258 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
259 <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
260 <attribute default="${build.classes.dir}" name="destdir"/>
261 <attribute default="${javac.classpath}" name="classpath"/>
262 <attribute default="${javac.processorpath}" name="processorpath"/>
263 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
264 <attribute default="${includes}" name="includes"/>
265 <attribute default="${excludes}" name="excludes"/>
266 <attribute default="${javac.debug}" name="debug"/>
267 <attribute default="${empty.dir}" name="sourcepath"/>
268 <attribute default="${empty.dir}" name="gensrcdir"/>
269 <element name="customize" optional="true"/>
271 <property location="${build.dir}/empty" name="empty.dir"/>
272 <mkdir dir="${empty.dir}"/>
273 <mkdir dir="@{apgeneratedsrcdir}"/>
274 <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}">
276 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
281 <path path="@{classpath}"/>
283 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
284 <compilerarg line="${javac.profile.cmd.line.arg}"/>
285 <compilerarg line="${javac.compilerargs}"/>
286 <compilerarg value="-processorpath"/>
287 <compilerarg path="@{processorpath}:${empty.dir}"/>
288 <compilerarg line="${ap.processors.internal}"/>
289 <compilerarg line="${annotation.processing.processor.options}"/>
290 <compilerarg value="-s"/>
291 <compilerarg path="@{apgeneratedsrcdir}"/>
292 <compilerarg line="${ap.proc.none.internal}"/>
298 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
299 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
300 <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
301 <attribute default="${build.classes.dir}" name="destdir"/>
302 <attribute default="${javac.classpath}" name="classpath"/>
303 <attribute default="${javac.processorpath}" name="processorpath"/>
304 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
305 <attribute default="${includes}" name="includes"/>
306 <attribute default="${excludes}" name="excludes"/>
307 <attribute default="${javac.debug}" name="debug"/>
308 <attribute default="${empty.dir}" name="sourcepath"/>
309 <attribute default="${empty.dir}" name="gensrcdir"/>
310 <element name="customize" optional="true"/>
312 <property location="${build.dir}/empty" name="empty.dir"/>
313 <mkdir dir="${empty.dir}"/>
314 <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}">
316 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
321 <path path="@{classpath}"/>
323 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
324 <compilerarg line="${javac.profile.cmd.line.arg}"/>
325 <compilerarg line="${javac.compilerargs}"/>
331 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
332 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
333 <attribute default="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}" name="srcdir"/>
334 <attribute default="${build.classes.dir}" name="destdir"/>
335 <attribute default="${javac.classpath}" name="classpath"/>
337 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
339 <path path="@{classpath}"/>
344 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
345 <attribute default="${build.classes.dir}" name="destdir"/>
347 <fail unless="javac.includes">Must set javac.includes</fail>
348 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
350 <filelist dir="@{destdir}" files="${javac.includes}"/>
352 <globmapper from="*.java" to="*.class"/>
354 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
355 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
357 <files includesfile="${javac.includesfile.binary}"/>
360 <fileset file="${javac.includesfile.binary}"/>
365 <target if="${junit.available}" name="-init-macrodef-junit-init">
366 <condition else="false" property="nb.junit.batch" value="true">
368 <istrue value="${junit.available}"/>
370 <isset property="test.method"/>
374 <condition else="false" property="nb.junit.single" value="true">
376 <istrue value="${junit.available}"/>
377 <isset property="test.method"/>
381 <target name="-init-test-properties">
382 <property name="test.binaryincludes" value="<nothing>"/>
383 <property name="test.binarytestincludes" value=""/>
384 <property name="test.binaryexcludes" value=""/>
386 <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
387 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
388 <attribute default="${includes}" name="includes"/>
389 <attribute default="${excludes}" name="excludes"/>
390 <attribute default="**" name="testincludes"/>
391 <attribute default="" name="testmethods"/>
392 <element name="customize" optional="true"/>
394 <property name="junit.forkmode" value="perTest"/>
395 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
396 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
398 <propertyref prefix="test-sys-prop."/>
399 <mapper from="test-sys-prop.*" to="*" type="glob"/>
401 <formatter type="brief" usefile="false"/>
402 <formatter type="xml"/>
403 <jvmarg value="-ea"/>
409 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
410 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
411 <attribute default="${includes}" name="includes"/>
412 <attribute default="${excludes}" name="excludes"/>
413 <attribute default="**" name="testincludes"/>
414 <attribute default="" name="testmethods"/>
415 <element name="customize" optional="true"/>
417 <property name="junit.forkmode" value="perTest"/>
418 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
419 <batchtest todir="${build.test.results.dir}">
420 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
421 <filename name="@{testincludes}"/>
423 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
424 <filename name="${test.binarytestincludes}"/>
428 <propertyref prefix="test-sys-prop."/>
429 <mapper from="test-sys-prop.*" to="*" type="glob"/>
431 <formatter type="brief" usefile="false"/>
432 <formatter type="xml"/>
433 <jvmarg value="-ea"/>
439 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
440 <target if="${testng.available}" name="-init-macrodef-testng">
441 <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
442 <attribute default="${includes}" name="includes"/>
443 <attribute default="${excludes}" name="excludes"/>
444 <attribute default="**" name="testincludes"/>
445 <attribute default="" name="testmethods"/>
446 <element name="customize" optional="true"/>
448 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
449 <isset property="test.method"/>
451 <union id="test.set">
452 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
453 <filename name="@{testincludes}"/>
456 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
457 <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}">
458 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
460 <propertyref prefix="test-sys-prop."/>
461 <mapper from="test-sys-prop.*" to="*" type="glob"/>
468 <target name="-init-macrodef-test-impl">
469 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
470 <attribute default="${includes}" name="includes"/>
471 <attribute default="${excludes}" name="excludes"/>
472 <attribute default="**" name="testincludes"/>
473 <attribute default="" name="testmethods"/>
474 <element implicit="true" name="customize" optional="true"/>
476 <echo>No tests executed.</echo>
480 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
481 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
482 <attribute default="${includes}" name="includes"/>
483 <attribute default="${excludes}" name="excludes"/>
484 <attribute default="**" name="testincludes"/>
485 <attribute default="" name="testmethods"/>
486 <element implicit="true" name="customize" optional="true"/>
488 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
490 </j2seproject3:junit>
494 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
495 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
496 <attribute default="${includes}" name="includes"/>
497 <attribute default="${excludes}" name="excludes"/>
498 <attribute default="**" name="testincludes"/>
499 <attribute default="" name="testmethods"/>
500 <element implicit="true" name="customize" optional="true"/>
502 <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
504 </j2seproject3:testng>
508 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
509 <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
510 <attribute default="${includes}" name="includes"/>
511 <attribute default="${excludes}" name="excludes"/>
512 <attribute default="**" name="testincludes"/>
513 <attribute default="" name="testmethods"/>
515 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
518 <path path="${run.test.classpath}"/>
520 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
521 <jvmarg line="${run.jvmargs}"/>
522 <jvmarg line="${run.jvmargs.ide}"/>
524 </j2seproject3:test-impl>
528 <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
529 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
530 <attribute default="${includes}" name="includes"/>
531 <attribute default="${excludes}" name="excludes"/>
532 <attribute default="**" name="testincludes"/>
533 <attribute default="" name="testmethods"/>
534 <element name="customize" optional="true"/>
536 <property name="junit.forkmode" value="perTest"/>
537 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
538 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
540 <propertyref prefix="test-sys-prop."/>
541 <mapper from="test-sys-prop.*" to="*" type="glob"/>
543 <formatter type="brief" usefile="false"/>
544 <formatter type="xml"/>
545 <jvmarg value="-ea"/>
546 <jvmarg line="${debug-args-line}"/>
547 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
553 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
554 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
555 <attribute default="${includes}" name="includes"/>
556 <attribute default="${excludes}" name="excludes"/>
557 <attribute default="**" name="testincludes"/>
558 <attribute default="" name="testmethods"/>
559 <element name="customize" optional="true"/>
561 <property name="junit.forkmode" value="perTest"/>
562 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
563 <batchtest todir="${build.test.results.dir}">
564 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
565 <filename name="@{testincludes}"/>
567 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
568 <filename name="${test.binarytestincludes}"/>
572 <propertyref prefix="test-sys-prop."/>
573 <mapper from="test-sys-prop.*" to="*" type="glob"/>
575 <formatter type="brief" usefile="false"/>
576 <formatter type="xml"/>
577 <jvmarg value="-ea"/>
578 <jvmarg line="${debug-args-line}"/>
579 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
585 <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
586 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
587 <attribute default="${includes}" name="includes"/>
588 <attribute default="${excludes}" name="excludes"/>
589 <attribute default="**" name="testincludes"/>
590 <attribute default="" name="testmethods"/>
591 <element implicit="true" name="customize" optional="true"/>
593 <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
595 </j2seproject3:junit-debug>
599 <target if="${testng.available}" name="-init-macrodef-testng-debug">
600 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
601 <attribute default="${main.class}" name="testClass"/>
602 <attribute default="" name="testMethod"/>
603 <element name="customize2" optional="true"/>
605 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
606 <isset property="test.method"/>
608 <condition else="-suitename jdbc-dk-driver -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
609 <matches pattern=".*\.xml" string="@{testClass}"/>
611 <delete dir="${build.test.results.dir}" quiet="true"/>
612 <mkdir dir="${build.test.results.dir}"/>
613 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
616 <jvmarg value="-ea"/>
617 <arg line="${testng.debug.mode}"/>
618 <arg line="-d ${build.test.results.dir}"/>
619 <arg line="-listener org.testng.reporters.VerboseReporter"/>
620 <arg line="${testng.cmd.args}"/>
622 </j2seproject3:debug>
626 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
627 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
628 <attribute default="${main.class}" name="testClass"/>
629 <attribute default="" name="testMethod"/>
630 <element implicit="true" name="customize2" optional="true"/>
632 <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
634 </j2seproject3:testng-debug>
638 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
639 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
640 <attribute default="${includes}" name="includes"/>
641 <attribute default="${excludes}" name="excludes"/>
642 <attribute default="**" name="testincludes"/>
643 <attribute default="" name="testmethods"/>
644 <attribute default="${main.class}" name="testClass"/>
645 <attribute default="" name="testMethod"/>
647 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
650 <path path="${run.test.classpath}"/>
652 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
653 <jvmarg line="${run.jvmargs}"/>
654 <jvmarg line="${run.jvmargs.ide}"/>
656 </j2seproject3:test-debug-impl>
660 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
661 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
662 <attribute default="${includes}" name="includes"/>
663 <attribute default="${excludes}" name="excludes"/>
664 <attribute default="**" name="testincludes"/>
665 <attribute default="" name="testmethods"/>
666 <attribute default="${main.class}" name="testClass"/>
667 <attribute default="" name="testMethod"/>
669 <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
672 <propertyref prefix="test-sys-prop."/>
673 <mapper from="test-sys-prop.*" to="*" type="glob"/>
676 </j2seproject3:testng-debug-impl>
680 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
682 pre NB7.2 profiling section; consider it deprecated
684 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
685 <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
686 <!-- Empty placeholder for easier customization. -->
687 <!-- You can override this target in the ../build.xml file. -->
689 <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
690 <!-- Empty placeholder for easier customization. -->
691 <!-- You can override this target in the ../build.xml file. -->
693 <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
694 <macrodef name="resolve">
695 <attribute name="name"/>
696 <attribute name="value"/>
698 <property name="@{name}" value="${env.@{value}}"/>
701 <macrodef name="profile">
702 <attribute default="${main.class}" name="classname"/>
703 <element name="customize" optional="true"/>
705 <property environment="env"/>
706 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
707 <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
708 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
709 <jvmarg value="${profiler.info.jvmargs.agent}"/>
710 <jvmarg line="${profiler.info.jvmargs}"/>
711 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
712 <arg line="${application.args}"/>
714 <path path="${run.classpath}"/>
717 <propertyref prefix="run-sys-prop."/>
718 <mapper from="run-sys-prop.*" to="*" type="glob"/>
725 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
726 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
727 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
730 end of pre NB7.2 profiling section
732 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
733 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
734 <attribute default="${main.class}" name="name"/>
735 <attribute default="${debug.classpath}" name="classpath"/>
736 <attribute default="" name="stopclassname"/>
738 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
740 <path path="@{classpath}"/>
745 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
746 <attribute default="${build.classes.dir}" name="dir"/>
749 <fileset dir="@{dir}" includes="${fix.classes}">
750 <include name="${fix.includes}*.class"/>
756 <target name="-init-debug-args">
757 <property name="version-output" value="java version "${ant.java.version}"/>
758 <condition property="have-jdk-older-than-1.4">
760 <contains string="${version-output}" substring="java version "1.0"/>
761 <contains string="${version-output}" substring="java version "1.1"/>
762 <contains string="${version-output}" substring="java version "1.2"/>
763 <contains string="${version-output}" substring="java version "1.3"/>
766 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
767 <istrue value="${have-jdk-older-than-1.4}"/>
769 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
770 <os family="windows"/>
772 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
773 <isset property="debug.transport"/>
776 <target depends="-init-debug-args" name="-init-macrodef-debug">
777 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
778 <attribute default="${main.class}" name="classname"/>
779 <attribute default="${debug.classpath}" name="classpath"/>
780 <element name="customize" optional="true"/>
782 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
783 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
784 <jvmarg line="${debug-args-line}"/>
785 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
786 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
787 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
788 <jvmarg line="${run.jvmargs}"/>
789 <jvmarg line="${run.jvmargs.ide}"/>
791 <path path="@{classpath}"/>
794 <propertyref prefix="run-sys-prop."/>
795 <mapper from="run-sys-prop.*" to="*" type="glob"/>
802 <target name="-init-macrodef-java">
803 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
804 <attribute default="${main.class}" name="classname"/>
805 <attribute default="${run.classpath}" name="classpath"/>
806 <attribute default="jvm" name="jvm"/>
807 <element name="customize" optional="true"/>
809 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
810 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
811 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
812 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
813 <jvmarg line="${run.jvmargs}"/>
814 <jvmarg line="${run.jvmargs.ide}"/>
816 <path path="@{classpath}"/>
819 <propertyref prefix="run-sys-prop."/>
820 <mapper from="run-sys-prop.*" to="*" type="glob"/>
827 <target name="-init-macrodef-copylibs">
828 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
829 <attribute default="${manifest.file}" name="manifest"/>
830 <element name="customize" optional="true"/>
832 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
833 <pathconvert property="run.classpath.without.build.classes.dir">
834 <path path="${run.classpath}"/>
835 <map from="${build.classes.dir.resolved}" to=""/>
837 <pathconvert pathsep=" " property="jar.classpath">
838 <path path="${run.classpath.without.build.classes.dir}"/>
842 <replacestring from=" " to="%20"/>
844 <globmapper from="*" to="lib/*"/>
847 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
848 <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
849 <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
851 <attribute name="Class-Path" value="${jar.classpath}"/>
858 <target name="-init-presetdef-jar">
859 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
860 <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
861 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
865 <target name="-init-ap-cmdline-properties">
866 <property name="annotation.processing.enabled" value="true"/>
867 <property name="annotation.processing.processors.list" value=""/>
868 <property name="annotation.processing.processor.options" value=""/>
869 <property name="annotation.processing.run.all.processors" value="true"/>
870 <property name="javac.processorpath" value="${javac.classpath}"/>
871 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
872 <condition property="ap.supported.internal" value="true">
874 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
878 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
879 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
880 <isfalse value="${annotation.processing.run.all.processors}"/>
882 <condition else="" property="ap.proc.none.internal" value="-proc:none">
883 <isfalse value="${annotation.processing.enabled}"/>
886 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
887 <property name="ap.cmd.line.internal" value=""/>
889 <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"/>
895 <target name="-deps-jar-init" unless="built-jar.properties">
896 <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
897 <delete file="${built-jar.properties}" quiet="true"/>
899 <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
900 <echo level="warn" message="Cycle detected: jdbc-dk-driver was already built"/>
902 <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
903 <mkdir dir="${build.dir}"/>
904 <touch file="${built-jar.properties}" verbose="false"/>
905 <property file="${built-jar.properties}" prefix="already.built.jar."/>
906 <antcall target="-warn-already-built-jar"/>
907 <propertyfile file="${built-jar.properties}">
908 <entry key="${basedir}" value=""/>
911 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
912 <target depends="init" name="-check-automatic-build">
913 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
915 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
916 <antcall target="clean"/>
918 <target depends="init,deps-jar" name="-pre-pre-compile">
919 <mkdir dir="${build.classes.dir}"/>
921 <target name="-pre-compile">
922 <!-- Empty placeholder for easier customization. -->
923 <!-- You can override this target in the ../build.xml file. -->
925 <target if="do.depend.true" name="-compile-depend">
926 <pathconvert property="build.generated.subdirs">
927 <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
931 <j2seproject3:depend srcdir="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}:${build.generated.subdirs}"/>
933 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
934 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
935 <copy todir="${build.classes.dir}">
936 <fileset dir="${src.conf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
937 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
938 <fileset dir="${src.sql-dk.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
941 <target if="has.persistence.xml" name="-copy-persistence-xml">
942 <mkdir dir="${build.classes.dir}/META-INF"/>
943 <copy todir="${build.classes.dir}/META-INF">
944 <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
947 <target name="-post-compile">
948 <!-- Empty placeholder for easier customization. -->
949 <!-- You can override this target in the ../build.xml file. -->
951 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
952 <target name="-pre-compile-single">
953 <!-- Empty placeholder for easier customization. -->
954 <!-- You can override this target in the ../build.xml file. -->
956 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
957 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
958 <j2seproject3:force-recompile/>
959 <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.conf.dir}:${src.dir}:${src.sql-dk.dir}"/>
961 <target name="-post-compile-single">
962 <!-- Empty placeholder for easier customization. -->
963 <!-- You can override this target in the ../build.xml file. -->
965 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
971 <target depends="init" name="-pre-pre-jar">
972 <dirname file="${dist.jar}" property="dist.jar.dir"/>
973 <mkdir dir="${dist.jar.dir}"/>
975 <target name="-pre-jar">
976 <!-- Empty placeholder for easier customization. -->
977 <!-- You can override this target in the ../build.xml file. -->
979 <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
980 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
981 <touch file="${tmp.manifest.file}" verbose="false"/>
983 <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
984 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
985 <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
987 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
988 <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
989 <attribute name="Main-Class" value="${main.class}"/>
992 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
993 <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
994 <attribute name="Profile" value="${javac.profile}"/>
997 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
998 <basename file="${application.splash}" property="splashscreen.basename"/>
999 <mkdir dir="${build.classes.dir}/META-INF"/>
1000 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
1001 <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1002 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1005 <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">
1006 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
1007 <echo level="info">To run this application from the command line without Ant, try:</echo>
1008 <property location="${dist.jar}" name="dist.jar.resolved"/>
1009 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
1011 <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">
1012 <j2seproject1:jar manifest="${tmp.manifest.file}"/>
1013 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1014 <property location="${dist.jar}" name="dist.jar.resolved"/>
1015 <pathconvert property="run.classpath.with.dist.jar">
1016 <path path="${run.classpath}"/>
1017 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1019 <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}">
1020 <isset property="main.class.available"/>
1022 <condition else="debug" property="jar.usage.level" value="info">
1023 <isset property="main.class.available"/>
1025 <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
1027 <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
1029 <fileset file="${tmp.manifest.file}"/>
1032 <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"/>
1033 <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"/>
1034 <target name="-post-jar">
1035 <!-- Empty placeholder for easier customization. -->
1036 <!-- You can override this target in the ../build.xml file. -->
1038 <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1039 <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
1045 <target depends="init,compile" description="Run a main class." name="run">
1048 <arg line="${application.args}"/>
1050 </j2seproject1:java>
1052 <target name="-do-not-recompile">
1053 <property name="javac.includes.binary" value=""/>
1055 <target depends="init,compile-single" name="run-single">
1056 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1057 <j2seproject1:java classname="${run.class}"/>
1059 <target depends="init,compile-test-single" name="run-test-with-main">
1060 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1061 <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1068 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1069 <j2seproject1:nbjpdastart name="${debug.class}"/>
1071 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1072 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1074 <target depends="init,compile" name="-debug-start-debuggee">
1075 <j2seproject3:debug>
1077 <arg line="${application.args}"/>
1079 </j2seproject3:debug>
1081 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1082 <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
1083 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
1085 <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
1086 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1087 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1088 <j2seproject3:debug classname="${debug.class}"/>
1090 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1091 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1092 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1093 <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1095 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1096 <target depends="init" name="-pre-debug-fix">
1097 <fail unless="fix.includes">Must set fix.includes</fail>
1098 <property name="javac.includes" value="${fix.includes}.java"/>
1100 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1101 <j2seproject1:nbjpdareload/>
1103 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1110 pre NB7.2 profiler integration
1112 <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1113 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1116 <path path="${run.classpath}"/>
1121 <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
1122 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
1123 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1126 <path path="${run.classpath}"/>
1129 <profile classname="${profile.class}"/>
1131 <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
1132 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1135 <path path="${run.classpath}"/>
1138 <profile classname="sun.applet.AppletViewer">
1140 <arg value="${applet.url}"/>
1144 <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1145 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1148 <path path="${run.test.classpath}"/>
1151 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1152 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1153 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1154 <jvmarg line="${profiler.info.jvmargs}"/>
1155 <test name="${profile.class}"/>
1157 <path path="${run.test.classpath}"/>
1160 <propertyref prefix="test-sys-prop."/>
1161 <mapper from="test-sys-prop.*" to="*" type="glob"/>
1163 <formatter type="brief" usefile="false"/>
1164 <formatter type="xml"/>
1168 end of pre NB72 profiling section
1170 <target if="netbeans.home" name="-profile-check">
1171 <condition property="profiler.configured">
1173 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1174 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1178 <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1180 <antcall target="run"/>
1182 <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">
1183 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1185 <antcall target="run-single"/>
1187 <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
1188 <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
1189 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1191 <antcall target="test-single"/>
1193 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
1194 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1196 <antcall target="run-test-with-main"/>
1198 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
1199 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1201 <antcall target="run-applet"/>
1208 <target depends="init" if="have.sources" name="-javadoc-build">
1209 <mkdir dir="${dist.javadoc.dir}"/>
1210 <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
1212 <isset property="endorsed.classpath.cmd.line.arg"/>
1214 <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
1218 <condition else="" property="bug5101868workaround" value="*.java">
1219 <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
1221 <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}">
1223 <path path="${javac.classpath}"/>
1225 <fileset dir="${src.conf.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1226 <filename name="**/*.java"/>
1228 <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1229 <filename name="**/*.java"/>
1231 <fileset dir="${src.sql-dk.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1232 <filename name="**/*.java"/>
1234 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1235 <include name="**/*.java"/>
1236 <exclude name="*.java"/>
1238 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
1240 <copy todir="${dist.javadoc.dir}">
1241 <fileset dir="${src.conf.dir}" excludes="${excludes}" includes="${includes}">
1242 <filename name="**/doc-files/**"/>
1244 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1245 <filename name="**/doc-files/**"/>
1247 <fileset dir="${src.sql-dk.dir}" excludes="${excludes}" includes="${includes}">
1248 <filename name="**/doc-files/**"/>
1250 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1251 <include name="**/doc-files/**"/>
1255 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1256 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1258 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
1260 =========================
1261 TEST COMPILATION SECTION
1262 =========================
1264 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1265 <mkdir dir="${build.test.classes.dir}"/>
1267 <target name="-pre-compile-test">
1268 <!-- Empty placeholder for easier customization. -->
1269 <!-- You can override this target in the ../build.xml file. -->
1271 <target if="do.depend.true" name="-compile-test-depend">
1272 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1274 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1275 <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}"/>
1276 <copy todir="${build.test.classes.dir}">
1277 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1280 <target name="-post-compile-test">
1281 <!-- Empty placeholder for easier customization. -->
1282 <!-- You can override this target in the ../build.xml file. -->
1284 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1285 <target name="-pre-compile-test-single">
1286 <!-- Empty placeholder for easier customization. -->
1287 <!-- You can override this target in the ../build.xml file. -->
1289 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1290 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1291 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1292 <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}"/>
1293 <copy todir="${build.test.classes.dir}">
1294 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1297 <target name="-post-compile-test-single">
1298 <!-- Empty placeholder for easier customization. -->
1299 <!-- You can override this target in the ../build.xml file. -->
1301 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1303 =======================
1304 TEST EXECUTION SECTION
1305 =======================
1307 <target depends="init" if="have.tests" name="-pre-test-run">
1308 <mkdir dir="${build.test.results.dir}"/>
1310 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1311 <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
1313 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1314 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1316 <target depends="init" if="have.tests" name="test-report"/>
1317 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1318 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1319 <target depends="init" if="have.tests" name="-pre-test-run-single">
1320 <mkdir dir="${build.test.results.dir}"/>
1322 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1323 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1324 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1326 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1327 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1329 <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"/>
1330 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1331 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1332 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1333 <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1335 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1336 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1338 <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"/>
1340 =======================
1341 TEST DEBUGGING SECTION
1342 =======================
1344 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1345 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1346 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1348 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1349 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1350 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1351 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1353 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1354 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1356 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1357 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1358 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1359 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1361 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1363 =========================
1364 APPLET EXECUTION SECTION
1365 =========================
1367 <target depends="init,compile-single" name="run-applet">
1368 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1369 <j2seproject1:java classname="sun.applet.AppletViewer">
1371 <arg value="${applet.url}"/>
1373 </j2seproject1:java>
1376 =========================
1377 APPLET DEBUGGING SECTION
1378 =========================
1380 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
1381 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1382 <j2seproject3:debug classname="sun.applet.AppletViewer">
1384 <arg value="${applet.url}"/>
1386 </j2seproject3:debug>
1388 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
1394 <target name="-deps-clean-init" unless="built-clean.properties">
1395 <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
1396 <delete file="${built-clean.properties}" quiet="true"/>
1398 <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
1399 <echo level="warn" message="Cycle detected: jdbc-dk-driver was already built"/>
1401 <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
1402 <mkdir dir="${build.dir}"/>
1403 <touch file="${built-clean.properties}" verbose="false"/>
1404 <property file="${built-clean.properties}" prefix="already.built.clean."/>
1405 <antcall target="-warn-already-built-clean"/>
1406 <propertyfile file="${built-clean.properties}">
1407 <entry key="${basedir}" value=""/>
1410 <target depends="init" name="-do-clean">
1411 <delete dir="${build.dir}"/>
1412 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1414 <target name="-post-clean">
1415 <!-- Empty placeholder for easier customization. -->
1416 <!-- You can override this target in the ../build.xml file. -->
1418 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1419 <target name="-check-call-dep">
1420 <property file="${call.built.properties}" prefix="already.built."/>
1421 <condition property="should.call.dep">
1424 <isset property="already.built.${call.subproject}"/>
1426 <available file="${call.script}"/>
1430 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
1431 <ant antfile="${call.script}" inheritall="false" target="${call.target}">
1433 <propertyref prefix="transfer."/>
1434 <mapper from="transfer.*" to="*" type="glob"/>