OSDN Git Service

Merge branch 'fix-nonconcurrency'
[coroid/NicoBrowser.git] / nbproject / build-impl.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!--\r
3 *** GENERATED FROM project.xml - DO NOT EDIT  ***\r
4 ***         EDIT ../build.xml INSTEAD         ***\r
5 \r
6 For the purpose of easier reading the script\r
7 is divided into following sections:\r
8 \r
9   - initialization\r
10   - compilation\r
11   - jar\r
12   - execution\r
13   - debugging\r
14   - javadoc\r
15   - junit compilation\r
16   - junit execution\r
17   - junit debugging\r
18   - applet\r
19   - cleanup\r
20 \r
21         -->\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="NicoBrowser-impl">\r
23     <import file="groovy-build.xml"/>\r
24     <import file="jnlp-impl.xml"/>\r
25     <fail message="Please build using Ant 1.8.0 or higher.">\r
26         <condition>\r
27             <not>\r
28                 <antversion atleast="1.8.0"/>\r
29             </not>\r
30         </condition>\r
31     </fail>\r
32     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>\r
33     <!-- \r
34                 ======================\r
35                 INITIALIZATION SECTION \r
36                 ======================\r
37             -->\r
38     <target name="-pre-init">\r
39         <!-- Empty placeholder for easier customization. -->\r
40         <!-- You can override this target in the ../build.xml file. -->\r
41     </target>\r
42     <target depends="-pre-init" name="-init-private">\r
43         <property file="nbproject/private/config.properties"/>\r
44         <property file="nbproject/private/configs/${config}.properties"/>\r
45         <property file="nbproject/private/private.properties"/>\r
46     </target>\r
47     <target depends="-pre-init,-init-private" name="-init-user">\r
48         <property file="${user.properties.file}"/>\r
49         <!-- The two properties below are usually overridden -->\r
50         <!-- by the active platform. Just a fallback. -->\r
51         <property name="default.javac.source" value="1.4"/>\r
52         <property name="default.javac.target" value="1.4"/>\r
53     </target>\r
54     <target depends="-pre-init,-init-private,-init-user" name="-init-project">\r
55         <property file="nbproject/configs/${config}.properties"/>\r
56         <property file="nbproject/project.properties"/>\r
57     </target>\r
58     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
59         <available file="${manifest.file}" property="manifest.available"/>\r
60         <condition property="splashscreen.available">\r
61             <and>\r
62                 <not>\r
63                     <equals arg1="${application.splash}" arg2="" trim="true"/>\r
64                 </not>\r
65                 <available file="${application.splash}"/>\r
66             </and>\r
67         </condition>\r
68         <condition property="main.class.available">\r
69             <and>\r
70                 <isset property="main.class"/>\r
71                 <not>\r
72                     <equals arg1="${main.class}" arg2="" trim="true"/>\r
73                 </not>\r
74             </and>\r
75         </condition>\r
76         <condition property="manifest.available+main.class">\r
77             <and>\r
78                 <isset property="manifest.available"/>\r
79                 <isset property="main.class.available"/>\r
80             </and>\r
81         </condition>\r
82         <condition property="do.archive">\r
83             <not>\r
84                 <istrue value="${jar.archive.disabled}"/>\r
85             </not>\r
86         </condition>\r
87         <condition property="do.mkdist">\r
88             <and>\r
89                 <isset property="do.archive"/>\r
90                 <isset property="libs.CopyLibs.classpath"/>\r
91                 <not>\r
92                     <istrue value="${mkdist.disabled}"/>\r
93                 </not>\r
94             </and>\r
95         </condition>\r
96         <condition property="manifest.available+main.class+mkdist.available">\r
97             <and>\r
98                 <istrue value="${manifest.available+main.class}"/>\r
99                 <isset property="do.mkdist"/>\r
100             </and>\r
101         </condition>\r
102         <condition property="do.archive+manifest.available">\r
103             <and>\r
104                 <isset property="manifest.available"/>\r
105                 <istrue value="${do.archive}"/>\r
106             </and>\r
107         </condition>\r
108         <condition property="do.archive+main.class.available">\r
109             <and>\r
110                 <isset property="main.class.available"/>\r
111                 <istrue value="${do.archive}"/>\r
112             </and>\r
113         </condition>\r
114         <condition property="do.archive+splashscreen.available">\r
115             <and>\r
116                 <isset property="splashscreen.available"/>\r
117                 <istrue value="${do.archive}"/>\r
118             </and>\r
119         </condition>\r
120         <condition property="do.archive+manifest.available+main.class">\r
121             <and>\r
122                 <istrue value="${manifest.available+main.class}"/>\r
123                 <istrue value="${do.archive}"/>\r
124             </and>\r
125         </condition>\r
126         <condition property="manifest.available-mkdist.available">\r
127             <or>\r
128                 <istrue value="${manifest.available}"/>\r
129                 <isset property="do.mkdist"/>\r
130             </or>\r
131         </condition>\r
132         <condition property="manifest.available+main.class-mkdist.available">\r
133             <or>\r
134                 <istrue value="${manifest.available+main.class}"/>\r
135                 <isset property="do.mkdist"/>\r
136             </or>\r
137         </condition>\r
138         <condition property="have.tests">\r
139             <or>\r
140                 <available file="${test.src.dir}"/>\r
141             </or>\r
142         </condition>\r
143         <condition property="have.sources">\r
144             <or>\r
145                 <available file="${src.dir}"/>\r
146             </or>\r
147         </condition>\r
148         <condition property="netbeans.home+have.tests">\r
149             <and>\r
150                 <isset property="netbeans.home"/>\r
151                 <isset property="have.tests"/>\r
152             </and>\r
153         </condition>\r
154         <condition property="no.javadoc.preview">\r
155             <and>\r
156                 <isset property="javadoc.preview"/>\r
157                 <isfalse value="${javadoc.preview}"/>\r
158             </and>\r
159         </condition>\r
160         <property name="run.jvmargs" value=""/>\r
161         <property name="javac.compilerargs" value=""/>\r
162         <property name="work.dir" value="${basedir}"/>\r
163         <condition property="no.deps">\r
164             <and>\r
165                 <istrue value="${no.dependencies}"/>\r
166             </and>\r
167         </condition>\r
168         <property name="javac.debug" value="true"/>\r
169         <property name="javadoc.preview" value="true"/>\r
170         <property name="application.args" value=""/>\r
171         <property name="source.encoding" value="${file.encoding}"/>\r
172         <property name="runtime.encoding" value="${source.encoding}"/>\r
173         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">\r
174             <and>\r
175                 <isset property="javadoc.encoding"/>\r
176                 <not>\r
177                     <equals arg1="${javadoc.encoding}" arg2=""/>\r
178                 </not>\r
179             </and>\r
180         </condition>\r
181         <property name="javadoc.encoding.used" value="${source.encoding}"/>\r
182         <property name="includes" value="**"/>\r
183         <property name="excludes" value=""/>\r
184         <property name="do.depend" value="false"/>\r
185         <condition property="do.depend.true">\r
186             <istrue value="${do.depend}"/>\r
187         </condition>\r
188         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>\r
189         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">\r
190             <length length="0" string="${endorsed.classpath}" when="greater"/>\r
191         </condition>\r
192         <condition else="false" property="jdkBug6558476">\r
193             <and>\r
194                 <matches pattern="1\.[56]" string="${java.specification.version}"/>\r
195                 <not>\r
196                     <os family="unix"/>\r
197                 </not>\r
198             </and>\r
199         </condition>\r
200         <property name="javac.fork" value="${jdkBug6558476}"/>\r
201         <property name="jar.index" value="false"/>\r
202         <property name="jar.index.metainf" value="${jar.index}"/>\r
203         <property name="copylibs.rebase" value="true"/>\r
204         <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>\r
205     </target>\r
206     <target name="-post-init">\r
207         <!-- Empty placeholder for easier customization. -->\r
208         <!-- You can override this target in the ../build.xml file. -->\r
209     </target>\r
210     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">\r
211         <fail unless="src.dir">Must set src.dir</fail>\r
212         <fail unless="test.src.dir">Must set test.src.dir</fail>\r
213         <fail unless="build.dir">Must set build.dir</fail>\r
214         <fail unless="dist.dir">Must set dist.dir</fail>\r
215         <fail unless="build.classes.dir">Must set build.classes.dir</fail>\r
216         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>\r
217         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>\r
218         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>\r
219         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>\r
220         <fail unless="dist.jar">Must set dist.jar</fail>\r
221     </target>\r
222     <target name="-init-macrodef-property">\r
223         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">\r
224             <attribute name="name"/>\r
225             <attribute name="value"/>\r
226             <sequential>\r
227                 <property name="@{name}" value="${@{value}}"/>\r
228             </sequential>\r
229         </macrodef>\r
230     </target>\r
231     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">\r
232         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
233             <attribute default="${src.dir}" name="srcdir"/>\r
234             <attribute default="${build.classes.dir}" name="destdir"/>\r
235             <attribute default="${javac.classpath}" name="classpath"/>\r
236             <attribute default="${javac.processorpath}" name="processorpath"/>\r
237             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
238             <attribute default="${includes}" name="includes"/>\r
239             <attribute default="${excludes}" name="excludes"/>\r
240             <attribute default="${javac.debug}" name="debug"/>\r
241             <attribute default="${empty.dir}" name="sourcepath"/>\r
242             <attribute default="${empty.dir}" name="gensrcdir"/>\r
243             <element name="customize" optional="true"/>\r
244             <sequential>\r
245                 <property location="${build.dir}/empty" name="empty.dir"/>\r
246                 <mkdir dir="${empty.dir}"/>\r
247                 <mkdir dir="@{apgeneratedsrcdir}"/>\r
248                 <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
249                     <src>\r
250                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
251                             <include name="*"/>\r
252                         </dirset>\r
253                     </src>\r
254                     <classpath>\r
255                         <path path="@{classpath}"/>\r
256                     </classpath>\r
257                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
258                     <compilerarg line="${javac.compilerargs}"/>\r
259                     <compilerarg value="-processorpath"/>\r
260                     <compilerarg path="@{processorpath}:${empty.dir}"/>\r
261                     <compilerarg line="${ap.processors.internal}"/>\r
262                     <compilerarg line="${annotation.processing.processor.options}"/>\r
263                     <compilerarg value="-s"/>\r
264                     <compilerarg path="@{apgeneratedsrcdir}"/>\r
265                     <compilerarg line="${ap.proc.none.internal}"/>\r
266                     <customize/>\r
267                 </javac>\r
268             </sequential>\r
269         </macrodef>\r
270     </target>\r
271     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">\r
272         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
273             <attribute default="${src.dir}" name="srcdir"/>\r
274             <attribute default="${build.classes.dir}" name="destdir"/>\r
275             <attribute default="${javac.classpath}" name="classpath"/>\r
276             <attribute default="${javac.processorpath}" name="processorpath"/>\r
277             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
278             <attribute default="${includes}" name="includes"/>\r
279             <attribute default="${excludes}" name="excludes"/>\r
280             <attribute default="${javac.debug}" name="debug"/>\r
281             <attribute default="${empty.dir}" name="sourcepath"/>\r
282             <attribute default="${empty.dir}" name="gensrcdir"/>\r
283             <element name="customize" optional="true"/>\r
284             <sequential>\r
285                 <property location="${build.dir}/empty" name="empty.dir"/>\r
286                 <mkdir dir="${empty.dir}"/>\r
287                 <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
288                     <src>\r
289                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
290                             <include name="*"/>\r
291                         </dirset>\r
292                     </src>\r
293                     <classpath>\r
294                         <path path="@{classpath}"/>\r
295                     </classpath>\r
296                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
297                     <compilerarg line="${javac.compilerargs}"/>\r
298                     <customize/>\r
299                 </javac>\r
300             </sequential>\r
301         </macrodef>\r
302     </target>\r
303     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">\r
304         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">\r
305             <attribute default="${src.dir}" name="srcdir"/>\r
306             <attribute default="${build.classes.dir}" name="destdir"/>\r
307             <attribute default="${javac.classpath}" name="classpath"/>\r
308             <sequential>\r
309                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">\r
310                     <classpath>\r
311                         <path path="@{classpath}"/>\r
312                     </classpath>\r
313                 </depend>\r
314             </sequential>\r
315         </macrodef>\r
316         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">\r
317             <attribute default="${build.classes.dir}" name="destdir"/>\r
318             <sequential>\r
319                 <fail unless="javac.includes">Must set javac.includes</fail>\r
320                 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">\r
321                     <path>\r
322                         <filelist dir="@{destdir}" files="${javac.includes}"/>\r
323                     </path>\r
324                     <globmapper from="*.java" to="*.class"/>\r
325                 </pathconvert>\r
326                 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>\r
327                 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>\r
328                 <delete>\r
329                     <files includesfile="${javac.includesfile.binary}"/>\r
330                 </delete>\r
331                 <delete>\r
332                     <fileset file="${javac.includesfile.binary}"/>\r
333                 </delete>\r
334             </sequential>\r
335         </macrodef>\r
336     </target>\r
337     <target name="-init-macrodef-junit">\r
338         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">\r
339             <attribute default="${includes}" name="includes"/>\r
340             <attribute default="${excludes}" name="excludes"/>\r
341             <attribute default="**" name="testincludes"/>\r
342             <sequential>\r
343                 <property name="junit.forkmode" value="perTest"/>\r
344                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">\r
345                     <batchtest todir="${build.test.results.dir}">\r
346                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">\r
347                             <filename name="@{testincludes}"/>\r
348                         </fileset>\r
349                     </batchtest>\r
350                     <classpath>\r
351                         <path path="${run.test.classpath}"/>\r
352                     </classpath>\r
353                     <syspropertyset>\r
354                         <propertyref prefix="test-sys-prop."/>\r
355                         <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
356                     </syspropertyset>\r
357                     <formatter type="brief" usefile="false"/>\r
358                     <formatter type="xml"/>\r
359                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
360                     <jvmarg value="-ea"/>\r
361                     <jvmarg line="${run.jvmargs}"/>\r
362                 </junit>\r
363             </sequential>\r
364         </macrodef>\r
365     </target>\r
366     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>\r
367     <target name="-profile-pre-init">\r
368         <!-- Empty placeholder for easier customization. -->\r
369         <!-- You can override this target in the ../build.xml file. -->\r
370     </target>\r
371     <target name="-profile-post-init">\r
372         <!-- Empty placeholder for easier customization. -->\r
373         <!-- You can override this target in the ../build.xml file. -->\r
374     </target>\r
375     <target name="-profile-init-macrodef-profile">\r
376         <macrodef name="resolve">\r
377             <attribute name="name"/>\r
378             <attribute name="value"/>\r
379             <sequential>\r
380                 <property name="@{name}" value="${env.@{value}}"/>\r
381             </sequential>\r
382         </macrodef>\r
383         <macrodef name="profile">\r
384             <attribute default="${main.class}" name="classname"/>\r
385             <element name="customize" optional="true"/>\r
386             <sequential>\r
387                 <property environment="env"/>\r
388                 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>\r
389                 <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">\r
390                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
391                     <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
392                     <jvmarg line="${profiler.info.jvmargs}"/>\r
393                     <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
394                     <arg line="${application.args}"/>\r
395                     <classpath>\r
396                         <path path="${run.classpath}"/>\r
397                     </classpath>\r
398                     <syspropertyset>\r
399                         <propertyref prefix="run-sys-prop."/>\r
400                         <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
401                     </syspropertyset>\r
402                     <customize/>\r
403                 </java>\r
404             </sequential>\r
405         </macrodef>\r
406     </target>\r
407     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">\r
408         <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>\r
409         <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>\r
410     </target>\r
411     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">\r
412         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">\r
413             <attribute default="${main.class}" name="name"/>\r
414             <attribute default="${debug.classpath}" name="classpath"/>\r
415             <attribute default="" name="stopclassname"/>\r
416             <sequential>\r
417                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">\r
418                     <classpath>\r
419                         <path path="@{classpath}"/>\r
420                     </classpath>\r
421                 </nbjpdastart>\r
422             </sequential>\r
423         </macrodef>\r
424         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">\r
425             <attribute default="${build.classes.dir}" name="dir"/>\r
426             <sequential>\r
427                 <nbjpdareload>\r
428                     <fileset dir="@{dir}" includes="${fix.classes}">\r
429                         <include name="${fix.includes}*.class"/>\r
430                     </fileset>\r
431                 </nbjpdareload>\r
432             </sequential>\r
433         </macrodef>\r
434     </target>\r
435     <target name="-init-debug-args">\r
436         <property name="version-output" value="java version &quot;${ant.java.version}"/>\r
437         <condition property="have-jdk-older-than-1.4">\r
438             <or>\r
439                 <contains string="${version-output}" substring="java version &quot;1.0"/>\r
440                 <contains string="${version-output}" substring="java version &quot;1.1"/>\r
441                 <contains string="${version-output}" substring="java version &quot;1.2"/>\r
442                 <contains string="${version-output}" substring="java version &quot;1.3"/>\r
443             </or>\r
444         </condition>\r
445         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">\r
446             <istrue value="${have-jdk-older-than-1.4}"/>\r
447         </condition>\r
448         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">\r
449             <os family="windows"/>\r
450         </condition>\r
451         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">\r
452             <isset property="debug.transport"/>\r
453         </condition>\r
454     </target>\r
455     <target depends="-init-debug-args" name="-init-macrodef-debug">\r
456         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">\r
457             <attribute default="${main.class}" name="classname"/>\r
458             <attribute default="${debug.classpath}" name="classpath"/>\r
459             <element name="customize" optional="true"/>\r
460             <sequential>\r
461                 <java classname="@{classname}" dir="${work.dir}" fork="true">\r
462                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
463                     <jvmarg line="${debug-args-line}"/>\r
464                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>\r
465                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
466                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
467                     <jvmarg line="${run.jvmargs}"/>\r
468                     <classpath>\r
469                         <path path="@{classpath}"/>\r
470                     </classpath>\r
471                     <syspropertyset>\r
472                         <propertyref prefix="run-sys-prop."/>\r
473                         <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
474                     </syspropertyset>\r
475                     <customize/>\r
476                 </java>\r
477             </sequential>\r
478         </macrodef>\r
479     </target>\r
480     <target name="-init-macrodef-java">\r
481         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">\r
482             <attribute default="${main.class}" name="classname"/>\r
483             <attribute default="${run.classpath}" name="classpath"/>\r
484             <element name="customize" optional="true"/>\r
485             <sequential>\r
486                 <java classname="@{classname}" dir="${work.dir}" fork="true">\r
487                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
488                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
489                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
490                     <jvmarg line="${run.jvmargs}"/>\r
491                     <classpath>\r
492                         <path path="@{classpath}"/>\r
493                     </classpath>\r
494                     <syspropertyset>\r
495                         <propertyref prefix="run-sys-prop."/>\r
496                         <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
497                     </syspropertyset>\r
498                     <customize/>\r
499                 </java>\r
500             </sequential>\r
501         </macrodef>\r
502     </target>\r
503     <target name="-init-macrodef-copylibs">\r
504         <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">\r
505             <attribute default="${manifest.file}" name="manifest"/>\r
506             <element name="customize" optional="true"/>\r
507             <sequential>\r
508                 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
509                 <pathconvert property="run.classpath.without.build.classes.dir">\r
510                     <path path="${run.classpath}"/>\r
511                     <map from="${build.classes.dir.resolved}" to=""/>\r
512                 </pathconvert>\r
513                 <pathconvert pathsep=" " property="jar.classpath">\r
514                     <path path="${run.classpath.without.build.classes.dir}"/>\r
515                     <chainedmapper>\r
516                         <flattenmapper/>\r
517                         <globmapper from="*" to="lib/*"/>\r
518                     </chainedmapper>\r
519                 </pathconvert>\r
520                 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
521                 <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
522                     <fileset dir="${build.classes.dir}"/>\r
523                     <manifest>\r
524                         <attribute name="Class-Path" value="${jar.classpath}"/>\r
525                         <customize/>\r
526                     </manifest>\r
527                 </copylibs>\r
528             </sequential>\r
529         </macrodef>\r
530     </target>\r
531     <target name="-init-presetdef-jar">\r
532         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">\r
533             <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">\r
534                 <j2seproject1:fileset dir="${build.classes.dir}"/>\r
535             </jar>\r
536         </presetdef>\r
537     </target>\r
538     <target name="-init-ap-cmdline-properties">\r
539         <property name="annotation.processing.enabled" value="true"/>\r
540         <property name="annotation.processing.processors.list" value=""/>\r
541         <property name="annotation.processing.processor.options" value=""/>\r
542         <property name="annotation.processing.run.all.processors" value="true"/>\r
543         <property name="javac.processorpath" value="${javac.classpath}"/>\r
544         <property name="javac.test.processorpath" value="${javac.test.classpath}"/>\r
545         <condition property="ap.supported.internal" value="true">\r
546             <not>\r
547                 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>\r
548             </not>\r
549         </condition>\r
550     </target>\r
551     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">\r
552         <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">\r
553             <isfalse value="${annotation.processing.run.all.processors}"/>\r
554         </condition>\r
555         <condition else="" property="ap.proc.none.internal" value="-proc:none">\r
556             <isfalse value="${annotation.processing.enabled}"/>\r
557         </condition>\r
558     </target>\r
559     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">\r
560         <property name="ap.cmd.line.internal" value=""/>\r
561     </target>\r
562     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>\r
563     <!--\r
564                 ===================\r
565                 COMPILATION SECTION\r
566                 ===================\r
567             -->\r
568     <target name="-deps-jar-init" unless="built-jar.properties">\r
569         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>\r
570         <delete file="${built-jar.properties}" quiet="true"/>\r
571     </target>\r
572     <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">\r
573         <echo level="warn" message="Cycle detected: NicoBrowser was already built"/>\r
574     </target>\r
575     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">\r
576         <mkdir dir="${build.dir}"/>\r
577         <touch file="${built-jar.properties}" verbose="false"/>\r
578         <property file="${built-jar.properties}" prefix="already.built.jar."/>\r
579         <antcall target="-warn-already-built-jar"/>\r
580         <propertyfile file="${built-jar.properties}">\r
581             <entry key="${basedir}" value=""/>\r
582         </propertyfile>\r
583     </target>\r
584     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>\r
585     <target depends="init" name="-check-automatic-build">\r
586         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>\r
587     </target>\r
588     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">\r
589         <antcall target="clean"/>\r
590     </target>\r
591     <target depends="init,deps-jar,-groovy-init-macrodef-javac" name="-pre-pre-compile">\r
592         <mkdir dir="${build.classes.dir}"/>\r
593     </target>\r
594     <target name="-pre-compile">\r
595         <!-- Empty placeholder for easier customization. -->\r
596         <!-- You can override this target in the ../build.xml file. -->\r
597     </target>\r
598     <target if="do.depend.true" name="-compile-depend">\r
599         <pathconvert property="build.generated.subdirs">\r
600             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
601                 <include name="*"/>\r
602             </dirset>\r
603         </pathconvert>\r
604         <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>\r
605     </target>\r
606     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">\r
607         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>\r
608         <copy todir="${build.classes.dir}">\r
609             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
610         </copy>\r
611     </target>\r
612     <target if="has.persistence.xml" name="-copy-persistence-xml">\r
613         <mkdir dir="${build.classes.dir}/META-INF"/>\r
614         <copy todir="${build.classes.dir}/META-INF">\r
615             <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>\r
616         </copy>\r
617     </target>\r
618     <target name="-post-compile">\r
619         <!-- Empty placeholder for easier customization. -->\r
620         <!-- You can override this target in the ../build.xml file. -->\r
621     </target>\r
622     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>\r
623     <target name="-pre-compile-single">\r
624         <!-- Empty placeholder for easier customization. -->\r
625         <!-- You can override this target in the ../build.xml file. -->\r
626     </target>\r
627     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">\r
628         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
629         <j2seproject3:force-recompile/>\r
630         <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
631     </target>\r
632     <target name="-post-compile-single">\r
633         <!-- Empty placeholder for easier customization. -->\r
634         <!-- You can override this target in the ../build.xml file. -->\r
635     </target>\r
636     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>\r
637     <!--\r
638                 ====================\r
639                 JAR BUILDING SECTION\r
640                 ====================\r
641             -->\r
642     <target depends="init" name="-pre-pre-jar">\r
643         <dirname file="${dist.jar}" property="dist.jar.dir"/>\r
644         <mkdir dir="${dist.jar.dir}"/>\r
645     </target>\r
646     <target name="-pre-jar">\r
647         <!-- Empty placeholder for easier customization. -->\r
648         <!-- You can override this target in the ../build.xml file. -->\r
649     </target>\r
650     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">\r
651         <j2seproject1:jar/>\r
652     </target>\r
653     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">\r
654         <j2seproject1:jar manifest="${manifest.file}"/>\r
655     </target>\r
656     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">\r
657         <j2seproject1:jar manifest="${manifest.file}">\r
658             <j2seproject1:manifest>\r
659                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>\r
660             </j2seproject1:manifest>\r
661         </j2seproject1:jar>\r
662         <echo level="info">To run this application from the command line without Ant, try:</echo>\r
663         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
664         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
665         <pathconvert property="run.classpath.with.dist.jar">\r
666             <path path="${run.classpath}"/>\r
667             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>\r
668         </pathconvert>\r
669         <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>\r
670     </target>\r
671     <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">\r
672         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>\r
673         <touch file="${tmp.manifest.file}" verbose="false"/>\r
674     </target>\r
675     <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">\r
676         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>\r
677         <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>\r
678     </target>\r
679     <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">\r
680         <manifest file="${tmp.manifest.file}" mode="update">\r
681             <attribute name="Main-Class" value="${main.class}"/>\r
682         </manifest>\r
683     </target>\r
684     <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">\r
685         <basename file="${application.splash}" property="splashscreen.basename"/>\r
686         <mkdir dir="${build.classes.dir}/META-INF"/>\r
687         <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>\r
688         <manifest file="${tmp.manifest.file}" mode="update">\r
689             <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>\r
690         </manifest>\r
691     </target>\r
692     <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">\r
693         <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>\r
694         <echo level="info">To run this application from the command line without Ant, try:</echo>\r
695         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
696         <echo level="info">java -jar "${dist.jar.resolved}"</echo>\r
697     </target>\r
698     <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">\r
699         <delete>\r
700             <fileset file="${tmp.manifest.file}"/>\r
701         </delete>\r
702     </target>\r
703     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>\r
704     <target name="-post-jar">\r
705         <!-- Empty placeholder for easier customization. -->\r
706         <!-- You can override this target in the ../build.xml file. -->\r
707     </target>\r
708     <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar,jnlp" description="Build JAR." name="jar"/>\r
709     <!--\r
710                 =================\r
711                 EXECUTION SECTION\r
712                 =================\r
713             -->\r
714     <target depends="init,compile" description="Run a main class." name="run">\r
715         <j2seproject1:java>\r
716             <customize>\r
717                 <arg line="${application.args}"/>\r
718             </customize>\r
719         </j2seproject1:java>\r
720     </target>\r
721     <target name="-do-not-recompile">\r
722         <property name="javac.includes.binary" value=""/>\r
723     </target>\r
724     <target depends="init,compile-single" name="run-single">\r
725         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
726         <j2seproject1:java classname="${run.class}"/>\r
727     </target>\r
728     <target depends="init,compile-test-single" name="run-test-with-main">\r
729         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
730         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
731     </target>\r
732     <!--\r
733                 =================\r
734                 DEBUGGING SECTION\r
735                 =================\r
736             -->\r
737     <target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
738         <j2seproject1:nbjpdastart name="${debug.class}"/>\r
739     </target>\r
740     <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">\r
741         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>\r
742     </target>\r
743     <target depends="init,compile" name="-debug-start-debuggee">\r
744         <j2seproject3:debug>\r
745             <customize>\r
746                 <arg line="${application.args}"/>\r
747             </customize>\r
748         </j2seproject3:debug>\r
749     </target>\r
750     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>\r
751     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">\r
752         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>\r
753     </target>\r
754     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>\r
755     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">\r
756         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
757         <j2seproject3:debug classname="${debug.class}"/>\r
758     </target>\r
759     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
760     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">\r
761         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
762         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>\r
763     </target>\r
764     <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
765     <target depends="init" name="-pre-debug-fix">\r
766         <fail unless="fix.includes">Must set fix.includes</fail>\r
767         <property name="javac.includes" value="${fix.includes}.java"/>\r
768     </target>\r
769     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">\r
770         <j2seproject1:nbjpdareload/>\r
771     </target>\r
772     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>\r
773     <!--\r
774                 =================\r
775                 PROFILING SECTION\r
776                 =================\r
777             -->\r
778     <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">\r
779         <nbprofiledirect>\r
780             <classpath>\r
781                 <path path="${run.classpath}"/>\r
782             </classpath>\r
783         </nbprofiledirect>\r
784         <profile/>\r
785     </target>\r
786     <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">\r
787         <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>\r
788         <nbprofiledirect>\r
789             <classpath>\r
790                 <path path="${run.classpath}"/>\r
791             </classpath>\r
792         </nbprofiledirect>\r
793         <profile classname="${profile.class}"/>\r
794     </target>\r
795     <!--\r
796                 =========================\r
797                 APPLET PROFILING  SECTION\r
798                 =========================\r
799             -->\r
800     <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">\r
801         <nbprofiledirect>\r
802             <classpath>\r
803                 <path path="${run.classpath}"/>\r
804             </classpath>\r
805         </nbprofiledirect>\r
806         <profile classname="sun.applet.AppletViewer">\r
807             <customize>\r
808                 <arg value="${applet.url}"/>\r
809             </customize>\r
810         </profile>\r
811     </target>\r
812     <!--\r
813                 =========================\r
814                 TESTS PROFILING  SECTION\r
815                 =========================\r
816             -->\r
817     <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">\r
818         <nbprofiledirect>\r
819             <classpath>\r
820                 <path path="${run.test.classpath}"/>\r
821             </classpath>\r
822         </nbprofiledirect>\r
823         <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">\r
824             <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
825             <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
826             <jvmarg line="${profiler.info.jvmargs}"/>\r
827             <test name="${profile.class}"/>\r
828             <classpath>\r
829                 <path path="${run.test.classpath}"/>\r
830             </classpath>\r
831             <syspropertyset>\r
832                 <propertyref prefix="test-sys-prop."/>\r
833                 <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
834             </syspropertyset>\r
835             <formatter type="brief" usefile="false"/>\r
836             <formatter type="xml"/>\r
837         </junit>\r
838     </target>\r
839     <!--\r
840                 ===============\r
841                 JAVADOC SECTION\r
842                 ===============\r
843             -->\r
844     <target depends="init" if="have.sources" name="-javadoc-build">\r
845         <mkdir dir="${dist.javadoc.dir}"/>\r
846         <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">\r
847             <and>\r
848                 <isset property="endorsed.classpath.cmd.line.arg"/>\r
849                 <not>\r
850                     <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>\r
851                 </not>\r
852             </and>\r
853         </condition>\r
854         <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">\r
855             <classpath>\r
856                 <path path="${javac.classpath}"/>\r
857             </classpath>\r
858             <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">\r
859                 <filename name="**/*.java"/>\r
860             </fileset>\r
861             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
862                 <include name="**/*.java"/>\r
863                 <exclude name="*.java"/>\r
864             </fileset>\r
865             <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>\r
866         </javadoc>\r
867         <copy todir="${dist.javadoc.dir}">\r
868             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
869                 <filename name="**/doc-files/**"/>\r
870             </fileset>\r
871             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
872                 <include name="**/doc-files/**"/>\r
873             </fileset>\r
874         </copy>\r
875     </target>\r
876     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">\r
877         <nbbrowse file="${dist.javadoc.dir}/index.html"/>\r
878     </target>\r
879     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>\r
880     <!--\r
881                 =========================\r
882                 JUNIT COMPILATION SECTION\r
883                 =========================\r
884             -->\r
885     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">\r
886         <mkdir dir="${build.test.classes.dir}"/>\r
887     </target>\r
888     <target name="-pre-compile-test">\r
889         <!-- Empty placeholder for easier customization. -->\r
890         <!-- You can override this target in the ../build.xml file. -->\r
891     </target>\r
892     <target if="do.depend.true" name="-compile-test-depend">\r
893         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
894     </target>\r
895     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">\r
896         <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
897         <copy todir="${build.test.classes.dir}">\r
898             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
899         </copy>\r
900     </target>\r
901     <target name="-post-compile-test">\r
902         <!-- Empty placeholder for easier customization. -->\r
903         <!-- You can override this target in the ../build.xml file. -->\r
904     </target>\r
905     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>\r
906     <target name="-pre-compile-test-single">\r
907         <!-- Empty placeholder for easier customization. -->\r
908         <!-- You can override this target in the ../build.xml file. -->\r
909     </target>\r
910     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">\r
911         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
912         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>\r
913         <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
914         <copy todir="${build.test.classes.dir}">\r
915             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
916         </copy>\r
917     </target>\r
918     <target name="-post-compile-test-single">\r
919         <!-- Empty placeholder for easier customization. -->\r
920         <!-- You can override this target in the ../build.xml file. -->\r
921     </target>\r
922     <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
923     <!--\r
924                 =======================\r
925                 JUNIT EXECUTION SECTION\r
926                 =======================\r
927             -->\r
928     <target depends="init" if="have.tests" name="-pre-test-run">\r
929         <mkdir dir="${build.test.results.dir}"/>\r
930     </target>\r
931     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">\r
932         <j2seproject3:junit testincludes="**/*Test.java"/>\r
933     </target>\r
934     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">\r
935         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
936     </target>\r
937     <target depends="init" if="have.tests" name="test-report"/>\r
938     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>\r
939     <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
940     <target depends="init" if="have.tests" name="-pre-test-run-single">\r
941         <mkdir dir="${build.test.results.dir}"/>\r
942     </target>\r
943     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">\r
944         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>\r
945         <j2seproject3:junit excludes="" includes="${test.includes}"/>\r
946     </target>\r
947     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
948         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
949     </target>\r
950     <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
951     <!--\r
952                 =======================\r
953                 JUNIT DEBUGGING SECTION\r
954                 =======================\r
955             -->\r
956     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">\r
957         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>\r
958         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>\r
959         <delete file="${test.report.file}"/>\r
960         <mkdir dir="${build.test.results.dir}"/>\r
961         <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">\r
962             <customize>\r
963                 <syspropertyset>\r
964                     <propertyref prefix="test-sys-prop."/>\r
965                     <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
966                 </syspropertyset>\r
967                 <arg value="${test.class}"/>\r
968                 <arg value="showoutput=true"/>\r
969                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>\r
970                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>\r
971             </customize>\r
972         </j2seproject3:debug>\r
973     </target>\r
974     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">\r
975         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>\r
976     </target>\r
977     <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>\r
978     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">\r
979         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>\r
980     </target>\r
981     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>\r
982     <!--\r
983                 =========================\r
984                 APPLET EXECUTION SECTION\r
985                 =========================\r
986             -->\r
987     <target depends="init,compile-single" name="run-applet">\r
988         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>\r
989         <j2seproject1:java classname="sun.applet.AppletViewer">\r
990             <customize>\r
991                 <arg value="${applet.url}"/>\r
992             </customize>\r
993         </j2seproject1:java>\r
994     </target>\r
995     <!--\r
996                 =========================\r
997                 APPLET DEBUGGING  SECTION\r
998                 =========================\r
999             -->\r
1000     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">\r
1001         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>\r
1002         <j2seproject3:debug classname="sun.applet.AppletViewer">\r
1003             <customize>\r
1004                 <arg value="${applet.url}"/>\r
1005             </customize>\r
1006         </j2seproject3:debug>\r
1007     </target>\r
1008     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>\r
1009     <!--\r
1010                 ===============\r
1011                 CLEANUP SECTION\r
1012                 ===============\r
1013             -->\r
1014     <target name="-deps-clean-init" unless="built-clean.properties">\r
1015         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>\r
1016         <delete file="${built-clean.properties}" quiet="true"/>\r
1017     </target>\r
1018     <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">\r
1019         <echo level="warn" message="Cycle detected: NicoBrowser was already built"/>\r
1020     </target>\r
1021     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">\r
1022         <mkdir dir="${build.dir}"/>\r
1023         <touch file="${built-clean.properties}" verbose="false"/>\r
1024         <property file="${built-clean.properties}" prefix="already.built.clean."/>\r
1025         <antcall target="-warn-already-built-clean"/>\r
1026         <propertyfile file="${built-clean.properties}">\r
1027             <entry key="${basedir}" value=""/>\r
1028         </propertyfile>\r
1029     </target>\r
1030     <target depends="init" name="-do-clean">\r
1031         <delete dir="${build.dir}"/>\r
1032         <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>\r
1033     </target>\r
1034     <target name="-post-clean">\r
1035         <!-- Empty placeholder for easier customization. -->\r
1036         <!-- You can override this target in the ../build.xml file. -->\r
1037     </target>\r
1038     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>\r
1039     <target name="-check-call-dep">\r
1040         <property file="${call.built.properties}" prefix="already.built."/>\r
1041         <condition property="should.call.dep">\r
1042             <not>\r
1043                 <isset property="already.built.${call.subproject}"/>\r
1044             </not>\r
1045         </condition>\r
1046     </target>\r
1047     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">\r
1048         <ant antfile="${call.script}" inheritall="false" target="${call.target}">\r
1049             <propertyset>\r
1050                 <propertyref prefix="transfer."/>\r
1051                 <mapper from="transfer.*" to="*" type="glob"/>\r
1052             </propertyset>\r
1053         </ant>\r
1054     </target>\r
1055 </project>\r