make/netbeans/nb-javac/nbproject/build-impl.xml
author Dusan Balek <dbalek@netbeans.org>
Fri, 04 Aug 2017 13:32:32 +0200
changeset 5956 15c0d1682895
parent 5873 31b7de13164b
permissions -rw-r--r--
Issue #271211 - NullPointerException at com.sun.tools.javac.comp.Enter.lambda$visitTopLevel$1 - fixed.
     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   - test compilation
    16   - test execution
    17   - test debugging
    18   - applet
    19   - cleanup
    20 
    21         -->
    22 <project xmlns:if="ant:if" 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" xmlns:unless="ant:unless" basedir=".." default="default" name="nb-javac-impl">
    23     <fail message="Please build using Ant 1.8.0 or higher.">
    24         <condition>
    25             <not>
    26                 <antversion atleast="1.8.0"/>
    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.6"/>
    50         <property name="default.javac.target" value="1.6"/>
    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 name="-init-modules-supported">
    57         <condition property="modules.supported.internal" value="true">
    58             <not>
    59                 <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
    60             </not>
    61         </condition>
    62     </target>
    63     <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
    64         <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
    65             <attribute name="property"/>
    66             <attribute name="sourcepath"/>
    67             <sequential>
    68                 <loadresource property="@{property}" quiet="true">
    69                     <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
    70                     <filterchain>
    71                         <stripjavacomments/>
    72                         <linecontainsregexp>
    73                             <regexp pattern="module .* \{"/>
    74                         </linecontainsregexp>
    75                         <tokenfilter>
    76                             <linetokenizer/>
    77                             <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
    78                         </tokenfilter>
    79                         <striplinebreaks/>
    80                     </filterchain>
    81                 </loadresource>
    82             </sequential>
    83         </macrodef>
    84     </target>
    85     <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
    86         <fail message="Java 9 support requires Ant 1.10.0 or higher.">
    87             <condition>
    88                 <not>
    89                     <antversion atleast="1.10.0"/>
    90                 </not>
    91             </condition>
    92         </fail>
    93         <j2seproject3:modulename property="module.name" sourcepath="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}"/>
    94         <condition property="named.module.internal">
    95             <and>
    96                 <isset property="module.name"/>
    97                 <length length="0" string="${module.name}" when="greater"/>
    98             </and>
    99         </condition>
   100         <condition property="unnamed.module.internal">
   101             <not>
   102                 <isset property="named.module.internal"/>
   103             </not>
   104         </condition>
   105         <property name="javac.modulepath" value=""/>
   106         <property name="run.modulepath" value="${javac.modulepath}"/>
   107         <property name="module.build.classes.dir" value="${build.classes.dir}"/>
   108         <property name="debug.modulepath" value="${run.modulepath}"/>
   109         <property name="javac.upgrademodulepath" value=""/>
   110         <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
   111         <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
   112             <and>
   113                 <isset property="javac.systemmodulepath"/>
   114                 <length length="0" string="${javac.systemmodulepath}" when="greater"/>
   115             </and>
   116         </condition>
   117         <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
   118         <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
   119         <property name="module.name" value=""/>
   120     </target>
   121     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
   122         <property name="platform.java" value="${java.home}/bin/java"/>
   123         <available file="${manifest.file}" property="manifest.available"/>
   124         <condition property="splashscreen.available">
   125             <and>
   126                 <not>
   127                     <equals arg1="${application.splash}" arg2="" trim="true"/>
   128                 </not>
   129                 <available file="${application.splash}"/>
   130             </and>
   131         </condition>
   132         <condition property="main.class.available">
   133             <and>
   134                 <isset property="main.class"/>
   135                 <not>
   136                     <equals arg1="${main.class}" arg2="" trim="true"/>
   137                 </not>
   138             </and>
   139         </condition>
   140         <condition property="profile.available">
   141             <and>
   142                 <isset property="javac.profile"/>
   143                 <length length="0" string="${javac.profile}" when="greater"/>
   144                 <not>
   145                     <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
   146                 </not>
   147             </and>
   148         </condition>
   149         <condition property="do.archive">
   150             <or>
   151                 <not>
   152                     <istrue value="${jar.archive.disabled}"/>
   153                 </not>
   154                 <istrue value="${not.archive.disabled}"/>
   155             </or>
   156         </condition>
   157         <condition property="do.mkdist">
   158             <and>
   159                 <isset property="do.archive"/>
   160                 <isset property="libs.CopyLibs.classpath"/>
   161                 <not>
   162                     <istrue value="${mkdist.disabled}"/>
   163                 </not>
   164                 <not>
   165                     <istrue value="${modules.supported.internal}"/>
   166                 </not>
   167             </and>
   168         </condition>
   169         <condition property="do.archive+manifest.available">
   170             <and>
   171                 <isset property="manifest.available"/>
   172                 <istrue value="${do.archive}"/>
   173             </and>
   174         </condition>
   175         <condition property="do.archive+main.class.available">
   176             <and>
   177                 <isset property="main.class.available"/>
   178                 <istrue value="${do.archive}"/>
   179             </and>
   180         </condition>
   181         <condition property="do.archive+splashscreen.available">
   182             <and>
   183                 <isset property="splashscreen.available"/>
   184                 <istrue value="${do.archive}"/>
   185             </and>
   186         </condition>
   187         <condition property="do.archive+profile.available">
   188             <and>
   189                 <isset property="profile.available"/>
   190                 <istrue value="${do.archive}"/>
   191             </and>
   192         </condition>
   193         <condition property="have.tests">
   194             <or>
   195                 <available file="${test.test.dir}"/>
   196             </or>
   197         </condition>
   198         <condition property="have.sources">
   199             <or>
   200                 <available file="${src.classes2.dir}"/>
   201                 <available file="${src.classes3.dir}"/>
   202                 <available file="${src.classes5.dir}"/>
   203                 <available file="${src.classes4.dir}"/>
   204             </or>
   205         </condition>
   206         <condition property="netbeans.home+have.tests">
   207             <and>
   208                 <isset property="netbeans.home"/>
   209                 <isset property="have.tests"/>
   210             </and>
   211         </condition>
   212         <condition property="no.javadoc.preview">
   213             <and>
   214                 <isset property="javadoc.preview"/>
   215                 <isfalse value="${javadoc.preview}"/>
   216             </and>
   217         </condition>
   218         <property name="run.jvmargs" value=""/>
   219         <property name="run.jvmargs.ide" value=""/>
   220         <property name="javac.compilerargs" value=""/>
   221         <property name="work.dir" value="${basedir}"/>
   222         <condition property="no.deps">
   223             <and>
   224                 <istrue value="${no.dependencies}"/>
   225             </and>
   226         </condition>
   227         <property name="javac.debug" value="true"/>
   228         <property name="javadoc.preview" value="true"/>
   229         <property name="application.args" value=""/>
   230         <property name="source.encoding" value="${file.encoding}"/>
   231         <property name="runtime.encoding" value="${source.encoding}"/>
   232         <property name="manifest.encoding" value="${source.encoding}"/>
   233         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   234             <and>
   235                 <isset property="javadoc.encoding"/>
   236                 <not>
   237                     <equals arg1="${javadoc.encoding}" arg2=""/>
   238                 </not>
   239             </and>
   240         </condition>
   241         <property name="javadoc.encoding.used" value="${source.encoding}"/>
   242         <property name="includes" value="**"/>
   243         <property name="excludes" value=""/>
   244         <property name="do.depend" value="false"/>
   245         <condition property="do.depend.true">
   246             <istrue value="${do.depend}"/>
   247         </condition>
   248         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   249         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   250             <and>
   251                 <isset property="endorsed.classpath"/>
   252                 <not>
   253                     <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
   254                 </not>
   255             </and>
   256         </condition>
   257         <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
   258             <isset property="profile.available"/>
   259         </condition>
   260         <condition else="false" property="jdkBug6558476">
   261             <and>
   262                 <matches pattern="1\.[56]" string="${java.specification.version}"/>
   263                 <not>
   264                     <os family="unix"/>
   265                 </not>
   266             </and>
   267         </condition>
   268         <condition else="false" property="javac.fork">
   269             <or>
   270                 <istrue value="${jdkBug6558476}"/>
   271                 <istrue value="${javac.external.vm}"/>
   272             </or>
   273         </condition>
   274         <property name="jar.index" value="false"/>
   275         <property name="jar.index.metainf" value="${jar.index}"/>
   276         <property name="copylibs.rebase" value="true"/>
   277         <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   278         <condition property="junit.available">
   279             <or>
   280                 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
   281                 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
   282             </or>
   283         </condition>
   284         <condition property="testng.available">
   285             <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
   286         </condition>
   287         <condition property="junit+testng.available">
   288             <and>
   289                 <istrue value="${junit.available}"/>
   290                 <istrue value="${testng.available}"/>
   291             </and>
   292         </condition>
   293         <condition else="testng" property="testng.mode" value="mixed">
   294             <istrue value="${junit+testng.available}"/>
   295         </condition>
   296         <condition else="" property="testng.debug.mode" value="-mixed">
   297             <istrue value="${junit+testng.available}"/>
   298         </condition>
   299         <property name="java.failonerror" value="true"/>
   300     </target>
   301     <target name="-post-init">
   302         <!-- Empty placeholder for easier customization. -->
   303         <!-- You can override this target in the ../build.xml file. -->
   304     </target>
   305     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
   306         <fail unless="src.classes2.dir">Must set src.classes2.dir</fail>
   307         <fail unless="src.classes3.dir">Must set src.classes3.dir</fail>
   308         <fail unless="src.classes5.dir">Must set src.classes5.dir</fail>
   309         <fail unless="src.classes4.dir">Must set src.classes4.dir</fail>
   310         <fail unless="test.test.dir">Must set test.test.dir</fail>
   311         <fail unless="build.dir">Must set build.dir</fail>
   312         <fail unless="dist.dir">Must set dist.dir</fail>
   313         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
   314         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
   315         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
   316         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
   317         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   318         <fail unless="dist.jar">Must set dist.jar</fail>
   319     </target>
   320     <target name="-init-macrodef-property">
   321         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
   322             <attribute name="name"/>
   323             <attribute name="value"/>
   324             <sequential>
   325                 <property name="@{name}" value="${@{value}}"/>
   326             </sequential>
   327         </macrodef>
   328     </target>
   329     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
   330         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   331             <attribute default="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}" name="srcdir"/>
   332             <attribute default="${build.classes.dir}" name="destdir"/>
   333             <attribute default="${javac.classpath}" name="classpath"/>
   334             <attribute default="${javac.modulepath}" name="modulepath"/>
   335             <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
   336             <attribute default="${javac.processorpath}" name="processorpath"/>
   337             <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
   338             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   339             <attribute default="${includes}" name="includes"/>
   340             <attribute default="${excludes}" name="excludes"/>
   341             <attribute default="${javac.debug}" name="debug"/>
   342             <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
   343             <attribute default="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}" if:set="named.module.internal" name="sourcepath"/>
   344             <attribute default="${empty.dir}" name="gensrcdir"/>
   345             <element name="customize" optional="true"/>
   346             <sequential>
   347                 <condition property="warn.excludes.internal">
   348                     <and>
   349                         <isset property="named.module.internal"/>
   350                         <length length="0" string="@{excludes}" trim="true" when="greater"/>
   351                     </and>
   352                 </condition>
   353                 <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
   354                 <property location="${build.dir}/empty" name="empty.dir"/>
   355                 <mkdir dir="${empty.dir}"/>
   356                 <mkdir dir="@{apgeneratedsrcdir}"/>
   357                 <condition property="processormodulepath.set">
   358                     <resourcecount count="0" when="greater">
   359                         <path>
   360                             <pathelement path="@{processormodulepath}"/>
   361                         </path>
   362                     </resourcecount>
   363                 </condition>
   364                 <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}">
   365                     <src>
   366                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   367                             <include name="*"/>
   368                         </dirset>
   369                     </src>
   370                     <classpath>
   371                         <path path="@{classpath}"/>
   372                     </classpath>
   373                     <modulepath>
   374                         <path path="@{modulepath}"/>
   375                     </modulepath>
   376                     <upgrademodulepath>
   377                         <path path="@{upgrademodulepath}"/>
   378                     </upgrademodulepath>
   379                     <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
   380                     <compilerarg line="${javac.profile.cmd.line.arg}"/>
   381                     <compilerarg line="${javac.compilerargs}"/>
   382                     <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
   383                     <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
   384                     <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
   385                     <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
   386                     <compilerarg line="${ap.processors.internal}"/>
   387                     <compilerarg line="${annotation.processing.processor.options}"/>
   388                     <compilerarg value="-s"/>
   389                     <compilerarg path="@{apgeneratedsrcdir}"/>
   390                     <compilerarg line="${ap.proc.none.internal}"/>
   391                     <customize/>
   392                 </javac>
   393             </sequential>
   394         </macrodef>
   395     </target>
   396     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
   397         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   398             <attribute default="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}" name="srcdir"/>
   399             <attribute default="${build.classes.dir}" name="destdir"/>
   400             <attribute default="${javac.classpath}" name="classpath"/>
   401             <attribute default="${javac.modulepath}" name="modulepath"/>
   402             <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
   403             <attribute default="${javac.processorpath}" name="processorpath"/>
   404             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   405             <attribute default="${includes}" name="includes"/>
   406             <attribute default="${excludes}" name="excludes"/>
   407             <attribute default="${javac.debug}" name="debug"/>
   408             <attribute default="${empty.dir}" name="sourcepath"/>
   409             <attribute default="${empty.dir}" name="gensrcdir"/>
   410             <element name="customize" optional="true"/>
   411             <sequential>
   412                 <property location="${build.dir}/empty" name="empty.dir"/>
   413                 <mkdir dir="${empty.dir}"/>
   414                 <mkdir dir="@{apgeneratedsrcdir}"/>
   415                 <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}">
   416                     <src>
   417                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   418                             <include name="*"/>
   419                         </dirset>
   420                     </src>
   421                     <classpath>
   422                         <path path="@{classpath}"/>
   423                     </classpath>
   424                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   425                     <compilerarg line="${javac.profile.cmd.line.arg}"/>
   426                     <compilerarg line="${javac.compilerargs}"/>
   427                     <compilerarg value="-processorpath"/>
   428                     <compilerarg path="@{processorpath}:${empty.dir}"/>
   429                     <compilerarg line="${ap.processors.internal}"/>
   430                     <compilerarg line="${annotation.processing.processor.options}"/>
   431                     <compilerarg value="-s"/>
   432                     <compilerarg path="@{apgeneratedsrcdir}"/>
   433                     <compilerarg line="${ap.proc.none.internal}"/>
   434                     <customize/>
   435                 </javac>
   436             </sequential>
   437         </macrodef>
   438     </target>
   439     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   440         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   441             <attribute default="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}" name="srcdir"/>
   442             <attribute default="${build.classes.dir}" name="destdir"/>
   443             <attribute default="${javac.classpath}" name="classpath"/>
   444             <attribute default="${javac.modulepath}" name="modulepath"/>
   445             <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
   446             <attribute default="${javac.processorpath}" name="processorpath"/>
   447             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   448             <attribute default="${includes}" name="includes"/>
   449             <attribute default="${excludes}" name="excludes"/>
   450             <attribute default="${javac.debug}" name="debug"/>
   451             <attribute default="${empty.dir}" name="sourcepath"/>
   452             <attribute default="${empty.dir}" name="gensrcdir"/>
   453             <element name="customize" optional="true"/>
   454             <sequential>
   455                 <property location="${build.dir}/empty" name="empty.dir"/>
   456                 <mkdir dir="${empty.dir}"/>
   457                 <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}">
   458                     <src>
   459                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   460                             <include name="*"/>
   461                         </dirset>
   462                     </src>
   463                     <classpath>
   464                         <path path="@{classpath}"/>
   465                     </classpath>
   466                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   467                     <compilerarg line="${javac.profile.cmd.line.arg}"/>
   468                     <compilerarg line="${javac.compilerargs}"/>
   469                     <customize/>
   470                 </javac>
   471             </sequential>
   472         </macrodef>
   473     </target>
   474     <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   475         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   476             <attribute default="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}" name="srcdir"/>
   477             <attribute default="${build.classes.dir}" name="destdir"/>
   478             <attribute default="${javac.classpath}" name="classpath"/>
   479             <sequential>
   480                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
   481                     <classpath>
   482                         <path path="@{classpath}"/>
   483                     </classpath>
   484                 </depend>
   485             </sequential>
   486         </macrodef>
   487         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
   488             <attribute default="${build.classes.dir}" name="destdir"/>
   489             <sequential>
   490                 <fail unless="javac.includes">Must set javac.includes</fail>
   491                 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   492                     <path>
   493                         <filelist dir="@{destdir}" files="${javac.includes}"/>
   494                     </path>
   495                     <globmapper from="*.java" to="*.class"/>
   496                 </pathconvert>
   497                 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   498                 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   499                 <delete>
   500                     <files includesfile="${javac.includesfile.binary}"/>
   501                 </delete>
   502                 <delete>
   503                     <fileset file="${javac.includesfile.binary}"/>
   504                 </delete>
   505             </sequential>
   506         </macrodef>
   507     </target>
   508     <target if="${junit.available}" name="-init-macrodef-junit-init">
   509         <condition else="false" property="nb.junit.batch" value="true">
   510             <and>
   511                 <istrue value="${junit.available}"/>
   512                 <not>
   513                     <isset property="test.method"/>
   514                 </not>
   515             </and>
   516         </condition>
   517         <condition else="false" property="nb.junit.single" value="true">
   518             <and>
   519                 <istrue value="${junit.available}"/>
   520                 <isset property="test.method"/>
   521             </and>
   522         </condition>
   523     </target>
   524     <target name="-init-test-properties">
   525         <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
   526         <property name="test.binarytestincludes" value=""/>
   527         <property name="test.binaryexcludes" value=""/>
   528     </target>
   529     <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
   530         <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
   531             <attribute default="${includes}" name="includes"/>
   532             <attribute default="${excludes}" name="excludes"/>
   533             <element name="customizePrototype" optional="true"/>
   534             <sequential>
   535                 <property name="junit.forkmode" value="perTest"/>
   536                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   537                     <syspropertyset>
   538                         <propertyref prefix="test-sys-prop."/>
   539                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   540                     </syspropertyset>
   541                     <classpath>
   542                         <path path="${run.test.classpath}"/>
   543                     </classpath>
   544                     <modulepath>
   545                         <path path="${run.test.modulepath}"/>
   546                     </modulepath>
   547                     <formatter type="brief" usefile="false"/>
   548                     <formatter type="xml"/>
   549                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   550                     <jvmarg value="-ea"/>
   551                     <jvmarg line="${run.test.jvmargs}"/>
   552                     <customizePrototype/>
   553                 </junit>
   554             </sequential>
   555         </macrodef>
   556     </target>
   557     <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
   558         <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
   559             <attribute default="${includes}" name="includes"/>
   560             <attribute default="${excludes}" name="excludes"/>
   561             <element name="customizePrototype" optional="true"/>
   562             <sequential>
   563                 <property name="junit.forkmode" value="perTest"/>
   564                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   565                     <syspropertyset>
   566                         <propertyref prefix="test-sys-prop."/>
   567                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   568                     </syspropertyset>
   569                     <classpath>
   570                         <path path="${run.test.classpath}"/>
   571                     </classpath>
   572                     <formatter type="brief" usefile="false"/>
   573                     <formatter type="xml"/>
   574                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   575                     <jvmarg value="-ea"/>
   576                     <customizePrototype/>
   577                 </junit>
   578             </sequential>
   579         </macrodef>
   580     </target>
   581     <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
   582         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   583             <attribute default="${includes}" name="includes"/>
   584             <attribute default="${excludes}" name="excludes"/>
   585             <attribute default="**" name="testincludes"/>
   586             <attribute default="" name="testmethods"/>
   587             <element name="customize" optional="true"/>
   588             <sequential>
   589                 <j2seproject3:junit-prototype>
   590                     <customizePrototype>
   591                         <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   592                         <customize/>
   593                     </customizePrototype>
   594                 </j2seproject3:junit-prototype>
   595             </sequential>
   596         </macrodef>
   597     </target>
   598     <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
   599         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   600             <attribute default="${includes}" name="includes"/>
   601             <attribute default="${excludes}" name="excludes"/>
   602             <attribute default="**" name="testincludes"/>
   603             <attribute default="" name="testmethods"/>
   604             <element name="customize" optional="true"/>
   605             <sequential>
   606                 <j2seproject3:junit-prototype>
   607                     <customizePrototype>
   608                         <batchtest todir="${build.test.results.dir}">
   609                             <fileset dir="${test.test.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   610                                 <filename name="@{testincludes}"/>
   611                             </fileset>
   612                             <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   613                                 <filename name="${test.binarytestincludes}"/>
   614                             </fileset>
   615                         </batchtest>
   616                         <customize/>
   617                     </customizePrototype>
   618                 </j2seproject3:junit-prototype>
   619             </sequential>
   620         </macrodef>
   621     </target>
   622     <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
   623     <target if="${testng.available}" name="-init-macrodef-testng">
   624         <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
   625             <attribute default="${includes}" name="includes"/>
   626             <attribute default="${excludes}" name="excludes"/>
   627             <attribute default="**" name="testincludes"/>
   628             <attribute default="" name="testmethods"/>
   629             <element name="customize" optional="true"/>
   630             <sequential>
   631                 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
   632                     <isset property="test.method"/>
   633                 </condition>
   634                 <union id="test.set">
   635                     <fileset dir="${test.test.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
   636                         <filename name="@{testincludes}"/>
   637                     </fileset>
   638                 </union>
   639                 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
   640                 <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="nb-javac" testname="TestNG tests" workingDir="${work.dir}">
   641                     <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
   642                     <propertyset>
   643                         <propertyref prefix="test-sys-prop."/>
   644                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
   645                     </propertyset>
   646                     <classpath>
   647                         <path path="${run.test.classpath}"/>
   648                     </classpath>
   649                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   650                     <customize/>
   651                 </testng>
   652             </sequential>
   653         </macrodef>
   654     </target>
   655     <target name="-init-macrodef-test-impl">
   656         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   657             <attribute default="${includes}" name="includes"/>
   658             <attribute default="${excludes}" name="excludes"/>
   659             <attribute default="**" name="testincludes"/>
   660             <attribute default="" name="testmethods"/>
   661             <element implicit="true" name="customize" optional="true"/>
   662             <sequential>
   663                 <echo>No tests executed.</echo>
   664             </sequential>
   665         </macrodef>
   666     </target>
   667     <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
   668         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   669             <attribute default="${includes}" name="includes"/>
   670             <attribute default="${excludes}" name="excludes"/>
   671             <attribute default="**" name="testincludes"/>
   672             <attribute default="" name="testmethods"/>
   673             <element implicit="true" name="customize" optional="true"/>
   674             <sequential>
   675                 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   676                     <customize/>
   677                 </j2seproject3:junit>
   678             </sequential>
   679         </macrodef>
   680     </target>
   681     <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
   682         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   683             <attribute default="${includes}" name="includes"/>
   684             <attribute default="${excludes}" name="excludes"/>
   685             <attribute default="**" name="testincludes"/>
   686             <attribute default="" name="testmethods"/>
   687             <element implicit="true" name="customize" optional="true"/>
   688             <sequential>
   689                 <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   690                     <customize/>
   691                 </j2seproject3:testng>
   692             </sequential>
   693         </macrodef>
   694     </target>
   695     <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
   696         <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
   697             <attribute default="${includes}" name="includes"/>
   698             <attribute default="${excludes}" name="excludes"/>
   699             <attribute default="**" name="testincludes"/>
   700             <attribute default="" name="testmethods"/>
   701             <sequential>
   702                 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   703                     <customize>
   704                         <jvmarg line="${run.jvmargs}"/>
   705                         <jvmarg line="${run.jvmargs.ide}"/>
   706                     </customize>
   707                 </j2seproject3:test-impl>
   708             </sequential>
   709         </macrodef>
   710     </target>
   711     <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
   712         <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   713             <attribute default="${includes}" name="includes"/>
   714             <attribute default="${excludes}" name="excludes"/>
   715             <attribute default="**" name="testincludes"/>
   716             <attribute default="" name="testmethods"/>
   717             <element name="customizeDebuggee" optional="true"/>
   718             <sequential>
   719                 <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   720                     <customize>
   721                         <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
   722                         <customizeDebuggee/>
   723                     </customize>
   724                 </j2seproject3:junit>
   725             </sequential>
   726         </macrodef>
   727     </target>
   728     <target if="${testng.available}" name="-init-macrodef-testng-debug">
   729         <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   730             <attribute default="${main.class}" name="testClass"/>
   731             <attribute default="" name="testMethod"/>
   732             <element name="customize2" optional="true"/>
   733             <sequential>
   734                 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
   735                     <isset property="test.method"/>
   736                 </condition>
   737                 <condition else="-suitename nb-javac -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
   738                     <matches pattern=".*\.xml" string="@{testClass}"/>
   739                 </condition>
   740                 <delete dir="${build.test.results.dir}" quiet="true"/>
   741                 <mkdir dir="${build.test.results.dir}"/>
   742                 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
   743                     <customizeDebuggee>
   744                         <customize2/>
   745                         <jvmarg value="-ea"/>
   746                         <arg line="${testng.debug.mode}"/>
   747                         <arg line="-d ${build.test.results.dir}"/>
   748                         <arg line="-listener org.testng.reporters.VerboseReporter"/>
   749                         <arg line="${testng.cmd.args}"/>
   750                     </customizeDebuggee>
   751                 </j2seproject3:debug>
   752             </sequential>
   753         </macrodef>
   754     </target>
   755     <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
   756         <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   757             <attribute default="${main.class}" name="testClass"/>
   758             <attribute default="" name="testMethod"/>
   759             <element implicit="true" name="customize2" optional="true"/>
   760             <sequential>
   761                 <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
   762                     <customize2/>
   763                 </j2seproject3:testng-debug>
   764             </sequential>
   765         </macrodef>
   766     </target>
   767     <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
   768         <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   769             <attribute default="${includes}" name="includes"/>
   770             <attribute default="${excludes}" name="excludes"/>
   771             <attribute default="**" name="testincludes"/>
   772             <attribute default="" name="testmethods"/>
   773             <attribute default="${main.class}" name="testClass"/>
   774             <attribute default="" name="testMethod"/>
   775             <sequential>
   776                 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   777                     <customizeDebuggee>
   778                         <jvmarg line="${run.jvmargs}"/>
   779                         <jvmarg line="${run.jvmargs.ide}"/>
   780                     </customizeDebuggee>
   781                 </j2seproject3:test-debug-impl>
   782             </sequential>
   783         </macrodef>
   784     </target>
   785     <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
   786         <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   787             <attribute default="${includes}" name="includes"/>
   788             <attribute default="${excludes}" name="excludes"/>
   789             <attribute default="**" name="testincludes"/>
   790             <attribute default="" name="testmethods"/>
   791             <attribute default="${main.class}" name="testClass"/>
   792             <attribute default="" name="testMethod"/>
   793             <sequential>
   794                 <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
   795                     <customize2>
   796                         <syspropertyset>
   797                             <propertyref prefix="test-sys-prop."/>
   798                             <mapper from="test-sys-prop.*" to="*" type="glob"/>
   799                         </syspropertyset>
   800                     </customize2>
   801                 </j2seproject3:testng-debug-impl>
   802             </sequential>
   803         </macrodef>
   804     </target>
   805     <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
   806     <!--
   807                 pre NB7.2 profiling section; consider it deprecated
   808             -->
   809     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
   810     <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
   811         <!-- Empty placeholder for easier customization. -->
   812         <!-- You can override this target in the ../build.xml file. -->
   813     </target>
   814     <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
   815         <!-- Empty placeholder for easier customization. -->
   816         <!-- You can override this target in the ../build.xml file. -->
   817     </target>
   818     <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
   819         <macrodef name="resolve">
   820             <attribute name="name"/>
   821             <attribute name="value"/>
   822             <sequential>
   823                 <property name="@{name}" value="${env.@{value}}"/>
   824             </sequential>
   825         </macrodef>
   826         <macrodef name="profile">
   827             <attribute default="${main.class}" name="classname"/>
   828             <element name="customize" optional="true"/>
   829             <sequential>
   830                 <property environment="env"/>
   831                 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   832                 <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
   833                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   834                     <jvmarg value="${profiler.info.jvmargs.agent}"/>
   835                     <jvmarg line="${profiler.info.jvmargs}"/>
   836                     <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   837                     <arg line="${application.args}"/>
   838                     <classpath>
   839                         <path path="${run.classpath}"/>
   840                     </classpath>
   841                     <syspropertyset>
   842                         <propertyref prefix="run-sys-prop."/>
   843                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   844                     </syspropertyset>
   845                     <customize/>
   846                 </java>
   847             </sequential>
   848         </macrodef>
   849     </target>
   850     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
   851         <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   852         <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   853     </target>
   854     <!--
   855                 end of pre NB7.2 profiling section
   856             -->
   857     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   858         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   859             <attribute default="${main.class}" name="name"/>
   860             <attribute default="${debug.modulepath}" name="modulepath"/>
   861             <attribute default="${debug.classpath}" name="classpath"/>
   862             <attribute default="" name="stopclassname"/>
   863             <sequential>
   864                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   865                     <modulepath>
   866                         <path path="@{modulepath}"/>
   867                     </modulepath>
   868                     <classpath>
   869                         <path path="@{classpath}"/>
   870                     </classpath>
   871                 </nbjpdastart>
   872             </sequential>
   873         </macrodef>
   874         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
   875             <attribute default="${build.classes.dir}" name="dir"/>
   876             <sequential>
   877                 <nbjpdareload>
   878                     <fileset dir="@{dir}" includes="${fix.classes}">
   879                         <include name="${fix.includes}*.class"/>
   880                     </fileset>
   881                 </nbjpdareload>
   882             </sequential>
   883         </macrodef>
   884     </target>
   885     <target name="-init-debug-args">
   886         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   887             <os family="windows"/>
   888         </condition>
   889         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   890             <isset property="debug.transport"/>
   891         </condition>
   892     </target>
   893     <target depends="-init-debug-args" name="-init-macrodef-debug">
   894         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   895             <attribute default="${module.name}" name="modulename"/>
   896             <attribute default="${main.class}" name="classname"/>
   897             <attribute default="${debug.modulepath}" name="modulepath"/>
   898             <attribute default="${debug.classpath}" name="classpath"/>
   899             <element name="customizeDebuggee" optional="true"/>
   900             <sequential>
   901                 <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
   902                     <customize>
   903                         <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
   904                         <customizeDebuggee/>
   905                     </customize>
   906                 </j2seproject1:java>
   907             </sequential>
   908         </macrodef>
   909     </target>
   910     <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
   911         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   912             <attribute default="${module.name}" name="modulename"/>
   913             <attribute default="${main.class}" name="classname"/>
   914             <attribute default="${run.modulepath}" name="modulepath"/>
   915             <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
   916             <attribute default="${run.classpath}" name="classpath"/>
   917             <attribute default="jvm" name="jvm"/>
   918             <element name="customize" optional="true"/>
   919             <sequential>
   920                 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
   921                     <classpath>
   922                         <path path="@{classpath}"/>
   923                     </classpath>
   924                     <modulepath>
   925                         <pathelement path="@{modulepath}"/>
   926                         <pathelement location="${module.build.classes.dir}"/>
   927                     </modulepath>
   928                     <upgrademodulepath>
   929                         <path path="@{upgrademodulepath}"/>
   930                     </upgrademodulepath>
   931                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   932                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   933                     <jvmarg line="${run.jvmargs}"/>
   934                     <jvmarg line="${run.jvmargs.ide}"/>
   935                     <syspropertyset>
   936                         <propertyref prefix="run-sys-prop."/>
   937                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   938                     </syspropertyset>
   939                     <customize/>
   940                 </java>
   941             </sequential>
   942         </macrodef>
   943     </target>
   944     <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
   945         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   946             <attribute default="" name="modulename"/>
   947             <attribute default="${main.class}" name="classname"/>
   948             <attribute default="${run.modulepath}" name="modulepath"/>
   949             <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
   950             <attribute default="${run.classpath}" name="classpath"/>
   951             <attribute default="jvm" name="jvm"/>
   952             <element name="customize" optional="true"/>
   953             <sequential>
   954                 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
   955                     <classpath>
   956                         <path path="@{classpath}"/>
   957                     </classpath>
   958                     <modulepath>
   959                         <path path="@{modulepath}"/>
   960                     </modulepath>
   961                     <upgrademodulepath>
   962                         <path path="@{upgrademodulepath}"/>
   963                     </upgrademodulepath>
   964                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   965                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   966                     <jvmarg line="${run.jvmargs}"/>
   967                     <jvmarg line="${run.jvmargs.ide}"/>
   968                     <syspropertyset>
   969                         <propertyref prefix="run-sys-prop."/>
   970                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   971                     </syspropertyset>
   972                     <customize/>
   973                 </java>
   974             </sequential>
   975         </macrodef>
   976     </target>
   977     <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
   978         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   979             <attribute default="" name="modulename"/>
   980             <attribute default="${main.class}" name="classname"/>
   981             <attribute default="" name="modulepath"/>
   982             <attribute default="${run.classpath}" name="classpath"/>
   983             <attribute default="jvm" name="jvm"/>
   984             <element name="customize" optional="true"/>
   985             <sequential>
   986                 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
   987                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   988                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   989                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   990                     <jvmarg line="${run.jvmargs}"/>
   991                     <jvmarg line="${run.jvmargs.ide}"/>
   992                     <classpath>
   993                         <path path="@{classpath}"/>
   994                     </classpath>
   995                     <syspropertyset>
   996                         <propertyref prefix="run-sys-prop."/>
   997                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
   998                     </syspropertyset>
   999                     <customize/>
  1000                 </java>
  1001             </sequential>
  1002         </macrodef>
  1003     </target>
  1004     <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
  1005     <target name="-init-macrodef-copylibs">
  1006         <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
  1007             <attribute default="${manifest.file}" name="manifest"/>
  1008             <element name="customize" optional="true"/>
  1009             <sequential>
  1010                 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1011                 <pathconvert property="run.classpath.without.build.classes.dir">
  1012                     <path path="${run.classpath}"/>
  1013                     <map from="${build.classes.dir.resolved}" to=""/>
  1014                 </pathconvert>
  1015                 <pathconvert pathsep=" " property="jar.classpath">
  1016                     <path path="${run.classpath.without.build.classes.dir}"/>
  1017                     <chainedmapper>
  1018                         <flattenmapper/>
  1019                         <filtermapper>
  1020                             <replacestring from=" " to="%20"/>
  1021                         </filtermapper>
  1022                         <globmapper from="*" to="lib/*"/>
  1023                     </chainedmapper>
  1024                 </pathconvert>
  1025                 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  1026                 <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  1027                     <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
  1028                     <manifest>
  1029                         <attribute name="Class-Path" value="${jar.classpath}"/>
  1030                         <customize/>
  1031                     </manifest>
  1032                 </copylibs>
  1033             </sequential>
  1034         </macrodef>
  1035     </target>
  1036     <target name="-init-presetdef-jar">
  1037         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  1038             <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
  1039                 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
  1040             </jar>
  1041         </presetdef>
  1042     </target>
  1043     <target name="-init-ap-cmdline-properties">
  1044         <property name="annotation.processing.enabled" value="true"/>
  1045         <property name="annotation.processing.processors.list" value=""/>
  1046         <property name="annotation.processing.processor.options" value=""/>
  1047         <property name="annotation.processing.run.all.processors" value="true"/>
  1048         <property name="javac.processorpath" value="${javac.classpath}"/>
  1049         <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
  1050         <condition property="ap.supported.internal" value="true">
  1051             <not>
  1052                 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
  1053             </not>
  1054         </condition>
  1055     </target>
  1056     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
  1057         <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
  1058             <isfalse value="${annotation.processing.run.all.processors}"/>
  1059         </condition>
  1060         <condition else="" property="ap.proc.none.internal" value="-proc:none">
  1061             <isfalse value="${annotation.processing.enabled}"/>
  1062         </condition>
  1063     </target>
  1064     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
  1065         <property name="ap.cmd.line.internal" value=""/>
  1066     </target>
  1067     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
  1068     <!--
  1069                 ===================
  1070                 COMPILATION SECTION
  1071                 ===================
  1072             -->
  1073     <target name="-deps-jar-init" unless="built-jar.properties">
  1074         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
  1075         <delete file="${built-jar.properties}" quiet="true"/>
  1076     </target>
  1077     <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
  1078         <echo level="warn" message="Cycle detected: nb-javac was already built"/>
  1079     </target>
  1080     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
  1081         <mkdir dir="${build.dir}"/>
  1082         <touch file="${built-jar.properties}" verbose="false"/>
  1083         <property file="${built-jar.properties}" prefix="already.built.jar."/>
  1084         <antcall target="-warn-already-built-jar"/>
  1085         <propertyfile file="${built-jar.properties}">
  1086             <entry key="${basedir}" value=""/>
  1087         </propertyfile>
  1088     </target>
  1089     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  1090     <target depends="init" name="-check-automatic-build">
  1091         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  1092     </target>
  1093     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  1094         <antcall target="clean">
  1095             <param name="no.dependencies" value="true"/>
  1096         </antcall>
  1097     </target>
  1098     <target depends="init,deps-jar" name="-pre-pre-compile">
  1099         <mkdir dir="${build.classes.dir}"/>
  1100     </target>
  1101     <target name="-pre-compile">
  1102         <!-- Empty placeholder for easier customization. -->
  1103         <!-- You can override this target in the ../build.xml file. -->
  1104     </target>
  1105     <target if="do.depend.true" name="-compile-depend">
  1106         <pathconvert property="build.generated.subdirs">
  1107             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1108                 <include name="*"/>
  1109             </dirset>
  1110         </pathconvert>
  1111         <j2seproject3:depend srcdir="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}:${build.generated.subdirs}"/>
  1112     </target>
  1113     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
  1114         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  1115         <copy todir="${build.classes.dir}">
  1116             <fileset dir="${src.classes2.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1117             <fileset dir="${src.classes3.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1118             <fileset dir="${src.classes5.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1119             <fileset dir="${src.classes4.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1120         </copy>
  1121     </target>
  1122     <target if="has.persistence.xml" name="-copy-persistence-xml">
  1123         <mkdir dir="${build.classes.dir}/META-INF"/>
  1124         <copy todir="${build.classes.dir}/META-INF">
  1125             <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
  1126         </copy>
  1127     </target>
  1128     <target name="-post-compile">
  1129         <!-- Empty placeholder for easier customization. -->
  1130         <!-- You can override this target in the ../build.xml file. -->
  1131     </target>
  1132     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  1133     <target name="-pre-compile-single">
  1134         <!-- Empty placeholder for easier customization. -->
  1135         <!-- You can override this target in the ../build.xml file. -->
  1136     </target>
  1137     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  1138         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1139         <j2seproject3:force-recompile/>
  1140         <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.classes2.dir}:${src.classes3.dir}:${src.classes5.dir}:${src.classes4.dir}"/>
  1141     </target>
  1142     <target name="-post-compile-single">
  1143         <!-- Empty placeholder for easier customization. -->
  1144         <!-- You can override this target in the ../build.xml file. -->
  1145     </target>
  1146     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  1147     <!--
  1148                 ====================
  1149                 JAR BUILDING SECTION
  1150                 ====================
  1151             -->
  1152     <target depends="init" name="-pre-pre-jar">
  1153         <dirname file="${dist.jar}" property="dist.jar.dir"/>
  1154         <mkdir dir="${dist.jar.dir}"/>
  1155     </target>
  1156     <target name="-pre-jar">
  1157         <!-- Empty placeholder for easier customization. -->
  1158         <!-- You can override this target in the ../build.xml file. -->
  1159     </target>
  1160     <target depends="init,compile" name="-check-module-main-class">
  1161         <pathconvert property="main.class.file">
  1162             <string value="${main.class}"/>
  1163             <unpackagemapper from="*" to="*.class"/>
  1164         </pathconvert>
  1165         <condition property="do.module.main.class">
  1166             <and>
  1167                 <isset property="main.class.available"/>
  1168                 <available file="${build.classes.dir}/module-info.class"/>
  1169                 <available file="${build.classes.dir}/${main.class.file}"/>
  1170                 <isset property="libs.CopyLibs.classpath"/>
  1171                 <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
  1172             </and>
  1173         </condition>
  1174     </target>
  1175     <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
  1176         <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
  1177         <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
  1178     </target>
  1179     <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
  1180         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  1181         <touch file="${tmp.manifest.file}" verbose="false"/>
  1182     </target>
  1183     <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
  1184         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  1185         <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
  1186     </target>
  1187     <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
  1188         <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1189             <attribute name="Main-Class" value="${main.class}"/>
  1190         </manifest>
  1191     </target>
  1192     <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
  1193         <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1194             <attribute name="Profile" value="${javac.profile}"/>
  1195         </manifest>
  1196     </target>
  1197     <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
  1198         <basename file="${application.splash}" property="splashscreen.basename"/>
  1199         <mkdir dir="${build.classes.dir}/META-INF"/>
  1200         <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  1201         <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1202             <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  1203         </manifest>
  1204     </target>
  1205     <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
  1206         <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  1207         <echo level="info">To run this application from the command line without Ant, try:</echo>
  1208         <property location="${dist.jar}" name="dist.jar.resolved"/>
  1209         <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  1210     </target>
  1211     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
  1212         <j2seproject1:jar manifest="${tmp.manifest.file}"/>
  1213         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1214         <property location="${dist.jar}" name="dist.jar.resolved"/>
  1215         <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
  1216             <isset property="named.module.internal"/>
  1217         </condition>
  1218         <pathconvert property="run.classpath.with.dist.jar">
  1219             <path path="${run.classpath}"/>
  1220             <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
  1221         </pathconvert>
  1222         <pathconvert property="run.modulepath.with.dist.jar">
  1223             <path location="${dist.jar.resolved}"/>
  1224             <path path="${run.modulepath}"/>
  1225             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  1226         </pathconvert>
  1227         <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
  1228             <isset property="named.module.internal"/>
  1229         </condition>
  1230         <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
  1231             <and>
  1232                 <isset property="modules.supported.internal"/>
  1233                 <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
  1234             </and>
  1235         </condition>
  1236         <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
  1237             <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
  1238         </condition>
  1239         <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
  1240             <isset property="do.module.main.class"/>
  1241         </condition>
  1242         <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
  1243             <isset property="named.module.internal"/>
  1244         </condition>
  1245         <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
  1246             <isset property="main.class.available"/>
  1247         </condition>
  1248         <condition else="debug" property="jar.usage.level" value="info">
  1249             <isset property="main.class.available"/>
  1250         </condition>
  1251         <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
  1252     </target>
  1253     <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
  1254         <delete>
  1255             <fileset file="${tmp.manifest.file}"/>
  1256         </delete>
  1257     </target>
  1258     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
  1259     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
  1260     <target name="-post-jar">
  1261         <!-- Empty placeholder for easier customization. -->
  1262         <!-- You can override this target in the ../build.xml file. -->
  1263     </target>
  1264     <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
  1265     <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
  1266     <!--
  1267                 =================
  1268                 DEPLOY SECTION
  1269                 =================
  1270             -->
  1271     <target name="-pre-deploy">
  1272         <!-- Empty placeholder for easier customization. -->
  1273         <!-- You can override this target in the ../build.xml file. -->
  1274     </target>
  1275     <target depends="init" name="-check-jlink">
  1276         <condition property="do.jlink.internal">
  1277             <and>
  1278                 <istrue value="${do.jlink}"/>
  1279                 <isset property="do.archive"/>
  1280                 <isset property="named.module.internal"/>
  1281             </and>
  1282         </condition>
  1283     </target>
  1284     <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
  1285         <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
  1286         <property name="jlink.launcher.name" value="${application.title}"/>
  1287         <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
  1288             <and>
  1289                 <isset property="jlink.additionalmodules"/>
  1290                 <length length="0" string="${jlink.additionalmodules}" when="greater"/>
  1291             </and>
  1292         </condition>
  1293         <condition property="jlink.do.strip.internal">
  1294             <and>
  1295                 <isset property="jlink.strip"/>
  1296                 <istrue value="${jlink.strip}"/>
  1297             </and>
  1298         </condition>
  1299         <condition property="jlink.do.additionalparam.internal">
  1300             <and>
  1301                 <isset property="jlink.additionalparam"/>
  1302                 <length length="0" string="${jlink.additionalparam}" when="greater"/>
  1303             </and>
  1304         </condition>
  1305         <condition property="jlink.do.launcher.internal">
  1306             <and>
  1307                 <istrue value="${jlink.launcher}"/>
  1308                 <isset property="main.class.available"/>
  1309             </and>
  1310         </condition>
  1311         <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
  1312         <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
  1313         <exec executable="${platform.jlink}">
  1314             <arg value="--module-path"/>
  1315             <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
  1316             <arg value="--add-modules"/>
  1317             <arg value="${jlink.add.modules}"/>
  1318             <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
  1319             <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
  1320             <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
  1321             <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
  1322             <arg value="--output"/>
  1323             <arg value="${dist.jlink.output}"/>
  1324         </exec>
  1325     </target>
  1326     <target name="-post-deploy">
  1327         <!-- Empty placeholder for easier customization. -->
  1328         <!-- You can override this target in the ../build.xml file. -->
  1329     </target>
  1330     <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
  1331     <!--
  1332                 =================
  1333                 EXECUTION SECTION
  1334                 =================
  1335             -->
  1336     <target depends="init,compile" description="Run a main class." name="run">
  1337         <j2seproject1:java>
  1338             <customize>
  1339                 <arg line="${application.args}"/>
  1340             </customize>
  1341         </j2seproject1:java>
  1342     </target>
  1343     <target name="-do-not-recompile">
  1344         <property name="javac.includes.binary" value=""/>
  1345     </target>
  1346     <target depends="init,compile-single" name="run-single">
  1347         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1348         <j2seproject1:java classname="${run.class}"/>
  1349     </target>
  1350     <target depends="init,compile-test-single" name="run-test-with-main">
  1351         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1352         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  1353     </target>
  1354     <!--
  1355                 =================
  1356                 DEBUGGING SECTION
  1357                 =================
  1358             -->
  1359     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  1360         <j2seproject1:nbjpdastart name="${debug.class}"/>
  1361     </target>
  1362     <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  1363         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  1364     </target>
  1365     <target depends="init,compile" name="-debug-start-debuggee">
  1366         <j2seproject3:debug>
  1367             <customizeDebuggee>
  1368                 <arg line="${application.args}"/>
  1369             </customizeDebuggee>
  1370         </j2seproject3:debug>
  1371     </target>
  1372     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  1373     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  1374         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  1375     </target>
  1376     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  1377     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  1378         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1379         <j2seproject3:debug classname="${debug.class}"/>
  1380     </target>
  1381     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  1382     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  1383         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1384         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  1385     </target>
  1386     <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  1387     <target depends="init" name="-pre-debug-fix">
  1388         <fail unless="fix.includes">Must set fix.includes</fail>
  1389         <property name="javac.includes" value="${fix.includes}.java"/>
  1390     </target>
  1391     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  1392         <j2seproject1:nbjpdareload/>
  1393     </target>
  1394     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  1395     <!--
  1396                 =================
  1397                 PROFILING SECTION
  1398                 =================
  1399             -->
  1400     <!--
  1401                 pre NB7.2 profiler integration
  1402             -->
  1403     <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
  1404         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1405         <nbprofiledirect>
  1406             <classpath>
  1407                 <path path="${run.classpath}"/>
  1408             </classpath>
  1409         </nbprofiledirect>
  1410         <profile/>
  1411     </target>
  1412     <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
  1413         <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  1414         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1415         <nbprofiledirect>
  1416             <classpath>
  1417                 <path path="${run.classpath}"/>
  1418             </classpath>
  1419         </nbprofiledirect>
  1420         <profile classname="${profile.class}"/>
  1421     </target>
  1422     <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
  1423         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1424         <nbprofiledirect>
  1425             <classpath>
  1426                 <path path="${run.classpath}"/>
  1427             </classpath>
  1428         </nbprofiledirect>
  1429         <profile classname="sun.applet.AppletViewer">
  1430             <customize>
  1431                 <arg value="${applet.url}"/>
  1432             </customize>
  1433         </profile>
  1434     </target>
  1435     <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  1436         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1437         <nbprofiledirect>
  1438             <classpath>
  1439                 <path path="${run.test.classpath}"/>
  1440             </classpath>
  1441         </nbprofiledirect>
  1442         <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
  1443             <customize>
  1444                 <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
  1445                 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1446                 <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1447                 <jvmarg line="${profiler.info.jvmargs}"/>
  1448                 <classpath>
  1449                     <path path="${run.test.classpath}"/>
  1450                 </classpath>
  1451             </customize>
  1452         </j2seproject3:junit>
  1453     </target>
  1454     <!--
  1455                 end of pre NB72 profiling section
  1456             -->
  1457     <target if="netbeans.home" name="-profile-check">
  1458         <condition property="profiler.configured">
  1459             <or>
  1460                 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  1461                 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  1462             </or>
  1463         </condition>
  1464     </target>
  1465     <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  1466         <startprofiler/>
  1467         <antcall target="run"/>
  1468     </target>
  1469     <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
  1470         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1471         <startprofiler/>
  1472         <antcall target="run-single"/>
  1473     </target>
  1474     <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  1475     <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  1476         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1477         <startprofiler/>
  1478         <antcall target="test-single"/>
  1479     </target>
  1480     <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  1481         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1482         <startprofiler/>
  1483         <antcall target="run-test-with-main"/>
  1484     </target>
  1485     <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  1486         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1487         <startprofiler/>
  1488         <antcall target="run-applet"/>
  1489     </target>
  1490     <!--
  1491                 ===============
  1492                 JAVADOC SECTION
  1493                 ===============
  1494             -->
  1495     <target depends="init" if="have.sources" name="-javadoc-build">
  1496         <mkdir dir="${dist.javadoc.dir}"/>
  1497         <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  1498             <and>
  1499                 <isset property="endorsed.classpath.cmd.line.arg"/>
  1500                 <not>
  1501                     <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  1502                 </not>
  1503             </and>
  1504         </condition>
  1505         <condition else="" property="bug5101868workaround" value="*.java">
  1506             <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  1507         </condition>
  1508         <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
  1509             <and>
  1510                 <isset property="javadoc.html5"/>
  1511                 <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
  1512             </and>
  1513         </condition>
  1514         <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${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}">
  1515             <classpath>
  1516                 <path path="${javac.classpath}"/>
  1517             </classpath>
  1518             <fileset dir="${src.classes2.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1519                 <filename name="**/*.java"/>
  1520             </fileset>
  1521             <fileset dir="${src.classes3.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1522                 <filename name="**/*.java"/>
  1523             </fileset>
  1524             <fileset dir="${src.classes5.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1525                 <filename name="**/*.java"/>
  1526             </fileset>
  1527             <fileset dir="${src.classes4.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1528                 <filename name="**/*.java"/>
  1529             </fileset>
  1530             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1531                 <include name="**/*.java"/>
  1532                 <exclude name="*.java"/>
  1533             </fileset>
  1534             <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  1535             <arg line="${javadoc.html5.cmd.line.arg}"/>
  1536         </javadoc>
  1537         <copy todir="${dist.javadoc.dir}">
  1538             <fileset dir="${src.classes2.dir}" excludes="${excludes}" includes="${includes}">
  1539                 <filename name="**/doc-files/**"/>
  1540             </fileset>
  1541             <fileset dir="${src.classes3.dir}" excludes="${excludes}" includes="${includes}">
  1542                 <filename name="**/doc-files/**"/>
  1543             </fileset>
  1544             <fileset dir="${src.classes5.dir}" excludes="${excludes}" includes="${includes}">
  1545                 <filename name="**/doc-files/**"/>
  1546             </fileset>
  1547             <fileset dir="${src.classes4.dir}" excludes="${excludes}" includes="${includes}">
  1548                 <filename name="**/doc-files/**"/>
  1549             </fileset>
  1550             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1551                 <include name="**/doc-files/**"/>
  1552             </fileset>
  1553         </copy>
  1554     </target>
  1555     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  1556         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1557     </target>
  1558     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1559     <!--
  1560                 =========================
  1561                 TEST COMPILATION SECTION
  1562                 =========================
  1563             -->
  1564     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1565         <mkdir dir="${build.test.classes.dir}"/>
  1566     </target>
  1567     <target name="-pre-compile-test">
  1568         <!-- Empty placeholder for easier customization. -->
  1569         <!-- You can override this target in the ../build.xml file. -->
  1570     </target>
  1571     <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
  1572         <j2seproject3:modulename property="test.module.name" sourcepath="${test.test.dir}"/>
  1573         <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.test.dir}">
  1574             <and>
  1575                 <isset property="test.module.name"/>
  1576                 <length length="0" string="${test.module.name}" when="greater"/>
  1577             </and>
  1578         </condition>
  1579         <condition else="--patch-module ${module.name}=${test.test.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
  1580             <and>
  1581                 <isset property="test.module.name"/>
  1582                 <length length="0" string="${test.module.name}" when="greater"/>
  1583             </and>
  1584         </condition>
  1585     </target>
  1586     <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
  1587         <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
  1588             <and>
  1589                 <isset property="test.module.name"/>
  1590                 <length length="0" string="${test.module.name}" when="greater"/>
  1591             </and>
  1592         </condition>
  1593         <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
  1594         <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
  1595         <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
  1596             <chainedmapper>
  1597                 <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
  1598                 <filtermapper>
  1599                     <uniqfilter/>
  1600                     <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
  1601                 </filtermapper>
  1602                 <cutdirsmapper dirs="1"/>
  1603                 <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
  1604             </chainedmapper>
  1605         </pathconvert>
  1606         <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
  1607             <and>
  1608                 <isset property="test.module.name"/>
  1609                 <length length="0" string="${test.module.name}" when="greater"/>
  1610             </and>
  1611         </condition>
  1612     </target>
  1613     <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
  1614         <property name="javac.test.sourcepath" value="${empty.dir}"/>
  1615         <property name="javac.test.compilerargs" value=""/>
  1616         <property name="run.test.jvmargs" value=""/>
  1617     </target>
  1618     <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
  1619     <target if="do.depend.true" name="-compile-test-depend">
  1620         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.test.dir}"/>
  1621     </target>
  1622     <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1623         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.test.dir}">
  1624             <customize>
  1625                 <compilerarg line="${javac.test.compilerargs}"/>
  1626             </customize>
  1627         </j2seproject3:javac>
  1628         <copy todir="${build.test.classes.dir}">
  1629             <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1630         </copy>
  1631     </target>
  1632     <target name="-post-compile-test">
  1633         <!-- Empty placeholder for easier customization. -->
  1634         <!-- You can override this target in the ../build.xml file. -->
  1635     </target>
  1636     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  1637     <target name="-pre-compile-test-single">
  1638         <!-- Empty placeholder for easier customization. -->
  1639         <!-- You can override this target in the ../build.xml file. -->
  1640     </target>
  1641     <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1642         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1643         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1644         <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.test.dir}" srcdir="${test.test.dir}">
  1645             <customize>
  1646                 <compilerarg line="${javac.test.compilerargs}"/>
  1647             </customize>
  1648         </j2seproject3:javac>
  1649         <copy todir="${build.test.classes.dir}">
  1650             <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1651         </copy>
  1652     </target>
  1653     <target name="-post-compile-test-single">
  1654         <!-- Empty placeholder for easier customization. -->
  1655         <!-- You can override this target in the ../build.xml file. -->
  1656     </target>
  1657     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  1658     <!--
  1659                 =======================
  1660                 TEST EXECUTION SECTION
  1661                 =======================
  1662             -->
  1663     <target depends="init" if="have.tests" name="-pre-test-run">
  1664         <mkdir dir="${build.test.results.dir}"/>
  1665     </target>
  1666     <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
  1667         <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  1668     </target>
  1669     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1670         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1671     </target>
  1672     <target depends="init" if="have.tests" name="test-report"/>
  1673     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1674     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  1675     <target depends="init" if="have.tests" name="-pre-test-run-single">
  1676         <mkdir dir="${build.test.results.dir}"/>
  1677     </target>
  1678     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1679         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1680         <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  1681     </target>
  1682     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1683         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1684     </target>
  1685     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  1686     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  1687         <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  1688         <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1689         <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  1690     </target>
  1691     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  1692         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1693     </target>
  1694     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  1695     <!--
  1696                 =======================
  1697                 TEST DEBUGGING SECTION
  1698                 =======================
  1699             -->
  1700     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  1701         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1702         <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  1703     </target>
  1704     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  1705         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1706         <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1707         <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  1708     </target>
  1709     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1710         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1711     </target>
  1712     <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1713     <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  1714     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1715         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1716     </target>
  1717     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1718     <!--
  1719                 =========================
  1720                 APPLET EXECUTION SECTION
  1721                 =========================
  1722             -->
  1723     <target depends="init,compile-single" name="run-applet">
  1724         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1725         <j2seproject1:java classname="sun.applet.AppletViewer">
  1726             <customize>
  1727                 <arg value="${applet.url}"/>
  1728             </customize>
  1729         </j2seproject1:java>
  1730     </target>
  1731     <!--
  1732                 =========================
  1733                 APPLET DEBUGGING  SECTION
  1734                 =========================
  1735             -->
  1736     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1737         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1738         <j2seproject3:debug classname="sun.applet.AppletViewer">
  1739             <customizeDebuggee>
  1740                 <arg value="${applet.url}"/>
  1741             </customizeDebuggee>
  1742         </j2seproject3:debug>
  1743     </target>
  1744     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1745     <!--
  1746                 ===============
  1747                 CLEANUP SECTION
  1748                 ===============
  1749             -->
  1750     <target name="-deps-clean-init" unless="built-clean.properties">
  1751         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1752         <delete file="${built-clean.properties}" quiet="true"/>
  1753     </target>
  1754     <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1755         <echo level="warn" message="Cycle detected: nb-javac was already built"/>
  1756     </target>
  1757     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1758         <mkdir dir="${build.dir}"/>
  1759         <touch file="${built-clean.properties}" verbose="false"/>
  1760         <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1761         <antcall target="-warn-already-built-clean"/>
  1762         <propertyfile file="${built-clean.properties}">
  1763             <entry key="${basedir}" value=""/>
  1764         </propertyfile>
  1765     </target>
  1766     <target depends="init" name="-do-clean">
  1767         <delete dir="${build.dir}"/>
  1768         <delete dir="${dist.jlink.output}"/>
  1769         <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1770     </target>
  1771     <target name="-post-clean">
  1772         <!-- Empty placeholder for easier customization. -->
  1773         <!-- You can override this target in the ../build.xml file. -->
  1774     </target>
  1775     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1776     <target name="-check-call-dep">
  1777         <property file="${call.built.properties}" prefix="already.built."/>
  1778         <condition property="should.call.dep">
  1779             <and>
  1780                 <not>
  1781                     <isset property="already.built.${call.subproject}"/>
  1782                 </not>
  1783                 <available file="${call.script}"/>
  1784             </and>
  1785         </condition>
  1786     </target>
  1787     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1788         <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1789             <propertyset>
  1790                 <propertyref prefix="transfer."/>
  1791                 <mapper from="transfer.*" to="*" type="glob"/>
  1792             </propertyset>
  1793         </ant>
  1794     </target>
  1795 </project>