samples/cloneproblem/nbproject/build-impl.xml
author Jaroslav Tulach <jtulach@netbeans.org>
Tue, 01 Mar 2011 21:28:39 +0100
changeset 368 e1089d423881
child 413 f11943a373a7
permissions -rw-r--r--
Demonstrating the 'clone' problem
     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="cloneproblem-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="splashscreen.available">
    59             <and>
    60                 <not>
    61                     <equals arg1="${application.splash}" arg2="" trim="true"/>
    62                 </not>
    63                 <available file="${application.splash}"/>
    64             </and>
    65         </condition>
    66         <condition property="main.class.available">
    67             <and>
    68                 <isset property="main.class"/>
    69                 <not>
    70                     <equals arg1="${main.class}" arg2="" trim="true"/>
    71                 </not>
    72             </and>
    73         </condition>
    74         <condition property="manifest.available+main.class">
    75             <and>
    76                 <isset property="manifest.available"/>
    77                 <isset property="main.class.available"/>
    78             </and>
    79         </condition>
    80         <condition property="do.archive">
    81             <not>
    82                 <istrue value="${jar.archive.disabled}"/>
    83             </not>
    84         </condition>
    85         <condition property="do.mkdist">
    86             <and>
    87                 <isset property="do.archive"/>
    88                 <isset property="libs.CopyLibs.classpath"/>
    89                 <not>
    90                     <istrue value="${mkdist.disabled}"/>
    91                 </not>
    92             </and>
    93         </condition>
    94         <condition property="manifest.available+main.class+mkdist.available">
    95             <and>
    96                 <istrue value="${manifest.available+main.class}"/>
    97                 <isset property="do.mkdist"/>
    98             </and>
    99         </condition>
   100         <condition property="do.archive+manifest.available">
   101             <and>
   102                 <isset property="manifest.available"/>
   103                 <istrue value="${do.archive}"/>
   104             </and>
   105         </condition>
   106         <condition property="do.archive+main.class.available">
   107             <and>
   108                 <isset property="main.class.available"/>
   109                 <istrue value="${do.archive}"/>
   110             </and>
   111         </condition>
   112         <condition property="do.archive+splashscreen.available">
   113             <and>
   114                 <isset property="splashscreen.available"/>
   115                 <istrue value="${do.archive}"/>
   116             </and>
   117         </condition>
   118         <condition property="do.archive+manifest.available+main.class">
   119             <and>
   120                 <istrue value="${manifest.available+main.class}"/>
   121                 <istrue value="${do.archive}"/>
   122             </and>
   123         </condition>
   124         <condition property="manifest.available-mkdist.available">
   125             <or>
   126                 <istrue value="${manifest.available}"/>
   127                 <isset property="do.mkdist"/>
   128             </or>
   129         </condition>
   130         <condition property="manifest.available+main.class-mkdist.available">
   131             <or>
   132                 <istrue value="${manifest.available+main.class}"/>
   133                 <isset property="do.mkdist"/>
   134             </or>
   135         </condition>
   136         <condition property="have.tests">
   137             <or>
   138                 <available file="${test.src.dir}"/>
   139             </or>
   140         </condition>
   141         <condition property="have.sources">
   142             <or>
   143                 <available file="${src.dir}"/>
   144             </or>
   145         </condition>
   146         <condition property="netbeans.home+have.tests">
   147             <and>
   148                 <isset property="netbeans.home"/>
   149                 <isset property="have.tests"/>
   150             </and>
   151         </condition>
   152         <condition property="no.javadoc.preview">
   153             <and>
   154                 <isset property="javadoc.preview"/>
   155                 <isfalse value="${javadoc.preview}"/>
   156             </and>
   157         </condition>
   158         <property name="run.jvmargs" value=""/>
   159         <property name="javac.compilerargs" value=""/>
   160         <property name="work.dir" value="${basedir}"/>
   161         <condition property="no.deps">
   162             <and>
   163                 <istrue value="${no.dependencies}"/>
   164             </and>
   165         </condition>
   166         <property name="javac.debug" value="true"/>
   167         <property name="javadoc.preview" value="true"/>
   168         <property name="application.args" value=""/>
   169         <property name="source.encoding" value="${file.encoding}"/>
   170         <property name="runtime.encoding" value="${source.encoding}"/>
   171         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   172             <and>
   173                 <isset property="javadoc.encoding"/>
   174                 <not>
   175                     <equals arg1="${javadoc.encoding}" arg2=""/>
   176                 </not>
   177             </and>
   178         </condition>
   179         <property name="javadoc.encoding.used" value="${source.encoding}"/>
   180         <property name="includes" value="**"/>
   181         <property name="excludes" value=""/>
   182         <property name="do.depend" value="false"/>
   183         <condition property="do.depend.true">
   184             <istrue value="${do.depend}"/>
   185         </condition>
   186         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   187         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   188             <length length="0" string="${endorsed.classpath}" when="greater"/>
   189         </condition>
   190         <property name="javac.fork" value="true"/>
   191         <property name="jar.index" value="false"/>
   192         <property name="jar.index.metainf" value="${jar.index}"/>
   193         <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   194     </target>
   195     <target name="-post-init">
   196         <!-- Empty placeholder for easier customization. -->
   197         <!-- You can override this target in the ../build.xml file. -->
   198     </target>
   199     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   200         <fail unless="src.dir">Must set src.dir</fail>
   201         <fail unless="test.src.dir">Must set test.src.dir</fail>
   202         <fail unless="build.dir">Must set build.dir</fail>
   203         <fail unless="dist.dir">Must set dist.dir</fail>
   204         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   205         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   206         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   207         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   208         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   209         <fail unless="dist.jar">Must set dist.jar</fail>
   210     </target>
   211     <target name="-init-macrodef-property">
   212         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   213             <attribute name="name"/>
   214             <attribute name="value"/>
   215             <sequential>
   216                 <property name="@{name}" value="${@{value}}"/>
   217             </sequential>
   218         </macrodef>
   219     </target>
   220     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   221         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   222             <attribute default="${src.dir}" name="srcdir"/>
   223             <attribute default="${build.classes.dir}" name="destdir"/>
   224             <attribute default="${javac.classpath}" name="classpath"/>
   225             <attribute default="${javac.processorpath}" name="processorpath"/>
   226             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   227             <attribute default="${includes}" name="includes"/>
   228             <attribute default="${excludes}" name="excludes"/>
   229             <attribute default="${javac.debug}" name="debug"/>
   230             <attribute default="${empty.dir}" name="sourcepath"/>
   231             <attribute default="${empty.dir}" name="gensrcdir"/>
   232             <element name="customize" optional="true"/>
   233             <sequential>
   234                 <property location="${build.dir}/empty" name="empty.dir"/>
   235                 <mkdir dir="${empty.dir}"/>
   236                 <mkdir dir="@{apgeneratedsrcdir}"/>
   237                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   238                     <src>
   239                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   240                             <include name="*"/>
   241                         </dirset>
   242                     </src>
   243                     <classpath>
   244                         <path path="@{classpath}"/>
   245                     </classpath>
   246                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   247                     <compilerarg line="${javac.compilerargs}"/>
   248                     <compilerarg value="-processorpath"/>
   249                     <compilerarg path="@{processorpath}:${empty.dir}"/>
   250                     <compilerarg line="${ap.processors.internal}"/>
   251                     <compilerarg line="${annotation.processing.processor.options}"/>
   252                     <compilerarg value="-s"/>
   253                     <compilerarg path="@{apgeneratedsrcdir}"/>
   254                     <compilerarg line="${ap.proc.none.internal}"/>
   255                     <customize/>
   256                 </javac>
   257             </sequential>
   258         </macrodef>
   259     </target>
   260     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   261         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   262             <attribute default="${src.dir}" name="srcdir"/>
   263             <attribute default="${build.classes.dir}" name="destdir"/>
   264             <attribute default="${javac.classpath}" name="classpath"/>
   265             <attribute default="${javac.processorpath}" name="processorpath"/>
   266             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   267             <attribute default="${includes}" name="includes"/>
   268             <attribute default="${excludes}" name="excludes"/>
   269             <attribute default="${javac.debug}" name="debug"/>
   270             <attribute default="${empty.dir}" name="sourcepath"/>
   271             <attribute default="${empty.dir}" name="gensrcdir"/>
   272             <element name="customize" optional="true"/>
   273             <sequential>
   274                 <property location="${build.dir}/empty" name="empty.dir"/>
   275                 <mkdir dir="${empty.dir}"/>
   276                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   277                     <src>
   278                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   279                             <include name="*"/>
   280                         </dirset>
   281                     </src>
   282                     <classpath>
   283                         <path path="@{classpath}"/>
   284                     </classpath>
   285                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   286                     <compilerarg line="${javac.compilerargs}"/>
   287                     <customize/>
   288                 </javac>
   289             </sequential>
   290         </macrodef>
   291     </target>
   292     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   293         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   294             <attribute default="${src.dir}" name="srcdir"/>
   295             <attribute default="${build.classes.dir}" name="destdir"/>
   296             <attribute default="${javac.classpath}" name="classpath"/>
   297             <sequential>
   298                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   299                     <classpath>
   300                         <path path="@{classpath}"/>
   301                     </classpath>
   302                 </depend>
   303             </sequential>
   304         </macrodef>
   305         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   306             <attribute default="${build.classes.dir}" name="destdir"/>
   307             <sequential>
   308                 <fail unless="javac.includes">Must set javac.includes</fail>
   309                 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   310                     <path>
   311                         <filelist dir="@{destdir}" files="${javac.includes}"/>
   312                     </path>
   313                     <globmapper from="*.java" to="*.class"/>
   314                 </pathconvert>
   315                 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   316                 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   317                 <delete>
   318                     <files includesfile="${javac.includesfile.binary}"/>
   319                 </delete>
   320                 <delete>
   321                     <fileset file="${javac.includesfile.binary}"/>
   322                 </delete>
   323             </sequential>
   324         </macrodef>
   325     </target>
   326     <target name="-init-macrodef-junit">
   327         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   328             <attribute default="${includes}" name="includes"/>
   329             <attribute default="${excludes}" name="excludes"/>
   330             <attribute default="**" name="testincludes"/>
   331             <sequential>
   332                 <property name="junit.forkmode" value="perTest"/>
   333                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   334                     <batchtest todir="${build.test.results.dir}">
   335                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   336                             <filename name="@{testincludes}"/>
   337                         </fileset>
   338                     </batchtest>
   339                     <classpath>
   340                         <path path="${run.test.classpath}"/>
   341                     </classpath>
   342                     <syspropertyset>
   343                         <propertyref prefix="test-sys-prop."/>
   344                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   345                     </syspropertyset>
   346                     <formatter type="brief" usefile="false"/>
   347                     <formatter type="xml"/>
   348                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   349                     <jvmarg value="-ea"/>
   350                     <jvmarg line="${run.jvmargs}"/>
   351                 </junit>
   352             </sequential>
   353         </macrodef>
   354     </target>
   355     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
   356     <target name="-profile-pre-init">
   357         <!-- Empty placeholder for easier customization. -->
   358         <!-- You can override this target in the ../build.xml file. -->
   359     </target>
   360     <target name="-profile-post-init">
   361         <!-- Empty placeholder for easier customization. -->
   362         <!-- You can override this target in the ../build.xml file. -->
   363     </target>
   364     <target name="-profile-init-macrodef-profile">
   365         <macrodef name="resolve">
   366             <attribute name="name"/>
   367             <attribute name="value"/>
   368             <sequential>
   369                 <property name="@{name}" value="${env.@{value}}"/>
   370             </sequential>
   371         </macrodef>
   372         <macrodef name="profile">
   373             <attribute default="${main.class}" name="classname"/>
   374             <element name="customize" optional="true"/>
   375             <sequential>
   376                 <property environment="env"/>
   377                 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   378                 <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   379                     <jvmarg value="${profiler.info.jvmargs.agent}"/>
   380                     <jvmarg line="${profiler.info.jvmargs}"/>
   381                     <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   382                     <arg line="${application.args}"/>
   383                     <classpath>
   384                         <path path="${run.classpath}"/>
   385                     </classpath>
   386                     <syspropertyset>
   387                         <propertyref prefix="run-sys-prop."/>
   388                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   389                     </syspropertyset>
   390                     <customize/>
   391                 </java>
   392             </sequential>
   393         </macrodef>
   394     </target>
   395     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
   396         <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   397         <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   398     </target>
   399     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   400         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   401             <attribute default="${main.class}" name="name"/>
   402             <attribute default="${debug.classpath}" name="classpath"/>
   403             <attribute default="" name="stopclassname"/>
   404             <sequential>
   405                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   406                     <classpath>
   407                         <path path="@{classpath}"/>
   408                     </classpath>
   409                 </nbjpdastart>
   410             </sequential>
   411         </macrodef>
   412         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   413             <attribute default="${build.classes.dir}" name="dir"/>
   414             <sequential>
   415                 <nbjpdareload>
   416                     <fileset dir="@{dir}" includes="${fix.classes}">
   417                         <include name="${fix.includes}*.class"/>
   418                     </fileset>
   419                 </nbjpdareload>
   420             </sequential>
   421         </macrodef>
   422     </target>
   423     <target name="-init-debug-args">
   424         <property name="version-output" value="java version &quot;${ant.java.version}"/>
   425         <condition property="have-jdk-older-than-1.4">
   426             <or>
   427                 <contains string="${version-output}" substring="java version &quot;1.0"/>
   428                 <contains string="${version-output}" substring="java version &quot;1.1"/>
   429                 <contains string="${version-output}" substring="java version &quot;1.2"/>
   430                 <contains string="${version-output}" substring="java version &quot;1.3"/>
   431             </or>
   432         </condition>
   433         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   434             <istrue value="${have-jdk-older-than-1.4}"/>
   435         </condition>
   436         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   437             <os family="windows"/>
   438         </condition>
   439         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   440             <isset property="debug.transport"/>
   441         </condition>
   442     </target>
   443     <target depends="-init-debug-args" name="-init-macrodef-debug">
   444         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   445             <attribute default="${main.class}" name="classname"/>
   446             <attribute default="${debug.classpath}" name="classpath"/>
   447             <element name="customize" optional="true"/>
   448             <sequential>
   449                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   450                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   451                     <jvmarg line="${debug-args-line}"/>
   452                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   453                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   454                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   455                     <jvmarg line="${run.jvmargs}"/>
   456                     <classpath>
   457                         <path path="@{classpath}"/>
   458                     </classpath>
   459                     <syspropertyset>
   460                         <propertyref prefix="run-sys-prop."/>
   461                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   462                     </syspropertyset>
   463                     <customize/>
   464                 </java>
   465             </sequential>
   466         </macrodef>
   467     </target>
   468     <target name="-init-macrodef-java">
   469         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   470             <attribute default="${main.class}" name="classname"/>
   471             <attribute default="${run.classpath}" name="classpath"/>
   472             <element name="customize" optional="true"/>
   473             <sequential>
   474                 <java classname="@{classname}" dir="${work.dir}" fork="true">
   475                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   476                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   477                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   478                     <jvmarg line="${run.jvmargs}"/>
   479                     <classpath>
   480                         <path path="@{classpath}"/>
   481                     </classpath>
   482                     <syspropertyset>
   483                         <propertyref prefix="run-sys-prop."/>
   484                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   485                     </syspropertyset>
   486                     <customize/>
   487                 </java>
   488             </sequential>
   489         </macrodef>
   490     </target>
   491     <target name="-init-macrodef-copylibs">
   492         <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   493             <attribute default="${manifest.file}" name="manifest"/>
   494             <element name="customize" optional="true"/>
   495             <sequential>
   496                 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   497                 <pathconvert property="run.classpath.without.build.classes.dir">
   498                     <path path="${run.classpath}"/>
   499                     <map from="${build.classes.dir.resolved}" to=""/>
   500                 </pathconvert>
   501                 <pathconvert pathsep=" " property="jar.classpath">
   502                     <path path="${run.classpath.without.build.classes.dir}"/>
   503                     <chainedmapper>
   504                         <flattenmapper/>
   505                         <globmapper from="*" to="lib/*"/>
   506                     </chainedmapper>
   507                 </pathconvert>
   508                 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   509                 <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   510                     <fileset dir="${build.classes.dir}"/>
   511                     <manifest>
   512                         <attribute name="Class-Path" value="${jar.classpath}"/>
   513                         <customize/>
   514                     </manifest>
   515                 </copylibs>
   516             </sequential>
   517         </macrodef>
   518     </target>
   519     <target name="-init-presetdef-jar">
   520         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   521             <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   522                 <j2seproject1:fileset dir="${build.classes.dir}"/>
   523             </jar>
   524         </presetdef>
   525     </target>
   526     <target name="-init-ap-cmdline-properties">
   527         <property name="annotation.processing.enabled" value="true"/>
   528         <property name="annotation.processing.processors.list" value=""/>
   529         <property name="annotation.processing.processor.options" value=""/>
   530         <property name="annotation.processing.run.all.processors" value="true"/>
   531         <property name="javac.processorpath" value="${javac.classpath}"/>
   532         <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   533         <condition property="ap.supported.internal" value="true">
   534             <not>
   535                 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   536             </not>
   537         </condition>
   538     </target>
   539     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   540         <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   541             <isfalse value="${annotation.processing.run.all.processors}"/>
   542         </condition>
   543         <condition else="" property="ap.proc.none.internal" value="-proc:none">
   544             <isfalse value="${annotation.processing.enabled}"/>
   545         </condition>
   546     </target>
   547     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   548         <property name="ap.cmd.line.internal" value=""/>
   549     </target>
   550     <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,-init-ap-cmdline" name="init"/>
   551     <!--
   552                 ===================
   553                 COMPILATION SECTION
   554                 ===================
   555             -->
   556     <target name="-deps-jar-init" unless="built-jar.properties">
   557         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   558         <delete file="${built-jar.properties}" quiet="true"/>
   559     </target>
   560     <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   561         <echo level="warn" message="Cycle detected: cloneproblem was already built"/>
   562     </target>
   563     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   564         <mkdir dir="${build.dir}"/>
   565         <touch file="${built-jar.properties}" verbose="false"/>
   566         <property file="${built-jar.properties}" prefix="already.built.jar."/>
   567         <antcall target="-warn-already-built-jar"/>
   568         <propertyfile file="${built-jar.properties}">
   569             <entry key="${basedir}" value=""/>
   570         </propertyfile>
   571     </target>
   572     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   573     <target depends="init" name="-check-automatic-build">
   574         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   575     </target>
   576     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   577         <antcall target="clean"/>
   578     </target>
   579     <target depends="init,deps-jar" name="-pre-pre-compile">
   580         <mkdir dir="${build.classes.dir}"/>
   581     </target>
   582     <target name="-pre-compile">
   583         <!-- Empty placeholder for easier customization. -->
   584         <!-- You can override this target in the ../build.xml file. -->
   585     </target>
   586     <target if="do.depend.true" name="-compile-depend">
   587         <pathconvert property="build.generated.subdirs">
   588             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   589                 <include name="*"/>
   590             </dirset>
   591         </pathconvert>
   592         <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   593     </target>
   594     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   595         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   596         <copy todir="${build.classes.dir}">
   597             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   598         </copy>
   599     </target>
   600     <target if="has.persistence.xml" name="-copy-persistence-xml">
   601         <mkdir dir="${build.classes.dir}/META-INF"/>
   602         <copy todir="${build.classes.dir}/META-INF">
   603             <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
   604         </copy>
   605     </target>
   606     <target name="-post-compile">
   607         <!-- Empty placeholder for easier customization. -->
   608         <!-- You can override this target in the ../build.xml file. -->
   609     </target>
   610     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   611     <target name="-pre-compile-single">
   612         <!-- Empty placeholder for easier customization. -->
   613         <!-- You can override this target in the ../build.xml file. -->
   614     </target>
   615     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   616         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   617         <j2seproject3:force-recompile/>
   618         <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   619     </target>
   620     <target name="-post-compile-single">
   621         <!-- Empty placeholder for easier customization. -->
   622         <!-- You can override this target in the ../build.xml file. -->
   623     </target>
   624     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   625     <!--
   626                 ====================
   627                 JAR BUILDING SECTION
   628                 ====================
   629             -->
   630     <target depends="init" name="-pre-pre-jar">
   631         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   632         <mkdir dir="${dist.jar.dir}"/>
   633     </target>
   634     <target name="-pre-jar">
   635         <!-- Empty placeholder for easier customization. -->
   636         <!-- You can override this target in the ../build.xml file. -->
   637     </target>
   638     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   639         <j2seproject1:jar/>
   640     </target>
   641     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
   642         <j2seproject1:jar manifest="${manifest.file}"/>
   643     </target>
   644     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   645         <j2seproject1:jar manifest="${manifest.file}">
   646             <j2seproject1:manifest>
   647                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   648             </j2seproject1:manifest>
   649         </j2seproject1:jar>
   650         <echo level="info">To run this application from the command line without Ant, try:</echo>
   651         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   652         <property location="${dist.jar}" name="dist.jar.resolved"/>
   653         <pathconvert property="run.classpath.with.dist.jar">
   654             <path path="${run.classpath}"/>
   655             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   656         </pathconvert>
   657         <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   658     </target>
   659     <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
   660         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   661         <touch file="${tmp.manifest.file}" verbose="false"/>
   662     </target>
   663     <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
   664         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   665         <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   666     </target>
   667     <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
   668         <manifest file="${tmp.manifest.file}" mode="update">
   669             <attribute name="Main-Class" value="${main.class}"/>
   670         </manifest>
   671     </target>
   672     <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
   673         <basename file="${application.splash}" property="splashscreen.basename"/>
   674         <mkdir dir="${build.classes.dir}/META-INF"/>
   675         <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   676         <manifest file="${tmp.manifest.file}" mode="update">
   677             <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   678         </manifest>
   679     </target>
   680     <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
   681         <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   682         <echo level="info">To run this application from the command line without Ant, try:</echo>
   683         <property location="${dist.jar}" name="dist.jar.resolved"/>
   684         <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   685     </target>
   686     <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
   687         <delete>
   688             <fileset file="${tmp.manifest.file}"/>
   689         </delete>
   690     </target>
   691     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
   692     <target name="-post-jar">
   693         <!-- Empty placeholder for easier customization. -->
   694         <!-- You can override this target in the ../build.xml file. -->
   695     </target>
   696     <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"/>
   697     <!--
   698                 =================
   699                 EXECUTION SECTION
   700                 =================
   701             -->
   702     <target depends="init,compile" description="Run a main class." name="run">
   703         <j2seproject1:java>
   704             <customize>
   705                 <arg line="${application.args}"/>
   706             </customize>
   707         </j2seproject1:java>
   708     </target>
   709     <target name="-do-not-recompile">
   710         <property name="javac.includes.binary" value=""/>
   711     </target>
   712     <target depends="init,compile-single" name="run-single">
   713         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   714         <j2seproject1:java classname="${run.class}"/>
   715     </target>
   716     <target depends="init,compile-test-single" name="run-test-with-main">
   717         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   718         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   719     </target>
   720     <!--
   721                 =================
   722                 DEBUGGING SECTION
   723                 =================
   724             -->
   725     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   726         <j2seproject1:nbjpdastart name="${debug.class}"/>
   727     </target>
   728     <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   729         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   730     </target>
   731     <target depends="init,compile" name="-debug-start-debuggee">
   732         <j2seproject3:debug>
   733             <customize>
   734                 <arg line="${application.args}"/>
   735             </customize>
   736         </j2seproject3:debug>
   737     </target>
   738     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
   739     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
   740         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
   741     </target>
   742     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
   743     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
   744         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   745         <j2seproject3:debug classname="${debug.class}"/>
   746     </target>
   747     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   748     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   749         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   750         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   751     </target>
   752     <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   753     <target depends="init" name="-pre-debug-fix">
   754         <fail unless="fix.includes">Must set fix.includes</fail>
   755         <property name="javac.includes" value="${fix.includes}.java"/>
   756     </target>
   757     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
   758         <j2seproject1:nbjpdareload/>
   759     </target>
   760     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   761     <!--
   762                 =================
   763                 PROFILING SECTION
   764                 =================
   765             -->
   766     <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
   767         <nbprofiledirect>
   768             <classpath>
   769                 <path path="${run.classpath}"/>
   770             </classpath>
   771         </nbprofiledirect>
   772         <profile/>
   773     </target>
   774     <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
   775         <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   776         <nbprofiledirect>
   777             <classpath>
   778                 <path path="${run.classpath}"/>
   779             </classpath>
   780         </nbprofiledirect>
   781         <profile classname="${profile.class}"/>
   782     </target>
   783     <!--
   784                 =========================
   785                 APPLET PROFILING  SECTION
   786                 =========================
   787             -->
   788     <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
   789         <nbprofiledirect>
   790             <classpath>
   791                 <path path="${run.classpath}"/>
   792             </classpath>
   793         </nbprofiledirect>
   794         <profile classname="sun.applet.AppletViewer">
   795             <customize>
   796                 <arg value="${applet.url}"/>
   797             </customize>
   798         </profile>
   799     </target>
   800     <!--
   801                 =========================
   802                 TESTS PROFILING  SECTION
   803                 =========================
   804             -->
   805     <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
   806         <nbprofiledirect>
   807             <classpath>
   808                 <path path="${run.test.classpath}"/>
   809             </classpath>
   810         </nbprofiledirect>
   811         <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
   812             <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   813             <jvmarg value="${profiler.info.jvmargs.agent}"/>
   814             <jvmarg line="${profiler.info.jvmargs}"/>
   815             <test name="${profile.class}"/>
   816             <classpath>
   817                 <path path="${run.test.classpath}"/>
   818             </classpath>
   819             <syspropertyset>
   820                 <propertyref prefix="test-sys-prop."/>
   821                 <mapper from="test-sys-prop.*" to="*" type="glob"/>
   822             </syspropertyset>
   823             <formatter type="brief" usefile="false"/>
   824             <formatter type="xml"/>
   825         </junit>
   826     </target>
   827     <!--
   828                 ===============
   829                 JAVADOC SECTION
   830                 ===============
   831             -->
   832     <target depends="init" if="have.sources" name="-javadoc-build">
   833         <mkdir dir="${dist.javadoc.dir}"/>
   834         <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}">
   835             <classpath>
   836                 <path path="${javac.classpath}"/>
   837             </classpath>
   838             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   839                 <filename name="**/*.java"/>
   840             </fileset>
   841             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   842                 <include name="**/*.java"/>
   843             </fileset>
   844         </javadoc>
   845         <copy todir="${dist.javadoc.dir}">
   846             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   847                 <filename name="**/doc-files/**"/>
   848             </fileset>
   849             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   850                 <include name="**/doc-files/**"/>
   851             </fileset>
   852         </copy>
   853     </target>
   854     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
   855         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   856     </target>
   857     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
   858     <!--
   859                 =========================
   860                 JUNIT COMPILATION SECTION
   861                 =========================
   862             -->
   863     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   864         <mkdir dir="${build.test.classes.dir}"/>
   865     </target>
   866     <target name="-pre-compile-test">
   867         <!-- Empty placeholder for easier customization. -->
   868         <!-- You can override this target in the ../build.xml file. -->
   869     </target>
   870     <target if="do.depend.true" name="-compile-test-depend">
   871         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   872     </target>
   873     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
   874         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
   875         <copy todir="${build.test.classes.dir}">
   876             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   877         </copy>
   878     </target>
   879     <target name="-post-compile-test">
   880         <!-- Empty placeholder for easier customization. -->
   881         <!-- You can override this target in the ../build.xml file. -->
   882     </target>
   883     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
   884     <target name="-pre-compile-test-single">
   885         <!-- Empty placeholder for easier customization. -->
   886         <!-- You can override this target in the ../build.xml file. -->
   887     </target>
   888     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   889         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   890         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   891         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
   892         <copy todir="${build.test.classes.dir}">
   893             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   894         </copy>
   895     </target>
   896     <target name="-post-compile-test-single">
   897         <!-- Empty placeholder for easier customization. -->
   898         <!-- You can override this target in the ../build.xml file. -->
   899     </target>
   900     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
   901     <!--
   902                 =======================
   903                 JUNIT EXECUTION SECTION
   904                 =======================
   905             -->
   906     <target depends="init" if="have.tests" name="-pre-test-run">
   907         <mkdir dir="${build.test.results.dir}"/>
   908     </target>
   909     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
   910         <j2seproject3:junit testincludes="**/*Test.java"/>
   911     </target>
   912     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
   913         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   914     </target>
   915     <target depends="init" if="have.tests" name="test-report"/>
   916     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
   917     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
   918     <target depends="init" if="have.tests" name="-pre-test-run-single">
   919         <mkdir dir="${build.test.results.dir}"/>
   920     </target>
   921     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
   922         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
   923         <j2seproject3:junit excludes="" includes="${test.includes}"/>
   924     </target>
   925     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   926         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
   927     </target>
   928     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
   929     <!--
   930                 =======================
   931                 JUNIT DEBUGGING SECTION
   932                 =======================
   933             -->
   934     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   935         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   936         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   937         <delete file="${test.report.file}"/>
   938         <mkdir dir="${build.test.results.dir}"/>
   939         <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}">
   940             <customize>
   941                 <syspropertyset>
   942                     <propertyref prefix="test-sys-prop."/>
   943                     <mapper from="test-sys-prop.*" to="*" type="glob"/>
   944                 </syspropertyset>
   945                 <arg value="${test.class}"/>
   946                 <arg value="showoutput=true"/>
   947                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   948                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   949             </customize>
   950         </j2seproject3:debug>
   951     </target>
   952     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   953         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   954     </target>
   955     <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   956     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   957         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   958     </target>
   959     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
   960     <!--
   961                 =========================
   962                 APPLET EXECUTION SECTION
   963                 =========================
   964             -->
   965     <target depends="init,compile-single" name="run-applet">
   966         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   967         <j2seproject1:java classname="sun.applet.AppletViewer">
   968             <customize>
   969                 <arg value="${applet.url}"/>
   970             </customize>
   971         </j2seproject1:java>
   972     </target>
   973     <!--
   974                 =========================
   975                 APPLET DEBUGGING  SECTION
   976                 =========================
   977             -->
   978     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
   979         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
   980         <j2seproject3:debug classname="sun.applet.AppletViewer">
   981             <customize>
   982                 <arg value="${applet.url}"/>
   983             </customize>
   984         </j2seproject3:debug>
   985     </target>
   986     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
   987     <!--
   988                 ===============
   989                 CLEANUP SECTION
   990                 ===============
   991             -->
   992     <target name="-deps-clean-init" unless="built-clean.properties">
   993         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
   994         <delete file="${built-clean.properties}" quiet="true"/>
   995     </target>
   996     <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
   997         <echo level="warn" message="Cycle detected: cloneproblem was already built"/>
   998     </target>
   999     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1000         <mkdir dir="${build.dir}"/>
  1001         <touch file="${built-clean.properties}" verbose="false"/>
  1002         <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1003         <antcall target="-warn-already-built-clean"/>
  1004         <propertyfile file="${built-clean.properties}">
  1005             <entry key="${basedir}" value=""/>
  1006         </propertyfile>
  1007     </target>
  1008     <target depends="init" name="-do-clean">
  1009         <delete dir="${build.dir}"/>
  1010         <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1011     </target>
  1012     <target name="-post-clean">
  1013         <!-- Empty placeholder for easier customization. -->
  1014         <!-- You can override this target in the ../build.xml file. -->
  1015     </target>
  1016     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1017     <target name="-check-call-dep">
  1018         <property file="${call.built.properties}" prefix="already.built."/>
  1019         <condition property="should.call.dep">
  1020             <not>
  1021                 <isset property="already.built.${call.subproject}"/>
  1022             </not>
  1023         </condition>
  1024     </target>
  1025     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1026         <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1027             <propertyset>
  1028                 <propertyref prefix="transfer."/>
  1029                 <mapper from="transfer.*" to="*" type="glob"/>
  1030             </propertyset>
  1031         </ant>
  1032     </target>
  1033 </project>