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