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