source: trunk/abcl/nbproject/build-impl.xml @ 11483

Last change on this file since 11483 was 11483, checked in by Mark Evenson, 14 years ago

Integrate build with Netbeans 6.x.

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