cli: support --input-url and multiple names per option (might be used for short variants like -i, -a etc.)
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="alt2xml-impl">
23 <fail message="Please build using Ant 1.7.1 or higher.">
26 <antversion atleast="1.7.1"/>
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 <available file="${manifest.file}" property="manifest.available"/>
58 <condition property="splashscreen.available">
61 <equals arg1="${application.splash}" arg2="" trim="true"/>
63 <available file="${application.splash}"/>
66 <condition property="main.class.available">
68 <isset property="main.class"/>
70 <equals arg1="${main.class}" arg2="" trim="true"/>
74 <condition property="manifest.available+main.class">
76 <isset property="manifest.available"/>
77 <isset property="main.class.available"/>
80 <condition property="do.archive">
82 <istrue value="${jar.archive.disabled}"/>
85 <condition property="do.mkdist">
87 <isset property="do.archive"/>
88 <isset property="libs.CopyLibs.classpath"/>
90 <istrue value="${mkdist.disabled}"/>
94 <condition property="manifest.available+main.class+mkdist.available">
96 <istrue value="${manifest.available+main.class}"/>
97 <isset property="do.mkdist"/>
100 <condition property="do.archive+manifest.available">
102 <isset property="manifest.available"/>
103 <istrue value="${do.archive}"/>
106 <condition property="do.archive+main.class.available">
108 <isset property="main.class.available"/>
109 <istrue value="${do.archive}"/>
112 <condition property="do.archive+splashscreen.available">
114 <isset property="splashscreen.available"/>
115 <istrue value="${do.archive}"/>
118 <condition property="do.archive+manifest.available+main.class">
120 <istrue value="${manifest.available+main.class}"/>
121 <istrue value="${do.archive}"/>
124 <condition property="manifest.available-mkdist.available">
126 <istrue value="${manifest.available}"/>
127 <isset property="do.mkdist"/>
130 <condition property="manifest.available+main.class-mkdist.available">
132 <istrue value="${manifest.available+main.class}"/>
133 <isset property="do.mkdist"/>
136 <condition property="have.tests">
138 <available file="${test.src.dir}"/>
141 <condition property="have.sources">
143 <available file="${src.dir}"/>
146 <condition property="netbeans.home+have.tests">
148 <isset property="netbeans.home"/>
149 <isset property="have.tests"/>
152 <condition property="no.javadoc.preview">
154 <isset property="javadoc.preview"/>
155 <isfalse value="${javadoc.preview}"/>
158 <property name="run.jvmargs" value=""/>
159 <property name="run.jvmargs.ide" value=""/>
160 <property name="javac.compilerargs" value=""/>
161 <property name="work.dir" value="${basedir}"/>
162 <condition property="no.deps">
164 <istrue value="${no.dependencies}"/>
167 <property name="javac.debug" value="true"/>
168 <property name="javadoc.preview" value="true"/>
169 <property name="application.args" value=""/>
170 <property name="source.encoding" value="${file.encoding}"/>
171 <property name="runtime.encoding" value="${source.encoding}"/>
172 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
174 <isset property="javadoc.encoding"/>
176 <equals arg1="${javadoc.encoding}" arg2=""/>
180 <property name="javadoc.encoding.used" value="${source.encoding}"/>
181 <property name="includes" value="**"/>
182 <property name="excludes" value=""/>
183 <property name="do.depend" value="false"/>
184 <condition property="do.depend.true">
185 <istrue value="${do.depend}"/>
187 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
188 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
189 <length length="0" string="${endorsed.classpath}" when="greater"/>
191 <condition else="false" property="jdkBug6558476">
193 <matches pattern="1\.[56]" string="${java.specification.version}"/>
199 <property name="javac.fork" value="${jdkBug6558476}"/>
200 <property name="jar.index" value="false"/>
201 <property name="jar.index.metainf" value="${jar.index}"/>
202 <property name="copylibs.rebase" value="true"/>
203 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
204 <condition property="junit.available">
206 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
207 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
210 <condition property="testng.available">
211 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
213 <condition property="junit+testng.available">
215 <istrue value="${junit.available}"/>
216 <istrue value="${testng.available}"/>
219 <condition else="testng" property="testng.mode" value="mixed">
220 <istrue value="${junit+testng.available}"/>
222 <condition else="" property="testng.debug.mode" value="-mixed">
223 <istrue value="${junit+testng.available}"/>
226 <target name="-post-init">
227 <!-- Empty placeholder for easier customization. -->
228 <!-- You can override this target in the ../build.xml file. -->
230 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
231 <fail unless="src.dir">Must set src.dir</fail>
232 <fail unless="test.src.dir">Must set test.src.dir</fail>
233 <fail unless="build.dir">Must set build.dir</fail>
234 <fail unless="dist.dir">Must set dist.dir</fail>
235 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
236 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
237 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
238 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
239 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
240 <fail unless="dist.jar">Must set dist.jar</fail>
242 <target name="-init-macrodef-property">
243 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
244 <attribute name="name"/>
245 <attribute name="value"/>
247 <property name="@{name}" value="${@{value}}"/>
251 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
252 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
253 <attribute default="${src.dir}" name="srcdir"/>
254 <attribute default="${build.classes.dir}" name="destdir"/>
255 <attribute default="${javac.classpath}" name="classpath"/>
256 <attribute default="${javac.processorpath}" name="processorpath"/>
257 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
258 <attribute default="${includes}" name="includes"/>
259 <attribute default="${excludes}" name="excludes"/>
260 <attribute default="${javac.debug}" name="debug"/>
261 <attribute default="${empty.dir}" name="sourcepath"/>
262 <attribute default="${empty.dir}" name="gensrcdir"/>
263 <element name="customize" optional="true"/>
265 <property location="${build.dir}/empty" name="empty.dir"/>
266 <mkdir dir="${empty.dir}"/>
267 <mkdir dir="@{apgeneratedsrcdir}"/>
268 <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}">
270 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
275 <path path="@{classpath}"/>
277 <compilerarg line="${endorsed.classpath.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.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.compilerargs}"/>
323 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
324 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
325 <attribute default="${src.dir}" name="srcdir"/>
326 <attribute default="${build.classes.dir}" name="destdir"/>
327 <attribute default="${javac.classpath}" name="classpath"/>
329 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
331 <path path="@{classpath}"/>
336 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
337 <attribute default="${build.classes.dir}" name="destdir"/>
339 <fail unless="javac.includes">Must set javac.includes</fail>
340 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
342 <filelist dir="@{destdir}" files="${javac.includes}"/>
344 <globmapper from="*.java" to="*.class"/>
346 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
347 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
349 <files includesfile="${javac.includesfile.binary}"/>
352 <fileset file="${javac.includesfile.binary}"/>
357 <target if="${junit.available}" name="-init-macrodef-junit-init">
358 <condition else="false" property="nb.junit.batch" value="true">
360 <istrue value="${junit.available}"/>
362 <isset property="test.method"/>
366 <condition else="false" property="nb.junit.single" value="true">
368 <istrue value="${junit.available}"/>
369 <isset property="test.method"/>
373 <target name="-init-test-properties">
374 <property name="test.binaryincludes" value="<nothing>"/>
375 <property name="test.binarytestincludes" value=""/>
376 <property name="test.binaryexcludes" value=""/>
378 <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
379 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
380 <attribute default="${includes}" name="includes"/>
381 <attribute default="${excludes}" name="excludes"/>
382 <attribute default="**" name="testincludes"/>
383 <attribute default="" name="testmethods"/>
384 <element name="customize" optional="true"/>
386 <property name="junit.forkmode" value="perTest"/>
387 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
388 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
390 <propertyref prefix="test-sys-prop."/>
391 <mapper from="test-sys-prop.*" to="*" type="glob"/>
393 <formatter type="brief" usefile="false"/>
394 <formatter type="xml"/>
395 <jvmarg value="-ea"/>
401 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
402 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
403 <attribute default="${includes}" name="includes"/>
404 <attribute default="${excludes}" name="excludes"/>
405 <attribute default="**" name="testincludes"/>
406 <attribute default="" name="testmethods"/>
407 <element name="customize" optional="true"/>
409 <property name="junit.forkmode" value="perTest"/>
410 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
411 <batchtest todir="${build.test.results.dir}">
412 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
413 <filename name="@{testincludes}"/>
415 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
416 <filename name="${test.binarytestincludes}"/>
420 <propertyref prefix="test-sys-prop."/>
421 <mapper from="test-sys-prop.*" to="*" type="glob"/>
423 <formatter type="brief" usefile="false"/>
424 <formatter type="xml"/>
425 <jvmarg value="-ea"/>
431 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
432 <target if="${testng.available}" name="-init-macrodef-testng">
433 <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
434 <attribute default="${includes}" name="includes"/>
435 <attribute default="${excludes}" name="excludes"/>
436 <attribute default="**" name="testincludes"/>
437 <attribute default="" name="testmethods"/>
438 <element name="customize" optional="true"/>
440 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
441 <isset property="test.method"/>
443 <union id="test.set">
444 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
445 <filename name="@{testincludes}"/>
448 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
449 <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="alt2xml" testname="TestNG tests" workingDir="${work.dir}">
450 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
452 <propertyref prefix="test-sys-prop."/>
453 <mapper from="test-sys-prop.*" to="*" type="glob"/>
460 <target name="-init-macrodef-test-impl">
461 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
462 <attribute default="${includes}" name="includes"/>
463 <attribute default="${excludes}" name="excludes"/>
464 <attribute default="**" name="testincludes"/>
465 <attribute default="" name="testmethods"/>
466 <element implicit="true" name="customize" optional="true"/>
468 <echo>No tests executed.</echo>
472 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
473 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
474 <attribute default="${includes}" name="includes"/>
475 <attribute default="${excludes}" name="excludes"/>
476 <attribute default="**" name="testincludes"/>
477 <attribute default="" name="testmethods"/>
478 <element implicit="true" name="customize" optional="true"/>
480 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
482 </j2seproject3:junit>
486 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
487 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
488 <attribute default="${includes}" name="includes"/>
489 <attribute default="${excludes}" name="excludes"/>
490 <attribute default="**" name="testincludes"/>
491 <attribute default="" name="testmethods"/>
492 <element implicit="true" name="customize" optional="true"/>
494 <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
496 </j2seproject3:testng>
500 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
501 <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
502 <attribute default="${includes}" name="includes"/>
503 <attribute default="${excludes}" name="excludes"/>
504 <attribute default="**" name="testincludes"/>
505 <attribute default="" name="testmethods"/>
507 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
510 <path path="${run.test.classpath}"/>
512 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
513 <jvmarg line="${run.jvmargs}"/>
514 <jvmarg line="${run.jvmargs.ide}"/>
516 </j2seproject3:test-impl>
520 <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
521 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
522 <attribute default="${includes}" name="includes"/>
523 <attribute default="${excludes}" name="excludes"/>
524 <attribute default="**" name="testincludes"/>
525 <attribute default="" name="testmethods"/>
526 <element name="customize" optional="true"/>
528 <property name="junit.forkmode" value="perTest"/>
529 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
530 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
532 <propertyref prefix="test-sys-prop."/>
533 <mapper from="test-sys-prop.*" to="*" type="glob"/>
535 <formatter type="brief" usefile="false"/>
536 <formatter type="xml"/>
537 <jvmarg value="-ea"/>
538 <jvmarg line="${debug-args-line}"/>
539 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
545 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
546 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
547 <attribute default="${includes}" name="includes"/>
548 <attribute default="${excludes}" name="excludes"/>
549 <attribute default="**" name="testincludes"/>
550 <attribute default="" name="testmethods"/>
551 <element name="customize" optional="true"/>
553 <property name="junit.forkmode" value="perTest"/>
554 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
555 <batchtest todir="${build.test.results.dir}">
556 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
557 <filename name="@{testincludes}"/>
559 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
560 <filename name="${test.binarytestincludes}"/>
564 <propertyref prefix="test-sys-prop."/>
565 <mapper from="test-sys-prop.*" to="*" type="glob"/>
567 <formatter type="brief" usefile="false"/>
568 <formatter type="xml"/>
569 <jvmarg value="-ea"/>
570 <jvmarg line="${debug-args-line}"/>
571 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
577 <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
578 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
579 <attribute default="${includes}" name="includes"/>
580 <attribute default="${excludes}" name="excludes"/>
581 <attribute default="**" name="testincludes"/>
582 <attribute default="" name="testmethods"/>
583 <element implicit="true" name="customize" optional="true"/>
585 <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
587 </j2seproject3:junit-debug>
591 <target if="${testng.available}" name="-init-macrodef-testng-debug">
592 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
593 <attribute default="${main.class}" name="testClass"/>
594 <attribute default="" name="testMethod"/>
595 <element name="customize2" optional="true"/>
597 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
598 <isset property="test.method"/>
600 <condition else="-suitename alt2xml -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
601 <matches pattern=".*\.xml" string="@{testClass}"/>
603 <delete dir="${build.test.results.dir}" quiet="true"/>
604 <mkdir dir="${build.test.results.dir}"/>
605 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
608 <jvmarg value="-ea"/>
609 <arg line="${testng.debug.mode}"/>
610 <arg line="-d ${build.test.results.dir}"/>
611 <arg line="-listener org.testng.reporters.VerboseReporter"/>
612 <arg line="${testng.cmd.args}"/>
614 </j2seproject3:debug>
618 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
619 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
620 <attribute default="${main.class}" name="testClass"/>
621 <attribute default="" name="testMethod"/>
622 <element implicit="true" name="customize2" optional="true"/>
624 <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
626 </j2seproject3:testng-debug>
630 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
631 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
632 <attribute default="${includes}" name="includes"/>
633 <attribute default="${excludes}" name="excludes"/>
634 <attribute default="**" name="testincludes"/>
635 <attribute default="" name="testmethods"/>
636 <attribute default="${main.class}" name="testClass"/>
637 <attribute default="" name="testMethod"/>
639 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
642 <path path="${run.test.classpath}"/>
644 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
645 <jvmarg line="${run.jvmargs}"/>
646 <jvmarg line="${run.jvmargs.ide}"/>
648 </j2seproject3:test-debug-impl>
652 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
653 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
654 <attribute default="${includes}" name="includes"/>
655 <attribute default="${excludes}" name="excludes"/>
656 <attribute default="**" name="testincludes"/>
657 <attribute default="" name="testmethods"/>
658 <attribute default="${main.class}" name="testClass"/>
659 <attribute default="" name="testMethod"/>
661 <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
664 <propertyref prefix="test-sys-prop."/>
665 <mapper from="test-sys-prop.*" to="*" type="glob"/>
668 </j2seproject3:testng-debug-impl>
672 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
674 pre NB7.2 profiling section; consider it deprecated
676 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
677 <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
678 <!-- Empty placeholder for easier customization. -->
679 <!-- You can override this target in the ../build.xml file. -->
681 <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
682 <!-- Empty placeholder for easier customization. -->
683 <!-- You can override this target in the ../build.xml file. -->
685 <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
686 <macrodef name="resolve">
687 <attribute name="name"/>
688 <attribute name="value"/>
690 <property name="@{name}" value="${env.@{value}}"/>
693 <macrodef name="profile">
694 <attribute default="${main.class}" name="classname"/>
695 <element name="customize" optional="true"/>
697 <property environment="env"/>
698 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
699 <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
700 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
701 <jvmarg value="${profiler.info.jvmargs.agent}"/>
702 <jvmarg line="${profiler.info.jvmargs}"/>
703 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
704 <arg line="${application.args}"/>
706 <path path="${run.classpath}"/>
709 <propertyref prefix="run-sys-prop."/>
710 <mapper from="run-sys-prop.*" to="*" type="glob"/>
717 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
718 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
719 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
722 end of pre NB7.2 profiling section
724 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
725 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
726 <attribute default="${main.class}" name="name"/>
727 <attribute default="${debug.classpath}" name="classpath"/>
728 <attribute default="" name="stopclassname"/>
730 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
732 <path path="@{classpath}"/>
737 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
738 <attribute default="${build.classes.dir}" name="dir"/>
741 <fileset dir="@{dir}" includes="${fix.classes}">
742 <include name="${fix.includes}*.class"/>
748 <target name="-init-debug-args">
749 <property name="version-output" value="java version "${ant.java.version}"/>
750 <condition property="have-jdk-older-than-1.4">
752 <contains string="${version-output}" substring="java version "1.0"/>
753 <contains string="${version-output}" substring="java version "1.1"/>
754 <contains string="${version-output}" substring="java version "1.2"/>
755 <contains string="${version-output}" substring="java version "1.3"/>
758 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
759 <istrue value="${have-jdk-older-than-1.4}"/>
761 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
762 <os family="windows"/>
764 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
765 <isset property="debug.transport"/>
768 <target depends="-init-debug-args" name="-init-macrodef-debug">
769 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
770 <attribute default="${main.class}" name="classname"/>
771 <attribute default="${debug.classpath}" name="classpath"/>
772 <element name="customize" optional="true"/>
774 <java classname="@{classname}" dir="${work.dir}" fork="true">
775 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
776 <jvmarg line="${debug-args-line}"/>
777 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
778 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
779 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
780 <jvmarg line="${run.jvmargs}"/>
781 <jvmarg line="${run.jvmargs.ide}"/>
783 <path path="@{classpath}"/>
786 <propertyref prefix="run-sys-prop."/>
787 <mapper from="run-sys-prop.*" to="*" type="glob"/>
794 <target name="-init-macrodef-java">
795 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
796 <attribute default="${main.class}" name="classname"/>
797 <attribute default="${run.classpath}" name="classpath"/>
798 <attribute default="jvm" name="jvm"/>
799 <element name="customize" optional="true"/>
801 <java classname="@{classname}" dir="${work.dir}" fork="true">
802 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
803 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
804 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
805 <jvmarg line="${run.jvmargs}"/>
806 <jvmarg line="${run.jvmargs.ide}"/>
808 <path path="@{classpath}"/>
811 <propertyref prefix="run-sys-prop."/>
812 <mapper from="run-sys-prop.*" to="*" type="glob"/>
819 <target name="-init-macrodef-copylibs">
820 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
821 <attribute default="${manifest.file}" name="manifest"/>
822 <element name="customize" optional="true"/>
824 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
825 <pathconvert property="run.classpath.without.build.classes.dir">
826 <path path="${run.classpath}"/>
827 <map from="${build.classes.dir.resolved}" to=""/>
829 <pathconvert pathsep=" " property="jar.classpath">
830 <path path="${run.classpath.without.build.classes.dir}"/>
834 <replacestring from=" " to="%20"/>
836 <globmapper from="*" to="lib/*"/>
839 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
840 <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
841 <fileset dir="${build.classes.dir}"/>
843 <attribute name="Class-Path" value="${jar.classpath}"/>
850 <target name="-init-presetdef-jar">
851 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
852 <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
853 <j2seproject1:fileset dir="${build.classes.dir}"/>
857 <target name="-init-ap-cmdline-properties">
858 <property name="annotation.processing.enabled" value="true"/>
859 <property name="annotation.processing.processors.list" value=""/>
860 <property name="annotation.processing.processor.options" value=""/>
861 <property name="annotation.processing.run.all.processors" value="true"/>
862 <property name="javac.processorpath" value="${javac.classpath}"/>
863 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
864 <condition property="ap.supported.internal" value="true">
866 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
870 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
871 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
872 <isfalse value="${annotation.processing.run.all.processors}"/>
874 <condition else="" property="ap.proc.none.internal" value="-proc:none">
875 <isfalse value="${annotation.processing.enabled}"/>
878 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
879 <property name="ap.cmd.line.internal" value=""/>
881 <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"/>
887 <target name="-deps-jar-init" unless="built-jar.properties">
888 <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
889 <delete file="${built-jar.properties}" quiet="true"/>
891 <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
892 <echo level="warn" message="Cycle detected: alt2xml was already built"/>
894 <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
895 <mkdir dir="${build.dir}"/>
896 <touch file="${built-jar.properties}" verbose="false"/>
897 <property file="${built-jar.properties}" prefix="already.built.jar."/>
898 <antcall target="-warn-already-built-jar"/>
899 <propertyfile file="${built-jar.properties}">
900 <entry key="${basedir}" value=""/>
903 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
904 <target depends="init" name="-check-automatic-build">
905 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
907 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
908 <antcall target="clean"/>
910 <target depends="init,deps-jar,-groovy-init-macrodef-javac" name="-pre-pre-compile">
911 <mkdir dir="${build.classes.dir}"/>
913 <target name="-pre-compile">
914 <!-- Empty placeholder for easier customization. -->
915 <!-- You can override this target in the ../build.xml file. -->
917 <target if="do.depend.true" name="-compile-depend">
918 <pathconvert property="build.generated.subdirs">
919 <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
923 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
925 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
926 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
927 <copy todir="${build.classes.dir}">
928 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
931 <target if="has.persistence.xml" name="-copy-persistence-xml">
932 <mkdir dir="${build.classes.dir}/META-INF"/>
933 <copy todir="${build.classes.dir}/META-INF">
934 <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
937 <target name="-post-compile">
938 <!-- Empty placeholder for easier customization. -->
939 <!-- You can override this target in the ../build.xml file. -->
941 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
942 <target name="-pre-compile-single">
943 <!-- Empty placeholder for easier customization. -->
944 <!-- You can override this target in the ../build.xml file. -->
946 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
947 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
948 <j2seproject3:force-recompile/>
949 <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
951 <target name="-post-compile-single">
952 <!-- Empty placeholder for easier customization. -->
953 <!-- You can override this target in the ../build.xml file. -->
955 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
961 <target depends="init" name="-pre-pre-jar">
962 <dirname file="${dist.jar}" property="dist.jar.dir"/>
963 <mkdir dir="${dist.jar.dir}"/>
965 <target name="-pre-jar">
966 <!-- Empty placeholder for easier customization. -->
967 <!-- You can override this target in the ../build.xml file. -->
969 <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
972 <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
973 <j2seproject1:jar manifest="${manifest.file}"/>
975 <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
976 <j2seproject1:jar manifest="${manifest.file}">
977 <j2seproject1:manifest>
978 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
979 </j2seproject1:manifest>
981 <echo level="info">To run this application from the command line without Ant, try:</echo>
982 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
983 <property location="${dist.jar}" name="dist.jar.resolved"/>
984 <pathconvert property="run.classpath.with.dist.jar">
985 <path path="${run.classpath}"/>
986 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
988 <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
990 <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
991 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
992 <touch file="${tmp.manifest.file}" verbose="false"/>
994 <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
995 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
996 <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
998 <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
999 <manifest file="${tmp.manifest.file}" mode="update">
1000 <attribute name="Main-Class" value="${main.class}"/>
1003 <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
1004 <basename file="${application.splash}" property="splashscreen.basename"/>
1005 <mkdir dir="${build.classes.dir}/META-INF"/>
1006 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
1007 <manifest file="${tmp.manifest.file}" mode="update">
1008 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1011 <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
1012 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
1013 <echo level="info">To run this application from the command line without Ant, try:</echo>
1014 <property location="${dist.jar}" name="dist.jar.resolved"/>
1015 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
1017 <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
1019 <fileset file="${tmp.manifest.file}"/>
1022 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
1023 <target name="-post-jar">
1024 <!-- Empty placeholder for easier customization. -->
1025 <!-- You can override this target in the ../build.xml file. -->
1027 <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
1033 <target depends="init,compile" description="Run a main class." name="run">
1036 <arg line="${application.args}"/>
1038 </j2seproject1:java>
1040 <target name="-do-not-recompile">
1041 <property name="javac.includes.binary" value=""/>
1043 <target depends="init,compile-single" name="run-single">
1044 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1045 <j2seproject1:java classname="${run.class}"/>
1047 <target depends="init,compile-test-single" name="run-test-with-main">
1048 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1049 <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1056 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1057 <j2seproject1:nbjpdastart name="${debug.class}"/>
1059 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1060 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1062 <target depends="init,compile" name="-debug-start-debuggee">
1063 <j2seproject3:debug>
1065 <arg line="${application.args}"/>
1067 </j2seproject3:debug>
1069 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1070 <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
1071 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
1073 <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
1074 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1075 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1076 <j2seproject3:debug classname="${debug.class}"/>
1078 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1079 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1080 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1081 <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1083 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1084 <target depends="init" name="-pre-debug-fix">
1085 <fail unless="fix.includes">Must set fix.includes</fail>
1086 <property name="javac.includes" value="${fix.includes}.java"/>
1088 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1089 <j2seproject1:nbjpdareload/>
1091 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1098 pre NB7.2 profiler integration
1100 <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1101 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1104 <path path="${run.classpath}"/>
1109 <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
1110 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
1111 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1114 <path path="${run.classpath}"/>
1117 <profile classname="${profile.class}"/>
1119 <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
1120 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1123 <path path="${run.classpath}"/>
1126 <profile classname="sun.applet.AppletViewer">
1128 <arg value="${applet.url}"/>
1132 <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1133 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1136 <path path="${run.test.classpath}"/>
1139 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1140 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1141 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1142 <jvmarg line="${profiler.info.jvmargs}"/>
1143 <test name="${profile.class}"/>
1145 <path path="${run.test.classpath}"/>
1148 <propertyref prefix="test-sys-prop."/>
1149 <mapper from="test-sys-prop.*" to="*" type="glob"/>
1151 <formatter type="brief" usefile="false"/>
1152 <formatter type="xml"/>
1156 end of pre NB72 profiling section
1158 <target if="netbeans.home" name="-profile-check">
1159 <condition property="profiler.configured">
1161 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1162 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1166 <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1168 <antcall target="run"/>
1170 <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">
1171 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1173 <antcall target="run-single"/>
1175 <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
1176 <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
1177 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1179 <antcall target="test-single"/>
1181 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
1182 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1184 <antcal target="run-test-with-main"/>
1186 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
1187 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1189 <antcall target="run-applet"/>
1196 <target depends="init" if="have.sources" name="-javadoc-build">
1197 <mkdir dir="${dist.javadoc.dir}"/>
1198 <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
1200 <isset property="endorsed.classpath.cmd.line.arg"/>
1202 <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
1206 <javadoc additionalparam="${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}">
1208 <path path="${javac.classpath}"/>
1210 <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
1211 <filename name="**/*.java"/>
1213 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1214 <include name="**/*.java"/>
1215 <exclude name="*.java"/>
1217 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
1219 <copy todir="${dist.javadoc.dir}">
1220 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1221 <filename name="**/doc-files/**"/>
1223 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1224 <include name="**/doc-files/**"/>
1228 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1229 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1231 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
1233 =========================
1234 TEST COMPILATION SECTION
1235 =========================
1237 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1238 <mkdir dir="${build.test.classes.dir}"/>
1240 <target name="-pre-compile-test">
1241 <!-- Empty placeholder for easier customization. -->
1242 <!-- You can override this target in the ../build.xml file. -->
1244 <target if="do.depend.true" name="-compile-test-depend">
1245 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1247 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1248 <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}"/>
1249 <copy todir="${build.test.classes.dir}">
1250 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1253 <target name="-post-compile-test">
1254 <!-- Empty placeholder for easier customization. -->
1255 <!-- You can override this target in the ../build.xml file. -->
1257 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1258 <target name="-pre-compile-test-single">
1259 <!-- Empty placeholder for easier customization. -->
1260 <!-- You can override this target in the ../build.xml file. -->
1262 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1263 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1264 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1265 <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}"/>
1266 <copy todir="${build.test.classes.dir}">
1267 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1270 <target name="-post-compile-test-single">
1271 <!-- Empty placeholder for easier customization. -->
1272 <!-- You can override this target in the ../build.xml file. -->
1274 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1276 =======================
1277 TEST EXECUTION SECTION
1278 =======================
1280 <target depends="init" if="have.tests" name="-pre-test-run">
1281 <mkdir dir="${build.test.results.dir}"/>
1283 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1284 <j2seproject3:test testincludes="**/*Test.java"/>
1286 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1287 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1289 <target depends="init" if="have.tests" name="test-report"/>
1290 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1291 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1292 <target depends="init" if="have.tests" name="-pre-test-run-single">
1293 <mkdir dir="${build.test.results.dir}"/>
1295 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1296 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1297 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1299 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1300 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1302 <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"/>
1303 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1304 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1305 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1306 <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1308 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1309 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1311 <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"/>
1313 =======================
1314 TEST DEBUGGING SECTION
1315 =======================
1317 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1318 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1319 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1321 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1322 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1323 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1324 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1326 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1327 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1329 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1330 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1331 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1332 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1334 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1336 =========================
1337 APPLET EXECUTION SECTION
1338 =========================
1340 <target depends="init,compile-single" name="run-applet">
1341 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1342 <j2seproject1:java classname="sun.applet.AppletViewer">
1344 <arg value="${applet.url}"/>
1346 </j2seproject1:java>
1349 =========================
1350 APPLET DEBUGGING SECTION
1351 =========================
1353 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
1354 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1355 <j2seproject3:debug classname="sun.applet.AppletViewer">
1357 <arg value="${applet.url}"/>
1359 </j2seproject3:debug>
1361 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
1367 <target name="-deps-clean-init" unless="built-clean.properties">
1368 <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
1369 <delete file="${built-clean.properties}" quiet="true"/>
1371 <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
1372 <echo level="warn" message="Cycle detected: alt2xml was already built"/>
1374 <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
1375 <mkdir dir="${build.dir}"/>
1376 <touch file="${built-clean.properties}" verbose="false"/>
1377 <property file="${built-clean.properties}" prefix="already.built.clean."/>
1378 <antcall target="-warn-already-built-clean"/>
1379 <propertyfile file="${built-clean.properties}">
1380 <entry key="${basedir}" value=""/>
1383 <target depends="init" name="-do-clean">
1384 <delete dir="${build.dir}"/>
1385 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1387 <target name="-post-clean">
1388 <!-- Empty placeholder for easier customization. -->
1389 <!-- You can override this target in the ../build.xml file. -->
1391 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1392 <target name="-check-call-dep">
1393 <property file="${call.built.properties}" prefix="already.built."/>
1394 <condition property="should.call.dep">
1397 <isset property="already.built.${call.subproject}"/>
1399 <available file="${call.script}"/>
1403 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
1404 <ant antfile="${call.script}" inheritall="false" target="${call.target}">
1406 <propertyref prefix="transfer."/>
1407 <mapper from="transfer.*" to="*" type="glob"/>