samples/friendpackage/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:50:29 +0200
changeset 4 eafdd59d4ae0
parent 2 d494ad06dbe7
child 6 b577ee7fcf67
permissions -rw-r--r--
Merge
     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 xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" 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="friendpackage-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                 <available file="${test.src.dir}"/>
    69             </or>
    70         </condition>
    71         <condition property="have.sources">
    72             <or>
    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     </target>
   112     <target name="-post-init">
   113         <!-- Empty placeholder for easier customization. -->
   114         <!-- You can override this target in the ../build.xml file. -->
   115     </target>
   116     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   117         <fail unless="src.dir">Must set src.dir</fail>
   118         <fail unless="test.src.dir">Must set test.src.dir</fail>
   119         <fail unless="build.dir">Must set build.dir</fail>
   120         <fail unless="dist.dir">Must set dist.dir</fail>
   121         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   122         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   123         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   124         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   125         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   126         <fail unless="dist.jar">Must set dist.jar</fail>
   127     </target>
   128     <target name="-init-macrodef-property">
   129         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   130             <attribute name="name"/>
   131             <attribute name="value"/>
   132             <sequential>
   133                 <property name="@{name}" value="${@{value}}"/>
   134             </sequential>
   135         </macrodef>
   136     </target>
   137     <target name="-init-macrodef-javac">
   138         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   139             <attribute default="${src.dir}" name="srcdir"/>
   140             <attribute default="${build.classes.dir}" name="destdir"/>
   141             <attribute default="${javac.classpath}" name="classpath"/>
   142             <attribute default="${includes}" name="includes"/>
   143             <attribute default="${excludes}" name="excludes"/>
   144             <attribute default="${javac.debug}" name="debug"/>
   145             <attribute default="" name="javac.compilerargs.jaxws"/>
   146             <attribute default="" name="sourcepath"/>
   147             <element name="customize" optional="true"/>
   148             <sequential>
   149                 <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}">
   150                     <classpath>
   151                         <path path="@{classpath}"/>
   152                     </classpath>
   153                     <compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
   154                     <customize/>
   155                 </javac>
   156             </sequential>
   157         </macrodef>
   158         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   159             <attribute default="${src.dir}" name="srcdir"/>
   160             <attribute default="${build.classes.dir}" name="destdir"/>
   161             <attribute default="${javac.classpath}" name="classpath"/>
   162             <sequential>
   163                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   164                     <classpath>
   165                         <path path="@{classpath}"/>
   166                     </classpath>
   167                 </depend>
   168             </sequential>
   169         </macrodef>
   170         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   171             <attribute default="${build.classes.dir}" name="destdir"/>
   172             <sequential>
   173                 <fail unless="javac.includes">Must set javac.includes</fail>
   174                 <pathconvert pathsep="," property="javac.includes.binary">
   175                     <path>
   176                         <filelist dir="@{destdir}" files="${javac.includes}"/>
   177                     </path>
   178                     <globmapper from="*.java" to="*.class"/>
   179                 </pathconvert>
   180                 <delete>
   181                     <files includes="${javac.includes.binary}"/>
   182                 </delete>
   183             </sequential>
   184         </macrodef>
   185     </target>
   186     <target name="-init-macrodef-junit">
   187         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   188             <attribute default="${includes}" name="includes"/>
   189             <attribute default="${excludes}" name="excludes"/>
   190             <sequential>
   191                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   192                     <batchtest todir="${build.test.results.dir}">
   193                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   194                             <filename name="**/*Test.java"/>
   195                         </fileset>
   196                     </batchtest>
   197                     <classpath>
   198                         <path path="${run.test.classpath}"/>
   199                     </classpath>
   200                     <syspropertyset>
   201                         <propertyref prefix="test-sys-prop."/>
   202                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   203                     </syspropertyset>
   204                     <formatter type="brief" usefile="false"/>
   205                     <formatter type="xml"/>
   206                     <jvmarg line="${run.jvmargs}"/>
   207                 </junit>
   208             </sequential>
   209         </macrodef>
   210     </target>
   211     <target name="-init-macrodef-nbjpda">
   212         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   213             <attribute default="${main.class}" name="name"/>
   214             <attribute default="${debug.classpath}" name="classpath"/>
   215             <attribute default="" name="stopclassname"/>
   216             <sequential>
   217                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
   218                     <classpath>
   219                         <path path="@{classpath}"/>
   220                     </classpath>
   221                 </nbjpdastart>
   222             </sequential>
   223         </macrodef>
   224         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   225             <attribute default="${build.classes.dir}" name="dir"/>
   226             <sequential>
   227                 <nbjpdareload>
   228                     <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
   229                 </nbjpdareload>
   230             </sequential>
   231         </macrodef>
   232     </target>
   233     <target name="-init-debug-args">
   234         <property name="version-output" value="java version &quot;${ant.java.version}"/>
   235         <condition property="have-jdk-older-than-1.4">
   236             <or>
   237                 <contains string="${version-output}" substring="java version &quot;1.0"/>
   238                 <contains string="${version-output}" substring="java version &quot;1.1"/>
   239                 <contains string="${version-output}" substring="java version &quot;1.2"/>
   240                 <contains string="${version-output}" substring="java version &quot;1.3"/>
   241             </or>
   242         </condition>
   243         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   244             <istrue value="${have-jdk-older-than-1.4}"/>
   245         </condition>
   246     </target>
   247     <target depends="-init-debug-args" name="-init-macrodef-debug">
   248         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   249             <attribute default="${main.class}" name="classname"/>
   250             <attribute default="${debug.classpath}" name="classpath"/>
   251             <element name="customize" optional="true"/>
   252             <sequential>
   253                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   254                     <jvmarg line="${debug-args-line}"/>
   255                     <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
   256                     <jvmarg line="${run.jvmargs}"/>
   257                     <classpath>
   258                         <path path="@{classpath}"/>
   259                     </classpath>
   260                     <syspropertyset>
   261                         <propertyref prefix="run-sys-prop."/>
   262                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   263                     </syspropertyset>
   264                     <customize/>
   265                 </java>
   266             </sequential>
   267         </macrodef>
   268     </target>
   269     <target name="-init-macrodef-java">
   270         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   271             <attribute default="${main.class}" name="classname"/>
   272             <element name="customize" optional="true"/>
   273             <sequential>
   274                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   275                     <jvmarg line="${run.jvmargs}"/>
   276                     <classpath>
   277                         <path path="${run.classpath}"/>
   278                     </classpath>
   279                     <syspropertyset>
   280                         <propertyref prefix="run-sys-prop."/>
   281                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   282                     </syspropertyset>
   283                     <customize/>
   284                 </java>
   285             </sequential>
   286         </macrodef>
   287     </target>
   288     <target name="-init-presetdef-jar">
   289         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   290             <jar compress="${jar.compress}" jarfile="${dist.jar}">
   291                 <j2seproject1:fileset dir="${build.classes.dir}"/>
   292             </jar>
   293         </presetdef>
   294     </target>
   295     <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"/>
   296     <!--
   297                 ===================
   298                 COMPILATION SECTION
   299                 ===================
   300             -->
   301     <target depends="init" name="deps-jar" unless="no.deps"/>
   302     <target depends="init,deps-jar" name="-pre-pre-compile">
   303         <mkdir dir="${build.classes.dir}"/>
   304     </target>
   305     <target name="-pre-compile">
   306         <!-- Empty placeholder for easier customization. -->
   307         <!-- You can override this target in the ../build.xml file. -->
   308     </target>
   309     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources" name="-do-compile">
   310         <j2seproject3:depend/>
   311         <j2seproject3:javac/>
   312         <copy todir="${build.classes.dir}">
   313             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   314         </copy>
   315     </target>
   316     <target name="-post-compile">
   317         <!-- Empty placeholder for easier customization. -->
   318         <!-- You can override this target in the ../build.xml file. -->
   319     </target>
   320     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   321     <target name="-pre-compile-single">
   322         <!-- Empty placeholder for easier customization. -->
   323         <!-- You can override this target in the ../build.xml file. -->
   324     </target>
   325     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   326         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   327         <j2seproject3:force-recompile/>
   328         <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
   329     </target>
   330     <target name="-post-compile-single">
   331         <!-- Empty placeholder for easier customization. -->
   332         <!-- You can override this target in the ../build.xml file. -->
   333     </target>
   334     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   335     <!--
   336                 ====================
   337                 JAR BUILDING SECTION
   338                 ====================
   339             -->
   340     <target depends="init" name="-pre-pre-jar">
   341         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   342         <mkdir dir="${dist.jar.dir}"/>
   343     </target>
   344     <target name="-pre-jar">
   345         <!-- Empty placeholder for easier customization. -->
   346         <!-- You can override this target in the ../build.xml file. -->
   347     </target>
   348     <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   349         <j2seproject1:jar/>
   350     </target>
   351     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   352         <j2seproject1:jar manifest="${manifest.file}"/>
   353     </target>
   354     <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">
   355         <j2seproject1:jar manifest="${manifest.file}">
   356             <j2seproject1:manifest>
   357                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   358             </j2seproject1:manifest>
   359         </j2seproject1:jar>
   360         <echo>To run this application from the command line without Ant, try:</echo>
   361         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   362         <property location="${dist.jar}" name="dist.jar.resolved"/>
   363         <pathconvert property="run.classpath.with.dist.jar">
   364             <path path="${run.classpath}"/>
   365             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   366         </pathconvert>
   367         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   368     </target>
   369     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   370         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   371         <pathconvert property="run.classpath.without.build.classes.dir">
   372             <path path="${run.classpath}"/>
   373             <map from="${build.classes.dir.resolved}" to=""/>
   374         </pathconvert>
   375         <pathconvert pathsep=" " property="jar.classpath">
   376             <path path="${run.classpath.without.build.classes.dir}"/>
   377             <chainedmapper>
   378                 <flattenmapper/>
   379                 <globmapper from="*" to="lib/*"/>
   380             </chainedmapper>
   381         </pathconvert>
   382         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   383         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   384             <fileset dir="${build.classes.dir}"/>
   385             <manifest>
   386                 <attribute name="Main-Class" value="${main.class}"/>
   387                 <attribute name="Class-Path" value="${jar.classpath}"/>
   388             </manifest>
   389         </copylibs>
   390         <echo>To run this application from the command line without Ant, try:</echo>
   391         <property location="${dist.jar}" name="dist.jar.resolved"/>
   392         <echo>java -jar "${dist.jar.resolved}"</echo>
   393     </target>
   394     <target name="-post-jar">
   395         <!-- Empty placeholder for easier customization. -->
   396         <!-- You can override this target in the ../build.xml file. -->
   397     </target>
   398     <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"/>
   399     <!--
   400                 =================
   401                 EXECUTION SECTION
   402                 =================
   403             -->
   404     <target depends="init,compile" description="Run a main class." name="run">
   405         <j2seproject1:java>
   406             <customize>
   407                 <arg line="${application.args}"/>
   408             </customize>
   409         </j2seproject1:java>
   410     </target>
   411     <target name="-do-not-recompile">
   412         <property name="javac.includes.binary" value=""/>
   413     </target>
   414     <target depends="init,-do-not-recompile,compile-single" name="run-single">
   415         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   416         <j2seproject1:java classname="${run.class}"/>
   417     </target>
   418     <!--
   419                 =================
   420                 DEBUGGING SECTION
   421                 =================
   422             -->
   423     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   424         <j2seproject1:nbjpdastart name="${debug.class}"/>
   425     </target>
   426     <target depends="init,compile" name="-debug-start-debuggee">
   427         <j2seproject3:debug>
   428             <customize>
   429                 <arg line="${application.args}"/>
   430             </customize>
   431         </j2seproject3:debug>
   432     </target>
   433     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
   434     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
   435         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
   436     </target>
   437     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
   438     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   439         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   440         <j2seproject3:debug classname="${debug.class}"/>
   441     </target>
   442     <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   443     <target depends="init" name="-pre-debug-fix">
   444         <fail unless="fix.includes">Must set fix.includes</fail>
   445         <property name="javac.includes" value="${fix.includes}.java"/>
   446     </target>
   447     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   448         <j2seproject1:nbjpdareload/>
   449     </target>
   450     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   451     <!--
   452                 ===============
   453                 JAVADOC SECTION
   454                 ===============
   455             -->
   456     <target depends="init" name="-javadoc-build">
   457         <mkdir dir="${dist.javadoc.dir}"/>
   458         <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" destdir="${dist.javadoc.dir}" 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}">
   459             <classpath>
   460                 <path path="${javac.classpath}"/>
   461             </classpath>
   462             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   463                 <filename name="**/*.java"/>
   464             </fileset>
   465         </javadoc>
   466     </target>
   467     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   468         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   469     </target>
   470     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
   471     <!--
   472                 =========================
   473                 JUNIT COMPILATION SECTION
   474                 =========================
   475             -->
   476     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   477         <mkdir dir="${build.test.classes.dir}"/>
   478     </target>
   479     <target name="-pre-compile-test">
   480         <!-- Empty placeholder for easier customization. -->
   481         <!-- You can override this target in the ../build.xml file. -->
   482     </target>
   483     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
   484         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   485         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   486         <copy todir="${build.test.classes.dir}">
   487             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   488         </copy>
   489     </target>
   490     <target name="-post-compile-test">
   491         <!-- Empty placeholder for easier customization. -->
   492         <!-- You can override this target in the ../build.xml file. -->
   493     </target>
   494     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   495     <target name="-pre-compile-test-single">
   496         <!-- Empty placeholder for easier customization. -->
   497         <!-- You can override this target in the ../build.xml file. -->
   498     </target>
   499     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   500         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   501         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   502         <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}"/>
   503         <copy todir="${build.test.classes.dir}">
   504             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   505         </copy>
   506     </target>
   507     <target name="-post-compile-test-single">
   508         <!-- Empty placeholder for easier customization. -->
   509         <!-- You can override this target in the ../build.xml file. -->
   510     </target>
   511     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   512     <!--
   513                 =======================
   514                 JUNIT EXECUTION SECTION
   515                 =======================
   516             -->
   517     <target depends="init" if="have.tests" name="-pre-test-run">
   518         <mkdir dir="${build.test.results.dir}"/>
   519     </target>
   520     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   521         <j2seproject3:junit/>
   522     </target>
   523     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   524         <fail if="tests.failed">Some tests failed; see details above.</fail>
   525     </target>
   526     <target depends="init" if="have.tests" name="test-report"/>
   527     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   528     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
   529     <target depends="init" if="have.tests" name="-pre-test-run-single">
   530         <mkdir dir="${build.test.results.dir}"/>
   531     </target>
   532     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
   533         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
   534         <j2seproject3:junit excludes="" includes="${test.includes}"/>
   535     </target>
   536     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   537         <fail if="tests.failed">Some tests failed; see details above.</fail>
   538     </target>
   539     <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"/>
   540     <!--
   541                 =======================
   542                 JUNIT DEBUGGING SECTION
   543                 =======================
   544             -->
   545     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   546         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   547         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   548         <delete file="${test.report.file}"/>
   549         <mkdir dir="${build.test.results.dir}"/>
   550         <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}">
   551             <customize>
   552                 <syspropertyset>
   553                     <propertyref prefix="test-sys-prop."/>
   554                     <mapper from="test-sys-prop.*" to="*" type="glob"/>
   555                 </syspropertyset>
   556                 <arg value="${test.class}"/>
   557                 <arg value="showoutput=true"/>
   558                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   559                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   560             </customize>
   561         </j2seproject3:debug>
   562     </target>
   563     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   564         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   565     </target>
   566     <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   567     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   568         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   569     </target>
   570     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
   571     <!--
   572                 =========================
   573                 APPLET EXECUTION SECTION
   574                 =========================
   575             -->
   576     <target depends="init,compile-single" name="run-applet">
   577         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   578         <j2seproject1:java classname="sun.applet.AppletViewer">
   579             <customize>
   580                 <arg value="${applet.url}"/>
   581             </customize>
   582         </j2seproject1:java>
   583     </target>
   584     <!--
   585                 =========================
   586                 APPLET DEBUGGING  SECTION
   587                 =========================
   588             -->
   589     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
   590         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   591         <j2seproject3:debug classname="sun.applet.AppletViewer">
   592             <customize>
   593                 <arg value="${applet.url}"/>
   594             </customize>
   595         </j2seproject3:debug>
   596     </target>
   597     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
   598     <!--
   599                 ===============
   600                 CLEANUP SECTION
   601                 ===============
   602             -->
   603     <target depends="init" name="deps-clean" unless="no.deps"/>
   604     <target depends="init" name="-do-clean">
   605         <delete dir="${build.dir}"/>
   606         <delete dir="${dist.dir}"/>
   607     </target>
   608     <target name="-post-clean">
   609         <!-- Empty placeholder for easier customization. -->
   610         <!-- You can override this target in the ../build.xml file. -->
   611     </target>
   612     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
   613 </project>