samples/aserverinfo/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Tue, 25 Aug 2009 11:32:10 +0200
changeset 337 d5b6a877e5a8
parent 292 60bb8519cb2d
child 338 2ed9d213455e
permissions -rw-r--r--
In fact builder pattern is combining mutable objects during creation with immutable result
     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     <fail message="Please build using Ant 1.7.1 or higher.">
    24         <condition>
    25             <not>
    26                 <antversion atleast="1.7.1"/>
    27             </not>
    28         </condition>
    29     </fail>
    30     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    31     <!-- 
    32                 ======================
    33                 INITIALIZATION SECTION 
    34                 ======================
    35             -->
    36     <target name="-pre-init">
    37         <!-- Empty placeholder for easier customization. -->
    38         <!-- You can override this target in the ../build.xml file. -->
    39     </target>
    40     <target depends="-pre-init" name="-init-private">
    41         <property file="nbproject/private/config.properties"/>
    42         <property file="nbproject/private/configs/${config}.properties"/>
    43         <property file="nbproject/private/private.properties"/>
    44     </target>
    45     <target depends="-pre-init,-init-private" name="-init-user">
    46         <property file="${user.properties.file}"/>
    47         <!-- The two properties below are usually overridden -->
    48         <!-- by the active platform. Just a fallback. -->
    49         <property name="default.javac.source" value="1.4"/>
    50         <property name="default.javac.target" value="1.4"/>
    51     </target>
    52     <target depends="-pre-init,-init-private,-init-user" name="-init-project">
    53         <property file="nbproject/configs/${config}.properties"/>
    54         <property file="nbproject/project.properties"/>
    55     </target>
    56     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    57         <available file="${manifest.file}" property="manifest.available"/>
    58         <condition property="manifest.available+main.class">
    59             <and>
    60                 <isset property="manifest.available"/>
    61                 <isset property="main.class"/>
    62                 <not>
    63                     <equals arg1="${main.class}" arg2="" trim="true"/>
    64                 </not>
    65             </and>
    66         </condition>
    67         <condition property="manifest.available+main.class+mkdist.available">
    68             <and>
    69                 <istrue value="${manifest.available+main.class}"/>
    70                 <isset property="libs.CopyLibs.classpath"/>
    71             </and>
    72         </condition>
    73         <condition property="have.tests">
    74             <or>
    75                 <available file="${test.src.dir}"/>
    76             </or>
    77         </condition>
    78         <condition property="have.sources">
    79             <or>
    80                 <available file="${src.dir}"/>
    81             </or>
    82         </condition>
    83         <condition property="netbeans.home+have.tests">
    84             <and>
    85                 <isset property="netbeans.home"/>
    86                 <isset property="have.tests"/>
    87             </and>
    88         </condition>
    89         <condition property="no.javadoc.preview">
    90             <and>
    91                 <isset property="javadoc.preview"/>
    92                 <isfalse value="${javadoc.preview}"/>
    93             </and>
    94         </condition>
    95         <property name="run.jvmargs" value=""/>
    96         <property name="javac.compilerargs" value=""/>
    97         <property name="work.dir" value="${basedir}"/>
    98         <condition property="no.deps">
    99             <and>
   100                 <istrue value="${no.dependencies}"/>
   101             </and>
   102         </condition>
   103         <property name="javac.debug" value="true"/>
   104         <property name="javadoc.preview" value="true"/>
   105         <property name="application.args" value=""/>
   106         <property name="source.encoding" value="${file.encoding}"/>
   107         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   108             <and>
   109                 <isset property="javadoc.encoding"/>
   110                 <not>
   111                     <equals arg1="${javadoc.encoding}" arg2=""/>
   112                 </not>
   113             </and>
   114         </condition>
   115         <property name="javadoc.encoding.used" value="${source.encoding}"/>
   116         <property name="includes" value="**"/>
   117         <property name="excludes" value=""/>
   118         <property name="do.depend" value="false"/>
   119         <condition property="do.depend.true">
   120             <istrue value="${do.depend}"/>
   121         </condition>
   122         <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
   123             <and>
   124                 <isset property="jaxws.endorsed.dir"/>
   125                 <available file="nbproject/jaxws-build.xml"/>
   126             </and>
   127         </condition>
   128     </target>
   129     <target name="-post-init">
   130         <!-- Empty placeholder for easier customization. -->
   131         <!-- You can override this target in the ../build.xml file. -->
   132     </target>
   133     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   134         <fail unless="src.dir">Must set src.dir</fail>
   135         <fail unless="test.src.dir">Must set test.src.dir</fail>
   136         <fail unless="build.dir">Must set build.dir</fail>
   137         <fail unless="dist.dir">Must set dist.dir</fail>
   138         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   139         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   140         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   141         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   142         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   143         <fail unless="dist.jar">Must set dist.jar</fail>
   144     </target>
   145     <target name="-init-macrodef-property">
   146         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   147             <attribute name="name"/>
   148             <attribute name="value"/>
   149             <sequential>
   150                 <property name="@{name}" value="${@{value}}"/>
   151             </sequential>
   152         </macrodef>
   153     </target>
   154     <target name="-init-macrodef-javac">
   155         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   156             <attribute default="${src.dir}" name="srcdir"/>
   157             <attribute default="${build.classes.dir}" name="destdir"/>
   158             <attribute default="${javac.classpath}" name="classpath"/>
   159             <attribute default="${includes}" name="includes"/>
   160             <attribute default="${excludes}" name="excludes"/>
   161             <attribute default="${javac.debug}" name="debug"/>
   162             <attribute default="${empty.dir}" name="sourcepath"/>
   163             <attribute default="${empty.dir}" name="gensrcdir"/>
   164             <element name="customize" optional="true"/>
   165             <sequential>
   166                 <property location="${build.dir}/empty" name="empty.dir"/>
   167                 <mkdir dir="${empty.dir}"/>
   168                 <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}">
   169                     <src>
   170                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   171                             <include name="*"/>
   172                         </dirset>
   173                     </src>
   174                     <classpath>
   175                         <path path="@{classpath}"/>
   176                     </classpath>
   177                     <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
   178                     <customize/>
   179                 </javac>
   180             </sequential>
   181         </macrodef>
   182         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   183             <attribute default="${src.dir}" name="srcdir"/>
   184             <attribute default="${build.classes.dir}" name="destdir"/>
   185             <attribute default="${javac.classpath}" name="classpath"/>
   186             <sequential>
   187                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   188                     <classpath>
   189                         <path path="@{classpath}"/>
   190                     </classpath>
   191                 </depend>
   192             </sequential>
   193         </macrodef>
   194         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   195             <attribute default="${build.classes.dir}" name="destdir"/>
   196             <sequential>
   197                 <fail unless="javac.includes">Must set javac.includes</fail>
   198                 <pathconvert pathsep="," property="javac.includes.binary">
   199                     <path>
   200                         <filelist dir="@{destdir}" files="${javac.includes}"/>
   201                     </path>
   202                     <globmapper from="*.java" to="*.class"/>
   203                 </pathconvert>
   204                 <delete>
   205                     <files includes="${javac.includes.binary}"/>
   206                 </delete>
   207             </sequential>
   208         </macrodef>
   209     </target>
   210     <target name="-init-macrodef-junit">
   211         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   212             <attribute default="${includes}" name="includes"/>
   213             <attribute default="${excludes}" name="excludes"/>
   214             <attribute default="**" name="testincludes"/>
   215             <sequential>
   216                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   217                     <batchtest todir="${build.test.results.dir}">
   218                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   219                             <filename name="@{testincludes}"/>
   220                         </fileset>
   221                     </batchtest>
   222                     <classpath>
   223                         <path path="${run.test.classpath}"/>
   224                     </classpath>
   225                     <syspropertyset>
   226                         <propertyref prefix="test-sys-prop."/>
   227                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   228                     </syspropertyset>
   229                     <formatter type="brief" usefile="false"/>
   230                     <formatter type="xml"/>
   231                     <jvmarg line="${run.jvmargs}"/>
   232                 </junit>
   233             </sequential>
   234         </macrodef>
   235     </target>
   236     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   237         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   238             <attribute default="${main.class}" name="name"/>
   239             <attribute default="${debug.classpath}" name="classpath"/>
   240             <attribute default="" name="stopclassname"/>
   241             <sequential>
   242                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   243                     <classpath>
   244                         <path path="@{classpath}"/>
   245                     </classpath>
   246                 </nbjpdastart>
   247             </sequential>
   248         </macrodef>
   249         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   250             <attribute default="${build.classes.dir}" name="dir"/>
   251             <sequential>
   252                 <nbjpdareload>
   253                     <fileset dir="@{dir}" includes="${fix.classes}">
   254                         <include name="${fix.includes}*.class"/>
   255                     </fileset>
   256                 </nbjpdareload>
   257             </sequential>
   258         </macrodef>
   259     </target>
   260     <target name="-init-debug-args">
   261         <property name="version-output" value="java version &quot;${ant.java.version}"/>
   262         <condition property="have-jdk-older-than-1.4">
   263             <or>
   264                 <contains string="${version-output}" substring="java version &quot;1.0"/>
   265                 <contains string="${version-output}" substring="java version &quot;1.1"/>
   266                 <contains string="${version-output}" substring="java version &quot;1.2"/>
   267                 <contains string="${version-output}" substring="java version &quot;1.3"/>
   268             </or>
   269         </condition>
   270         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   271             <istrue value="${have-jdk-older-than-1.4}"/>
   272         </condition>
   273         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   274             <os family="windows"/>
   275         </condition>
   276         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   277             <isset property="debug.transport"/>
   278         </condition>
   279     </target>
   280     <target depends="-init-debug-args" name="-init-macrodef-debug">
   281         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   282             <attribute default="${main.class}" name="classname"/>
   283             <attribute default="${debug.classpath}" name="classpath"/>
   284             <element name="customize" optional="true"/>
   285             <sequential>
   286                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   287                     <jvmarg line="${debug-args-line}"/>
   288                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   289                     <jvmarg value="-Dfile.encoding=${source.encoding}"/>
   290                     <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
   291                     <jvmarg line="${run.jvmargs}"/>
   292                     <classpath>
   293                         <path path="@{classpath}"/>
   294                     </classpath>
   295                     <syspropertyset>
   296                         <propertyref prefix="run-sys-prop."/>
   297                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   298                     </syspropertyset>
   299                     <customize/>
   300                 </java>
   301             </sequential>
   302         </macrodef>
   303     </target>
   304     <target name="-init-macrodef-java">
   305         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   306             <attribute default="${main.class}" name="classname"/>
   307             <attribute default="${run.classpath}" name="classpath"/>
   308             <element name="customize" optional="true"/>
   309             <sequential>
   310                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   311                     <jvmarg value="-Dfile.encoding=${source.encoding}"/>
   312                     <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
   313                     <jvmarg line="${run.jvmargs}"/>
   314                     <classpath>
   315                         <path path="@{classpath}"/>
   316                     </classpath>
   317                     <syspropertyset>
   318                         <propertyref prefix="run-sys-prop."/>
   319                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   320                     </syspropertyset>
   321                     <customize/>
   322                 </java>
   323             </sequential>
   324         </macrodef>
   325     </target>
   326     <target name="-init-presetdef-jar">
   327         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   328             <jar compress="${jar.compress}" jarfile="${dist.jar}">
   329                 <j2seproject1:fileset dir="${build.classes.dir}"/>
   330             </jar>
   331         </presetdef>
   332     </target>
   333     <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"/>
   334     <!--
   335                 ===================
   336                 COMPILATION SECTION
   337                 ===================
   338             -->
   339     <target name="-deps-jar-init" unless="built-jar.properties">
   340         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   341         <delete file="${built-jar.properties}" quiet="true"/>
   342     </target>
   343     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   344         <mkdir dir="${build.dir}"/>
   345         <touch file="${built-jar.properties}" verbose="false"/>
   346         <property file="${built-jar.properties}" prefix="already.built.jar."/>
   347         <fail message="Cycle detected: aserverinfo was already built">
   348             <condition>
   349                 <isset property="already.built.jar.${basedir}"/>
   350             </condition>
   351         </fail>
   352         <propertyfile file="${built-jar.properties}">
   353             <entry key="${basedir}" value=""/>
   354         </propertyfile>
   355     </target>
   356     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   357     <target depends="init" name="-check-automatic-build">
   358         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   359     </target>
   360     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   361         <antcall target="clean"/>
   362     </target>
   363     <target depends="init,deps-jar" name="-pre-pre-compile">
   364         <mkdir dir="${build.classes.dir}"/>
   365     </target>
   366     <target name="-pre-compile">
   367         <!-- Empty placeholder for easier customization. -->
   368         <!-- You can override this target in the ../build.xml file. -->
   369     </target>
   370     <target if="do.depend.true" name="-compile-depend">
   371         <pathconvert property="build.generated.subdirs">
   372             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   373                 <include name="*"/>
   374             </dirset>
   375         </pathconvert>
   376         <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   377     </target>
   378     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   379         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   380         <copy todir="${build.classes.dir}">
   381             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   382         </copy>
   383     </target>
   384     <target name="-post-compile">
   385         <!-- Empty placeholder for easier customization. -->
   386         <!-- You can override this target in the ../build.xml file. -->
   387     </target>
   388     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   389     <target name="-pre-compile-single">
   390         <!-- Empty placeholder for easier customization. -->
   391         <!-- You can override this target in the ../build.xml file. -->
   392     </target>
   393     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   394         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   395         <j2seproject3:force-recompile/>
   396         <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   397     </target>
   398     <target name="-post-compile-single">
   399         <!-- Empty placeholder for easier customization. -->
   400         <!-- You can override this target in the ../build.xml file. -->
   401     </target>
   402     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   403     <!--
   404                 ====================
   405                 JAR BUILDING SECTION
   406                 ====================
   407             -->
   408     <target depends="init" name="-pre-pre-jar">
   409         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   410         <mkdir dir="${dist.jar.dir}"/>
   411     </target>
   412     <target name="-pre-jar">
   413         <!-- Empty placeholder for easier customization. -->
   414         <!-- You can override this target in the ../build.xml file. -->
   415     </target>
   416     <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   417         <j2seproject1:jar/>
   418     </target>
   419     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   420         <j2seproject1:jar manifest="${manifest.file}"/>
   421     </target>
   422     <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">
   423         <j2seproject1:jar manifest="${manifest.file}">
   424             <j2seproject1:manifest>
   425                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   426             </j2seproject1:manifest>
   427         </j2seproject1:jar>
   428         <echo>To run this application from the command line without Ant, try:</echo>
   429         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   430         <property location="${dist.jar}" name="dist.jar.resolved"/>
   431         <pathconvert property="run.classpath.with.dist.jar">
   432             <path path="${run.classpath}"/>
   433             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   434         </pathconvert>
   435         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   436     </target>
   437     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   438         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   439         <pathconvert property="run.classpath.without.build.classes.dir">
   440             <path path="${run.classpath}"/>
   441             <map from="${build.classes.dir.resolved}" to=""/>
   442         </pathconvert>
   443         <pathconvert pathsep=" " property="jar.classpath">
   444             <path path="${run.classpath.without.build.classes.dir}"/>
   445             <chainedmapper>
   446                 <flattenmapper/>
   447                 <globmapper from="*" to="lib/*"/>
   448             </chainedmapper>
   449         </pathconvert>
   450         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   451         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   452             <fileset dir="${build.classes.dir}"/>
   453             <manifest>
   454                 <attribute name="Main-Class" value="${main.class}"/>
   455                 <attribute name="Class-Path" value="${jar.classpath}"/>
   456             </manifest>
   457         </copylibs>
   458         <echo>To run this application from the command line without Ant, try:</echo>
   459         <property location="${dist.jar}" name="dist.jar.resolved"/>
   460         <echo>java -jar "${dist.jar.resolved}"</echo>
   461     </target>
   462     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
   463         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   464         <pathconvert property="run.classpath.without.build.classes.dir">
   465             <path path="${run.classpath}"/>
   466             <map from="${build.classes.dir.resolved}" to=""/>
   467         </pathconvert>
   468         <pathconvert pathsep=" " property="jar.classpath">
   469             <path path="${run.classpath.without.build.classes.dir}"/>
   470             <chainedmapper>
   471                 <flattenmapper/>
   472                 <globmapper from="*" to="lib/*"/>
   473             </chainedmapper>
   474         </pathconvert>
   475         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   476         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   477             <fileset dir="${build.classes.dir}"/>
   478         </copylibs>
   479     </target>
   480     <target name="-post-jar">
   481         <!-- Empty placeholder for easier customization. -->
   482         <!-- You can override this target in the ../build.xml file. -->
   483     </target>
   484     <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
   485     <!--
   486                 =================
   487                 EXECUTION SECTION
   488                 =================
   489             -->
   490     <target depends="init,compile" description="Run a main class." name="run">
   491         <j2seproject1:java>
   492             <customize>
   493                 <arg line="${application.args}"/>
   494             </customize>
   495         </j2seproject1:java>
   496     </target>
   497     <target name="-do-not-recompile">
   498         <property name="javac.includes.binary" value=""/>
   499     </target>
   500     <target depends="init,-do-not-recompile,compile-single" name="run-single">
   501         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   502         <j2seproject1:java classname="${run.class}"/>
   503     </target>
   504     <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
   505         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   506         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   507     </target>
   508     <!--
   509                 =================
   510                 DEBUGGING SECTION
   511                 =================
   512             -->
   513     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   514         <j2seproject1:nbjpdastart name="${debug.class}"/>
   515     </target>
   516     <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   517         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   518     </target>
   519     <target depends="init,compile" name="-debug-start-debuggee">
   520         <j2seproject3:debug>
   521             <customize>
   522                 <arg line="${application.args}"/>
   523             </customize>
   524         </j2seproject3:debug>
   525     </target>
   526     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
   527     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
   528         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
   529     </target>
   530     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
   531     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   532         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   533         <j2seproject3:debug classname="${debug.class}"/>
   534     </target>
   535     <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   536     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   537         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   538         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   539     </target>
   540     <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"/>
   541     <target depends="init" name="-pre-debug-fix">
   542         <fail unless="fix.includes">Must set fix.includes</fail>
   543         <property name="javac.includes" value="${fix.includes}.java"/>
   544     </target>
   545     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   546         <j2seproject1:nbjpdareload/>
   547     </target>
   548     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   549     <!--
   550                 ===============
   551                 JAVADOC SECTION
   552                 ===============
   553             -->
   554     <target depends="init" name="-javadoc-build">
   555         <mkdir dir="${dist.javadoc.dir}"/>
   556         <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}">
   557             <classpath>
   558                 <path path="${javac.classpath}"/>
   559             </classpath>
   560             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   561                 <filename name="**/*.java"/>
   562             </fileset>
   563             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   564                 <include name="**/*.java"/>
   565             </fileset>
   566         </javadoc>
   567     </target>
   568     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   569         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   570     </target>
   571     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
   572     <!--
   573                 =========================
   574                 JUNIT COMPILATION SECTION
   575                 =========================
   576             -->
   577     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   578         <mkdir dir="${build.test.classes.dir}"/>
   579     </target>
   580     <target name="-pre-compile-test">
   581         <!-- Empty placeholder for easier customization. -->
   582         <!-- You can override this target in the ../build.xml file. -->
   583     </target>
   584     <target if="do.depend.true" name="-compile-test-depend">
   585         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   586     </target>
   587     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   588         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   589         <copy todir="${build.test.classes.dir}">
   590             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   591         </copy>
   592     </target>
   593     <target name="-post-compile-test">
   594         <!-- Empty placeholder for easier customization. -->
   595         <!-- You can override this target in the ../build.xml file. -->
   596     </target>
   597     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   598     <target name="-pre-compile-test-single">
   599         <!-- Empty placeholder for easier customization. -->
   600         <!-- You can override this target in the ../build.xml file. -->
   601     </target>
   602     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   603         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   604         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   605         <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}"/>
   606         <copy todir="${build.test.classes.dir}">
   607             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   608         </copy>
   609     </target>
   610     <target name="-post-compile-test-single">
   611         <!-- Empty placeholder for easier customization. -->
   612         <!-- You can override this target in the ../build.xml file. -->
   613     </target>
   614     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   615     <!--
   616                 =======================
   617                 JUNIT EXECUTION SECTION
   618                 =======================
   619             -->
   620     <target depends="init" if="have.tests" name="-pre-test-run">
   621         <mkdir dir="${build.test.results.dir}"/>
   622     </target>
   623     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   624         <j2seproject3:junit testincludes="**/*Test.java"/>
   625     </target>
   626     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   627         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   628     </target>
   629     <target depends="init" if="have.tests" name="test-report"/>
   630     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   631     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
   632     <target depends="init" if="have.tests" name="-pre-test-run-single">
   633         <mkdir dir="${build.test.results.dir}"/>
   634     </target>
   635     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
   636         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
   637         <j2seproject3:junit excludes="" includes="${test.includes}"/>
   638     </target>
   639     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   640         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   641     </target>
   642     <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"/>
   643     <!--
   644                 =======================
   645                 JUNIT DEBUGGING SECTION
   646                 =======================
   647             -->
   648     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   649         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   650         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   651         <delete file="${test.report.file}"/>
   652         <mkdir dir="${build.test.results.dir}"/>
   653         <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}">
   654             <customize>
   655                 <syspropertyset>
   656                     <propertyref prefix="test-sys-prop."/>
   657                     <mapper from="test-sys-prop.*" to="*" type="glob"/>
   658                 </syspropertyset>
   659                 <arg value="${test.class}"/>
   660                 <arg value="showoutput=true"/>
   661                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   662                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   663             </customize>
   664         </j2seproject3:debug>
   665     </target>
   666     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   667         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   668     </target>
   669     <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   670     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   671         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   672     </target>
   673     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
   674     <!--
   675                 =========================
   676                 APPLET EXECUTION SECTION
   677                 =========================
   678             -->
   679     <target depends="init,compile-single" name="run-applet">
   680         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   681         <j2seproject1:java classname="sun.applet.AppletViewer">
   682             <customize>
   683                 <arg value="${applet.url}"/>
   684             </customize>
   685         </j2seproject1:java>
   686     </target>
   687     <!--
   688                 =========================
   689                 APPLET DEBUGGING  SECTION
   690                 =========================
   691             -->
   692     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
   693         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   694         <j2seproject3:debug classname="sun.applet.AppletViewer">
   695             <customize>
   696                 <arg value="${applet.url}"/>
   697             </customize>
   698         </j2seproject3:debug>
   699     </target>
   700     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
   701     <!--
   702                 ===============
   703                 CLEANUP SECTION
   704                 ===============
   705             -->
   706     <target name="-deps-clean-init" unless="built-clean.properties">
   707         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
   708         <delete file="${built-clean.properties}" quiet="true"/>
   709     </target>
   710     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
   711         <mkdir dir="${build.dir}"/>
   712         <touch file="${built-clean.properties}" verbose="false"/>
   713         <property file="${built-clean.properties}" prefix="already.built.clean."/>
   714         <fail message="Cycle detected: aserverinfo was already built">
   715             <condition>
   716                 <isset property="already.built.clean.${basedir}"/>
   717             </condition>
   718         </fail>
   719         <propertyfile file="${built-clean.properties}">
   720             <entry key="${basedir}" value=""/>
   721         </propertyfile>
   722     </target>
   723     <target depends="init" name="-do-clean">
   724         <delete dir="${build.dir}"/>
   725         <delete dir="${dist.dir}"/>
   726     </target>
   727     <target name="-post-clean">
   728         <!-- Empty placeholder for easier customization. -->
   729         <!-- You can override this target in the ../build.xml file. -->
   730     </target>
   731     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
   732     <target name="-check-call-dep">
   733         <property file="${call.built.properties}" prefix="already.built."/>
   734         <condition property="should.call.dep">
   735             <not>
   736                 <isset property="already.built.${call.subproject}"/>
   737             </not>
   738         </condition>
   739     </target>
   740     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
   741         <ant antfile="${call.script}" inheritall="false" target="${call.target}">
   742             <propertyset>
   743                 <propertyref prefix="transfer."/>
   744                 <mapper from="transfer.*" to="*" type="glob"/>
   745             </propertyset>
   746         </ant>
   747     </target>
   748 </project>