OSDN Git Service

2009/03/23リリース。
[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     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>\r
26     <!-- \r
27                 ======================\r
28                 INITIALIZATION SECTION \r
29                 ======================\r
30             -->\r
31     <target name="-pre-init">\r
32         <!-- Empty placeholder for easier customization. -->\r
33         <!-- You can override this target in the ../build.xml file. -->\r
34     </target>\r
35     <target depends="-pre-init" name="-init-private">\r
36         <property file="nbproject/private/config.properties"/>\r
37         <property file="nbproject/private/configs/${config}.properties"/>\r
38         <property file="nbproject/private/private.properties"/>\r
39     </target>\r
40     <target depends="-pre-init,-init-private" name="-init-user">\r
41         <property file="${user.properties.file}"/>\r
42         <!-- The two properties below are usually overridden -->\r
43         <!-- by the active platform. Just a fallback. -->\r
44         <property name="default.javac.source" value="1.4"/>\r
45         <property name="default.javac.target" value="1.4"/>\r
46     </target>\r
47     <target depends="-pre-init,-init-private,-init-user" name="-init-project">\r
48         <property file="nbproject/configs/${config}.properties"/>\r
49         <property file="nbproject/project.properties"/>\r
50     </target>\r
51     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
52         <available file="${manifest.file}" property="manifest.available"/>\r
53         <condition property="manifest.available+main.class">\r
54             <and>\r
55                 <isset property="manifest.available"/>\r
56                 <isset property="main.class"/>\r
57                 <not>\r
58                     <equals arg1="${main.class}" arg2="" trim="true"/>\r
59                 </not>\r
60             </and>\r
61         </condition>\r
62         <condition property="manifest.available+main.class+mkdist.available">\r
63             <and>\r
64                 <istrue value="${manifest.available+main.class}"/>\r
65                 <isset property="libs.CopyLibs.classpath"/>\r
66             </and>\r
67         </condition>\r
68         <condition property="have.tests">\r
69             <or>\r
70                 <available file="${test.src.dir}"/>\r
71             </or>\r
72         </condition>\r
73         <condition property="have.sources">\r
74             <or>\r
75                 <available file="${src.dir}"/>\r
76             </or>\r
77         </condition>\r
78         <condition property="netbeans.home+have.tests">\r
79             <and>\r
80                 <isset property="netbeans.home"/>\r
81                 <isset property="have.tests"/>\r
82             </and>\r
83         </condition>\r
84         <condition property="no.javadoc.preview">\r
85             <and>\r
86                 <isset property="javadoc.preview"/>\r
87                 <isfalse value="${javadoc.preview}"/>\r
88             </and>\r
89         </condition>\r
90         <property name="run.jvmargs" value=""/>\r
91         <property name="javac.compilerargs" value=""/>\r
92         <property name="work.dir" value="${basedir}"/>\r
93         <condition property="no.deps">\r
94             <and>\r
95                 <istrue value="${no.dependencies}"/>\r
96             </and>\r
97         </condition>\r
98         <property name="javac.debug" value="true"/>\r
99         <property name="javadoc.preview" value="true"/>\r
100         <property name="application.args" value=""/>\r
101         <property name="source.encoding" value="${file.encoding}"/>\r
102         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">\r
103             <and>\r
104                 <isset property="javadoc.encoding"/>\r
105                 <not>\r
106                     <equals arg1="${javadoc.encoding}" arg2=""/>\r
107                 </not>\r
108             </and>\r
109         </condition>\r
110         <property name="javadoc.encoding.used" value="${source.encoding}"/>\r
111         <property name="includes" value="**"/>\r
112         <property name="excludes" value=""/>\r
113         <property name="do.depend" value="false"/>\r
114         <condition property="do.depend.true">\r
115             <istrue value="${do.depend}"/>\r
116         </condition>\r
117         <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">\r
118             <and>\r
119                 <isset property="jaxws.endorsed.dir"/>\r
120                 <available file="nbproject/jaxws-build.xml"/>\r
121             </and>\r
122         </condition>\r
123     </target>\r
124     <target name="-post-init">\r
125         <!-- Empty placeholder for easier customization. -->\r
126         <!-- You can override this target in the ../build.xml file. -->\r
127     </target>\r
128     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">\r
129         <fail unless="src.dir">Must set src.dir</fail>\r
130         <fail unless="test.src.dir">Must set test.src.dir</fail>\r
131         <fail unless="build.dir">Must set build.dir</fail>\r
132         <fail unless="dist.dir">Must set dist.dir</fail>\r
133         <fail unless="build.classes.dir">Must set build.classes.dir</fail>\r
134         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>\r
135         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>\r
136         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>\r
137         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>\r
138         <fail unless="dist.jar">Must set dist.jar</fail>\r
139     </target>\r
140     <target name="-init-macrodef-property">\r
141         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">\r
142             <attribute name="name"/>\r
143             <attribute name="value"/>\r
144             <sequential>\r
145                 <property name="@{name}" value="${@{value}}"/>\r
146             </sequential>\r
147         </macrodef>\r
148     </target>\r
149     <target name="-init-macrodef-javac">\r
150         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
151             <attribute default="${src.dir}" name="srcdir"/>\r
152             <attribute default="${build.classes.dir}" name="destdir"/>\r
153             <attribute default="${javac.classpath}" name="classpath"/>\r
154             <attribute default="${includes}" name="includes"/>\r
155             <attribute default="${excludes}" name="excludes"/>\r
156             <attribute default="${javac.debug}" name="debug"/>\r
157             <attribute default="/does/not/exist" name="sourcepath"/>\r
158             <element name="customize" optional="true"/>\r
159             <sequential>\r
160                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">\r
161                     <classpath>\r
162                         <path path="@{classpath}"/>\r
163                     </classpath>\r
164                     <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>\r
165                     <customize/>\r
166                 </javac>\r
167             </sequential>\r
168         </macrodef>\r
169         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">\r
170             <attribute default="${src.dir}" name="srcdir"/>\r
171             <attribute default="${build.classes.dir}" name="destdir"/>\r
172             <attribute default="${javac.classpath}" name="classpath"/>\r
173             <sequential>\r
174                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">\r
175                     <classpath>\r
176                         <path path="@{classpath}"/>\r
177                     </classpath>\r
178                 </depend>\r
179             </sequential>\r
180         </macrodef>\r
181         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">\r
182             <attribute default="${build.classes.dir}" name="destdir"/>\r
183             <sequential>\r
184                 <fail unless="javac.includes">Must set javac.includes</fail>\r
185                 <pathconvert pathsep="," property="javac.includes.binary">\r
186                     <path>\r
187                         <filelist dir="@{destdir}" files="${javac.includes}"/>\r
188                     </path>\r
189                     <globmapper from="*.java" to="*.class"/>\r
190                 </pathconvert>\r
191                 <delete>\r
192                     <files includes="${javac.includes.binary}"/>\r
193                 </delete>\r
194             </sequential>\r
195         </macrodef>\r
196     </target>\r
197     <target name="-init-macrodef-junit">\r
198         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">\r
199             <attribute default="${includes}" name="includes"/>\r
200             <attribute default="${excludes}" name="excludes"/>\r
201             <attribute default="**" name="testincludes"/>\r
202             <sequential>\r
203                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">\r
204                     <batchtest todir="${build.test.results.dir}">\r
205                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">\r
206                             <filename name="@{testincludes}"/>\r
207                         </fileset>\r
208                     </batchtest>\r
209                     <classpath>\r
210                         <path path="${run.test.classpath}"/>\r
211                     </classpath>\r
212                     <syspropertyset>\r
213                         <propertyref prefix="test-sys-prop."/>\r
214                         <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
215                     </syspropertyset>\r
216                     <formatter type="brief" usefile="false"/>\r
217                     <formatter type="xml"/>\r
218                     <jvmarg line="${run.jvmargs}"/>\r
219                 </junit>\r
220             </sequential>\r
221         </macrodef>\r
222     </target>\r
223     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">\r
224         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">\r
225             <attribute default="${main.class}" name="name"/>\r
226             <attribute default="${debug.classpath}" name="classpath"/>\r
227             <attribute default="" name="stopclassname"/>\r
228             <sequential>\r
229                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">\r
230                     <classpath>\r
231                         <path path="@{classpath}"/>\r
232                     </classpath>\r
233                 </nbjpdastart>\r
234             </sequential>\r
235         </macrodef>\r
236         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">\r
237             <attribute default="${build.classes.dir}" name="dir"/>\r
238             <sequential>\r
239                 <nbjpdareload>\r
240                     <fileset dir="@{dir}" includes="${fix.classes}">\r
241                         <include name="${fix.includes}*.class"/>\r
242                     </fileset>\r
243                 </nbjpdareload>\r
244             </sequential>\r
245         </macrodef>\r
246     </target>\r
247     <target name="-init-debug-args">\r
248         <property name="version-output" value="java version &quot;${ant.java.version}"/>\r
249         <condition property="have-jdk-older-than-1.4">\r
250             <or>\r
251                 <contains string="${version-output}" substring="java version &quot;1.0"/>\r
252                 <contains string="${version-output}" substring="java version &quot;1.1"/>\r
253                 <contains string="${version-output}" substring="java version &quot;1.2"/>\r
254                 <contains string="${version-output}" substring="java version &quot;1.3"/>\r
255             </or>\r
256         </condition>\r
257         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">\r
258             <istrue value="${have-jdk-older-than-1.4}"/>\r
259         </condition>\r
260         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">\r
261             <os family="windows"/>\r
262         </condition>\r
263         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">\r
264             <isset property="debug.transport"/>\r
265         </condition>\r
266     </target>\r
267     <target depends="-init-debug-args" name="-init-macrodef-debug">\r
268         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">\r
269             <attribute default="${main.class}" name="classname"/>\r
270             <attribute default="${debug.classpath}" name="classpath"/>\r
271             <element name="customize" optional="true"/>\r
272             <sequential>\r
273                 <java classname="@{classname}" dir="${work.dir}" fork="true">\r
274                     <jvmarg line="${debug-args-line}"/>\r
275                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>\r
276                     <jvmarg line="${run.jvmargs}"/>\r
277                     <classpath>\r
278                         <path path="@{classpath}"/>\r
279                     </classpath>\r
280                     <syspropertyset>\r
281                         <propertyref prefix="run-sys-prop."/>\r
282                         <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
283                     </syspropertyset>\r
284                     <customize/>\r
285                 </java>\r
286             </sequential>\r
287         </macrodef>\r
288     </target>\r
289     <target name="-init-macrodef-java">\r
290         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">\r
291             <attribute default="${main.class}" name="classname"/>\r
292             <element name="customize" optional="true"/>\r
293             <sequential>\r
294                 <java classname="@{classname}" dir="${work.dir}" fork="true">\r
295                     <jvmarg line="${run.jvmargs}"/>\r
296                     <classpath>\r
297                         <path path="${run.classpath}"/>\r
298                     </classpath>\r
299                     <syspropertyset>\r
300                         <propertyref prefix="run-sys-prop."/>\r
301                         <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
302                     </syspropertyset>\r
303                     <customize/>\r
304                 </java>\r
305             </sequential>\r
306         </macrodef>\r
307     </target>\r
308     <target name="-init-presetdef-jar">\r
309         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">\r
310             <jar compress="${jar.compress}" jarfile="${dist.jar}">\r
311                 <j2seproject1:fileset dir="${build.classes.dir}"/>\r
312             </jar>\r
313         </presetdef>\r
314     </target>\r
315     <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" name="init"/>\r
316     <!--\r
317                 ===================\r
318                 COMPILATION SECTION\r
319                 ===================\r
320             -->\r
321     <target depends="init" name="deps-jar" unless="no.deps"/>\r
322     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>\r
323     <target depends="init" name="-check-automatic-build">\r
324         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>\r
325     </target>\r
326     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">\r
327         <antcall target="clean"/>\r
328     </target>\r
329     <target depends="init,deps-jar,-groovy-init-macrodef-javac" name="-pre-pre-compile">\r
330         <mkdir dir="${build.classes.dir}"/>\r
331     </target>\r
332     <target name="-pre-compile">\r
333         <!-- Empty placeholder for easier customization. -->\r
334         <!-- You can override this target in the ../build.xml file. -->\r
335     </target>\r
336     <target if="do.depend.true" name="-compile-depend">\r
337         <j2seproject3:depend/>\r
338     </target>\r
339     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">\r
340         <j2seproject3:javac/>\r
341         <copy todir="${build.classes.dir}">\r
342             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
343         </copy>\r
344     </target>\r
345     <target name="-post-compile">\r
346         <!-- Empty placeholder for easier customization. -->\r
347         <!-- You can override this target in the ../build.xml file. -->\r
348     </target>\r
349     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>\r
350     <target name="-pre-compile-single">\r
351         <!-- Empty placeholder for easier customization. -->\r
352         <!-- You can override this target in the ../build.xml file. -->\r
353     </target>\r
354     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">\r
355         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
356         <j2seproject3:force-recompile/>\r
357         <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
358     </target>\r
359     <target name="-post-compile-single">\r
360         <!-- Empty placeholder for easier customization. -->\r
361         <!-- You can override this target in the ../build.xml file. -->\r
362     </target>\r
363     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>\r
364     <!--\r
365                 ====================\r
366                 JAR BUILDING SECTION\r
367                 ====================\r
368             -->\r
369     <target depends="init" name="-pre-pre-jar">\r
370         <dirname file="${dist.jar}" property="dist.jar.dir"/>\r
371         <mkdir dir="${dist.jar.dir}"/>\r
372     </target>\r
373     <target name="-pre-jar">\r
374         <!-- Empty placeholder for easier customization. -->\r
375         <!-- You can override this target in the ../build.xml file. -->\r
376     </target>\r
377     <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">\r
378         <j2seproject1:jar/>\r
379     </target>\r
380     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">\r
381         <j2seproject1:jar manifest="${manifest.file}"/>\r
382     </target>\r
383     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">\r
384         <j2seproject1:jar manifest="${manifest.file}">\r
385             <j2seproject1:manifest>\r
386                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>\r
387             </j2seproject1:manifest>\r
388         </j2seproject1:jar>\r
389         <echo>To run this application from the command line without Ant, try:</echo>\r
390         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
391         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
392         <pathconvert property="run.classpath.with.dist.jar">\r
393             <path path="${run.classpath}"/>\r
394             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>\r
395         </pathconvert>\r
396         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>\r
397     </target>\r
398     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">\r
399         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
400         <pathconvert property="run.classpath.without.build.classes.dir">\r
401             <path path="${run.classpath}"/>\r
402             <map from="${build.classes.dir.resolved}" to=""/>\r
403         </pathconvert>\r
404         <pathconvert pathsep=" " property="jar.classpath">\r
405             <path path="${run.classpath.without.build.classes.dir}"/>\r
406             <chainedmapper>\r
407                 <flattenmapper/>\r
408                 <globmapper from="*" to="lib/*"/>\r
409             </chainedmapper>\r
410         </pathconvert>\r
411         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
412         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
413             <fileset dir="${build.classes.dir}"/>\r
414             <manifest>\r
415                 <attribute name="Main-Class" value="${main.class}"/>\r
416                 <attribute name="Class-Path" value="${jar.classpath}"/>\r
417             </manifest>\r
418         </copylibs>\r
419         <echo>To run this application from the command line without Ant, try:</echo>\r
420         <property location="${dist.jar}" name="dist.jar.resolved"/>\r
421         <echo>java -jar "${dist.jar.resolved}"</echo>\r
422     </target>\r
423     <target name="-post-jar">\r
424         <!-- Empty placeholder for easier customization. -->\r
425         <!-- You can override this target in the ../build.xml file. -->\r
426     </target>\r
427     <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
428     <!--\r
429                 =================\r
430                 EXECUTION SECTION\r
431                 =================\r
432             -->\r
433     <target depends="init,compile" description="Run a main class." name="run">\r
434         <j2seproject1:java>\r
435             <customize>\r
436                 <arg line="${application.args}"/>\r
437             </customize>\r
438         </j2seproject1:java>\r
439     </target>\r
440     <target name="-do-not-recompile">\r
441         <property name="javac.includes.binary" value=""/>\r
442     </target>\r
443     <target depends="init,-do-not-recompile,compile-single" name="run-single">\r
444         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
445         <j2seproject1:java classname="${run.class}"/>\r
446     </target>\r
447     <!--\r
448                 =================\r
449                 DEBUGGING SECTION\r
450                 =================\r
451             -->\r
452     <target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
453         <j2seproject1:nbjpdastart name="${debug.class}"/>\r
454     </target>\r
455     <target depends="init,compile" name="-debug-start-debuggee">\r
456         <j2seproject3:debug>\r
457             <customize>\r
458                 <arg line="${application.args}"/>\r
459             </customize>\r
460         </j2seproject3:debug>\r
461     </target>\r
462     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>\r
463     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">\r
464         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>\r
465     </target>\r
466     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>\r
467     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">\r
468         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
469         <j2seproject3:debug classname="${debug.class}"/>\r
470     </target>\r
471     <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
472     <target depends="init" name="-pre-debug-fix">\r
473         <fail unless="fix.includes">Must set fix.includes</fail>\r
474         <property name="javac.includes" value="${fix.includes}.java"/>\r
475     </target>\r
476     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">\r
477         <j2seproject1:nbjpdareload/>\r
478     </target>\r
479     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>\r
480     <!--\r
481                 ===============\r
482                 JAVADOC SECTION\r
483                 ===============\r
484             -->\r
485     <target depends="init" name="-javadoc-build">\r
486         <mkdir dir="${dist.javadoc.dir}"/>\r
487         <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
488             <classpath>\r
489                 <path path="${javac.classpath}"/>\r
490             </classpath>\r
491             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
492                 <filename name="**/*.java"/>\r
493             </fileset>\r
494         </javadoc>\r
495     </target>\r
496     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">\r
497         <nbbrowse file="${dist.javadoc.dir}/index.html"/>\r
498     </target>\r
499     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>\r
500     <!--\r
501                 =========================\r
502                 JUNIT COMPILATION SECTION\r
503                 =========================\r
504             -->\r
505     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">\r
506         <mkdir dir="${build.test.classes.dir}"/>\r
507     </target>\r
508     <target name="-pre-compile-test">\r
509         <!-- Empty placeholder for easier customization. -->\r
510         <!-- You can override this target in the ../build.xml file. -->\r
511     </target>\r
512     <target if="do.depend.true" name="-compile-test-depend">\r
513         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
514     </target>\r
515     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">\r
516         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
517         <copy todir="${build.test.classes.dir}">\r
518             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
519         </copy>\r
520     </target>\r
521     <target name="-post-compile-test">\r
522         <!-- Empty placeholder for easier customization. -->\r
523         <!-- You can override this target in the ../build.xml file. -->\r
524     </target>\r
525     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>\r
526     <target name="-pre-compile-test-single">\r
527         <!-- Empty placeholder for easier customization. -->\r
528         <!-- You can override this target in the ../build.xml file. -->\r
529     </target>\r
530     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">\r
531         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
532         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>\r
533         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>\r
534         <copy todir="${build.test.classes.dir}">\r
535             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
536         </copy>\r
537     </target>\r
538     <target name="-post-compile-test-single">\r
539         <!-- Empty placeholder for easier customization. -->\r
540         <!-- You can override this target in the ../build.xml file. -->\r
541     </target>\r
542     <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
543     <!--\r
544                 =======================\r
545                 JUNIT EXECUTION SECTION\r
546                 =======================\r
547             -->\r
548     <target depends="init" if="have.tests" name="-pre-test-run">\r
549         <mkdir dir="${build.test.results.dir}"/>\r
550     </target>\r
551     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">\r
552         <j2seproject3:junit testincludes="**/*Test.java"/>\r
553     </target>\r
554     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">\r
555         <fail if="tests.failed">Some tests failed; see details above.</fail>\r
556     </target>\r
557     <target depends="init" if="have.tests" name="test-report"/>\r
558     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>\r
559     <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
560     <target depends="init" if="have.tests" name="-pre-test-run-single">\r
561         <mkdir dir="${build.test.results.dir}"/>\r
562     </target>\r
563     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">\r
564         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>\r
565         <j2seproject3:junit excludes="" includes="${test.includes}"/>\r
566     </target>\r
567     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
568         <fail if="tests.failed">Some tests failed; see details above.</fail>\r
569     </target>\r
570     <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>\r
571     <!--\r
572                 =======================\r
573                 JUNIT DEBUGGING SECTION\r
574                 =======================\r
575             -->\r
576     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">\r
577         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>\r
578         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>\r
579         <delete file="${test.report.file}"/>\r
580         <mkdir dir="${build.test.results.dir}"/>\r
581         <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
582             <customize>\r
583                 <syspropertyset>\r
584                     <propertyref prefix="test-sys-prop."/>\r
585                     <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
586                 </syspropertyset>\r
587                 <arg value="${test.class}"/>\r
588                 <arg value="showoutput=true"/>\r
589                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>\r
590                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>\r
591             </customize>\r
592         </j2seproject3:debug>\r
593     </target>\r
594     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">\r
595         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>\r
596     </target>\r
597     <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>\r
598     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">\r
599         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>\r
600     </target>\r
601     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>\r
602     <!--\r
603                 =========================\r
604                 APPLET EXECUTION SECTION\r
605                 =========================\r
606             -->\r
607     <target depends="init,compile-single" name="run-applet">\r
608         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>\r
609         <j2seproject1:java classname="sun.applet.AppletViewer">\r
610             <customize>\r
611                 <arg value="${applet.url}"/>\r
612             </customize>\r
613         </j2seproject1:java>\r
614     </target>\r
615     <!--\r
616                 =========================\r
617                 APPLET DEBUGGING  SECTION\r
618                 =========================\r
619             -->\r
620     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">\r
621         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>\r
622         <j2seproject3:debug classname="sun.applet.AppletViewer">\r
623             <customize>\r
624                 <arg value="${applet.url}"/>\r
625             </customize>\r
626         </j2seproject3:debug>\r
627     </target>\r
628     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>\r
629     <!--\r
630                 ===============\r
631                 CLEANUP SECTION\r
632                 ===============\r
633             -->\r
634     <target depends="init" name="deps-clean" unless="no.deps"/>\r
635     <target depends="init" name="-do-clean">\r
636         <delete dir="${build.dir}"/>\r
637         <delete dir="${dist.dir}"/>\r
638     </target>\r
639     <target name="-post-clean">\r
640         <!-- Empty placeholder for easier customization. -->\r
641         <!-- You can override this target in the ../build.xml file. -->\r
642     </target>\r
643     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>\r
644 </project>\r