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