Merge origin/master
[habeas.git] / nbproject / build-impl.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
4 *** EDIT ../build.xml INSTEAD ***
5
6 For the purpose of easier reading the script
7 is divided into following sections:
8
9 - initialization
10 - compilation
11 - jar
12 - execution
13 - debugging
14 - javadoc
15 - test compilation
16 - test execution
17 - test debugging
18 - applet
19 - cleanup
20
21 -->
22 <project xmlns:if="ant:if" 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" xmlns:unless="ant:unless" basedir=".." default="default" name="Habeas-impl">
23 <fail message="Please build using Ant 1.8.0 or higher.">
24 <condition>
25 <not>
26 <antversion atleast="1.8.0"/>
27 </not>
28 </condition>
29 </fail>
30 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
31 <!--
32 ======================
33 INITIALIZATION SECTION
34 ======================
35 -->
36 <target name="-pre-init">
37 <!-- Empty placeholder for easier customization. -->
38 <!-- You can override this target in the ../build.xml file. -->
39 </target>
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"/>
44 </target>
45 <target name="-pre-init-libraries">
46 <property location="./lib/nblibraries.properties" name="libraries.path"/>
47 <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
48 <pathconvert dirsep="/" property="libraries.dir">
49 <path path="${libraries.dir.nativedirsep}"/>
50 </pathconvert>
51 <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
52 <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
53 </target>
54 <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
55 <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
56 <filterchain>
57 <replacestring from="$${base}" to="${libraries.dir}"/>
58 <escapeunicode/>
59 </filterchain>
60 </loadproperties>
61 </target>
62 <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
63 <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
64 <filterchain>
65 <replacestring from="$${base}" to="${libraries.dir}"/>
66 <escapeunicode/>
67 </filterchain>
68 </loadproperties>
69 </target>
70 <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
71 <property file="${user.properties.file}"/>
72 <!-- The two properties below are usually overridden -->
73 <!-- by the active platform. Just a fallback. -->
74 <property name="default.javac.source" value="1.8"/>
75 <property name="default.javac.target" value="1.8"/>
76 </target>
77 <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
78 <property file="nbproject/configs/${config}.properties"/>
79 <property file="nbproject/project.properties"/>
80 </target>
81 <target name="-init-modules-supported">
82 <condition property="modules.supported.internal" value="true">
83 <not>
84 <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
85 </not>
86 </condition>
87 </target>
88 <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
89 <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
90 <attribute name="property"/>
91 <attribute name="sourcepath"/>
92 <sequential>
93 <loadresource property="@{property}" quiet="true">
94 <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
95 <filterchain>
96 <stripjavacomments/>
97 <linecontainsregexp>
98 <regexp pattern="module .* \{"/>
99 </linecontainsregexp>
100 <tokenfilter>
101 <linetokenizer/>
102 <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
103 </tokenfilter>
104 <striplinebreaks/>
105 </filterchain>
106 </loadresource>
107 </sequential>
108 </macrodef>
109 </target>
110 <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
111 <fail message="Java 9 support requires Ant 1.10.0 or higher.">
112 <condition>
113 <not>
114 <antversion atleast="1.10.0"/>
115 </not>
116 </condition>
117 </fail>
118 <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
119 <condition property="named.module.internal">
120 <and>
121 <isset property="module.name"/>
122 <length length="0" string="${module.name}" when="greater"/>
123 </and>
124 </condition>
125 <condition property="unnamed.module.internal">
126 <not>
127 <isset property="named.module.internal"/>
128 </not>
129 </condition>
130 <property name="javac.modulepath" value=""/>
131 <property name="run.modulepath" value="${javac.modulepath}"/>
132 <property name="module.build.classes.dir" value="${build.classes.dir}"/>
133 <property name="debug.modulepath" value="${run.modulepath}"/>
134 <property name="javac.upgrademodulepath" value=""/>
135 <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
136 <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
137 <and>
138 <isset property="javac.systemmodulepath"/>
139 <length length="0" string="${javac.systemmodulepath}" when="greater"/>
140 </and>
141 </condition>
142 <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
143 <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
144 <property name="module.name" value=""/>
145 </target>
146 <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
147 <property name="platform.java" value="${java.home}/bin/java"/>
148 <available file="${manifest.file}" property="manifest.available"/>
149 <condition property="splashscreen.available">
150 <and>
151 <not>
152 <equals arg1="${application.splash}" arg2="" trim="true"/>
153 </not>
154 <available file="${application.splash}"/>
155 </and>
156 </condition>
157 <condition property="main.class.available">
158 <and>
159 <isset property="main.class"/>
160 <not>
161 <equals arg1="${main.class}" arg2="" trim="true"/>
162 </not>
163 </and>
164 </condition>
165 <condition property="profile.available">
166 <and>
167 <isset property="javac.profile"/>
168 <length length="0" string="${javac.profile}" when="greater"/>
169 <not>
170 <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
171 </not>
172 </and>
173 </condition>
174 <condition property="do.archive">
175 <or>
176 <not>
177 <istrue value="${jar.archive.disabled}"/>
178 </not>
179 <istrue value="${not.archive.disabled}"/>
180 </or>
181 </condition>
182 <condition property="do.archive+manifest.available">
183 <and>
184 <isset property="manifest.available"/>
185 <istrue value="${do.archive}"/>
186 </and>
187 </condition>
188 <condition property="do.archive+main.class.available">
189 <and>
190 <isset property="main.class.available"/>
191 <istrue value="${do.archive}"/>
192 </and>
193 </condition>
194 <condition property="do.archive+splashscreen.available">
195 <and>
196 <isset property="splashscreen.available"/>
197 <istrue value="${do.archive}"/>
198 </and>
199 </condition>
200 <condition property="do.archive+profile.available">
201 <and>
202 <isset property="profile.available"/>
203 <istrue value="${do.archive}"/>
204 </and>
205 </condition>
206 <condition property="have.tests">
207 <or>
208 <available file="${test.src.dir}"/>
209 </or>
210 </condition>
211 <condition property="have.sources">
212 <or>
213 <available file="${src.dir}"/>
214 </or>
215 </condition>
216 <condition property="netbeans.home+have.tests">
217 <and>
218 <isset property="netbeans.home"/>
219 <isset property="have.tests"/>
220 </and>
221 </condition>
222 <condition property="no.javadoc.preview">
223 <and>
224 <isset property="javadoc.preview"/>
225 <isfalse value="${javadoc.preview}"/>
226 </and>
227 </condition>
228 <property name="run.jvmargs" value=""/>
229 <property name="run.jvmargs.ide" value=""/>
230 <property name="javac.compilerargs" value=""/>
231 <property name="work.dir" value="${basedir}"/>
232 <condition property="no.deps">
233 <and>
234 <istrue value="${no.dependencies}"/>
235 </and>
236 </condition>
237 <property name="javac.debug" value="true"/>
238 <property name="javadoc.preview" value="true"/>
239 <property name="application.args" value=""/>
240 <property name="source.encoding" value="${file.encoding}"/>
241 <property name="runtime.encoding" value="${source.encoding}"/>
242 <property name="manifest.encoding" value="${source.encoding}"/>
243 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
244 <and>
245 <isset property="javadoc.encoding"/>
246 <not>
247 <equals arg1="${javadoc.encoding}" arg2=""/>
248 </not>
249 </and>
250 </condition>
251 <property name="javadoc.encoding.used" value="${source.encoding}"/>
252 <property name="includes" value="**"/>
253 <property name="excludes" value=""/>
254 <property name="do.depend" value="false"/>
255 <condition property="do.depend.true">
256 <istrue value="${do.depend}"/>
257 </condition>
258 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
259 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
260 <and>
261 <isset property="endorsed.classpath"/>
262 <not>
263 <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
264 </not>
265 </and>
266 </condition>
267 <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
268 <isset property="profile.available"/>
269 </condition>
270 <condition else="false" property="jdkBug6558476">
271 <and>
272 <matches pattern="1\.[56]" string="${java.specification.version}"/>
273 <not>
274 <os family="unix"/>
275 </not>
276 </and>
277 </condition>
278 <condition else="false" property="javac.fork">
279 <or>
280 <istrue value="${jdkBug6558476}"/>
281 <istrue value="${javac.external.vm}"/>
282 </or>
283 </condition>
284 <property name="jar.index" value="false"/>
285 <property name="jar.index.metainf" value="${jar.index}"/>
286 <property name="copylibs.rebase" value="true"/>
287 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
288 <condition property="junit.available">
289 <or>
290 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
291 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
292 </or>
293 </condition>
294 <condition property="testng.available">
295 <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
296 </condition>
297 <condition property="junit+testng.available">
298 <and>
299 <istrue value="${junit.available}"/>
300 <istrue value="${testng.available}"/>
301 </and>
302 </condition>
303 <condition else="testng" property="testng.mode" value="mixed">
304 <istrue value="${junit+testng.available}"/>
305 </condition>
306 <condition else="" property="testng.debug.mode" value="-mixed">
307 <istrue value="${junit+testng.available}"/>
308 </condition>
309 <property name="java.failonerror" value="true"/>
310 </target>
311 <target name="-post-init">
312 <!-- Empty placeholder for easier customization. -->
313 <!-- You can override this target in the ../build.xml file. -->
314 </target>
315 <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
316 <fail unless="src.dir">Must set src.dir</fail>
317 <fail unless="test.src.dir">Must set test.src.dir</fail>
318 <fail unless="build.dir">Must set build.dir</fail>
319 <fail unless="dist.dir">Must set dist.dir</fail>
320 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
321 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
322 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
323 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
324 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
325 <fail unless="dist.jar">Must set dist.jar</fail>
326 </target>
327 <target name="-init-macrodef-property">
328 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
329 <attribute name="name"/>
330 <attribute name="value"/>
331 <sequential>
332 <property name="@{name}" value="${@{value}}"/>
333 </sequential>
334 </macrodef>
335 </target>
336 <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
337 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
338 <attribute default="${src.dir}" name="srcdir"/>
339 <attribute default="${build.classes.dir}" name="destdir"/>
340 <attribute default="${javac.classpath}" name="classpath"/>
341 <attribute default="${javac.modulepath}" name="modulepath"/>
342 <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
343 <attribute default="${javac.processorpath}" name="processorpath"/>
344 <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
345 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
346 <attribute default="${includes}" name="includes"/>
347 <attribute default="${excludes}" name="excludes"/>
348 <attribute default="${javac.debug}" name="debug"/>
349 <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
350 <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
351 <attribute default="${empty.dir}" name="gensrcdir"/>
352 <element name="customize" optional="true"/>
353 <sequential>
354 <condition property="warn.excludes.internal">
355 <and>
356 <isset property="named.module.internal"/>
357 <length length="0" string="@{excludes}" trim="true" when="greater"/>
358 </and>
359 </condition>
360 <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
361 <property location="${build.dir}/empty" name="empty.dir"/>
362 <mkdir dir="${empty.dir}"/>
363 <mkdir dir="@{apgeneratedsrcdir}"/>
364 <condition property="processormodulepath.set">
365 <resourcecount count="0" when="greater">
366 <path>
367 <pathelement path="@{processormodulepath}"/>
368 </path>
369 </resourcecount>
370 </condition>
371 <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}">
372 <src>
373 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
374 <include name="*"/>
375 </dirset>
376 </src>
377 <classpath>
378 <path path="@{classpath}"/>
379 </classpath>
380 <modulepath>
381 <path path="@{modulepath}"/>
382 </modulepath>
383 <upgrademodulepath>
384 <path path="@{upgrademodulepath}"/>
385 </upgrademodulepath>
386 <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
387 <compilerarg line="${javac.profile.cmd.line.arg}"/>
388 <compilerarg line="${javac.compilerargs}"/>
389 <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
390 <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
391 <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
392 <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
393 <compilerarg line="${ap.processors.internal}"/>
394 <compilerarg line="${annotation.processing.processor.options}"/>
395 <compilerarg value="-s"/>
396 <compilerarg path="@{apgeneratedsrcdir}"/>
397 <compilerarg line="${ap.proc.none.internal}"/>
398 <customize/>
399 </javac>
400 </sequential>
401 </macrodef>
402 </target>
403 <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
404 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
405 <attribute default="${src.dir}" name="srcdir"/>
406 <attribute default="${build.classes.dir}" name="destdir"/>
407 <attribute default="${javac.classpath}" name="classpath"/>
408 <attribute default="${javac.modulepath}" name="modulepath"/>
409 <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
410 <attribute default="${javac.processorpath}" name="processorpath"/>
411 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
412 <attribute default="${includes}" name="includes"/>
413 <attribute default="${excludes}" name="excludes"/>
414 <attribute default="${javac.debug}" name="debug"/>
415 <attribute default="${empty.dir}" name="sourcepath"/>
416 <attribute default="${empty.dir}" name="gensrcdir"/>
417 <element name="customize" optional="true"/>
418 <sequential>
419 <property location="${build.dir}/empty" name="empty.dir"/>
420 <mkdir dir="${empty.dir}"/>
421 <mkdir dir="@{apgeneratedsrcdir}"/>
422 <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}">
423 <src>
424 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
425 <include name="*"/>
426 </dirset>
427 </src>
428 <classpath>
429 <path path="@{classpath}"/>
430 </classpath>
431 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
432 <compilerarg line="${javac.profile.cmd.line.arg}"/>
433 <compilerarg line="${javac.compilerargs}"/>
434 <compilerarg value="-processorpath"/>
435 <compilerarg path="@{processorpath}:${empty.dir}"/>
436 <compilerarg line="${ap.processors.internal}"/>
437 <compilerarg line="${annotation.processing.processor.options}"/>
438 <compilerarg value="-s"/>
439 <compilerarg path="@{apgeneratedsrcdir}"/>
440 <compilerarg line="${ap.proc.none.internal}"/>
441 <customize/>
442 </javac>
443 </sequential>
444 </macrodef>
445 </target>
446 <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
447 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
448 <attribute default="${src.dir}" name="srcdir"/>
449 <attribute default="${build.classes.dir}" name="destdir"/>
450 <attribute default="${javac.classpath}" name="classpath"/>
451 <attribute default="${javac.modulepath}" name="modulepath"/>
452 <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
453 <attribute default="${javac.processorpath}" name="processorpath"/>
454 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
455 <attribute default="${includes}" name="includes"/>
456 <attribute default="${excludes}" name="excludes"/>
457 <attribute default="${javac.debug}" name="debug"/>
458 <attribute default="${empty.dir}" name="sourcepath"/>
459 <attribute default="${empty.dir}" name="gensrcdir"/>
460 <element name="customize" optional="true"/>
461 <sequential>
462 <property location="${build.dir}/empty" name="empty.dir"/>
463 <mkdir dir="${empty.dir}"/>
464 <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}">
465 <src>
466 <dirset dir="@{gensrcdir}" erroronmissingdir="false">
467 <include name="*"/>
468 </dirset>
469 </src>
470 <classpath>
471 <path path="@{classpath}"/>
472 </classpath>
473 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
474 <compilerarg line="${javac.profile.cmd.line.arg}"/>
475 <compilerarg line="${javac.compilerargs}"/>
476 <customize/>
477 </javac>
478 </sequential>
479 </macrodef>
480 </target>
481 <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
482 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
483 <attribute default="${src.dir}" name="srcdir"/>
484 <attribute default="${build.classes.dir}" name="destdir"/>
485 <attribute default="${javac.classpath}" name="classpath"/>
486 <sequential>
487 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
488 <classpath>
489 <path path="@{classpath}"/>
490 </classpath>
491 </depend>
492 </sequential>
493 </macrodef>
494 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
495 <attribute default="${build.classes.dir}" name="destdir"/>
496 <sequential>
497 <fail unless="javac.includes">Must set javac.includes</fail>
498 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
499 <path>
500 <filelist dir="@{destdir}" files="${javac.includes}"/>
501 </path>
502 <globmapper from="*.java" to="*.class"/>
503 </pathconvert>
504 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
505 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
506 <delete>
507 <files includesfile="${javac.includesfile.binary}"/>
508 </delete>
509 <delete>
510 <fileset file="${javac.includesfile.binary}"/>
511 </delete>
512 </sequential>
513 </macrodef>
514 </target>
515 <target if="${junit.available}" name="-init-macrodef-junit-init">
516 <condition else="false" property="nb.junit.batch" value="true">
517 <and>
518 <istrue value="${junit.available}"/>
519 <not>
520 <isset property="test.method"/>
521 </not>
522 </and>
523 </condition>
524 <condition else="false" property="nb.junit.single" value="true">
525 <and>
526 <istrue value="${junit.available}"/>
527 <isset property="test.method"/>
528 </and>
529 </condition>
530 </target>
531 <target name="-init-test-properties">
532 <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
533 <property name="test.binarytestincludes" value=""/>
534 <property name="test.binaryexcludes" value=""/>
535 </target>
536 <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
537 <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
538 <attribute default="${includes}" name="includes"/>
539 <attribute default="${excludes}" name="excludes"/>
540 <element name="customizePrototype" optional="true"/>
541 <sequential>
542 <property name="junit.forkmode" value="perTest"/>
543 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
544 <syspropertyset>
545 <propertyref prefix="test-sys-prop."/>
546 <mapper from="test-sys-prop.*" to="*" type="glob"/>
547 </syspropertyset>
548 <classpath>
549 <path path="${run.test.classpath}"/>
550 </classpath>
551 <modulepath>
552 <path path="${run.test.modulepath}"/>
553 </modulepath>
554 <formatter type="brief" usefile="false"/>
555 <formatter type="xml"/>
556 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
557 <jvmarg value="-ea"/>
558 <jvmarg line="${run.test.jvmargs}"/>
559 <customizePrototype/>
560 </junit>
561 </sequential>
562 </macrodef>
563 </target>
564 <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
565 <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
566 <attribute default="${includes}" name="includes"/>
567 <attribute default="${excludes}" name="excludes"/>
568 <element name="customizePrototype" optional="true"/>
569 <sequential>
570 <property name="junit.forkmode" value="perTest"/>
571 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
572 <syspropertyset>
573 <propertyref prefix="test-sys-prop."/>
574 <mapper from="test-sys-prop.*" to="*" type="glob"/>
575 </syspropertyset>
576 <classpath>
577 <path path="${run.test.classpath}"/>
578 </classpath>
579 <formatter type="brief" usefile="false"/>
580 <formatter type="xml"/>
581 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
582 <jvmarg value="-ea"/>
583 <customizePrototype/>
584 </junit>
585 </sequential>
586 </macrodef>
587 </target>
588 <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
589 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
590 <attribute default="${includes}" name="includes"/>
591 <attribute default="${excludes}" name="excludes"/>
592 <attribute default="**" name="testincludes"/>
593 <attribute default="" name="testmethods"/>
594 <element name="customize" optional="true"/>
595 <sequential>
596 <j2seproject3:junit-prototype>
597 <customizePrototype>
598 <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
599 <customize/>
600 </customizePrototype>
601 </j2seproject3:junit-prototype>
602 </sequential>
603 </macrodef>
604 </target>
605 <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
606 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
607 <attribute default="${includes}" name="includes"/>
608 <attribute default="${excludes}" name="excludes"/>
609 <attribute default="**" name="testincludes"/>
610 <attribute default="" name="testmethods"/>
611 <element name="customize" optional="true"/>
612 <sequential>
613 <j2seproject3:junit-prototype>
614 <customizePrototype>
615 <batchtest todir="${build.test.results.dir}">
616 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
617 <filename name="@{testincludes}"/>
618 </fileset>
619 <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
620 <filename name="${test.binarytestincludes}"/>
621 </fileset>
622 </batchtest>
623 <customize/>
624 </customizePrototype>
625 </j2seproject3:junit-prototype>
626 </sequential>
627 </macrodef>
628 </target>
629 <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
630 <target if="${testng.available}" name="-init-macrodef-testng">
631 <macrodef name="testng" 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 <element name="customize" optional="true"/>
637 <sequential>
638 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
639 <isset property="test.method"/>
640 </condition>
641 <union id="test.set">
642 <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
643 <filename name="@{testincludes}"/>
644 </fileset>
645 </union>
646 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
647 <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="Habeas" testname="TestNG tests" workingDir="${work.dir}">
648 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
649 <propertyset>
650 <propertyref prefix="test-sys-prop."/>
651 <mapper from="test-sys-prop.*" to="*" type="glob"/>
652 </propertyset>
653 <classpath>
654 <path path="${run.test.classpath}"/>
655 </classpath>
656 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
657 <customize/>
658 </testng>
659 </sequential>
660 </macrodef>
661 </target>
662 <target name="-init-macrodef-test-impl">
663 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
664 <attribute default="${includes}" name="includes"/>
665 <attribute default="${excludes}" name="excludes"/>
666 <attribute default="**" name="testincludes"/>
667 <attribute default="" name="testmethods"/>
668 <element implicit="true" name="customize" optional="true"/>
669 <sequential>
670 <echo>No tests executed.</echo>
671 </sequential>
672 </macrodef>
673 </target>
674 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
675 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
676 <attribute default="${includes}" name="includes"/>
677 <attribute default="${excludes}" name="excludes"/>
678 <attribute default="**" name="testincludes"/>
679 <attribute default="" name="testmethods"/>
680 <element implicit="true" name="customize" optional="true"/>
681 <sequential>
682 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
683 <customize/>
684 </j2seproject3:junit>
685 </sequential>
686 </macrodef>
687 </target>
688 <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
689 <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
690 <attribute default="${includes}" name="includes"/>
691 <attribute default="${excludes}" name="excludes"/>
692 <attribute default="**" name="testincludes"/>
693 <attribute default="" name="testmethods"/>
694 <element implicit="true" name="customize" optional="true"/>
695 <sequential>
696 <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
697 <customize/>
698 </j2seproject3:testng>
699 </sequential>
700 </macrodef>
701 </target>
702 <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
703 <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
704 <attribute default="${includes}" name="includes"/>
705 <attribute default="${excludes}" name="excludes"/>
706 <attribute default="**" name="testincludes"/>
707 <attribute default="" name="testmethods"/>
708 <sequential>
709 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
710 <customize>
711 <jvmarg line="${run.jvmargs}"/>
712 <jvmarg line="${run.jvmargs.ide}"/>
713 </customize>
714 </j2seproject3:test-impl>
715 </sequential>
716 </macrodef>
717 </target>
718 <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
719 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
720 <attribute default="${includes}" name="includes"/>
721 <attribute default="${excludes}" name="excludes"/>
722 <attribute default="**" name="testincludes"/>
723 <attribute default="" name="testmethods"/>
724 <element name="customizeDebuggee" optional="true"/>
725 <sequential>
726 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
727 <customize>
728 <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
729 <customizeDebuggee/>
730 </customize>
731 </j2seproject3:junit>
732 </sequential>
733 </macrodef>
734 </target>
735 <target if="${testng.available}" name="-init-macrodef-testng-debug">
736 <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
737 <attribute default="${main.class}" name="testClass"/>
738 <attribute default="" name="testMethod"/>
739 <element name="customize2" optional="true"/>
740 <sequential>
741 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
742 <isset property="test.method"/>
743 </condition>
744 <condition else="-suitename Habeas -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
745 <matches pattern=".*\.xml" string="@{testClass}"/>
746 </condition>
747 <delete dir="${build.test.results.dir}" quiet="true"/>
748 <mkdir dir="${build.test.results.dir}"/>
749 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
750 <customizeDebuggee>
751 <customize2/>
752 <jvmarg value="-ea"/>
753 <arg line="${testng.debug.mode}"/>
754 <arg line="-d ${build.test.results.dir}"/>
755 <arg line="-listener org.testng.reporters.VerboseReporter"/>
756 <arg line="${testng.cmd.args}"/>
757 </customizeDebuggee>
758 </j2seproject3:debug>
759 </sequential>
760 </macrodef>
761 </target>
762 <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
763 <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
764 <attribute default="${main.class}" name="testClass"/>
765 <attribute default="" name="testMethod"/>
766 <element implicit="true" name="customize2" optional="true"/>
767 <sequential>
768 <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
769 <customize2/>
770 </j2seproject3:testng-debug>
771 </sequential>
772 </macrodef>
773 </target>
774 <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
775 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
776 <attribute default="${includes}" name="includes"/>
777 <attribute default="${excludes}" name="excludes"/>
778 <attribute default="**" name="testincludes"/>
779 <attribute default="" name="testmethods"/>
780 <attribute default="${main.class}" name="testClass"/>
781 <attribute default="" name="testMethod"/>
782 <sequential>
783 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
784 <customizeDebuggee>
785 <jvmarg line="${run.jvmargs}"/>
786 <jvmarg line="${run.jvmargs.ide}"/>
787 </customizeDebuggee>
788 </j2seproject3:test-debug-impl>
789 </sequential>
790 </macrodef>
791 </target>
792 <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
793 <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
794 <attribute default="${includes}" name="includes"/>
795 <attribute default="${excludes}" name="excludes"/>
796 <attribute default="**" name="testincludes"/>
797 <attribute default="" name="testmethods"/>
798 <attribute default="${main.class}" name="testClass"/>
799 <attribute default="" name="testMethod"/>
800 <sequential>
801 <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
802 <customize2>
803 <syspropertyset>
804 <propertyref prefix="test-sys-prop."/>
805 <mapper from="test-sys-prop.*" to="*" type="glob"/>
806 </syspropertyset>
807 </customize2>
808 </j2seproject3:testng-debug-impl>
809 </sequential>
810 </macrodef>
811 </target>
812 <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
813 <!--
814 pre NB7.2 profiling section; consider it deprecated
815 -->
816 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
817 <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
818 <!-- Empty placeholder for easier customization. -->
819 <!-- You can override this target in the ../build.xml file. -->
820 </target>
821 <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
822 <!-- Empty placeholder for easier customization. -->
823 <!-- You can override this target in the ../build.xml file. -->
824 </target>
825 <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
826 <macrodef name="resolve">
827 <attribute name="name"/>
828 <attribute name="value"/>
829 <sequential>
830 <property name="@{name}" value="${env.@{value}}"/>
831 </sequential>
832 </macrodef>
833 <macrodef name="profile">
834 <attribute default="${main.class}" name="classname"/>
835 <element name="customize" optional="true"/>
836 <sequential>
837 <property environment="env"/>
838 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
839 <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
840 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
841 <jvmarg value="${profiler.info.jvmargs.agent}"/>
842 <jvmarg line="${profiler.info.jvmargs}"/>
843 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
844 <arg line="${application.args}"/>
845 <classpath>
846 <path path="${run.classpath}"/>
847 </classpath>
848 <syspropertyset>
849 <propertyref prefix="run-sys-prop."/>
850 <mapper from="run-sys-prop.*" to="*" type="glob"/>
851 </syspropertyset>
852 <customize/>
853 </java>
854 </sequential>
855 </macrodef>
856 </target>
857 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
858 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
859 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
860 </target>
861 <!--
862 end of pre NB7.2 profiling section
863 -->
864 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
865 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
866 <attribute default="${main.class}" name="name"/>
867 <attribute default="${debug.modulepath}" name="modulepath"/>
868 <attribute default="${debug.classpath}" name="classpath"/>
869 <attribute default="" name="stopclassname"/>
870 <sequential>
871 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
872 <modulepath>
873 <path path="@{modulepath}"/>
874 </modulepath>
875 <classpath>
876 <path path="@{classpath}"/>
877 </classpath>
878 </nbjpdastart>
879 </sequential>
880 </macrodef>
881 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
882 <attribute default="${build.classes.dir}" name="dir"/>
883 <sequential>
884 <nbjpdareload>
885 <fileset dir="@{dir}" includes="${fix.classes}">
886 <include name="${fix.includes}*.class"/>
887 </fileset>
888 </nbjpdareload>
889 </sequential>
890 </macrodef>
891 </target>
892 <target name="-init-debug-args">
893 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
894 <os family="windows"/>
895 </condition>
896 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
897 <isset property="debug.transport"/>
898 </condition>
899 </target>
900 <target depends="-init-debug-args" name="-init-macrodef-debug">
901 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
902 <attribute default="${module.name}" name="modulename"/>
903 <attribute default="${main.class}" name="classname"/>
904 <attribute default="${debug.modulepath}" name="modulepath"/>
905 <attribute default="${debug.classpath}" name="classpath"/>
906 <element name="customizeDebuggee" optional="true"/>
907 <sequential>
908 <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
909 <customize>
910 <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
911 <customizeDebuggee/>
912 </customize>
913 </j2seproject1:java>
914 </sequential>
915 </macrodef>
916 </target>
917 <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
918 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
919 <attribute default="${module.name}" name="modulename"/>
920 <attribute default="${main.class}" name="classname"/>
921 <attribute default="${run.modulepath}" name="modulepath"/>
922 <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
923 <attribute default="${run.classpath}" name="classpath"/>
924 <attribute default="jvm" name="jvm"/>
925 <element name="customize" optional="true"/>
926 <sequential>
927 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
928 <classpath>
929 <path path="@{classpath}"/>
930 </classpath>
931 <modulepath>
932 <pathelement path="@{modulepath}"/>
933 <pathelement location="${module.build.classes.dir}"/>
934 </modulepath>
935 <upgrademodulepath>
936 <path path="@{upgrademodulepath}"/>
937 </upgrademodulepath>
938 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
939 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
940 <jvmarg line="${run.jvmargs}"/>
941 <jvmarg line="${run.jvmargs.ide}"/>
942 <syspropertyset>
943 <propertyref prefix="run-sys-prop."/>
944 <mapper from="run-sys-prop.*" to="*" type="glob"/>
945 </syspropertyset>
946 <customize/>
947 </java>
948 </sequential>
949 </macrodef>
950 </target>
951 <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
952 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
953 <attribute default="" name="modulename"/>
954 <attribute default="${main.class}" name="classname"/>
955 <attribute default="${run.modulepath}" name="modulepath"/>
956 <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
957 <attribute default="${run.classpath}" name="classpath"/>
958 <attribute default="jvm" name="jvm"/>
959 <element name="customize" optional="true"/>
960 <sequential>
961 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
962 <classpath>
963 <path path="@{classpath}"/>
964 </classpath>
965 <modulepath>
966 <path path="@{modulepath}"/>
967 </modulepath>
968 <upgrademodulepath>
969 <path path="@{upgrademodulepath}"/>
970 </upgrademodulepath>
971 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
972 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
973 <jvmarg line="${run.jvmargs}"/>
974 <jvmarg line="${run.jvmargs.ide}"/>
975 <syspropertyset>
976 <propertyref prefix="run-sys-prop."/>
977 <mapper from="run-sys-prop.*" to="*" type="glob"/>
978 </syspropertyset>
979 <customize/>
980 </java>
981 </sequential>
982 </macrodef>
983 </target>
984 <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
985 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
986 <attribute default="" name="modulename"/>
987 <attribute default="${main.class}" name="classname"/>
988 <attribute default="" name="modulepath"/>
989 <attribute default="${run.classpath}" name="classpath"/>
990 <attribute default="jvm" name="jvm"/>
991 <element name="customize" optional="true"/>
992 <sequential>
993 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
994 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
995 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
996 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
997 <jvmarg line="${run.jvmargs}"/>
998 <jvmarg line="${run.jvmargs.ide}"/>
999 <classpath>
1000 <path path="@{classpath}"/>
1001 </classpath>
1002 <syspropertyset>
1003 <propertyref prefix="run-sys-prop."/>
1004 <mapper from="run-sys-prop.*" to="*" type="glob"/>
1005 </syspropertyset>
1006 <customize/>
1007 </java>
1008 </sequential>
1009 </macrodef>
1010 </target>
1011 <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
1012 <target name="-init-macrodef-copylibs">
1013 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
1014 <attribute default="${manifest.file}" name="manifest"/>
1015 <element name="customize" optional="true"/>
1016 <sequential>
1017 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1018 <pathconvert property="run.classpath.without.build.classes.dir">
1019 <path path="${run.classpath}"/>
1020 <map from="${build.classes.dir.resolved}" to=""/>
1021 </pathconvert>
1022 <pathconvert pathsep=" " property="jar.classpath">
1023 <path path="${run.classpath.without.build.classes.dir}"/>
1024 <chainedmapper>
1025 <flattenmapper/>
1026 <filtermapper>
1027 <replacestring from=" " to="%20"/>
1028 </filtermapper>
1029 <globmapper from="*" to="lib/*"/>
1030 </chainedmapper>
1031 </pathconvert>
1032 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
1033 <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1034 <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
1035 <manifest>
1036 <attribute name="Class-Path" value="${jar.classpath}"/>
1037 <customize/>
1038 </manifest>
1039 </copylibs>
1040 </sequential>
1041 </macrodef>
1042 </target>
1043 <target name="-init-presetdef-jar">
1044 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
1045 <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
1046 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
1047 </jar>
1048 </presetdef>
1049 </target>
1050 <target name="-init-ap-cmdline-properties">
1051 <property name="annotation.processing.enabled" value="true"/>
1052 <property name="annotation.processing.processors.list" value=""/>
1053 <property name="annotation.processing.processor.options" value=""/>
1054 <property name="annotation.processing.run.all.processors" value="true"/>
1055 <property name="javac.processorpath" value="${javac.classpath}"/>
1056 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
1057 <condition property="ap.supported.internal" value="true">
1058 <not>
1059 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
1060 </not>
1061 </condition>
1062 </target>
1063 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
1064 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
1065 <isfalse value="${annotation.processing.run.all.processors}"/>
1066 </condition>
1067 <condition else="" property="ap.proc.none.internal" value="-proc:none">
1068 <isfalse value="${annotation.processing.enabled}"/>
1069 </condition>
1070 </target>
1071 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
1072 <property name="ap.cmd.line.internal" value=""/>
1073 </target>
1074 <target depends="-pre-init,-init-private,-init-libraries,-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"/>
1075 <!--
1076 ===================
1077 COMPILATION SECTION
1078 ===================
1079 -->
1080 <target name="-deps-jar-init" unless="built-jar.properties">
1081 <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
1082 <delete file="${built-jar.properties}" quiet="true"/>
1083 </target>
1084 <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
1085 <echo level="warn" message="Cycle detected: Habeas was already built"/>
1086 </target>
1087 <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
1088 <mkdir dir="${build.dir}"/>
1089 <touch file="${built-jar.properties}" verbose="false"/>
1090 <property file="${built-jar.properties}" prefix="already.built.jar."/>
1091 <antcall target="-warn-already-built-jar"/>
1092 <propertyfile file="${built-jar.properties}">
1093 <entry key="${basedir}" value=""/>
1094 </propertyfile>
1095 </target>
1096 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
1097 <target depends="init" name="-check-automatic-build">
1098 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
1099 </target>
1100 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
1101 <antcall target="clean">
1102 <param name="no.dependencies" value="true"/>
1103 </antcall>
1104 </target>
1105 <target depends="init,deps-jar" name="-pre-pre-compile">
1106 <mkdir dir="${build.classes.dir}"/>
1107 </target>
1108 <target name="-pre-compile">
1109 <!-- Empty placeholder for easier customization. -->
1110 <!-- You can override this target in the ../build.xml file. -->
1111 </target>
1112 <target if="do.depend.true" name="-compile-depend">
1113 <pathconvert property="build.generated.subdirs">
1114 <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1115 <include name="*"/>
1116 </dirset>
1117 </pathconvert>
1118 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
1119 </target>
1120 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
1121 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
1122 <copy todir="${build.classes.dir}">
1123 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1124 </copy>
1125 </target>
1126 <target if="has.persistence.xml" name="-copy-persistence-xml">
1127 <mkdir dir="${build.classes.dir}/META-INF"/>
1128 <copy todir="${build.classes.dir}/META-INF">
1129 <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
1130 </copy>
1131 </target>
1132 <target name="-post-compile">
1133 <!-- Empty placeholder for easier customization. -->
1134 <!-- You can override this target in the ../build.xml file. -->
1135 </target>
1136 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
1137 <target name="-pre-compile-single">
1138 <!-- Empty placeholder for easier customization. -->
1139 <!-- You can override this target in the ../build.xml file. -->
1140 </target>
1141 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
1142 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1143 <j2seproject3:force-recompile/>
1144 <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
1145 </target>
1146 <target name="-post-compile-single">
1147 <!-- Empty placeholder for easier customization. -->
1148 <!-- You can override this target in the ../build.xml file. -->
1149 </target>
1150 <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
1151 <!--
1152 ====================
1153 JAR BUILDING SECTION
1154 ====================
1155 -->
1156 <target depends="init" name="-pre-pre-jar">
1157 <dirname file="${dist.jar}" property="dist.jar.dir"/>
1158 <mkdir dir="${dist.jar.dir}"/>
1159 </target>
1160 <target name="-pre-jar">
1161 <!-- Empty placeholder for easier customization. -->
1162 <!-- You can override this target in the ../build.xml file. -->
1163 </target>
1164 <target depends="init,compile" name="-check-module-main-class">
1165 <pathconvert property="main.class.file">
1166 <string value="${main.class}"/>
1167 <unpackagemapper from="*" to="*.class"/>
1168 </pathconvert>
1169 <condition property="do.module.main.class">
1170 <and>
1171 <isset property="main.class.available"/>
1172 <available file="${build.classes.dir}/module-info.class"/>
1173 <available file="${build.classes.dir}/${main.class.file}"/>
1174 <isset property="libs.CopyLibs.classpath"/>
1175 <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
1176 </and>
1177 </condition>
1178 </target>
1179 <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
1180 <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
1181 <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
1182 </target>
1183 <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
1184 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
1185 <touch file="${tmp.manifest.file}" verbose="false"/>
1186 </target>
1187 <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
1188 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
1189 <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
1190 </target>
1191 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
1192 <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1193 <attribute name="Main-Class" value="${main.class}"/>
1194 </manifest>
1195 </target>
1196 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
1197 <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1198 <attribute name="Profile" value="${javac.profile}"/>
1199 </manifest>
1200 </target>
1201 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
1202 <basename file="${application.splash}" property="splashscreen.basename"/>
1203 <mkdir dir="${build.classes.dir}/META-INF"/>
1204 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
1205 <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1206 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1207 </manifest>
1208 </target>
1209 <target depends="init,compile" name="-check-do-mkdist">
1210 <condition property="do.mkdist">
1211 <and>
1212 <isset property="do.archive"/>
1213 <isset property="libs.CopyLibs.classpath"/>
1214 <not>
1215 <istrue value="${mkdist.disabled}"/>
1216 </not>
1217 <not>
1218 <available file="${build.classes.dir}/module-info.class"/>
1219 </not>
1220 </and>
1221 </condition>
1222 </target>
1223 <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,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs">
1224 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
1225 <echo level="info">To run this application from the command line without Ant, try:</echo>
1226 <property location="${dist.jar}" name="dist.jar.resolved"/>
1227 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
1228 </target>
1229 <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,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
1230 <j2seproject1:jar manifest="${tmp.manifest.file}"/>
1231 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1232 <property location="${dist.jar}" name="dist.jar.resolved"/>
1233 <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
1234 <isset property="named.module.internal"/>
1235 </condition>
1236 <pathconvert property="run.classpath.with.dist.jar">
1237 <path path="${run.classpath}"/>
1238 <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
1239 </pathconvert>
1240 <pathconvert property="run.modulepath.with.dist.jar">
1241 <path location="${dist.jar.resolved}"/>
1242 <path path="${run.modulepath}"/>
1243 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1244 </pathconvert>
1245 <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
1246 <isset property="named.module.internal"/>
1247 </condition>
1248 <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
1249 <and>
1250 <isset property="modules.supported.internal"/>
1251 <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
1252 </and>
1253 </condition>
1254 <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
1255 <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
1256 </condition>
1257 <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
1258 <isset property="do.module.main.class"/>
1259 </condition>
1260 <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
1261 <isset property="named.module.internal"/>
1262 </condition>
1263 <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
1264 <isset property="main.class.available"/>
1265 </condition>
1266 <condition else="debug" property="jar.usage.level" value="info">
1267 <isset property="main.class.available"/>
1268 </condition>
1269 <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
1270 </target>
1271 <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
1272 <delete>
1273 <fileset file="${tmp.manifest.file}"/>
1274 </delete>
1275 </target>
1276 <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"/>
1277 <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"/>
1278 <target name="-post-jar">
1279 <!-- Empty placeholder for easier customization. -->
1280 <!-- You can override this target in the ../build.xml file. -->
1281 </target>
1282 <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1283 <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
1284 <!--
1285 =================
1286 DEPLOY SECTION
1287 =================
1288 -->
1289 <target name="-pre-deploy">
1290 <!-- Empty placeholder for easier customization. -->
1291 <!-- You can override this target in the ../build.xml file. -->
1292 </target>
1293 <target depends="init" name="-check-jlink">
1294 <condition property="do.jlink.internal">
1295 <and>
1296 <istrue value="${do.jlink}"/>
1297 <isset property="do.archive"/>
1298 <isset property="named.module.internal"/>
1299 </and>
1300 </condition>
1301 </target>
1302 <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
1303 <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
1304 <property name="jlink.launcher.name" value="${application.title}"/>
1305 <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
1306 <and>
1307 <isset property="jlink.additionalmodules"/>
1308 <length length="0" string="${jlink.additionalmodules}" when="greater"/>
1309 </and>
1310 </condition>
1311 <condition property="jlink.do.strip.internal">
1312 <and>
1313 <isset property="jlink.strip"/>
1314 <istrue value="${jlink.strip}"/>
1315 </and>
1316 </condition>
1317 <condition property="jlink.do.additionalparam.internal">
1318 <and>
1319 <isset property="jlink.additionalparam"/>
1320 <length length="0" string="${jlink.additionalparam}" when="greater"/>
1321 </and>
1322 </condition>
1323 <condition property="jlink.do.launcher.internal">
1324 <and>
1325 <istrue value="${jlink.launcher}"/>
1326 <isset property="main.class.available"/>
1327 </and>
1328 </condition>
1329 <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
1330 <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
1331 <exec executable="${platform.jlink}">
1332 <arg value="--module-path"/>
1333 <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
1334 <arg value="--add-modules"/>
1335 <arg value="${jlink.add.modules}"/>
1336 <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
1337 <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
1338 <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
1339 <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
1340 <arg value="--output"/>
1341 <arg value="${dist.jlink.output}"/>
1342 </exec>
1343 </target>
1344 <target name="-post-deploy">
1345 <!-- Empty placeholder for easier customization. -->
1346 <!-- You can override this target in the ../build.xml file. -->
1347 </target>
1348 <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
1349 <!--
1350 =================
1351 EXECUTION SECTION
1352 =================
1353 -->
1354 <target depends="init,compile" description="Run a main class." name="run">
1355 <j2seproject1:java>
1356 <customize>
1357 <arg line="${application.args}"/>
1358 </customize>
1359 </j2seproject1:java>
1360 </target>
1361 <target name="-do-not-recompile">
1362 <property name="javac.includes.binary" value=""/>
1363 </target>
1364 <target depends="init,compile-single" name="run-single">
1365 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1366 <j2seproject1:java classname="${run.class}"/>
1367 </target>
1368 <target depends="init,compile-test-single" name="run-test-with-main">
1369 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1370 <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
1371 </target>
1372 <!--
1373 =================
1374 DEBUGGING SECTION
1375 =================
1376 -->
1377 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1378 <j2seproject1:nbjpdastart name="${debug.class}"/>
1379 </target>
1380 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
1381 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
1382 </target>
1383 <target depends="init,compile" name="-debug-start-debuggee">
1384 <j2seproject3:debug>
1385 <customizeDebuggee>
1386 <arg line="${application.args}"/>
1387 </customizeDebuggee>
1388 </j2seproject3:debug>
1389 </target>
1390 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1391 <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
1392 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
1393 </target>
1394 <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
1395 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1396 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1397 <j2seproject3:debug classname="${debug.class}"/>
1398 </target>
1399 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1400 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
1401 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1402 <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
1403 </target>
1404 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1405 <target depends="init" name="-pre-debug-fix">
1406 <fail unless="fix.includes">Must set fix.includes</fail>
1407 <property name="javac.includes" value="${fix.includes}.java"/>
1408 </target>
1409 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1410 <j2seproject1:nbjpdareload/>
1411 </target>
1412 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1413 <!--
1414 =================
1415 PROFILING SECTION
1416 =================
1417 -->
1418 <!--
1419 pre NB7.2 profiler integration
1420 -->
1421 <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1422 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1423 <nbprofiledirect>
1424 <classpath>
1425 <path path="${run.classpath}"/>
1426 </classpath>
1427 </nbprofiledirect>
1428 <profile/>
1429 </target>
1430 <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
1431 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
1432 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1433 <nbprofiledirect>
1434 <classpath>
1435 <path path="${run.classpath}"/>
1436 </classpath>
1437 </nbprofiledirect>
1438 <profile classname="${profile.class}"/>
1439 </target>
1440 <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
1441 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1442 <nbprofiledirect>
1443 <classpath>
1444 <path path="${run.classpath}"/>
1445 </classpath>
1446 </nbprofiledirect>
1447 <profile classname="sun.applet.AppletViewer">
1448 <customize>
1449 <arg value="${applet.url}"/>
1450 </customize>
1451 </profile>
1452 </target>
1453 <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1454 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1455 <nbprofiledirect>
1456 <classpath>
1457 <path path="${run.test.classpath}"/>
1458 </classpath>
1459 </nbprofiledirect>
1460 <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
1461 <customize>
1462 <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
1463 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1464 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1465 <jvmarg line="${profiler.info.jvmargs}"/>
1466 <classpath>
1467 <path path="${run.test.classpath}"/>
1468 </classpath>
1469 </customize>
1470 </j2seproject3:junit>
1471 </target>
1472 <!--
1473 end of pre NB72 profiling section
1474 -->
1475 <target if="netbeans.home" name="-profile-check">
1476 <condition property="profiler.configured">
1477 <or>
1478 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1479 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1480 </or>
1481 </condition>
1482 </target>
1483 <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1484 <startprofiler/>
1485 <antcall target="run"/>
1486 </target>
1487 <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">
1488 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1489 <startprofiler/>
1490 <antcall target="run-single"/>
1491 </target>
1492 <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
1493 <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
1494 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1495 <startprofiler/>
1496 <antcall target="test-single"/>
1497 </target>
1498 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
1499 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1500 <startprofiler/>
1501 <antcall target="run-test-with-main"/>
1502 </target>
1503 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
1504 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1505 <startprofiler/>
1506 <antcall target="run-applet"/>
1507 </target>
1508 <!--
1509 ===============
1510 JAVADOC SECTION
1511 ===============
1512 -->
1513 <target depends="init" if="have.sources" name="-javadoc-build">
1514 <mkdir dir="${dist.javadoc.dir}"/>
1515 <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
1516 <and>
1517 <isset property="endorsed.classpath.cmd.line.arg"/>
1518 <not>
1519 <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
1520 </not>
1521 </and>
1522 </condition>
1523 <condition else="" property="bug5101868workaround" value="*.java">
1524 <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
1525 </condition>
1526 <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
1527 <and>
1528 <isset property="javadoc.html5"/>
1529 <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
1530 </and>
1531 </condition>
1532 <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}">
1533 <classpath>
1534 <path path="${javac.classpath}"/>
1535 </classpath>
1536 <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1537 <filename name="**/*.java"/>
1538 </fileset>
1539 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1540 <include name="**/*.java"/>
1541 <exclude name="*.java"/>
1542 </fileset>
1543 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
1544 <arg line="${javadoc.html5.cmd.line.arg}"/>
1545 </javadoc>
1546 <copy todir="${dist.javadoc.dir}">
1547 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1548 <filename name="**/doc-files/**"/>
1549 </fileset>
1550 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1551 <include name="**/doc-files/**"/>
1552 </fileset>
1553 </copy>
1554 </target>
1555 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1556 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1557 </target>
1558 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
1559 <!--
1560 =========================
1561 TEST COMPILATION SECTION
1562 =========================
1563 -->
1564 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1565 <mkdir dir="${build.test.classes.dir}"/>
1566 </target>
1567 <target name="-pre-compile-test">
1568 <!-- Empty placeholder for easier customization. -->
1569 <!-- You can override this target in the ../build.xml file. -->
1570 </target>
1571 <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
1572 <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
1573 <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
1574 <and>
1575 <isset property="test.module.name"/>
1576 <length length="0" string="${test.module.name}" when="greater"/>
1577 </and>
1578 </condition>
1579 <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
1580 <and>
1581 <isset property="test.module.name"/>
1582 <length length="0" string="${test.module.name}" when="greater"/>
1583 </and>
1584 </condition>
1585 </target>
1586 <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
1587 <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
1588 <and>
1589 <isset property="test.module.name"/>
1590 <length length="0" string="${test.module.name}" when="greater"/>
1591 </and>
1592 </condition>
1593 <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
1594 <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
1595 <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
1596 <chainedmapper>
1597 <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
1598 <filtermapper>
1599 <uniqfilter/>
1600 <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
1601 </filtermapper>
1602 <cutdirsmapper dirs="1"/>
1603 <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
1604 </chainedmapper>
1605 </pathconvert>
1606 <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
1607 <and>
1608 <isset property="test.module.name"/>
1609 <length length="0" string="${test.module.name}" when="greater"/>
1610 </and>
1611 </condition>
1612 </target>
1613 <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
1614 <property name="javac.test.sourcepath" value="${empty.dir}"/>
1615 <property name="javac.test.compilerargs" value=""/>
1616 <property name="run.test.jvmargs" value=""/>
1617 </target>
1618 <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
1619 <target if="do.depend.true" name="-compile-test-depend">
1620 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1621 </target>
1622 <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1623 <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}">
1624 <customize>
1625 <compilerarg line="${javac.test.compilerargs}"/>
1626 </customize>
1627 </j2seproject3:javac>
1628 <copy todir="${build.test.classes.dir}">
1629 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1630 </copy>
1631 </target>
1632 <target name="-post-compile-test">
1633 <!-- Empty placeholder for easier customization. -->
1634 <!-- You can override this target in the ../build.xml file. -->
1635 </target>
1636 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1637 <target name="-pre-compile-test-single">
1638 <!-- Empty placeholder for easier customization. -->
1639 <!-- You can override this target in the ../build.xml file. -->
1640 </target>
1641 <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1642 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1643 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1644 <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}">
1645 <customize>
1646 <compilerarg line="${javac.test.compilerargs}"/>
1647 </customize>
1648 </j2seproject3:javac>
1649 <copy todir="${build.test.classes.dir}">
1650 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1651 </copy>
1652 </target>
1653 <target name="-post-compile-test-single">
1654 <!-- Empty placeholder for easier customization. -->
1655 <!-- You can override this target in the ../build.xml file. -->
1656 </target>
1657 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1658 <!--
1659 =======================
1660 TEST EXECUTION SECTION
1661 =======================
1662 -->
1663 <target depends="init" if="have.tests" name="-pre-test-run">
1664 <mkdir dir="${build.test.results.dir}"/>
1665 </target>
1666 <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
1667 <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
1668 </target>
1669 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1670 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1671 </target>
1672 <target depends="init" if="have.tests" name="test-report"/>
1673 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1674 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1675 <target depends="init" if="have.tests" name="-pre-test-run-single">
1676 <mkdir dir="${build.test.results.dir}"/>
1677 </target>
1678 <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1679 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1680 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1681 </target>
1682 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1683 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1684 </target>
1685 <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
1686 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1687 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1688 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1689 <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1690 </target>
1691 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1692 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1693 </target>
1694 <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
1695 <!--
1696 =======================
1697 TEST DEBUGGING SECTION
1698 =======================
1699 -->
1700 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1701 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1702 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1703 </target>
1704 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1705 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1706 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1707 <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1708 </target>
1709 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1710 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1711 </target>
1712 <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1713 <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1714 <target depends="debug-test-method" name="debug-single-method"/>
1715 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1716 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1717 </target>
1718 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1719 <!--
1720 =========================
1721 APPLET EXECUTION SECTION
1722 =========================
1723 -->
1724 <target depends="init,compile-single" name="run-applet">
1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1726 <j2seproject1:java classname="sun.applet.AppletViewer">
1727 <customize>
1728 <arg value="${applet.url}"/>
1729 </customize>
1730 </j2seproject1:java>
1731 </target>
1732 <!--
1733 =========================
1734 APPLET DEBUGGING SECTION
1735 =========================
1736 -->
1737 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
1738 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1739 <j2seproject3:debug classname="sun.applet.AppletViewer">
1740 <customizeDebuggee>
1741 <arg value="${applet.url}"/>
1742 </customizeDebuggee>
1743 </j2seproject3:debug>
1744 </target>
1745 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
1746 <!--
1747 ===============
1748 CLEANUP SECTION
1749 ===============
1750 -->
1751 <target name="-deps-clean-init" unless="built-clean.properties">
1752 <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
1753 <delete file="${built-clean.properties}" quiet="true"/>
1754 </target>
1755 <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
1756 <echo level="warn" message="Cycle detected: Habeas was already built"/>
1757 </target>
1758 <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
1759 <mkdir dir="${build.dir}"/>
1760 <touch file="${built-clean.properties}" verbose="false"/>
1761 <property file="${built-clean.properties}" prefix="already.built.clean."/>
1762 <antcall target="-warn-already-built-clean"/>
1763 <propertyfile file="${built-clean.properties}">
1764 <entry key="${basedir}" value=""/>
1765 </propertyfile>
1766 </target>
1767 <target depends="init" name="-do-clean">
1768 <delete dir="${build.dir}"/>
1769 <delete dir="${dist.jlink.output}"/>
1770 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1771 </target>
1772 <target name="-post-clean">
1773 <!-- Empty placeholder for easier customization. -->
1774 <!-- You can override this target in the ../build.xml file. -->
1775 </target>
1776 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1777 <target name="-check-call-dep">
1778 <property file="${call.built.properties}" prefix="already.built."/>
1779 <condition property="should.call.dep">
1780 <and>
1781 <not>
1782 <isset property="already.built.${call.subproject}"/>
1783 </not>
1784 <available file="${call.script}"/>
1785 </and>
1786 </condition>
1787 </target>
1788 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
1789 <ant antfile="${call.script}" inheritall="false" target="${call.target}">
1790 <propertyset>
1791 <propertyref prefix="transfer."/>
1792 <mapper from="transfer.*" to="*" type="glob"/>
1793 </propertyset>
1794 </ant>
1795 </target>
1796 </project>