1 <?xml version="1.0" encoding="UTF-8"?>
\r
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
\r
4 *** EDIT ../build.xml INSTEAD ***
\r
6 For the purpose of easier reading the script
\r
7 is divided into following sections:
\r
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="Addressbook-impl">
\r
23 <fail message="Please build using Ant 1.8.0 or higher.">
\r
26 <antversion atleast="1.8.0"/>
\r
30 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
\r
32 ======================
\r
33 INITIALIZATION SECTION
\r
34 ======================
\r
36 <target name="-pre-init">
\r
37 <!-- Empty placeholder for easier customization. -->
\r
38 <!-- You can override this target in the ../build.xml file. -->
\r
40 <target depends="-pre-init" name="-init-private">
\r
41 <property file="nbproject/private/config.properties"/>
\r
42 <property file="nbproject/private/configs/${config}.properties"/>
\r
43 <property file="nbproject/private/private.properties"/>
\r
45 <target depends="-pre-init,-init-private" name="-init-user">
\r
46 <property file="${user.properties.file}"/>
\r
47 <!-- The two properties below are usually overridden -->
\r
48 <!-- by the active platform. Just a fallback. -->
\r
49 <property name="default.javac.source" value="1.4"/>
\r
50 <property name="default.javac.target" value="1.4"/>
\r
52 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
\r
53 <property file="nbproject/configs/${config}.properties"/>
\r
54 <property file="nbproject/project.properties"/>
\r
56 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
\r
57 <property name="platform.java" value="${java.home}/bin/java"/>
\r
58 <available file="${manifest.file}" property="manifest.available"/>
\r
59 <condition property="splashscreen.available">
\r
62 <equals arg1="${application.splash}" arg2="" trim="true"/>
\r
64 <available file="${application.splash}"/>
\r
67 <condition property="main.class.available">
\r
69 <isset property="main.class"/>
\r
71 <equals arg1="${main.class}" arg2="" trim="true"/>
\r
75 <condition property="profile.available">
\r
77 <isset property="javac.profile"/>
\r
78 <length length="0" string="${javac.profile}" when="greater"/>
\r
79 <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
\r
82 <condition property="do.archive">
\r
85 <istrue value="${jar.archive.disabled}"/>
\r
87 <istrue value="${not.archive.disabled}"/>
\r
90 <condition property="do.mkdist">
\r
92 <isset property="do.archive"/>
\r
93 <isset property="libs.CopyLibs.classpath"/>
\r
95 <istrue value="${mkdist.disabled}"/>
\r
99 <condition property="do.archive+manifest.available">
\r
101 <isset property="manifest.available"/>
\r
102 <istrue value="${do.archive}"/>
\r
105 <condition property="do.archive+main.class.available">
\r
107 <isset property="main.class.available"/>
\r
108 <istrue value="${do.archive}"/>
\r
111 <condition property="do.archive+splashscreen.available">
\r
113 <isset property="splashscreen.available"/>
\r
114 <istrue value="${do.archive}"/>
\r
117 <condition property="do.archive+profile.available">
\r
119 <isset property="profile.available"/>
\r
120 <istrue value="${do.archive}"/>
\r
123 <condition property="have.tests">
\r
125 <available file="${test.src.dir}"/>
\r
128 <condition property="have.sources">
\r
130 <available file="${src.dir}"/>
\r
133 <condition property="netbeans.home+have.tests">
\r
135 <isset property="netbeans.home"/>
\r
136 <isset property="have.tests"/>
\r
139 <condition property="no.javadoc.preview">
\r
141 <isset property="javadoc.preview"/>
\r
142 <isfalse value="${javadoc.preview}"/>
\r
145 <property name="run.jvmargs" value=""/>
\r
146 <property name="run.jvmargs.ide" value=""/>
\r
147 <property name="javac.compilerargs" value=""/>
\r
148 <property name="work.dir" value="${basedir}"/>
\r
149 <condition property="no.deps">
\r
151 <istrue value="${no.dependencies}"/>
\r
154 <property name="javac.debug" value="true"/>
\r
155 <property name="javadoc.preview" value="true"/>
\r
156 <property name="application.args" value=""/>
\r
157 <property name="source.encoding" value="${file.encoding}"/>
\r
158 <property name="runtime.encoding" value="${source.encoding}"/>
\r
159 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
\r
161 <isset property="javadoc.encoding"/>
\r
163 <equals arg1="${javadoc.encoding}" arg2=""/>
\r
167 <property name="javadoc.encoding.used" value="${source.encoding}"/>
\r
168 <property name="includes" value="**"/>
\r
169 <property name="excludes" value=""/>
\r
170 <property name="do.depend" value="false"/>
\r
171 <condition property="do.depend.true">
\r
172 <istrue value="${do.depend}"/>
\r
174 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
\r
175 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
\r
177 <isset property="endorsed.classpath"/>
\r
179 <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
\r
183 <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
\r
184 <isset property="profile.available"/>
\r
186 <condition else="false" property="jdkBug6558476">
\r
188 <matches pattern="1\.[56]" string="${java.specification.version}"/>
\r
190 <os family="unix"/>
\r
194 <property name="javac.fork" value="${jdkBug6558476}"/>
\r
195 <property name="jar.index" value="false"/>
\r
196 <property name="jar.index.metainf" value="${jar.index}"/>
\r
197 <property name="copylibs.rebase" value="true"/>
\r
198 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
\r
199 <condition property="junit.available">
\r
201 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
\r
202 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
\r
205 <condition property="testng.available">
\r
206 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
\r
208 <condition property="junit+testng.available">
\r
210 <istrue value="${junit.available}"/>
\r
211 <istrue value="${testng.available}"/>
\r
214 <condition else="testng" property="testng.mode" value="mixed">
\r
215 <istrue value="${junit+testng.available}"/>
\r
217 <condition else="" property="testng.debug.mode" value="-mixed">
\r
218 <istrue value="${junit+testng.available}"/>
\r
221 <target name="-post-init">
\r
222 <!-- Empty placeholder for easier customization. -->
\r
223 <!-- You can override this target in the ../build.xml file. -->
\r
225 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
\r
226 <fail unless="src.dir">Must set src.dir</fail>
\r
227 <fail unless="test.src.dir">Must set test.src.dir</fail>
\r
228 <fail unless="build.dir">Must set build.dir</fail>
\r
229 <fail unless="dist.dir">Must set dist.dir</fail>
\r
230 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
\r
231 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
\r
232 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
\r
233 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
\r
234 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
\r
235 <fail unless="dist.jar">Must set dist.jar</fail>
\r
237 <target name="-init-macrodef-property">
\r
238 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
\r
239 <attribute name="name"/>
\r
240 <attribute name="value"/>
\r
242 <property name="@{name}" value="${@{value}}"/>
\r
246 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
\r
247 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
248 <attribute default="${src.dir}" name="srcdir"/>
\r
249 <attribute default="${build.classes.dir}" name="destdir"/>
\r
250 <attribute default="${javac.classpath}" name="classpath"/>
\r
251 <attribute default="${javac.processorpath}" name="processorpath"/>
\r
252 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
\r
253 <attribute default="${includes}" name="includes"/>
\r
254 <attribute default="${excludes}" name="excludes"/>
\r
255 <attribute default="${javac.debug}" name="debug"/>
\r
256 <attribute default="${empty.dir}" name="sourcepath"/>
\r
257 <attribute default="${empty.dir}" name="gensrcdir"/>
\r
258 <element name="customize" optional="true"/>
\r
260 <property location="${build.dir}/empty" name="empty.dir"/>
\r
261 <mkdir dir="${empty.dir}"/>
\r
262 <mkdir dir="@{apgeneratedsrcdir}"/>
\r
263 <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}">
\r
265 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
\r
266 <include name="*"/>
\r
270 <path path="@{classpath}"/>
\r
272 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
273 <compilerarg line="${javac.profile.cmd.line.arg}"/>
\r
274 <compilerarg line="${javac.compilerargs}"/>
\r
275 <compilerarg value="-processorpath"/>
\r
276 <compilerarg path="@{processorpath}:${empty.dir}"/>
\r
277 <compilerarg line="${ap.processors.internal}"/>
\r
278 <compilerarg line="${annotation.processing.processor.options}"/>
\r
279 <compilerarg value="-s"/>
\r
280 <compilerarg path="@{apgeneratedsrcdir}"/>
\r
281 <compilerarg line="${ap.proc.none.internal}"/>
\r
287 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
\r
288 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
289 <attribute default="${src.dir}" name="srcdir"/>
\r
290 <attribute default="${build.classes.dir}" name="destdir"/>
\r
291 <attribute default="${javac.classpath}" name="classpath"/>
\r
292 <attribute default="${javac.processorpath}" name="processorpath"/>
\r
293 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
\r
294 <attribute default="${includes}" name="includes"/>
\r
295 <attribute default="${excludes}" name="excludes"/>
\r
296 <attribute default="${javac.debug}" name="debug"/>
\r
297 <attribute default="${empty.dir}" name="sourcepath"/>
\r
298 <attribute default="${empty.dir}" name="gensrcdir"/>
\r
299 <element name="customize" optional="true"/>
\r
301 <property location="${build.dir}/empty" name="empty.dir"/>
\r
302 <mkdir dir="${empty.dir}"/>
\r
303 <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}">
\r
305 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
\r
306 <include name="*"/>
\r
310 <path path="@{classpath}"/>
\r
312 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
313 <compilerarg line="${javac.profile.cmd.line.arg}"/>
\r
314 <compilerarg line="${javac.compilerargs}"/>
\r
320 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
\r
321 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
322 <attribute default="${src.dir}" name="srcdir"/>
\r
323 <attribute default="${build.classes.dir}" name="destdir"/>
\r
324 <attribute default="${javac.classpath}" name="classpath"/>
\r
326 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
\r
328 <path path="@{classpath}"/>
\r
333 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
334 <attribute default="${build.classes.dir}" name="destdir"/>
\r
336 <fail unless="javac.includes">Must set javac.includes</fail>
\r
337 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
\r
339 <filelist dir="@{destdir}" files="${javac.includes}"/>
\r
341 <globmapper from="*.java" to="*.class"/>
\r
343 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
\r
344 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
\r
346 <files includesfile="${javac.includesfile.binary}"/>
\r
349 <fileset file="${javac.includesfile.binary}"/>
\r
354 <target if="${junit.available}" name="-init-macrodef-junit-init">
\r
355 <condition else="false" property="nb.junit.batch" value="true">
\r
357 <istrue value="${junit.available}"/>
\r
359 <isset property="test.method"/>
\r
363 <condition else="false" property="nb.junit.single" value="true">
\r
365 <istrue value="${junit.available}"/>
\r
366 <isset property="test.method"/>
\r
370 <target name="-init-test-properties">
\r
371 <property name="test.binaryincludes" value="<nothing>"/>
\r
372 <property name="test.binarytestincludes" value=""/>
\r
373 <property name="test.binaryexcludes" value=""/>
\r
375 <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
\r
376 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
377 <attribute default="${includes}" name="includes"/>
\r
378 <attribute default="${excludes}" name="excludes"/>
\r
379 <attribute default="**" name="testincludes"/>
\r
380 <attribute default="" name="testmethods"/>
\r
381 <element name="customize" optional="true"/>
\r
383 <property name="junit.forkmode" value="perTest"/>
\r
384 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
\r
385 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
\r
387 <propertyref prefix="test-sys-prop."/>
\r
388 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
390 <formatter type="brief" usefile="false"/>
\r
391 <formatter type="xml"/>
\r
392 <jvmarg value="-ea"/>
\r
398 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
\r
399 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
400 <attribute default="${includes}" name="includes"/>
\r
401 <attribute default="${excludes}" name="excludes"/>
\r
402 <attribute default="**" name="testincludes"/>
\r
403 <attribute default="" name="testmethods"/>
\r
404 <element name="customize" optional="true"/>
\r
406 <property name="junit.forkmode" value="perTest"/>
\r
407 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
\r
408 <batchtest todir="${build.test.results.dir}">
\r
409 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
\r
410 <filename name="@{testincludes}"/>
\r
412 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
\r
413 <filename name="${test.binarytestincludes}"/>
\r
417 <propertyref prefix="test-sys-prop."/>
\r
418 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
420 <formatter type="brief" usefile="false"/>
\r
421 <formatter type="xml"/>
\r
422 <jvmarg value="-ea"/>
\r
428 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
\r
429 <target if="${testng.available}" name="-init-macrodef-testng">
\r
430 <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
431 <attribute default="${includes}" name="includes"/>
\r
432 <attribute default="${excludes}" name="excludes"/>
\r
433 <attribute default="**" name="testincludes"/>
\r
434 <attribute default="" name="testmethods"/>
\r
435 <element name="customize" optional="true"/>
\r
437 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
\r
438 <isset property="test.method"/>
\r
440 <union id="test.set">
\r
441 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
\r
442 <filename name="@{testincludes}"/>
\r
445 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
\r
446 <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="Addressbook" testname="TestNG tests" workingDir="${work.dir}">
\r
447 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
\r
449 <propertyref prefix="test-sys-prop."/>
\r
450 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
457 <target name="-init-macrodef-test-impl">
\r
458 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
459 <attribute default="${includes}" name="includes"/>
\r
460 <attribute default="${excludes}" name="excludes"/>
\r
461 <attribute default="**" name="testincludes"/>
\r
462 <attribute default="" name="testmethods"/>
\r
463 <element implicit="true" name="customize" optional="true"/>
\r
465 <echo>No tests executed.</echo>
\r
469 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
\r
470 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
471 <attribute default="${includes}" name="includes"/>
\r
472 <attribute default="${excludes}" name="excludes"/>
\r
473 <attribute default="**" name="testincludes"/>
\r
474 <attribute default="" name="testmethods"/>
\r
475 <element implicit="true" name="customize" optional="true"/>
\r
477 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
\r
479 </j2seproject3:junit>
\r
483 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
\r
484 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
485 <attribute default="${includes}" name="includes"/>
\r
486 <attribute default="${excludes}" name="excludes"/>
\r
487 <attribute default="**" name="testincludes"/>
\r
488 <attribute default="" name="testmethods"/>
\r
489 <element implicit="true" name="customize" optional="true"/>
\r
491 <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
\r
493 </j2seproject3:testng>
\r
497 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
\r
498 <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
499 <attribute default="${includes}" name="includes"/>
\r
500 <attribute default="${excludes}" name="excludes"/>
\r
501 <attribute default="**" name="testincludes"/>
\r
502 <attribute default="" name="testmethods"/>
\r
504 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
\r
507 <path path="${run.test.classpath}"/>
\r
509 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
510 <jvmarg line="${run.jvmargs}"/>
\r
511 <jvmarg line="${run.jvmargs.ide}"/>
\r
513 </j2seproject3:test-impl>
\r
517 <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
\r
518 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
519 <attribute default="${includes}" name="includes"/>
\r
520 <attribute default="${excludes}" name="excludes"/>
\r
521 <attribute default="**" name="testincludes"/>
\r
522 <attribute default="" name="testmethods"/>
\r
523 <element name="customize" optional="true"/>
\r
525 <property name="junit.forkmode" value="perTest"/>
\r
526 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
\r
527 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
\r
529 <propertyref prefix="test-sys-prop."/>
\r
530 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
532 <formatter type="brief" usefile="false"/>
\r
533 <formatter type="xml"/>
\r
534 <jvmarg value="-ea"/>
\r
535 <jvmarg line="${debug-args-line}"/>
\r
536 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
\r
542 <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
\r
543 <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
544 <attribute default="${includes}" name="includes"/>
\r
545 <attribute default="${excludes}" name="excludes"/>
\r
546 <attribute default="**" name="testincludes"/>
\r
547 <attribute default="" name="testmethods"/>
\r
548 <element name="customize" optional="true"/>
\r
550 <property name="junit.forkmode" value="perTest"/>
\r
551 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
\r
552 <batchtest todir="${build.test.results.dir}">
\r
553 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
\r
554 <filename name="@{testincludes}"/>
\r
556 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
\r
557 <filename name="${test.binarytestincludes}"/>
\r
561 <propertyref prefix="test-sys-prop."/>
\r
562 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
564 <formatter type="brief" usefile="false"/>
\r
565 <formatter type="xml"/>
\r
566 <jvmarg value="-ea"/>
\r
567 <jvmarg line="${debug-args-line}"/>
\r
568 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
\r
574 <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
\r
575 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
576 <attribute default="${includes}" name="includes"/>
\r
577 <attribute default="${excludes}" name="excludes"/>
\r
578 <attribute default="**" name="testincludes"/>
\r
579 <attribute default="" name="testmethods"/>
\r
580 <element implicit="true" name="customize" optional="true"/>
\r
582 <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
\r
584 </j2seproject3:junit-debug>
\r
588 <target if="${testng.available}" name="-init-macrodef-testng-debug">
\r
589 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
590 <attribute default="${main.class}" name="testClass"/>
\r
591 <attribute default="" name="testMethod"/>
\r
592 <element name="customize2" optional="true"/>
\r
594 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
\r
595 <isset property="test.method"/>
\r
597 <condition else="-suitename Addressbook -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
\r
598 <matches pattern=".*\.xml" string="@{testClass}"/>
\r
600 <delete dir="${build.test.results.dir}" quiet="true"/>
\r
601 <mkdir dir="${build.test.results.dir}"/>
\r
602 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
\r
605 <jvmarg value="-ea"/>
\r
606 <arg line="${testng.debug.mode}"/>
\r
607 <arg line="-d ${build.test.results.dir}"/>
\r
608 <arg line="-listener org.testng.reporters.VerboseReporter"/>
\r
609 <arg line="${testng.cmd.args}"/>
\r
611 </j2seproject3:debug>
\r
615 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
\r
616 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
617 <attribute default="${main.class}" name="testClass"/>
\r
618 <attribute default="" name="testMethod"/>
\r
619 <element implicit="true" name="customize2" optional="true"/>
\r
621 <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
\r
623 </j2seproject3:testng-debug>
\r
627 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
\r
628 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
629 <attribute default="${includes}" name="includes"/>
\r
630 <attribute default="${excludes}" name="excludes"/>
\r
631 <attribute default="**" name="testincludes"/>
\r
632 <attribute default="" name="testmethods"/>
\r
633 <attribute default="${main.class}" name="testClass"/>
\r
634 <attribute default="" name="testMethod"/>
\r
636 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
\r
639 <path path="${run.test.classpath}"/>
\r
641 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
642 <jvmarg line="${run.jvmargs}"/>
\r
643 <jvmarg line="${run.jvmargs.ide}"/>
\r
645 </j2seproject3:test-debug-impl>
\r
649 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
\r
650 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
651 <attribute default="${includes}" name="includes"/>
\r
652 <attribute default="${excludes}" name="excludes"/>
\r
653 <attribute default="**" name="testincludes"/>
\r
654 <attribute default="" name="testmethods"/>
\r
655 <attribute default="${main.class}" name="testClass"/>
\r
656 <attribute default="" name="testMethod"/>
\r
658 <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
\r
661 <propertyref prefix="test-sys-prop."/>
\r
662 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
665 </j2seproject3:testng-debug-impl>
\r
669 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
\r
671 pre NB7.2 profiling section; consider it deprecated
\r
673 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
\r
674 <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
\r
675 <!-- Empty placeholder for easier customization. -->
\r
676 <!-- You can override this target in the ../build.xml file. -->
\r
678 <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
\r
679 <!-- Empty placeholder for easier customization. -->
\r
680 <!-- You can override this target in the ../build.xml file. -->
\r
682 <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
\r
683 <macrodef name="resolve">
\r
684 <attribute name="name"/>
\r
685 <attribute name="value"/>
\r
687 <property name="@{name}" value="${env.@{value}}"/>
\r
690 <macrodef name="profile">
\r
691 <attribute default="${main.class}" name="classname"/>
\r
692 <element name="customize" optional="true"/>
\r
694 <property environment="env"/>
\r
695 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
\r
696 <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
\r
697 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
698 <jvmarg value="${profiler.info.jvmargs.agent}"/>
\r
699 <jvmarg line="${profiler.info.jvmargs}"/>
\r
700 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
\r
701 <arg line="${application.args}"/>
\r
703 <path path="${run.classpath}"/>
\r
706 <propertyref prefix="run-sys-prop."/>
\r
707 <mapper from="run-sys-prop.*" to="*" type="glob"/>
\r
714 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
\r
715 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
\r
716 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
\r
719 end of pre NB7.2 profiling section
\r
721 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
\r
722 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
\r
723 <attribute default="${main.class}" name="name"/>
\r
724 <attribute default="${debug.classpath}" name="classpath"/>
\r
725 <attribute default="" name="stopclassname"/>
\r
727 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
\r
729 <path path="@{classpath}"/>
\r
734 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
\r
735 <attribute default="${build.classes.dir}" name="dir"/>
\r
738 <fileset dir="@{dir}" includes="${fix.classes}">
\r
739 <include name="${fix.includes}*.class"/>
\r
745 <target name="-init-debug-args">
\r
746 <property name="version-output" value="java version "${ant.java.version}"/>
\r
747 <condition property="have-jdk-older-than-1.4">
\r
749 <contains string="${version-output}" substring="java version "1.0"/>
\r
750 <contains string="${version-output}" substring="java version "1.1"/>
\r
751 <contains string="${version-output}" substring="java version "1.2"/>
\r
752 <contains string="${version-output}" substring="java version "1.3"/>
\r
755 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
\r
756 <istrue value="${have-jdk-older-than-1.4}"/>
\r
758 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
\r
759 <os family="windows"/>
\r
761 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
\r
762 <isset property="debug.transport"/>
\r
765 <target depends="-init-debug-args" name="-init-macrodef-debug">
\r
766 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
767 <attribute default="${main.class}" name="classname"/>
\r
768 <attribute default="${debug.classpath}" name="classpath"/>
\r
769 <element name="customize" optional="true"/>
\r
771 <java classname="@{classname}" dir="${work.dir}" fork="true">
\r
772 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
773 <jvmarg line="${debug-args-line}"/>
\r
774 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
\r
775 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
\r
776 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
\r
777 <jvmarg line="${run.jvmargs}"/>
\r
778 <jvmarg line="${run.jvmargs.ide}"/>
\r
780 <path path="@{classpath}"/>
\r
783 <propertyref prefix="run-sys-prop."/>
\r
784 <mapper from="run-sys-prop.*" to="*" type="glob"/>
\r
791 <target name="-init-macrodef-java">
\r
792 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
\r
793 <attribute default="${main.class}" name="classname"/>
\r
794 <attribute default="${run.classpath}" name="classpath"/>
\r
795 <attribute default="jvm" name="jvm"/>
\r
796 <element name="customize" optional="true"/>
\r
798 <java classname="@{classname}" dir="${work.dir}" fork="true">
\r
799 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
\r
800 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
\r
801 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
\r
802 <jvmarg line="${run.jvmargs}"/>
\r
803 <jvmarg line="${run.jvmargs.ide}"/>
\r
805 <path path="@{classpath}"/>
\r
808 <propertyref prefix="run-sys-prop."/>
\r
809 <mapper from="run-sys-prop.*" to="*" type="glob"/>
\r
816 <target name="-init-macrodef-copylibs">
\r
817 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
\r
818 <attribute default="${manifest.file}" name="manifest"/>
\r
819 <element name="customize" optional="true"/>
\r
821 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
\r
822 <pathconvert property="run.classpath.without.build.classes.dir">
\r
823 <path path="${run.classpath}"/>
\r
824 <map from="${build.classes.dir.resolved}" to=""/>
\r
826 <pathconvert pathsep=" " property="jar.classpath">
\r
827 <path path="${run.classpath.without.build.classes.dir}"/>
\r
831 <replacestring from=" " to="%20"/>
\r
833 <globmapper from="*" to="lib/*"/>
\r
836 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
\r
837 <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
\r
838 <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
\r
840 <attribute name="Class-Path" value="${jar.classpath}"/>
\r
847 <target name="-init-presetdef-jar">
\r
848 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
\r
849 <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
\r
850 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
\r
854 <target name="-init-ap-cmdline-properties">
\r
855 <property name="annotation.processing.enabled" value="true"/>
\r
856 <property name="annotation.processing.processors.list" value=""/>
\r
857 <property name="annotation.processing.processor.options" value=""/>
\r
858 <property name="annotation.processing.run.all.processors" value="true"/>
\r
859 <property name="javac.processorpath" value="${javac.classpath}"/>
\r
860 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
\r
861 <condition property="ap.supported.internal" value="true">
\r
863 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
\r
867 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
\r
868 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
\r
869 <isfalse value="${annotation.processing.run.all.processors}"/>
\r
871 <condition else="" property="ap.proc.none.internal" value="-proc:none">
\r
872 <isfalse value="${annotation.processing.enabled}"/>
\r
875 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
\r
876 <property name="ap.cmd.line.internal" value=""/>
\r
878 <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"/>
\r
880 ===================
\r
881 COMPILATION SECTION
\r
882 ===================
\r
884 <target name="-deps-jar-init" unless="built-jar.properties">
\r
885 <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
\r
886 <delete file="${built-jar.properties}" quiet="true"/>
\r
888 <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
\r
889 <echo level="warn" message="Cycle detected: Addressbook was already built"/>
\r
891 <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
\r
892 <mkdir dir="${build.dir}"/>
\r
893 <touch file="${built-jar.properties}" verbose="false"/>
\r
894 <property file="${built-jar.properties}" prefix="already.built.jar."/>
\r
895 <antcall target="-warn-already-built-jar"/>
\r
896 <propertyfile file="${built-jar.properties}">
\r
897 <entry key="${basedir}" value=""/>
\r
899 <antcall target="-maybe-call-dep">
\r
900 <param name="call.built.properties" value="${built-jar.properties}"/>
\r
901 <param name="call.target" value="jar"/>
\r
902 <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
\r
903 <param name="transfer.not.archive.disabled" value="true"/>
\r
906 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
\r
907 <target depends="init" name="-check-automatic-build">
\r
908 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
\r
910 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
\r
911 <antcall target="clean"/>
\r
913 <target depends="init,deps-jar" name="-pre-pre-compile">
\r
914 <mkdir dir="${build.classes.dir}"/>
\r
916 <target name="-pre-compile">
\r
917 <!-- Empty placeholder for easier customization. -->
\r
918 <!-- You can override this target in the ../build.xml file. -->
\r
920 <target if="do.depend.true" name="-compile-depend">
\r
921 <pathconvert property="build.generated.subdirs">
\r
922 <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
\r
923 <include name="*"/>
\r
926 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
\r
928 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
\r
929 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
\r
930 <copy todir="${build.classes.dir}">
\r
931 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
\r
934 <target if="has.persistence.xml" name="-copy-persistence-xml">
\r
935 <mkdir dir="${build.classes.dir}/META-INF"/>
\r
936 <copy todir="${build.classes.dir}/META-INF">
\r
937 <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
\r
940 <target name="-post-compile">
\r
941 <!-- Empty placeholder for easier customization. -->
\r
942 <!-- You can override this target in the ../build.xml file. -->
\r
944 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
\r
945 <target name="-pre-compile-single">
\r
946 <!-- Empty placeholder for easier customization. -->
\r
947 <!-- You can override this target in the ../build.xml file. -->
\r
949 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
\r
950 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
\r
951 <j2seproject3:force-recompile/>
\r
952 <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
\r
954 <target name="-post-compile-single">
\r
955 <!-- Empty placeholder for easier customization. -->
\r
956 <!-- You can override this target in the ../build.xml file. -->
\r
958 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
\r
960 ====================
\r
961 JAR BUILDING SECTION
\r
962 ====================
\r
964 <target depends="init" name="-pre-pre-jar">
\r
965 <dirname file="${dist.jar}" property="dist.jar.dir"/>
\r
966 <mkdir dir="${dist.jar.dir}"/>
\r
968 <target name="-pre-jar">
\r
969 <!-- Empty placeholder for easier customization. -->
\r
970 <!-- You can override this target in the ../build.xml file. -->
\r
972 <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
\r
973 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
\r
974 <touch file="${tmp.manifest.file}" verbose="false"/>
\r
976 <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
\r
977 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
\r
978 <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
\r
980 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
\r
981 <manifest file="${tmp.manifest.file}" mode="update">
\r
982 <attribute name="Main-Class" value="${main.class}"/>
\r
985 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
\r
986 <manifest file="${tmp.manifest.file}" mode="update">
\r
987 <attribute name="Profile" value="${javac.profile}"/>
\r
990 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
\r
991 <basename file="${application.splash}" property="splashscreen.basename"/>
\r
992 <mkdir dir="${build.classes.dir}/META-INF"/>
\r
993 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
\r
994 <manifest file="${tmp.manifest.file}" mode="update">
\r
995 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
\r
998 <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
\r
999 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
\r
1000 <echo level="info">To run this application from the command line without Ant, try:</echo>
\r
1001 <property location="${dist.jar}" name="dist.jar.resolved"/>
\r
1002 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
\r
1004 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
\r
1005 <j2seproject1:jar manifest="${tmp.manifest.file}"/>
\r
1006 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
\r
1007 <property location="${dist.jar}" name="dist.jar.resolved"/>
\r
1008 <pathconvert property="run.classpath.with.dist.jar">
\r
1009 <path path="${run.classpath}"/>
\r
1010 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
\r
1012 <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
\r
1013 <isset property="main.class.available"/>
\r
1015 <condition else="debug" property="jar.usage.level" value="info">
\r
1016 <isset property="main.class.available"/>
\r
1018 <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
\r
1020 <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
\r
1022 <fileset file="${tmp.manifest.file}"/>
\r
1025 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
\r
1026 <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
\r
1027 <target name="-post-jar">
\r
1028 <!-- Empty placeholder for easier customization. -->
\r
1029 <!-- You can override this target in the ../build.xml file. -->
\r
1031 <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
\r
1032 <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
\r
1038 <target depends="init,compile" description="Run a main class." name="run">
\r
1039 <j2seproject1:java>
\r
1041 <arg line="${application.args}"/>
\r
1043 </j2seproject1:java>
\r
1045 <target name="-do-not-recompile">
\r
1046 <property name="javac.includes.binary" value=""/>
\r
1048 <target depends="init,compile-single" name="run-single">
\r
1049 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
\r
1050 <j2seproject1:java classname="${run.class}"/>
\r
1052 <target depends="init,compile-test-single" name="run-test-with-main">
\r
1053 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
\r
1054 <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
\r
1061 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
\r
1062 <j2seproject1:nbjpdastart name="${debug.class}"/>
\r
1064 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
\r
1065 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
\r
1067 <target depends="init,compile" name="-debug-start-debuggee">
\r
1068 <j2seproject3:debug>
\r
1070 <arg line="${application.args}"/>
\r
1072 </j2seproject3:debug>
\r
1074 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
\r
1075 <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
\r
1076 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
\r
1078 <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
\r
1079 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
\r
1080 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
\r
1081 <j2seproject3:debug classname="${debug.class}"/>
\r
1083 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
\r
1084 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
\r
1085 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
\r
1086 <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
\r
1088 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
\r
1089 <target depends="init" name="-pre-debug-fix">
\r
1090 <fail unless="fix.includes">Must set fix.includes</fail>
\r
1091 <property name="javac.includes" value="${fix.includes}.java"/>
\r
1093 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
\r
1094 <j2seproject1:nbjpdareload/>
\r
1096 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
\r
1103 pre NB7.2 profiler integration
\r
1105 <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
\r
1106 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
\r
1109 <path path="${run.classpath}"/>
\r
1111 </nbprofiledirect>
\r
1114 <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
\r
1115 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
\r
1116 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
\r
1119 <path path="${run.classpath}"/>
\r
1121 </nbprofiledirect>
\r
1122 <profile classname="${profile.class}"/>
\r
1124 <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
\r
1125 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
\r
1128 <path path="${run.classpath}"/>
\r
1130 </nbprofiledirect>
\r
1131 <profile classname="sun.applet.AppletViewer">
\r
1133 <arg value="${applet.url}"/>
\r
1137 <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
\r
1138 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
\r
1141 <path path="${run.test.classpath}"/>
\r
1143 </nbprofiledirect>
\r
1144 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
\r
1145 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
\r
1146 <jvmarg value="${profiler.info.jvmargs.agent}"/>
\r
1147 <jvmarg line="${profiler.info.jvmargs}"/>
\r
1148 <test name="${profile.class}"/>
\r
1150 <path path="${run.test.classpath}"/>
\r
1153 <propertyref prefix="test-sys-prop."/>
\r
1154 <mapper from="test-sys-prop.*" to="*" type="glob"/>
\r
1156 <formatter type="brief" usefile="false"/>
\r
1157 <formatter type="xml"/>
\r
1161 end of pre NB72 profiling section
\r
1163 <target if="netbeans.home" name="-profile-check">
\r
1164 <condition property="profiler.configured">
\r
1166 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
\r
1167 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
\r
1171 <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
\r
1173 <antcall target="run"/>
\r
1175 <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
\r
1176 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
\r
1178 <antcall target="run-single"/>
\r
1180 <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
\r
1181 <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
\r
1182 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
\r
1184 <antcall target="test-single"/>
\r
1186 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
\r
1187 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
\r
1189 <antcal target="run-test-with-main"/>
\r
1191 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
\r
1192 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
\r
1194 <antcall target="run-applet"/>
\r
1201 <target depends="init" if="have.sources" name="-javadoc-build">
\r
1202 <mkdir dir="${dist.javadoc.dir}"/>
\r
1203 <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
\r
1205 <isset property="endorsed.classpath.cmd.line.arg"/>
\r
1207 <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
\r
1211 <condition else="" property="bug5101868workaround" value="*.java">
\r
1212 <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
\r
1214 <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
\r
1216 <path path="${javac.classpath}"/>
\r
1218 <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
\r
1219 <filename name="**/*.java"/>
\r
1221 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
\r
1222 <include name="**/*.java"/>
\r
1223 <exclude name="*.java"/>
\r
1225 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
\r
1227 <copy todir="${dist.javadoc.dir}">
\r
1228 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
\r
1229 <filename name="**/doc-files/**"/>
\r
1231 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
\r
1232 <include name="**/doc-files/**"/>
\r
1236 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
\r
1237 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
\r
1239 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
\r
1241 =========================
\r
1242 TEST COMPILATION SECTION
\r
1243 =========================
\r
1245 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
\r
1246 <mkdir dir="${build.test.classes.dir}"/>
\r
1248 <target name="-pre-compile-test">
\r
1249 <!-- Empty placeholder for easier customization. -->
\r
1250 <!-- You can override this target in the ../build.xml file. -->
\r
1252 <target if="do.depend.true" name="-compile-test-depend">
\r
1253 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
\r
1255 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
\r
1256 <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}"/>
\r
1257 <copy todir="${build.test.classes.dir}">
\r
1258 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
\r
1261 <target name="-post-compile-test">
\r
1262 <!-- Empty placeholder for easier customization. -->
\r
1263 <!-- You can override this target in the ../build.xml file. -->
\r
1265 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
\r
1266 <target name="-pre-compile-test-single">
\r
1267 <!-- Empty placeholder for easier customization. -->
\r
1268 <!-- You can override this target in the ../build.xml file. -->
\r
1270 <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
\r
1271 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
\r
1272 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
\r
1273 <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}"/>
\r
1274 <copy todir="${build.test.classes.dir}">
\r
1275 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
\r
1278 <target name="-post-compile-test-single">
\r
1279 <!-- Empty placeholder for easier customization. -->
\r
1280 <!-- You can override this target in the ../build.xml file. -->
\r
1282 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
\r
1284 =======================
\r
1285 TEST EXECUTION SECTION
\r
1286 =======================
\r
1288 <target depends="init" if="have.tests" name="-pre-test-run">
\r
1289 <mkdir dir="${build.test.results.dir}"/>
\r
1291 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
\r
1292 <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
\r
1294 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
\r
1295 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
\r
1297 <target depends="init" if="have.tests" name="test-report"/>
\r
1298 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
\r
1299 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
\r
1300 <target depends="init" if="have.tests" name="-pre-test-run-single">
\r
1301 <mkdir dir="${build.test.results.dir}"/>
\r
1303 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
\r
1304 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
\r
1305 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
\r
1307 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
\r
1308 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
\r
1310 <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"/>
\r
1311 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
\r
1312 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
\r
1313 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
\r
1314 <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
\r
1316 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
\r
1317 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
\r
1319 <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"/>
\r
1321 =======================
\r
1322 TEST DEBUGGING SECTION
\r
1323 =======================
\r
1325 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
\r
1326 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
\r
1327 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
\r
1329 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
\r
1330 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
\r
1331 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
\r
1332 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
\r
1334 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
\r
1335 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
\r
1337 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
\r
1338 <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
\r
1339 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
\r
1340 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
\r
1342 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
\r
1344 =========================
\r
1345 APPLET EXECUTION SECTION
\r
1346 =========================
\r
1348 <target depends="init,compile-single" name="run-applet">
\r
1349 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
\r
1350 <j2seproject1:java classname="sun.applet.AppletViewer">
\r
1352 <arg value="${applet.url}"/>
\r
1354 </j2seproject1:java>
\r
1357 =========================
\r
1358 APPLET DEBUGGING SECTION
\r
1359 =========================
\r
1361 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
\r
1362 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
\r
1363 <j2seproject3:debug classname="sun.applet.AppletViewer">
\r
1365 <arg value="${applet.url}"/>
\r
1367 </j2seproject3:debug>
\r
1369 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
\r
1375 <target name="-deps-clean-init" unless="built-clean.properties">
\r
1376 <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
\r
1377 <delete file="${built-clean.properties}" quiet="true"/>
\r
1379 <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
\r
1380 <echo level="warn" message="Cycle detected: Addressbook was already built"/>
\r
1382 <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
\r
1383 <mkdir dir="${build.dir}"/>
\r
1384 <touch file="${built-clean.properties}" verbose="false"/>
\r
1385 <property file="${built-clean.properties}" prefix="already.built.clean."/>
\r
1386 <antcall target="-warn-already-built-clean"/>
\r
1387 <propertyfile file="${built-clean.properties}">
\r
1388 <entry key="${basedir}" value=""/>
\r
1390 <antcall target="-maybe-call-dep">
\r
1391 <param name="call.built.properties" value="${built-clean.properties}"/>
\r
1392 <param name="call.target" value="clean"/>
\r
1393 <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
\r
1394 <param name="transfer.not.archive.disabled" value="true"/>
\r
1397 <target depends="init" name="-do-clean">
\r
1398 <delete dir="${build.dir}"/>
\r
1399 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
\r
1401 <target name="-post-clean">
\r
1402 <!-- Empty placeholder for easier customization. -->
\r
1403 <!-- You can override this target in the ../build.xml file. -->
\r
1405 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
\r
1406 <target name="-check-call-dep">
\r
1407 <property file="${call.built.properties}" prefix="already.built."/>
\r
1408 <condition property="should.call.dep">
\r
1411 <isset property="already.built.${call.subproject}"/>
\r
1413 <available file="${call.script}"/>
\r
1417 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
\r
1418 <ant antfile="${call.script}" inheritall="false" target="${call.target}">
\r
1420 <propertyref prefix="transfer."/>
\r
1421 <mapper from="transfer.*" to="*" type="glob"/>
\r