Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 40940cabcdcd2be
parent 408 9a439a79c6d0
child 410 c884e4396eeb
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
samples/aserverinfo/build.xml
samples/aserverinfo/nbproject/build-impl.xml
samples/aserverinfo/nbproject/genfiles.properties
samples/aserverinfo/nbproject/project.properties
samples/componentinjection/anagram-modular/build.xml
samples/libs/build.xml
samples/unionfs/build.xml
samples/unionfs/nbproject/build-impl.xml
samples/unionfs/nbproject/genfiles.properties
     1.1 --- a/samples/aserverinfo/build.xml	Thu Oct 30 20:46:27 2014 +0100
     1.2 +++ b/samples/aserverinfo/build.xml	Thu Oct 30 21:30:10 2014 +0100
     1.3 @@ -51,8 +51,7 @@
     1.4        -init-macrodef-junit:     defines macro for junit execution
     1.5        -init-macrodef-debug:     defines macro for class debugging
     1.6        -init-macrodef-java:      defines macro for class execution
     1.7 -      -do-jar-with-manifest:    JAR building (if you are using a manifest)
     1.8 -      -do-jar-without-manifest: JAR building (if you are not using a manifest)
     1.9 +      -do-jar:                  JAR building
    1.10        run:                      execution of project 
    1.11        -javadoc-build:           Javadoc generation
    1.12        test-report:              JUnit report generation
     2.1 --- a/samples/aserverinfo/nbproject/build-impl.xml	Thu Oct 30 20:46:27 2014 +0100
     2.2 +++ b/samples/aserverinfo/nbproject/build-impl.xml	Thu Oct 30 21:30:10 2014 +0100
     2.3 @@ -12,14 +12,21 @@
     2.4    - execution
     2.5    - debugging
     2.6    - javadoc
     2.7 -  - junit compilation
     2.8 -  - junit execution
     2.9 -  - junit debugging
    2.10 +  - test compilation
    2.11 +  - test execution
    2.12 +  - test debugging
    2.13    - applet
    2.14    - cleanup
    2.15  
    2.16          -->
    2.17  <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="aserverinfo-impl">
    2.18 +    <fail message="Please build using Ant 1.8.0 or higher.">
    2.19 +        <condition>
    2.20 +            <not>
    2.21 +                <antversion atleast="1.8.0"/>
    2.22 +            </not>
    2.23 +        </condition>
    2.24 +    </fail>
    2.25      <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    2.26      <!-- 
    2.27                  ======================
    2.28 @@ -47,20 +54,70 @@
    2.29          <property file="nbproject/project.properties"/>
    2.30      </target>
    2.31      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    2.32 +        <property name="platform.java" value="${java.home}/bin/java"/>
    2.33          <available file="${manifest.file}" property="manifest.available"/>
    2.34 -        <condition property="manifest.available+main.class">
    2.35 +        <condition property="splashscreen.available">
    2.36              <and>
    2.37 -                <isset property="manifest.available"/>
    2.38 +                <not>
    2.39 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    2.40 +                </not>
    2.41 +                <available file="${application.splash}"/>
    2.42 +            </and>
    2.43 +        </condition>
    2.44 +        <condition property="main.class.available">
    2.45 +            <and>
    2.46                  <isset property="main.class"/>
    2.47                  <not>
    2.48                      <equals arg1="${main.class}" arg2="" trim="true"/>
    2.49                  </not>
    2.50              </and>
    2.51          </condition>
    2.52 -        <condition property="manifest.available+main.class+mkdist.available">
    2.53 +        <condition property="profile.available">
    2.54              <and>
    2.55 -                <istrue value="${manifest.available+main.class}"/>
    2.56 +                <isset property="javac.profile"/>
    2.57 +                <length length="0" string="${javac.profile}" when="greater"/>
    2.58 +                <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
    2.59 +            </and>
    2.60 +        </condition>
    2.61 +        <condition property="do.archive">
    2.62 +            <or>
    2.63 +                <not>
    2.64 +                    <istrue value="${jar.archive.disabled}"/>
    2.65 +                </not>
    2.66 +                <istrue value="${not.archive.disabled}"/>
    2.67 +            </or>
    2.68 +        </condition>
    2.69 +        <condition property="do.mkdist">
    2.70 +            <and>
    2.71 +                <isset property="do.archive"/>
    2.72                  <isset property="libs.CopyLibs.classpath"/>
    2.73 +                <not>
    2.74 +                    <istrue value="${mkdist.disabled}"/>
    2.75 +                </not>
    2.76 +            </and>
    2.77 +        </condition>
    2.78 +        <condition property="do.archive+manifest.available">
    2.79 +            <and>
    2.80 +                <isset property="manifest.available"/>
    2.81 +                <istrue value="${do.archive}"/>
    2.82 +            </and>
    2.83 +        </condition>
    2.84 +        <condition property="do.archive+main.class.available">
    2.85 +            <and>
    2.86 +                <isset property="main.class.available"/>
    2.87 +                <istrue value="${do.archive}"/>
    2.88 +            </and>
    2.89 +        </condition>
    2.90 +        <condition property="do.archive+splashscreen.available">
    2.91 +            <and>
    2.92 +                <isset property="splashscreen.available"/>
    2.93 +                <istrue value="${do.archive}"/>
    2.94 +            </and>
    2.95 +        </condition>
    2.96 +        <condition property="do.archive+profile.available">
    2.97 +            <and>
    2.98 +                <isset property="profile.available"/>
    2.99 +                <istrue value="${do.archive}"/>
   2.100              </and>
   2.101          </condition>
   2.102          <condition property="have.tests">
   2.103 @@ -86,6 +143,7 @@
   2.104              </and>
   2.105          </condition>
   2.106          <property name="run.jvmargs" value=""/>
   2.107 +        <property name="run.jvmargs.ide" value=""/>
   2.108          <property name="javac.compilerargs" value=""/>
   2.109          <property name="work.dir" value="${basedir}"/>
   2.110          <condition property="no.deps">
   2.111 @@ -97,6 +155,7 @@
   2.112          <property name="javadoc.preview" value="true"/>
   2.113          <property name="application.args" value=""/>
   2.114          <property name="source.encoding" value="${file.encoding}"/>
   2.115 +        <property name="runtime.encoding" value="${source.encoding}"/>
   2.116          <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   2.117              <and>
   2.118                  <isset property="javadoc.encoding"/>
   2.119 @@ -112,12 +171,52 @@
   2.120          <condition property="do.depend.true">
   2.121              <istrue value="${do.depend}"/>
   2.122          </condition>
   2.123 -        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
   2.124 +        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   2.125 +        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   2.126              <and>
   2.127 -                <isset property="jaxws.endorsed.dir"/>
   2.128 -                <available file="nbproject/jaxws-build.xml"/>
   2.129 +                <isset property="endorsed.classpath"/>
   2.130 +                <not>
   2.131 +                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
   2.132 +                </not>
   2.133              </and>
   2.134          </condition>
   2.135 +        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
   2.136 +            <isset property="profile.available"/>
   2.137 +        </condition>
   2.138 +        <condition else="false" property="jdkBug6558476">
   2.139 +            <and>
   2.140 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   2.141 +                <not>
   2.142 +                    <os family="unix"/>
   2.143 +                </not>
   2.144 +            </and>
   2.145 +        </condition>
   2.146 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   2.147 +        <property name="jar.index" value="false"/>
   2.148 +        <property name="jar.index.metainf" value="${jar.index}"/>
   2.149 +        <property name="copylibs.rebase" value="true"/>
   2.150 +        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   2.151 +        <condition property="junit.available">
   2.152 +            <or>
   2.153 +                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
   2.154 +                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
   2.155 +            </or>
   2.156 +        </condition>
   2.157 +        <condition property="testng.available">
   2.158 +            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
   2.159 +        </condition>
   2.160 +        <condition property="junit+testng.available">
   2.161 +            <and>
   2.162 +                <istrue value="${junit.available}"/>
   2.163 +                <istrue value="${testng.available}"/>
   2.164 +            </and>
   2.165 +        </condition>
   2.166 +        <condition else="testng" property="testng.mode" value="mixed">
   2.167 +            <istrue value="${junit+testng.available}"/>
   2.168 +        </condition>
   2.169 +        <condition else="" property="testng.debug.mode" value="-mixed">
   2.170 +            <istrue value="${junit+testng.available}"/>
   2.171 +        </condition>
   2.172      </target>
   2.173      <target name="-post-init">
   2.174          <!-- Empty placeholder for easier customization. -->
   2.175 @@ -144,26 +243,81 @@
   2.176              </sequential>
   2.177          </macrodef>
   2.178      </target>
   2.179 -    <target name="-init-macrodef-javac">
   2.180 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   2.181          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.182              <attribute default="${src.dir}" name="srcdir"/>
   2.183              <attribute default="${build.classes.dir}" name="destdir"/>
   2.184              <attribute default="${javac.classpath}" name="classpath"/>
   2.185 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   2.186 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   2.187              <attribute default="${includes}" name="includes"/>
   2.188              <attribute default="${excludes}" name="excludes"/>
   2.189              <attribute default="${javac.debug}" name="debug"/>
   2.190 -            <attribute default="" name="sourcepath"/>
   2.191 +            <attribute default="${empty.dir}" name="sourcepath"/>
   2.192 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   2.193              <element name="customize" optional="true"/>
   2.194              <sequential>
   2.195 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
   2.196 +                <property location="${build.dir}/empty" name="empty.dir"/>
   2.197 +                <mkdir dir="${empty.dir}"/>
   2.198 +                <mkdir dir="@{apgeneratedsrcdir}"/>
   2.199 +                <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}">
   2.200 +                    <src>
   2.201 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   2.202 +                            <include name="*"/>
   2.203 +                        </dirset>
   2.204 +                    </src>
   2.205                      <classpath>
   2.206                          <path path="@{classpath}"/>
   2.207                      </classpath>
   2.208 -                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
   2.209 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.210 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   2.211 +                    <compilerarg line="${javac.compilerargs}"/>
   2.212 +                    <compilerarg value="-processorpath"/>
   2.213 +                    <compilerarg path="@{processorpath}:${empty.dir}"/>
   2.214 +                    <compilerarg line="${ap.processors.internal}"/>
   2.215 +                    <compilerarg line="${annotation.processing.processor.options}"/>
   2.216 +                    <compilerarg value="-s"/>
   2.217 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
   2.218 +                    <compilerarg line="${ap.proc.none.internal}"/>
   2.219                      <customize/>
   2.220                  </javac>
   2.221              </sequential>
   2.222          </macrodef>
   2.223 +    </target>
   2.224 +    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   2.225 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.226 +            <attribute default="${src.dir}" name="srcdir"/>
   2.227 +            <attribute default="${build.classes.dir}" name="destdir"/>
   2.228 +            <attribute default="${javac.classpath}" name="classpath"/>
   2.229 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   2.230 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   2.231 +            <attribute default="${includes}" name="includes"/>
   2.232 +            <attribute default="${excludes}" name="excludes"/>
   2.233 +            <attribute default="${javac.debug}" name="debug"/>
   2.234 +            <attribute default="${empty.dir}" name="sourcepath"/>
   2.235 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   2.236 +            <element name="customize" optional="true"/>
   2.237 +            <sequential>
   2.238 +                <property location="${build.dir}/empty" name="empty.dir"/>
   2.239 +                <mkdir dir="${empty.dir}"/>
   2.240 +                <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}">
   2.241 +                    <src>
   2.242 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   2.243 +                            <include name="*"/>
   2.244 +                        </dirset>
   2.245 +                    </src>
   2.246 +                    <classpath>
   2.247 +                        <path path="@{classpath}"/>
   2.248 +                    </classpath>
   2.249 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.250 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   2.251 +                    <compilerarg line="${javac.compilerargs}"/>
   2.252 +                    <customize/>
   2.253 +                </javac>
   2.254 +            </sequential>
   2.255 +        </macrodef>
   2.256 +    </target>
   2.257 +    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   2.258          <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.259              <attribute default="${src.dir}" name="srcdir"/>
   2.260              <attribute default="${build.classes.dir}" name="destdir"/>
   2.261 @@ -180,44 +334,390 @@
   2.262              <attribute default="${build.classes.dir}" name="destdir"/>
   2.263              <sequential>
   2.264                  <fail unless="javac.includes">Must set javac.includes</fail>
   2.265 -                <pathconvert pathsep="," property="javac.includes.binary">
   2.266 +                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   2.267                      <path>
   2.268                          <filelist dir="@{destdir}" files="${javac.includes}"/>
   2.269                      </path>
   2.270                      <globmapper from="*.java" to="*.class"/>
   2.271                  </pathconvert>
   2.272 +                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   2.273 +                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   2.274                  <delete>
   2.275 -                    <files includes="${javac.includes.binary}"/>
   2.276 +                    <files includesfile="${javac.includesfile.binary}"/>
   2.277 +                </delete>
   2.278 +                <delete>
   2.279 +                    <fileset file="${javac.includesfile.binary}"/>
   2.280                  </delete>
   2.281              </sequential>
   2.282          </macrodef>
   2.283      </target>
   2.284 -    <target name="-init-macrodef-junit">
   2.285 +    <target if="${junit.available}" name="-init-macrodef-junit-init">
   2.286 +        <condition else="false" property="nb.junit.batch" value="true">
   2.287 +            <and>
   2.288 +                <istrue value="${junit.available}"/>
   2.289 +                <not>
   2.290 +                    <isset property="test.method"/>
   2.291 +                </not>
   2.292 +            </and>
   2.293 +        </condition>
   2.294 +        <condition else="false" property="nb.junit.single" value="true">
   2.295 +            <and>
   2.296 +                <istrue value="${junit.available}"/>
   2.297 +                <isset property="test.method"/>
   2.298 +            </and>
   2.299 +        </condition>
   2.300 +    </target>
   2.301 +    <target name="-init-test-properties">
   2.302 +        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
   2.303 +        <property name="test.binarytestincludes" value=""/>
   2.304 +        <property name="test.binaryexcludes" value=""/>
   2.305 +    </target>
   2.306 +    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
   2.307          <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.308              <attribute default="${includes}" name="includes"/>
   2.309              <attribute default="${excludes}" name="excludes"/>
   2.310              <attribute default="**" name="testincludes"/>
   2.311 +            <attribute default="" name="testmethods"/>
   2.312 +            <element name="customize" optional="true"/>
   2.313              <sequential>
   2.314 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   2.315 -                    <batchtest todir="${build.test.results.dir}">
   2.316 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.317 -                            <filename name="@{testincludes}"/>
   2.318 -                        </fileset>
   2.319 -                    </batchtest>
   2.320 -                    <classpath>
   2.321 -                        <path path="${run.test.classpath}"/>
   2.322 -                    </classpath>
   2.323 +                <property name="junit.forkmode" value="perTest"/>
   2.324 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.325 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   2.326                      <syspropertyset>
   2.327                          <propertyref prefix="test-sys-prop."/>
   2.328                          <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.329                      </syspropertyset>
   2.330                      <formatter type="brief" usefile="false"/>
   2.331                      <formatter type="xml"/>
   2.332 -                    <jvmarg line="${run.jvmargs}"/>
   2.333 +                    <jvmarg value="-ea"/>
   2.334 +                    <customize/>
   2.335                  </junit>
   2.336              </sequential>
   2.337          </macrodef>
   2.338      </target>
   2.339 +    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
   2.340 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.341 +            <attribute default="${includes}" name="includes"/>
   2.342 +            <attribute default="${excludes}" name="excludes"/>
   2.343 +            <attribute default="**" name="testincludes"/>
   2.344 +            <attribute default="" name="testmethods"/>
   2.345 +            <element name="customize" optional="true"/>
   2.346 +            <sequential>
   2.347 +                <property name="junit.forkmode" value="perTest"/>
   2.348 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.349 +                    <batchtest todir="${build.test.results.dir}">
   2.350 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.351 +                            <filename name="@{testincludes}"/>
   2.352 +                        </fileset>
   2.353 +                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   2.354 +                            <filename name="${test.binarytestincludes}"/>
   2.355 +                        </fileset>
   2.356 +                    </batchtest>
   2.357 +                    <syspropertyset>
   2.358 +                        <propertyref prefix="test-sys-prop."/>
   2.359 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.360 +                    </syspropertyset>
   2.361 +                    <formatter type="brief" usefile="false"/>
   2.362 +                    <formatter type="xml"/>
   2.363 +                    <jvmarg value="-ea"/>
   2.364 +                    <customize/>
   2.365 +                </junit>
   2.366 +            </sequential>
   2.367 +        </macrodef>
   2.368 +    </target>
   2.369 +    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
   2.370 +    <target if="${testng.available}" name="-init-macrodef-testng">
   2.371 +        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.372 +            <attribute default="${includes}" name="includes"/>
   2.373 +            <attribute default="${excludes}" name="excludes"/>
   2.374 +            <attribute default="**" name="testincludes"/>
   2.375 +            <attribute default="" name="testmethods"/>
   2.376 +            <element name="customize" optional="true"/>
   2.377 +            <sequential>
   2.378 +                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
   2.379 +                    <isset property="test.method"/>
   2.380 +                </condition>
   2.381 +                <union id="test.set">
   2.382 +                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
   2.383 +                        <filename name="@{testincludes}"/>
   2.384 +                    </fileset>
   2.385 +                </union>
   2.386 +                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
   2.387 +                <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="aserverinfo" testname="TestNG tests" workingDir="${work.dir}">
   2.388 +                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
   2.389 +                    <propertyset>
   2.390 +                        <propertyref prefix="test-sys-prop."/>
   2.391 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.392 +                    </propertyset>
   2.393 +                    <customize/>
   2.394 +                </testng>
   2.395 +            </sequential>
   2.396 +        </macrodef>
   2.397 +    </target>
   2.398 +    <target name="-init-macrodef-test-impl">
   2.399 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.400 +            <attribute default="${includes}" name="includes"/>
   2.401 +            <attribute default="${excludes}" name="excludes"/>
   2.402 +            <attribute default="**" name="testincludes"/>
   2.403 +            <attribute default="" name="testmethods"/>
   2.404 +            <element implicit="true" name="customize" optional="true"/>
   2.405 +            <sequential>
   2.406 +                <echo>No tests executed.</echo>
   2.407 +            </sequential>
   2.408 +        </macrodef>
   2.409 +    </target>
   2.410 +    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
   2.411 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.412 +            <attribute default="${includes}" name="includes"/>
   2.413 +            <attribute default="${excludes}" name="excludes"/>
   2.414 +            <attribute default="**" name="testincludes"/>
   2.415 +            <attribute default="" name="testmethods"/>
   2.416 +            <element implicit="true" name="customize" optional="true"/>
   2.417 +            <sequential>
   2.418 +                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.419 +                    <customize/>
   2.420 +                </j2seproject3:junit>
   2.421 +            </sequential>
   2.422 +        </macrodef>
   2.423 +    </target>
   2.424 +    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
   2.425 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.426 +            <attribute default="${includes}" name="includes"/>
   2.427 +            <attribute default="${excludes}" name="excludes"/>
   2.428 +            <attribute default="**" name="testincludes"/>
   2.429 +            <attribute default="" name="testmethods"/>
   2.430 +            <element implicit="true" name="customize" optional="true"/>
   2.431 +            <sequential>
   2.432 +                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.433 +                    <customize/>
   2.434 +                </j2seproject3:testng>
   2.435 +            </sequential>
   2.436 +        </macrodef>
   2.437 +    </target>
   2.438 +    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
   2.439 +        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.440 +            <attribute default="${includes}" name="includes"/>
   2.441 +            <attribute default="${excludes}" name="excludes"/>
   2.442 +            <attribute default="**" name="testincludes"/>
   2.443 +            <attribute default="" name="testmethods"/>
   2.444 +            <sequential>
   2.445 +                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.446 +                    <customize>
   2.447 +                        <classpath>
   2.448 +                            <path path="${run.test.classpath}"/>
   2.449 +                        </classpath>
   2.450 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.451 +                        <jvmarg line="${run.jvmargs}"/>
   2.452 +                        <jvmarg line="${run.jvmargs.ide}"/>
   2.453 +                    </customize>
   2.454 +                </j2seproject3:test-impl>
   2.455 +            </sequential>
   2.456 +        </macrodef>
   2.457 +    </target>
   2.458 +    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
   2.459 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.460 +            <attribute default="${includes}" name="includes"/>
   2.461 +            <attribute default="${excludes}" name="excludes"/>
   2.462 +            <attribute default="**" name="testincludes"/>
   2.463 +            <attribute default="" name="testmethods"/>
   2.464 +            <element name="customize" optional="true"/>
   2.465 +            <sequential>
   2.466 +                <property name="junit.forkmode" value="perTest"/>
   2.467 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.468 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   2.469 +                    <syspropertyset>
   2.470 +                        <propertyref prefix="test-sys-prop."/>
   2.471 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.472 +                    </syspropertyset>
   2.473 +                    <formatter type="brief" usefile="false"/>
   2.474 +                    <formatter type="xml"/>
   2.475 +                    <jvmarg value="-ea"/>
   2.476 +                    <jvmarg line="${debug-args-line}"/>
   2.477 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   2.478 +                    <customize/>
   2.479 +                </junit>
   2.480 +            </sequential>
   2.481 +        </macrodef>
   2.482 +    </target>
   2.483 +    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
   2.484 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.485 +            <attribute default="${includes}" name="includes"/>
   2.486 +            <attribute default="${excludes}" name="excludes"/>
   2.487 +            <attribute default="**" name="testincludes"/>
   2.488 +            <attribute default="" name="testmethods"/>
   2.489 +            <element name="customize" optional="true"/>
   2.490 +            <sequential>
   2.491 +                <property name="junit.forkmode" value="perTest"/>
   2.492 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.493 +                    <batchtest todir="${build.test.results.dir}">
   2.494 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.495 +                            <filename name="@{testincludes}"/>
   2.496 +                        </fileset>
   2.497 +                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   2.498 +                            <filename name="${test.binarytestincludes}"/>
   2.499 +                        </fileset>
   2.500 +                    </batchtest>
   2.501 +                    <syspropertyset>
   2.502 +                        <propertyref prefix="test-sys-prop."/>
   2.503 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.504 +                    </syspropertyset>
   2.505 +                    <formatter type="brief" usefile="false"/>
   2.506 +                    <formatter type="xml"/>
   2.507 +                    <jvmarg value="-ea"/>
   2.508 +                    <jvmarg line="${debug-args-line}"/>
   2.509 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   2.510 +                    <customize/>
   2.511 +                </junit>
   2.512 +            </sequential>
   2.513 +        </macrodef>
   2.514 +    </target>
   2.515 +    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
   2.516 +        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.517 +            <attribute default="${includes}" name="includes"/>
   2.518 +            <attribute default="${excludes}" name="excludes"/>
   2.519 +            <attribute default="**" name="testincludes"/>
   2.520 +            <attribute default="" name="testmethods"/>
   2.521 +            <element implicit="true" name="customize" optional="true"/>
   2.522 +            <sequential>
   2.523 +                <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.524 +                    <customize/>
   2.525 +                </j2seproject3:junit-debug>
   2.526 +            </sequential>
   2.527 +        </macrodef>
   2.528 +    </target>
   2.529 +    <target if="${testng.available}" name="-init-macrodef-testng-debug">
   2.530 +        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.531 +            <attribute default="${main.class}" name="testClass"/>
   2.532 +            <attribute default="" name="testMethod"/>
   2.533 +            <element name="customize2" optional="true"/>
   2.534 +            <sequential>
   2.535 +                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
   2.536 +                    <isset property="test.method"/>
   2.537 +                </condition>
   2.538 +                <condition else="-suitename aserverinfo -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
   2.539 +                    <matches pattern=".*\.xml" string="@{testClass}"/>
   2.540 +                </condition>
   2.541 +                <delete dir="${build.test.results.dir}" quiet="true"/>
   2.542 +                <mkdir dir="${build.test.results.dir}"/>
   2.543 +                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
   2.544 +                    <customize>
   2.545 +                        <customize2/>
   2.546 +                        <jvmarg value="-ea"/>
   2.547 +                        <arg line="${testng.debug.mode}"/>
   2.548 +                        <arg line="-d ${build.test.results.dir}"/>
   2.549 +                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
   2.550 +                        <arg line="${testng.cmd.args}"/>
   2.551 +                    </customize>
   2.552 +                </j2seproject3:debug>
   2.553 +            </sequential>
   2.554 +        </macrodef>
   2.555 +    </target>
   2.556 +    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
   2.557 +        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.558 +            <attribute default="${main.class}" name="testClass"/>
   2.559 +            <attribute default="" name="testMethod"/>
   2.560 +            <element implicit="true" name="customize2" optional="true"/>
   2.561 +            <sequential>
   2.562 +                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
   2.563 +                    <customize2/>
   2.564 +                </j2seproject3:testng-debug>
   2.565 +            </sequential>
   2.566 +        </macrodef>
   2.567 +    </target>
   2.568 +    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
   2.569 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.570 +            <attribute default="${includes}" name="includes"/>
   2.571 +            <attribute default="${excludes}" name="excludes"/>
   2.572 +            <attribute default="**" name="testincludes"/>
   2.573 +            <attribute default="" name="testmethods"/>
   2.574 +            <attribute default="${main.class}" name="testClass"/>
   2.575 +            <attribute default="" name="testMethod"/>
   2.576 +            <sequential>
   2.577 +                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.578 +                    <customize>
   2.579 +                        <classpath>
   2.580 +                            <path path="${run.test.classpath}"/>
   2.581 +                        </classpath>
   2.582 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.583 +                        <jvmarg line="${run.jvmargs}"/>
   2.584 +                        <jvmarg line="${run.jvmargs.ide}"/>
   2.585 +                    </customize>
   2.586 +                </j2seproject3:test-debug-impl>
   2.587 +            </sequential>
   2.588 +        </macrodef>
   2.589 +    </target>
   2.590 +    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
   2.591 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.592 +            <attribute default="${includes}" name="includes"/>
   2.593 +            <attribute default="${excludes}" name="excludes"/>
   2.594 +            <attribute default="**" name="testincludes"/>
   2.595 +            <attribute default="" name="testmethods"/>
   2.596 +            <attribute default="${main.class}" name="testClass"/>
   2.597 +            <attribute default="" name="testMethod"/>
   2.598 +            <sequential>
   2.599 +                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
   2.600 +                    <customize2>
   2.601 +                        <syspropertyset>
   2.602 +                            <propertyref prefix="test-sys-prop."/>
   2.603 +                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.604 +                        </syspropertyset>
   2.605 +                    </customize2>
   2.606 +                </j2seproject3:testng-debug-impl>
   2.607 +            </sequential>
   2.608 +        </macrodef>
   2.609 +    </target>
   2.610 +    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
   2.611 +    <!--
   2.612 +                pre NB7.2 profiling section; consider it deprecated
   2.613 +            -->
   2.614 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
   2.615 +    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
   2.616 +        <!-- Empty placeholder for easier customization. -->
   2.617 +        <!-- You can override this target in the ../build.xml file. -->
   2.618 +    </target>
   2.619 +    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
   2.620 +        <!-- Empty placeholder for easier customization. -->
   2.621 +        <!-- You can override this target in the ../build.xml file. -->
   2.622 +    </target>
   2.623 +    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
   2.624 +        <macrodef name="resolve">
   2.625 +            <attribute name="name"/>
   2.626 +            <attribute name="value"/>
   2.627 +            <sequential>
   2.628 +                <property name="@{name}" value="${env.@{value}}"/>
   2.629 +            </sequential>
   2.630 +        </macrodef>
   2.631 +        <macrodef name="profile">
   2.632 +            <attribute default="${main.class}" name="classname"/>
   2.633 +            <element name="customize" optional="true"/>
   2.634 +            <sequential>
   2.635 +                <property environment="env"/>
   2.636 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   2.637 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   2.638 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.639 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   2.640 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   2.641 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   2.642 +                    <arg line="${application.args}"/>
   2.643 +                    <classpath>
   2.644 +                        <path path="${run.classpath}"/>
   2.645 +                    </classpath>
   2.646 +                    <syspropertyset>
   2.647 +                        <propertyref prefix="run-sys-prop."/>
   2.648 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   2.649 +                    </syspropertyset>
   2.650 +                    <customize/>
   2.651 +                </java>
   2.652 +            </sequential>
   2.653 +        </macrodef>
   2.654 +    </target>
   2.655 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
   2.656 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   2.657 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   2.658 +    </target>
   2.659 +    <!--
   2.660 +                end of pre NB7.2 profiling section
   2.661 +            -->
   2.662      <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   2.663          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.664              <attribute default="${main.class}" name="name"/>
   2.665 @@ -269,9 +769,13 @@
   2.666              <element name="customize" optional="true"/>
   2.667              <sequential>
   2.668                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   2.669 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.670                      <jvmarg line="${debug-args-line}"/>
   2.671                      <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   2.672 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   2.673 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   2.674                      <jvmarg line="${run.jvmargs}"/>
   2.675 +                    <jvmarg line="${run.jvmargs.ide}"/>
   2.676                      <classpath>
   2.677                          <path path="@{classpath}"/>
   2.678                      </classpath>
   2.679 @@ -288,10 +792,15 @@
   2.680          <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.681              <attribute default="${main.class}" name="classname"/>
   2.682              <attribute default="${run.classpath}" name="classpath"/>
   2.683 +            <attribute default="jvm" name="jvm"/>
   2.684              <element name="customize" optional="true"/>
   2.685              <sequential>
   2.686                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   2.687 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.688 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   2.689 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   2.690                      <jvmarg line="${run.jvmargs}"/>
   2.691 +                    <jvmarg line="${run.jvmargs.ide}"/>
   2.692                      <classpath>
   2.693                          <path path="@{classpath}"/>
   2.694                      </classpath>
   2.695 @@ -304,20 +813,90 @@
   2.696              </sequential>
   2.697          </macrodef>
   2.698      </target>
   2.699 +    <target name="-init-macrodef-copylibs">
   2.700 +        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.701 +            <attribute default="${manifest.file}" name="manifest"/>
   2.702 +            <element name="customize" optional="true"/>
   2.703 +            <sequential>
   2.704 +                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.705 +                <pathconvert property="run.classpath.without.build.classes.dir">
   2.706 +                    <path path="${run.classpath}"/>
   2.707 +                    <map from="${build.classes.dir.resolved}" to=""/>
   2.708 +                </pathconvert>
   2.709 +                <pathconvert pathsep=" " property="jar.classpath">
   2.710 +                    <path path="${run.classpath.without.build.classes.dir}"/>
   2.711 +                    <chainedmapper>
   2.712 +                        <flattenmapper/>
   2.713 +                        <filtermapper>
   2.714 +                            <replacestring from=" " to="%20"/>
   2.715 +                        </filtermapper>
   2.716 +                        <globmapper from="*" to="lib/*"/>
   2.717 +                    </chainedmapper>
   2.718 +                </pathconvert>
   2.719 +                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   2.720 +                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.721 +                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   2.722 +                    <manifest>
   2.723 +                        <attribute name="Class-Path" value="${jar.classpath}"/>
   2.724 +                        <customize/>
   2.725 +                    </manifest>
   2.726 +                </copylibs>
   2.727 +            </sequential>
   2.728 +        </macrodef>
   2.729 +    </target>
   2.730      <target name="-init-presetdef-jar">
   2.731          <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.732 -            <jar compress="${jar.compress}" jarfile="${dist.jar}">
   2.733 -                <j2seproject1:fileset dir="${build.classes.dir}"/>
   2.734 +            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   2.735 +                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   2.736              </jar>
   2.737          </presetdef>
   2.738      </target>
   2.739 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
   2.740 +    <target name="-init-ap-cmdline-properties">
   2.741 +        <property name="annotation.processing.enabled" value="true"/>
   2.742 +        <property name="annotation.processing.processors.list" value=""/>
   2.743 +        <property name="annotation.processing.processor.options" value=""/>
   2.744 +        <property name="annotation.processing.run.all.processors" value="true"/>
   2.745 +        <property name="javac.processorpath" value="${javac.classpath}"/>
   2.746 +        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   2.747 +        <condition property="ap.supported.internal" value="true">
   2.748 +            <not>
   2.749 +                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   2.750 +            </not>
   2.751 +        </condition>
   2.752 +    </target>
   2.753 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   2.754 +        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   2.755 +            <isfalse value="${annotation.processing.run.all.processors}"/>
   2.756 +        </condition>
   2.757 +        <condition else="" property="ap.proc.none.internal" value="-proc:none">
   2.758 +            <isfalse value="${annotation.processing.enabled}"/>
   2.759 +        </condition>
   2.760 +    </target>
   2.761 +    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   2.762 +        <property name="ap.cmd.line.internal" value=""/>
   2.763 +    </target>
   2.764 +    <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"/>
   2.765      <!--
   2.766                  ===================
   2.767                  COMPILATION SECTION
   2.768                  ===================
   2.769              -->
   2.770 -    <target depends="init" name="deps-jar" unless="no.deps"/>
   2.771 +    <target name="-deps-jar-init" unless="built-jar.properties">
   2.772 +        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   2.773 +        <delete file="${built-jar.properties}" quiet="true"/>
   2.774 +    </target>
   2.775 +    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   2.776 +        <echo level="warn" message="Cycle detected: aserverinfo was already built"/>
   2.777 +    </target>
   2.778 +    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   2.779 +        <mkdir dir="${build.dir}"/>
   2.780 +        <touch file="${built-jar.properties}" verbose="false"/>
   2.781 +        <property file="${built-jar.properties}" prefix="already.built.jar."/>
   2.782 +        <antcall target="-warn-already-built-jar"/>
   2.783 +        <propertyfile file="${built-jar.properties}">
   2.784 +            <entry key="${basedir}" value=""/>
   2.785 +        </propertyfile>
   2.786 +    </target>
   2.787      <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   2.788      <target depends="init" name="-check-automatic-build">
   2.789          <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   2.790 @@ -333,14 +912,25 @@
   2.791          <!-- You can override this target in the ../build.xml file. -->
   2.792      </target>
   2.793      <target if="do.depend.true" name="-compile-depend">
   2.794 -        <j2seproject3:depend/>
   2.795 +        <pathconvert property="build.generated.subdirs">
   2.796 +            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   2.797 +                <include name="*"/>
   2.798 +            </dirset>
   2.799 +        </pathconvert>
   2.800 +        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   2.801      </target>
   2.802 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   2.803 -        <j2seproject3:javac/>
   2.804 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   2.805 +        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   2.806          <copy todir="${build.classes.dir}">
   2.807              <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   2.808          </copy>
   2.809      </target>
   2.810 +    <target if="has.persistence.xml" name="-copy-persistence-xml">
   2.811 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   2.812 +        <copy todir="${build.classes.dir}/META-INF">
   2.813 +            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
   2.814 +        </copy>
   2.815 +    </target>
   2.816      <target name="-post-compile">
   2.817          <!-- Empty placeholder for easier customization. -->
   2.818          <!-- You can override this target in the ../build.xml file. -->
   2.819 @@ -353,7 +943,7 @@
   2.820      <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   2.821          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   2.822          <j2seproject3:force-recompile/>
   2.823 -        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
   2.824 +        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   2.825      </target>
   2.826      <target name="-post-compile-single">
   2.827          <!-- Empty placeholder for easier customization. -->
   2.828 @@ -373,57 +963,67 @@
   2.829          <!-- Empty placeholder for easier customization. -->
   2.830          <!-- You can override this target in the ../build.xml file. -->
   2.831      </target>
   2.832 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   2.833 -        <j2seproject1:jar/>
   2.834 +    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
   2.835 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   2.836 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   2.837      </target>
   2.838 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   2.839 -        <j2seproject1:jar manifest="${manifest.file}"/>
   2.840 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
   2.841 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   2.842 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   2.843      </target>
   2.844 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   2.845 -        <j2seproject1:jar manifest="${manifest.file}">
   2.846 -            <j2seproject1:manifest>
   2.847 -                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   2.848 -            </j2seproject1:manifest>
   2.849 -        </j2seproject1:jar>
   2.850 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.851 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
   2.852 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.853 +            <attribute name="Main-Class" value="${main.class}"/>
   2.854 +        </manifest>
   2.855 +    </target>
   2.856 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
   2.857 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.858 +            <attribute name="Profile" value="${javac.profile}"/>
   2.859 +        </manifest>
   2.860 +    </target>
   2.861 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
   2.862 +        <basename file="${application.splash}" property="splashscreen.basename"/>
   2.863 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   2.864 +        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   2.865 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.866 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   2.867 +        </manifest>
   2.868 +    </target>
   2.869 +    <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">
   2.870 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   2.871 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   2.872 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.873 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   2.874 +    </target>
   2.875 +    <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">
   2.876 +        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
   2.877          <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.878          <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.879          <pathconvert property="run.classpath.with.dist.jar">
   2.880              <path path="${run.classpath}"/>
   2.881              <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   2.882          </pathconvert>
   2.883 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   2.884 +        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
   2.885 +            <isset property="main.class.available"/>
   2.886 +        </condition>
   2.887 +        <condition else="debug" property="jar.usage.level" value="info">
   2.888 +            <isset property="main.class.available"/>
   2.889 +        </condition>
   2.890 +        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
   2.891      </target>
   2.892 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   2.893 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.894 -        <pathconvert property="run.classpath.without.build.classes.dir">
   2.895 -            <path path="${run.classpath}"/>
   2.896 -            <map from="${build.classes.dir.resolved}" to=""/>
   2.897 -        </pathconvert>
   2.898 -        <pathconvert pathsep=" " property="jar.classpath">
   2.899 -            <path path="${run.classpath.without.build.classes.dir}"/>
   2.900 -            <chainedmapper>
   2.901 -                <flattenmapper/>
   2.902 -                <globmapper from="*" to="lib/*"/>
   2.903 -            </chainedmapper>
   2.904 -        </pathconvert>
   2.905 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   2.906 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.907 -            <fileset dir="${build.classes.dir}"/>
   2.908 -            <manifest>
   2.909 -                <attribute name="Main-Class" value="${main.class}"/>
   2.910 -                <attribute name="Class-Path" value="${jar.classpath}"/>
   2.911 -            </manifest>
   2.912 -        </copylibs>
   2.913 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.914 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.915 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   2.916 +    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
   2.917 +        <delete>
   2.918 +            <fileset file="${tmp.manifest.file}"/>
   2.919 +        </delete>
   2.920      </target>
   2.921 +    <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"/>
   2.922 +    <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"/>
   2.923      <target name="-post-jar">
   2.924          <!-- Empty placeholder for easier customization. -->
   2.925          <!-- You can override this target in the ../build.xml file. -->
   2.926      </target>
   2.927 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
   2.928 +    <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
   2.929 +    <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
   2.930      <!--
   2.931                  =================
   2.932                  EXECUTION SECTION
   2.933 @@ -439,11 +1039,11 @@
   2.934      <target name="-do-not-recompile">
   2.935          <property name="javac.includes.binary" value=""/>
   2.936      </target>
   2.937 -    <target depends="init,-do-not-recompile,compile-single" name="run-single">
   2.938 +    <target depends="init,compile-single" name="run-single">
   2.939          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   2.940          <j2seproject1:java classname="${run.class}"/>
   2.941      </target>
   2.942 -    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
   2.943 +    <target depends="init,compile-test-single" name="run-test-with-main">
   2.944          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   2.945          <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   2.946      </target>
   2.947 @@ -474,12 +1074,12 @@
   2.948          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   2.949          <j2seproject3:debug classname="${debug.class}"/>
   2.950      </target>
   2.951 -    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   2.952 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   2.953      <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   2.954          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   2.955          <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   2.956      </target>
   2.957 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   2.958 +    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   2.959      <target depends="init" name="-pre-debug-fix">
   2.960          <fail unless="fix.includes">Must set fix.includes</fail>
   2.961          <property name="javac.includes" value="${fix.includes}.java"/>
   2.962 @@ -489,20 +1089,143 @@
   2.963      </target>
   2.964      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   2.965      <!--
   2.966 +                =================
   2.967 +                PROFILING SECTION
   2.968 +                =================
   2.969 +            -->
   2.970 +    <!--
   2.971 +                pre NB7.2 profiler integration
   2.972 +            -->
   2.973 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
   2.974 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   2.975 +        <nbprofiledirect>
   2.976 +            <classpath>
   2.977 +                <path path="${run.classpath}"/>
   2.978 +            </classpath>
   2.979 +        </nbprofiledirect>
   2.980 +        <profile/>
   2.981 +    </target>
   2.982 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
   2.983 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   2.984 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   2.985 +        <nbprofiledirect>
   2.986 +            <classpath>
   2.987 +                <path path="${run.classpath}"/>
   2.988 +            </classpath>
   2.989 +        </nbprofiledirect>
   2.990 +        <profile classname="${profile.class}"/>
   2.991 +    </target>
   2.992 +    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
   2.993 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   2.994 +        <nbprofiledirect>
   2.995 +            <classpath>
   2.996 +                <path path="${run.classpath}"/>
   2.997 +            </classpath>
   2.998 +        </nbprofiledirect>
   2.999 +        <profile classname="sun.applet.AppletViewer">
  2.1000 +            <customize>
  2.1001 +                <arg value="${applet.url}"/>
  2.1002 +            </customize>
  2.1003 +        </profile>
  2.1004 +    </target>
  2.1005 +    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  2.1006 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  2.1007 +        <nbprofiledirect>
  2.1008 +            <classpath>
  2.1009 +                <path path="${run.test.classpath}"/>
  2.1010 +            </classpath>
  2.1011 +        </nbprofiledirect>
  2.1012 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  2.1013 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  2.1014 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
  2.1015 +            <jvmarg line="${profiler.info.jvmargs}"/>
  2.1016 +            <test name="${profile.class}"/>
  2.1017 +            <classpath>
  2.1018 +                <path path="${run.test.classpath}"/>
  2.1019 +            </classpath>
  2.1020 +            <syspropertyset>
  2.1021 +                <propertyref prefix="test-sys-prop."/>
  2.1022 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
  2.1023 +            </syspropertyset>
  2.1024 +            <formatter type="brief" usefile="false"/>
  2.1025 +            <formatter type="xml"/>
  2.1026 +        </junit>
  2.1027 +    </target>
  2.1028 +    <!--
  2.1029 +                end of pre NB72 profiling section
  2.1030 +            -->
  2.1031 +    <target if="netbeans.home" name="-profile-check">
  2.1032 +        <condition property="profiler.configured">
  2.1033 +            <or>
  2.1034 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  2.1035 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  2.1036 +            </or>
  2.1037 +        </condition>
  2.1038 +    </target>
  2.1039 +    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  2.1040 +        <startprofiler/>
  2.1041 +        <antcall target="run"/>
  2.1042 +    </target>
  2.1043 +    <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">
  2.1044 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  2.1045 +        <startprofiler/>
  2.1046 +        <antcall target="run-single"/>
  2.1047 +    </target>
  2.1048 +    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  2.1049 +    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  2.1050 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  2.1051 +        <startprofiler/>
  2.1052 +        <antcall target="test-single"/>
  2.1053 +    </target>
  2.1054 +    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  2.1055 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  2.1056 +        <startprofiler/>
  2.1057 +        <antcal target="run-test-with-main"/>
  2.1058 +    </target>
  2.1059 +    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  2.1060 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  2.1061 +        <startprofiler/>
  2.1062 +        <antcall target="run-applet"/>
  2.1063 +    </target>
  2.1064 +    <!--
  2.1065                  ===============
  2.1066                  JAVADOC SECTION
  2.1067                  ===============
  2.1068              -->
  2.1069 -    <target depends="init" name="-javadoc-build">
  2.1070 +    <target depends="init" if="have.sources" name="-javadoc-build">
  2.1071          <mkdir dir="${dist.javadoc.dir}"/>
  2.1072 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  2.1073 +        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  2.1074 +            <and>
  2.1075 +                <isset property="endorsed.classpath.cmd.line.arg"/>
  2.1076 +                <not>
  2.1077 +                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  2.1078 +                </not>
  2.1079 +            </and>
  2.1080 +        </condition>
  2.1081 +        <condition else="" property="bug5101868workaround" value="*.java">
  2.1082 +            <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  2.1083 +        </condition>
  2.1084 +        <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}">
  2.1085              <classpath>
  2.1086                  <path path="${javac.classpath}"/>
  2.1087              </classpath>
  2.1088 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  2.1089 +            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  2.1090                  <filename name="**/*.java"/>
  2.1091              </fileset>
  2.1092 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  2.1093 +                <include name="**/*.java"/>
  2.1094 +                <exclude name="*.java"/>
  2.1095 +            </fileset>
  2.1096 +            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  2.1097          </javadoc>
  2.1098 +        <copy todir="${dist.javadoc.dir}">
  2.1099 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  2.1100 +                <filename name="**/doc-files/**"/>
  2.1101 +            </fileset>
  2.1102 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  2.1103 +                <include name="**/doc-files/**"/>
  2.1104 +            </fileset>
  2.1105 +        </copy>
  2.1106      </target>
  2.1107      <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  2.1108          <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  2.1109 @@ -510,7 +1233,7 @@
  2.1110      <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  2.1111      <!--
  2.1112                  =========================
  2.1113 -                JUNIT COMPILATION SECTION
  2.1114 +                TEST COMPILATION SECTION
  2.1115                  =========================
  2.1116              -->
  2.1117      <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  2.1118 @@ -523,8 +1246,8 @@
  2.1119      <target if="do.depend.true" name="-compile-test-depend">
  2.1120          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  2.1121      </target>
  2.1122 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  2.1123 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  2.1124 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  2.1125 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
  2.1126          <copy todir="${build.test.classes.dir}">
  2.1127              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  2.1128          </copy>
  2.1129 @@ -538,10 +1261,10 @@
  2.1130          <!-- Empty placeholder for easier customization. -->
  2.1131          <!-- You can override this target in the ../build.xml file. -->
  2.1132      </target>
  2.1133 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  2.1134 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  2.1135          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  2.1136          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  2.1137 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  2.1138 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  2.1139          <copy todir="${build.test.classes.dir}">
  2.1140              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  2.1141          </copy>
  2.1142 @@ -553,17 +1276,17 @@
  2.1143      <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  2.1144      <!--
  2.1145                  =======================
  2.1146 -                JUNIT EXECUTION SECTION
  2.1147 +                TEST EXECUTION SECTION
  2.1148                  =======================
  2.1149              -->
  2.1150      <target depends="init" if="have.tests" name="-pre-test-run">
  2.1151          <mkdir dir="${build.test.results.dir}"/>
  2.1152      </target>
  2.1153      <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  2.1154 -        <j2seproject3:junit testincludes="**/*Test.java"/>
  2.1155 +        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  2.1156      </target>
  2.1157      <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  2.1158 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  2.1159 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  2.1160      </target>
  2.1161      <target depends="init" if="have.tests" name="test-report"/>
  2.1162      <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  2.1163 @@ -573,39 +1296,40 @@
  2.1164      </target>
  2.1165      <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  2.1166          <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  2.1167 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
  2.1168 +        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  2.1169      </target>
  2.1170      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  2.1171 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  2.1172 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  2.1173      </target>
  2.1174 -    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  2.1175 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  2.1176 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  2.1177 +        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  2.1178 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  2.1179 +        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  2.1180 +    </target>
  2.1181 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  2.1182 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  2.1183 +    </target>
  2.1184 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  2.1185      <!--
  2.1186                  =======================
  2.1187 -                JUNIT DEBUGGING SECTION
  2.1188 +                TEST DEBUGGING SECTION
  2.1189                  =======================
  2.1190              -->
  2.1191 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  2.1192 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  2.1193          <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  2.1194 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  2.1195 -        <delete file="${test.report.file}"/>
  2.1196 -        <mkdir dir="${build.test.results.dir}"/>
  2.1197 -        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  2.1198 -            <customize>
  2.1199 -                <syspropertyset>
  2.1200 -                    <propertyref prefix="test-sys-prop."/>
  2.1201 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
  2.1202 -                </syspropertyset>
  2.1203 -                <arg value="${test.class}"/>
  2.1204 -                <arg value="showoutput=true"/>
  2.1205 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  2.1206 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  2.1207 -            </customize>
  2.1208 -        </j2seproject3:debug>
  2.1209 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  2.1210 +    </target>
  2.1211 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  2.1212 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  2.1213 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  2.1214 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  2.1215      </target>
  2.1216      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  2.1217          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  2.1218      </target>
  2.1219 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  2.1220 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  2.1221 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  2.1222      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  2.1223          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  2.1224      </target>
  2.1225 @@ -642,14 +1366,48 @@
  2.1226                  CLEANUP SECTION
  2.1227                  ===============
  2.1228              -->
  2.1229 -    <target depends="init" name="deps-clean" unless="no.deps"/>
  2.1230 +    <target name="-deps-clean-init" unless="built-clean.properties">
  2.1231 +        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  2.1232 +        <delete file="${built-clean.properties}" quiet="true"/>
  2.1233 +    </target>
  2.1234 +    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  2.1235 +        <echo level="warn" message="Cycle detected: aserverinfo was already built"/>
  2.1236 +    </target>
  2.1237 +    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  2.1238 +        <mkdir dir="${build.dir}"/>
  2.1239 +        <touch file="${built-clean.properties}" verbose="false"/>
  2.1240 +        <property file="${built-clean.properties}" prefix="already.built.clean."/>
  2.1241 +        <antcall target="-warn-already-built-clean"/>
  2.1242 +        <propertyfile file="${built-clean.properties}">
  2.1243 +            <entry key="${basedir}" value=""/>
  2.1244 +        </propertyfile>
  2.1245 +    </target>
  2.1246      <target depends="init" name="-do-clean">
  2.1247          <delete dir="${build.dir}"/>
  2.1248 -        <delete dir="${dist.dir}"/>
  2.1249 +        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  2.1250      </target>
  2.1251      <target name="-post-clean">
  2.1252          <!-- Empty placeholder for easier customization. -->
  2.1253          <!-- You can override this target in the ../build.xml file. -->
  2.1254      </target>
  2.1255      <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  2.1256 +    <target name="-check-call-dep">
  2.1257 +        <property file="${call.built.properties}" prefix="already.built."/>
  2.1258 +        <condition property="should.call.dep">
  2.1259 +            <and>
  2.1260 +                <not>
  2.1261 +                    <isset property="already.built.${call.subproject}"/>
  2.1262 +                </not>
  2.1263 +                <available file="${call.script}"/>
  2.1264 +            </and>
  2.1265 +        </condition>
  2.1266 +    </target>
  2.1267 +    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  2.1268 +        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  2.1269 +            <propertyset>
  2.1270 +                <propertyref prefix="transfer."/>
  2.1271 +                <mapper from="transfer.*" to="*" type="glob"/>
  2.1272 +            </propertyset>
  2.1273 +        </ant>
  2.1274 +    </target>
  2.1275  </project>
     3.1 --- a/samples/aserverinfo/nbproject/genfiles.properties	Thu Oct 30 20:46:27 2014 +0100
     3.2 +++ b/samples/aserverinfo/nbproject/genfiles.properties	Thu Oct 30 21:30:10 2014 +0100
     3.3 @@ -1,8 +1,8 @@
     3.4  build.xml.data.CRC32=c82747ea
     3.5 -build.xml.script.CRC32=aee7ca48
     3.6 -build.xml.stylesheet.CRC32=958a1d3e
     3.7 +build.xml.script.CRC32=6c4c58c4
     3.8 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48
     3.9  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    3.10  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    3.11  nbproject/build-impl.xml.data.CRC32=c82747ea
    3.12 -nbproject/build-impl.xml.script.CRC32=1033418a
    3.13 -nbproject/build-impl.xml.stylesheet.CRC32=84d9cdb5
    3.14 +nbproject/build-impl.xml.script.CRC32=ec37325a
    3.15 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
     4.1 --- a/samples/aserverinfo/nbproject/project.properties	Thu Oct 30 20:46:27 2014 +0100
     4.2 +++ b/samples/aserverinfo/nbproject/project.properties	Thu Oct 30 21:30:10 2014 +0100
     4.3 @@ -3,6 +3,7 @@
     4.4  # This directory is removed when the project is cleaned:
     4.5  build.dir=build
     4.6  build.generated.dir=${build.dir}/generated
     4.7 +build.generated.sources.dir=${build.dir}/generated-sources
     4.8  # Only compile against the classpath explicitly listed here:
     4.9  build.sysclasspath=ignore
    4.10  build.test.classes.dir=${build.dir}/test/classes
     5.1 --- a/samples/componentinjection/anagram-modular/build.xml	Thu Oct 30 20:46:27 2014 +0100
     5.2 +++ b/samples/componentinjection/anagram-modular/build.xml	Thu Oct 30 21:30:10 2014 +0100
     5.3 @@ -1,6 +1,8 @@
     5.4  <?xml version="1.0" encoding="UTF-8"?>
     5.5  <project name="Various Examples of Component Injection" default="test" basedir=".">
     5.6 -    <property name="spring.jar" value="spring-2.5.6.SEC01.jar"/>
     5.7 +    <property name="spring-core.jar" value="spring-core-4.0.1.RELEASE.jar"/>
     5.8 +    <property name="spring-beans.jar" value="spring-beans-4.0.1.RELEASE.jar"/>
     5.9 +    <property name="spring-context.jar" value="spring-context-4.0.1.RELEASE.jar"/>
    5.10      <target name="clean">
    5.11          <delete dir="build"/>
    5.12      </target>
    5.13 @@ -42,11 +44,11 @@
    5.14          </antcall>
    5.15          <antcall target="-build-one">
    5.16              <param name="version" value="app-spring"/>
    5.17 -            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring.jar}"/>
    5.18 +            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring-core.jar}:../../libs/dist/${spring-context.jar}:../../libs/dist/${spring-beans.jar}"/>
    5.19          </antcall>
    5.20          <antcall target="-build-one">
    5.21              <param name="version" value="app-spring-scan"/>
    5.22 -            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring.jar}"/>
    5.23 +            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring-core.jar}:../../libs/dist/${spring-context.jar}:../../libs/dist/${spring-beans.jar}"/>
    5.24          </antcall>
    5.25          <antcall target="-build-one">
    5.26              <param name="version" value="app-lookup"/>
    5.27 @@ -79,13 +81,13 @@
    5.28          <echo level="info" message="Running spring version"/>
    5.29          <antcall target="-run-one">
    5.30              <param name="version" value="app-spring"/>
    5.31 -            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring.jar}:../../libs/dist/commons-logging-1.1.jar"/>
    5.32 +            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring-core.jar}:../../libs/dist/${spring-beans.jar}:../../libs/dist/${spring-context.jar}:../../libs/dist/commons-logging-1.1.jar"/>
    5.33              <param name="main" value="org.apidesign.anagram.app.spring.Main"/>
    5.34          </antcall>
    5.35          <echo level="info" message="Running spring autoscan version"/>
    5.36          <antcall target="-run-one">
    5.37              <param name="version" value="app-spring-scan"/>
    5.38 -            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring.jar}:../../libs/dist/commons-logging-1.1.jar"/>
    5.39 +            <param name="cp" value="build/api/classes:build/word-static/classes:build/scrambler-simple/classes:build/gui/classes:../../libs/dist/${spring-core.jar}:../../libs/dist/${spring-context.jar}:../../libs/dist/${spring-beans.jar}:../../libs/dist/commons-logging-1.1.jar"/>
    5.40              <param name="main" value="org.apidesign.anagram.app.springscan.Main"/>
    5.41          </antcall>
    5.42          <echo level="info" message="Running registerGeneral version"/>
     6.1 --- a/samples/libs/build.xml	Thu Oct 30 20:46:27 2014 +0100
     6.2 +++ b/samples/libs/build.xml	Thu Oct 30 21:30:10 2014 +0100
     6.3 @@ -61,8 +61,8 @@
     6.4      </target>
     6.5  
     6.6      <available property="autoupdate.tasks.jar" file="dist/tasks.jar"/>
     6.7 -    <property name="bootstrap.url" value="http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar"/>
     6.8 -    <property name="netbeans.updatecenter.url" value="http://dlc.sun.com.edgesuite.net/netbeans/7.1.1/final/uc/catalog.xml.gz"/>
     6.9 +    <property name="bootstrap.url" value="http://updates.netbeans.org/netbeans/updates/8.0.1/uc/final/distribution/tasks.jar"/>
    6.10 +    <property name="netbeans.updatecenter.url" value="http://updates.netbeans.org/netbeans/updates/8.0.1/uc/final/distribution/catalog.xml.gz"/>
    6.11      <target name="-download-autoupdate-task" unless="autoupdate.tasks.jar">
    6.12          <mkdir dir="dist"/>
    6.13          <get dest="dist/tasks.jar" src="${bootstrap.url}" usetimestamp="true"/>
     7.1 --- a/samples/unionfs/build.xml	Thu Oct 30 20:46:27 2014 +0100
     7.2 +++ b/samples/unionfs/build.xml	Thu Oct 30 21:30:10 2014 +0100
     7.3 @@ -51,8 +51,7 @@
     7.4        -init-macrodef-junit:     defines macro for junit execution
     7.5        -init-macrodef-debug:     defines macro for class debugging
     7.6        -init-macrodef-java:      defines macro for class execution
     7.7 -      -do-jar-with-manifest:    JAR building (if you are using a manifest)
     7.8 -      -do-jar-without-manifest: JAR building (if you are not using a manifest)
     7.9 +      -do-jar:                  JAR building
    7.10        run:                      execution of project 
    7.11        -javadoc-build:           Javadoc generation
    7.12        test-report:              JUnit report generation
     8.1 --- a/samples/unionfs/nbproject/build-impl.xml	Thu Oct 30 20:46:27 2014 +0100
     8.2 +++ b/samples/unionfs/nbproject/build-impl.xml	Thu Oct 30 21:30:10 2014 +0100
     8.3 @@ -12,18 +12,18 @@
     8.4    - execution
     8.5    - debugging
     8.6    - javadoc
     8.7 -  - junit compilation
     8.8 -  - junit execution
     8.9 -  - junit debugging
    8.10 +  - test compilation
    8.11 +  - test execution
    8.12 +  - test debugging
    8.13    - applet
    8.14    - cleanup
    8.15  
    8.16          -->
    8.17  <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="unionfs-impl">
    8.18 -    <fail message="Please build using Ant 1.7.1 or higher.">
    8.19 +    <fail message="Please build using Ant 1.8.0 or higher.">
    8.20          <condition>
    8.21              <not>
    8.22 -                <antversion atleast="1.7.1"/>
    8.23 +                <antversion atleast="1.8.0"/>
    8.24              </not>
    8.25          </condition>
    8.26      </fail>
    8.27 @@ -54,7 +54,16 @@
    8.28          <property file="nbproject/project.properties"/>
    8.29      </target>
    8.30      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    8.31 +        <property name="platform.java" value="${java.home}/bin/java"/>
    8.32          <available file="${manifest.file}" property="manifest.available"/>
    8.33 +        <condition property="splashscreen.available">
    8.34 +            <and>
    8.35 +                <not>
    8.36 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    8.37 +                </not>
    8.38 +                <available file="${application.splash}"/>
    8.39 +            </and>
    8.40 +        </condition>
    8.41          <condition property="main.class.available">
    8.42              <and>
    8.43                  <isset property="main.class"/>
    8.44 @@ -63,43 +72,53 @@
    8.45                  </not>
    8.46              </and>
    8.47          </condition>
    8.48 -        <condition property="manifest.available+main.class">
    8.49 +        <condition property="profile.available">
    8.50              <and>
    8.51 -                <isset property="manifest.available"/>
    8.52 -                <isset property="main.class.available"/>
    8.53 +                <isset property="javac.profile"/>
    8.54 +                <length length="0" string="${javac.profile}" when="greater"/>
    8.55 +                <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
    8.56              </and>
    8.57          </condition>
    8.58 +        <condition property="do.archive">
    8.59 +            <or>
    8.60 +                <not>
    8.61 +                    <istrue value="${jar.archive.disabled}"/>
    8.62 +                </not>
    8.63 +                <istrue value="${not.archive.disabled}"/>
    8.64 +            </or>
    8.65 +        </condition>
    8.66          <condition property="do.mkdist">
    8.67              <and>
    8.68 +                <isset property="do.archive"/>
    8.69                  <isset property="libs.CopyLibs.classpath"/>
    8.70                  <not>
    8.71                      <istrue value="${mkdist.disabled}"/>
    8.72                  </not>
    8.73              </and>
    8.74          </condition>
    8.75 -        <condition property="manifest.available+main.class+mkdist.available">
    8.76 +        <condition property="do.archive+manifest.available">
    8.77              <and>
    8.78 -                <istrue value="${manifest.available+main.class}"/>
    8.79 -                <isset property="do.mkdist"/>
    8.80 +                <isset property="manifest.available"/>
    8.81 +                <istrue value="${do.archive}"/>
    8.82              </and>
    8.83          </condition>
    8.84 -        <condition property="manifest.available+mkdist.available">
    8.85 +        <condition property="do.archive+main.class.available">
    8.86              <and>
    8.87 -                <istrue value="${manifest.available}"/>
    8.88 -                <isset property="do.mkdist"/>
    8.89 +                <isset property="main.class.available"/>
    8.90 +                <istrue value="${do.archive}"/>
    8.91              </and>
    8.92          </condition>
    8.93 -        <condition property="manifest.available-mkdist.available">
    8.94 -            <or>
    8.95 -                <istrue value="${manifest.available}"/>
    8.96 -                <isset property="do.mkdist"/>
    8.97 -            </or>
    8.98 +        <condition property="do.archive+splashscreen.available">
    8.99 +            <and>
   8.100 +                <isset property="splashscreen.available"/>
   8.101 +                <istrue value="${do.archive}"/>
   8.102 +            </and>
   8.103          </condition>
   8.104 -        <condition property="manifest.available+main.class-mkdist.available">
   8.105 -            <or>
   8.106 -                <istrue value="${manifest.available+main.class}"/>
   8.107 -                <isset property="do.mkdist"/>
   8.108 -            </or>
   8.109 +        <condition property="do.archive+profile.available">
   8.110 +            <and>
   8.111 +                <isset property="profile.available"/>
   8.112 +                <istrue value="${do.archive}"/>
   8.113 +            </and>
   8.114          </condition>
   8.115          <condition property="have.tests">
   8.116              <or>
   8.117 @@ -124,6 +143,7 @@
   8.118              </and>
   8.119          </condition>
   8.120          <property name="run.jvmargs" value=""/>
   8.121 +        <property name="run.jvmargs.ide" value=""/>
   8.122          <property name="javac.compilerargs" value=""/>
   8.123          <property name="work.dir" value="${basedir}"/>
   8.124          <condition property="no.deps">
   8.125 @@ -153,9 +173,50 @@
   8.126          </condition>
   8.127          <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   8.128          <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   8.129 -            <length length="0" string="${endorsed.classpath}" when="greater"/>
   8.130 +            <and>
   8.131 +                <isset property="endorsed.classpath"/>
   8.132 +                <not>
   8.133 +                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
   8.134 +                </not>
   8.135 +            </and>
   8.136          </condition>
   8.137 -        <property name="javac.fork" value="false"/>
   8.138 +        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
   8.139 +            <isset property="profile.available"/>
   8.140 +        </condition>
   8.141 +        <condition else="false" property="jdkBug6558476">
   8.142 +            <and>
   8.143 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   8.144 +                <not>
   8.145 +                    <os family="unix"/>
   8.146 +                </not>
   8.147 +            </and>
   8.148 +        </condition>
   8.149 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   8.150 +        <property name="jar.index" value="false"/>
   8.151 +        <property name="jar.index.metainf" value="${jar.index}"/>
   8.152 +        <property name="copylibs.rebase" value="true"/>
   8.153 +        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   8.154 +        <condition property="junit.available">
   8.155 +            <or>
   8.156 +                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
   8.157 +                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
   8.158 +            </or>
   8.159 +        </condition>
   8.160 +        <condition property="testng.available">
   8.161 +            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
   8.162 +        </condition>
   8.163 +        <condition property="junit+testng.available">
   8.164 +            <and>
   8.165 +                <istrue value="${junit.available}"/>
   8.166 +                <istrue value="${testng.available}"/>
   8.167 +            </and>
   8.168 +        </condition>
   8.169 +        <condition else="testng" property="testng.mode" value="mixed">
   8.170 +            <istrue value="${junit+testng.available}"/>
   8.171 +        </condition>
   8.172 +        <condition else="" property="testng.debug.mode" value="-mixed">
   8.173 +            <istrue value="${junit+testng.available}"/>
   8.174 +        </condition>
   8.175      </target>
   8.176      <target name="-post-init">
   8.177          <!-- Empty placeholder for easier customization. -->
   8.178 @@ -182,11 +243,54 @@
   8.179              </sequential>
   8.180          </macrodef>
   8.181      </target>
   8.182 -    <target name="-init-macrodef-javac">
   8.183 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   8.184          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.185              <attribute default="${src.dir}" name="srcdir"/>
   8.186              <attribute default="${build.classes.dir}" name="destdir"/>
   8.187              <attribute default="${javac.classpath}" name="classpath"/>
   8.188 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   8.189 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   8.190 +            <attribute default="${includes}" name="includes"/>
   8.191 +            <attribute default="${excludes}" name="excludes"/>
   8.192 +            <attribute default="${javac.debug}" name="debug"/>
   8.193 +            <attribute default="${empty.dir}" name="sourcepath"/>
   8.194 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   8.195 +            <element name="customize" optional="true"/>
   8.196 +            <sequential>
   8.197 +                <property location="${build.dir}/empty" name="empty.dir"/>
   8.198 +                <mkdir dir="${empty.dir}"/>
   8.199 +                <mkdir dir="@{apgeneratedsrcdir}"/>
   8.200 +                <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}">
   8.201 +                    <src>
   8.202 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   8.203 +                            <include name="*"/>
   8.204 +                        </dirset>
   8.205 +                    </src>
   8.206 +                    <classpath>
   8.207 +                        <path path="@{classpath}"/>
   8.208 +                    </classpath>
   8.209 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   8.210 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   8.211 +                    <compilerarg line="${javac.compilerargs}"/>
   8.212 +                    <compilerarg value="-processorpath"/>
   8.213 +                    <compilerarg path="@{processorpath}:${empty.dir}"/>
   8.214 +                    <compilerarg line="${ap.processors.internal}"/>
   8.215 +                    <compilerarg line="${annotation.processing.processor.options}"/>
   8.216 +                    <compilerarg value="-s"/>
   8.217 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
   8.218 +                    <compilerarg line="${ap.proc.none.internal}"/>
   8.219 +                    <customize/>
   8.220 +                </javac>
   8.221 +            </sequential>
   8.222 +        </macrodef>
   8.223 +    </target>
   8.224 +    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   8.225 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.226 +            <attribute default="${src.dir}" name="srcdir"/>
   8.227 +            <attribute default="${build.classes.dir}" name="destdir"/>
   8.228 +            <attribute default="${javac.classpath}" name="classpath"/>
   8.229 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   8.230 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   8.231              <attribute default="${includes}" name="includes"/>
   8.232              <attribute default="${excludes}" name="excludes"/>
   8.233              <attribute default="${javac.debug}" name="debug"/>
   8.234 @@ -206,11 +310,14 @@
   8.235                          <path path="@{classpath}"/>
   8.236                      </classpath>
   8.237                      <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   8.238 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   8.239                      <compilerarg line="${javac.compilerargs}"/>
   8.240                      <customize/>
   8.241                  </javac>
   8.242              </sequential>
   8.243          </macrodef>
   8.244 +    </target>
   8.245 +    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   8.246          <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.247              <attribute default="${src.dir}" name="srcdir"/>
   8.248              <attribute default="${build.classes.dir}" name="destdir"/>
   8.249 @@ -227,45 +334,390 @@
   8.250              <attribute default="${build.classes.dir}" name="destdir"/>
   8.251              <sequential>
   8.252                  <fail unless="javac.includes">Must set javac.includes</fail>
   8.253 -                <pathconvert pathsep="," property="javac.includes.binary">
   8.254 +                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   8.255                      <path>
   8.256                          <filelist dir="@{destdir}" files="${javac.includes}"/>
   8.257                      </path>
   8.258                      <globmapper from="*.java" to="*.class"/>
   8.259                  </pathconvert>
   8.260 +                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   8.261 +                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   8.262                  <delete>
   8.263 -                    <files includes="${javac.includes.binary}"/>
   8.264 +                    <files includesfile="${javac.includesfile.binary}"/>
   8.265 +                </delete>
   8.266 +                <delete>
   8.267 +                    <fileset file="${javac.includesfile.binary}"/>
   8.268                  </delete>
   8.269              </sequential>
   8.270          </macrodef>
   8.271      </target>
   8.272 -    <target name="-init-macrodef-junit">
   8.273 +    <target if="${junit.available}" name="-init-macrodef-junit-init">
   8.274 +        <condition else="false" property="nb.junit.batch" value="true">
   8.275 +            <and>
   8.276 +                <istrue value="${junit.available}"/>
   8.277 +                <not>
   8.278 +                    <isset property="test.method"/>
   8.279 +                </not>
   8.280 +            </and>
   8.281 +        </condition>
   8.282 +        <condition else="false" property="nb.junit.single" value="true">
   8.283 +            <and>
   8.284 +                <istrue value="${junit.available}"/>
   8.285 +                <isset property="test.method"/>
   8.286 +            </and>
   8.287 +        </condition>
   8.288 +    </target>
   8.289 +    <target name="-init-test-properties">
   8.290 +        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
   8.291 +        <property name="test.binarytestincludes" value=""/>
   8.292 +        <property name="test.binaryexcludes" value=""/>
   8.293 +    </target>
   8.294 +    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
   8.295          <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.296              <attribute default="${includes}" name="includes"/>
   8.297              <attribute default="${excludes}" name="excludes"/>
   8.298              <attribute default="**" name="testincludes"/>
   8.299 +            <attribute default="" name="testmethods"/>
   8.300 +            <element name="customize" optional="true"/>
   8.301              <sequential>
   8.302 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
   8.303 -                    <batchtest todir="${build.test.results.dir}">
   8.304 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   8.305 -                            <filename name="@{testincludes}"/>
   8.306 -                        </fileset>
   8.307 -                    </batchtest>
   8.308 -                    <classpath>
   8.309 -                        <path path="${run.test.classpath}"/>
   8.310 -                    </classpath>
   8.311 +                <property name="junit.forkmode" value="perTest"/>
   8.312 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   8.313 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   8.314                      <syspropertyset>
   8.315                          <propertyref prefix="test-sys-prop."/>
   8.316                          <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.317                      </syspropertyset>
   8.318                      <formatter type="brief" usefile="false"/>
   8.319                      <formatter type="xml"/>
   8.320 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   8.321 -                    <jvmarg line="${run.jvmargs}"/>
   8.322 +                    <jvmarg value="-ea"/>
   8.323 +                    <customize/>
   8.324                  </junit>
   8.325              </sequential>
   8.326          </macrodef>
   8.327      </target>
   8.328 +    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
   8.329 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.330 +            <attribute default="${includes}" name="includes"/>
   8.331 +            <attribute default="${excludes}" name="excludes"/>
   8.332 +            <attribute default="**" name="testincludes"/>
   8.333 +            <attribute default="" name="testmethods"/>
   8.334 +            <element name="customize" optional="true"/>
   8.335 +            <sequential>
   8.336 +                <property name="junit.forkmode" value="perTest"/>
   8.337 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   8.338 +                    <batchtest todir="${build.test.results.dir}">
   8.339 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   8.340 +                            <filename name="@{testincludes}"/>
   8.341 +                        </fileset>
   8.342 +                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   8.343 +                            <filename name="${test.binarytestincludes}"/>
   8.344 +                        </fileset>
   8.345 +                    </batchtest>
   8.346 +                    <syspropertyset>
   8.347 +                        <propertyref prefix="test-sys-prop."/>
   8.348 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.349 +                    </syspropertyset>
   8.350 +                    <formatter type="brief" usefile="false"/>
   8.351 +                    <formatter type="xml"/>
   8.352 +                    <jvmarg value="-ea"/>
   8.353 +                    <customize/>
   8.354 +                </junit>
   8.355 +            </sequential>
   8.356 +        </macrodef>
   8.357 +    </target>
   8.358 +    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
   8.359 +    <target if="${testng.available}" name="-init-macrodef-testng">
   8.360 +        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.361 +            <attribute default="${includes}" name="includes"/>
   8.362 +            <attribute default="${excludes}" name="excludes"/>
   8.363 +            <attribute default="**" name="testincludes"/>
   8.364 +            <attribute default="" name="testmethods"/>
   8.365 +            <element name="customize" optional="true"/>
   8.366 +            <sequential>
   8.367 +                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
   8.368 +                    <isset property="test.method"/>
   8.369 +                </condition>
   8.370 +                <union id="test.set">
   8.371 +                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
   8.372 +                        <filename name="@{testincludes}"/>
   8.373 +                    </fileset>
   8.374 +                </union>
   8.375 +                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
   8.376 +                <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="unionfs" testname="TestNG tests" workingDir="${work.dir}">
   8.377 +                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
   8.378 +                    <propertyset>
   8.379 +                        <propertyref prefix="test-sys-prop."/>
   8.380 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.381 +                    </propertyset>
   8.382 +                    <customize/>
   8.383 +                </testng>
   8.384 +            </sequential>
   8.385 +        </macrodef>
   8.386 +    </target>
   8.387 +    <target name="-init-macrodef-test-impl">
   8.388 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.389 +            <attribute default="${includes}" name="includes"/>
   8.390 +            <attribute default="${excludes}" name="excludes"/>
   8.391 +            <attribute default="**" name="testincludes"/>
   8.392 +            <attribute default="" name="testmethods"/>
   8.393 +            <element implicit="true" name="customize" optional="true"/>
   8.394 +            <sequential>
   8.395 +                <echo>No tests executed.</echo>
   8.396 +            </sequential>
   8.397 +        </macrodef>
   8.398 +    </target>
   8.399 +    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
   8.400 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.401 +            <attribute default="${includes}" name="includes"/>
   8.402 +            <attribute default="${excludes}" name="excludes"/>
   8.403 +            <attribute default="**" name="testincludes"/>
   8.404 +            <attribute default="" name="testmethods"/>
   8.405 +            <element implicit="true" name="customize" optional="true"/>
   8.406 +            <sequential>
   8.407 +                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   8.408 +                    <customize/>
   8.409 +                </j2seproject3:junit>
   8.410 +            </sequential>
   8.411 +        </macrodef>
   8.412 +    </target>
   8.413 +    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
   8.414 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.415 +            <attribute default="${includes}" name="includes"/>
   8.416 +            <attribute default="${excludes}" name="excludes"/>
   8.417 +            <attribute default="**" name="testincludes"/>
   8.418 +            <attribute default="" name="testmethods"/>
   8.419 +            <element implicit="true" name="customize" optional="true"/>
   8.420 +            <sequential>
   8.421 +                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   8.422 +                    <customize/>
   8.423 +                </j2seproject3:testng>
   8.424 +            </sequential>
   8.425 +        </macrodef>
   8.426 +    </target>
   8.427 +    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
   8.428 +        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.429 +            <attribute default="${includes}" name="includes"/>
   8.430 +            <attribute default="${excludes}" name="excludes"/>
   8.431 +            <attribute default="**" name="testincludes"/>
   8.432 +            <attribute default="" name="testmethods"/>
   8.433 +            <sequential>
   8.434 +                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   8.435 +                    <customize>
   8.436 +                        <classpath>
   8.437 +                            <path path="${run.test.classpath}"/>
   8.438 +                        </classpath>
   8.439 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   8.440 +                        <jvmarg line="${run.jvmargs}"/>
   8.441 +                        <jvmarg line="${run.jvmargs.ide}"/>
   8.442 +                    </customize>
   8.443 +                </j2seproject3:test-impl>
   8.444 +            </sequential>
   8.445 +        </macrodef>
   8.446 +    </target>
   8.447 +    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
   8.448 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.449 +            <attribute default="${includes}" name="includes"/>
   8.450 +            <attribute default="${excludes}" name="excludes"/>
   8.451 +            <attribute default="**" name="testincludes"/>
   8.452 +            <attribute default="" name="testmethods"/>
   8.453 +            <element name="customize" optional="true"/>
   8.454 +            <sequential>
   8.455 +                <property name="junit.forkmode" value="perTest"/>
   8.456 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   8.457 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   8.458 +                    <syspropertyset>
   8.459 +                        <propertyref prefix="test-sys-prop."/>
   8.460 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.461 +                    </syspropertyset>
   8.462 +                    <formatter type="brief" usefile="false"/>
   8.463 +                    <formatter type="xml"/>
   8.464 +                    <jvmarg value="-ea"/>
   8.465 +                    <jvmarg line="${debug-args-line}"/>
   8.466 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   8.467 +                    <customize/>
   8.468 +                </junit>
   8.469 +            </sequential>
   8.470 +        </macrodef>
   8.471 +    </target>
   8.472 +    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
   8.473 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.474 +            <attribute default="${includes}" name="includes"/>
   8.475 +            <attribute default="${excludes}" name="excludes"/>
   8.476 +            <attribute default="**" name="testincludes"/>
   8.477 +            <attribute default="" name="testmethods"/>
   8.478 +            <element name="customize" optional="true"/>
   8.479 +            <sequential>
   8.480 +                <property name="junit.forkmode" value="perTest"/>
   8.481 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   8.482 +                    <batchtest todir="${build.test.results.dir}">
   8.483 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   8.484 +                            <filename name="@{testincludes}"/>
   8.485 +                        </fileset>
   8.486 +                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   8.487 +                            <filename name="${test.binarytestincludes}"/>
   8.488 +                        </fileset>
   8.489 +                    </batchtest>
   8.490 +                    <syspropertyset>
   8.491 +                        <propertyref prefix="test-sys-prop."/>
   8.492 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.493 +                    </syspropertyset>
   8.494 +                    <formatter type="brief" usefile="false"/>
   8.495 +                    <formatter type="xml"/>
   8.496 +                    <jvmarg value="-ea"/>
   8.497 +                    <jvmarg line="${debug-args-line}"/>
   8.498 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   8.499 +                    <customize/>
   8.500 +                </junit>
   8.501 +            </sequential>
   8.502 +        </macrodef>
   8.503 +    </target>
   8.504 +    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
   8.505 +        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.506 +            <attribute default="${includes}" name="includes"/>
   8.507 +            <attribute default="${excludes}" name="excludes"/>
   8.508 +            <attribute default="**" name="testincludes"/>
   8.509 +            <attribute default="" name="testmethods"/>
   8.510 +            <element implicit="true" name="customize" optional="true"/>
   8.511 +            <sequential>
   8.512 +                <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   8.513 +                    <customize/>
   8.514 +                </j2seproject3:junit-debug>
   8.515 +            </sequential>
   8.516 +        </macrodef>
   8.517 +    </target>
   8.518 +    <target if="${testng.available}" name="-init-macrodef-testng-debug">
   8.519 +        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.520 +            <attribute default="${main.class}" name="testClass"/>
   8.521 +            <attribute default="" name="testMethod"/>
   8.522 +            <element name="customize2" optional="true"/>
   8.523 +            <sequential>
   8.524 +                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
   8.525 +                    <isset property="test.method"/>
   8.526 +                </condition>
   8.527 +                <condition else="-suitename unionfs -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
   8.528 +                    <matches pattern=".*\.xml" string="@{testClass}"/>
   8.529 +                </condition>
   8.530 +                <delete dir="${build.test.results.dir}" quiet="true"/>
   8.531 +                <mkdir dir="${build.test.results.dir}"/>
   8.532 +                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
   8.533 +                    <customize>
   8.534 +                        <customize2/>
   8.535 +                        <jvmarg value="-ea"/>
   8.536 +                        <arg line="${testng.debug.mode}"/>
   8.537 +                        <arg line="-d ${build.test.results.dir}"/>
   8.538 +                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
   8.539 +                        <arg line="${testng.cmd.args}"/>
   8.540 +                    </customize>
   8.541 +                </j2seproject3:debug>
   8.542 +            </sequential>
   8.543 +        </macrodef>
   8.544 +    </target>
   8.545 +    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
   8.546 +        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.547 +            <attribute default="${main.class}" name="testClass"/>
   8.548 +            <attribute default="" name="testMethod"/>
   8.549 +            <element implicit="true" name="customize2" optional="true"/>
   8.550 +            <sequential>
   8.551 +                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
   8.552 +                    <customize2/>
   8.553 +                </j2seproject3:testng-debug>
   8.554 +            </sequential>
   8.555 +        </macrodef>
   8.556 +    </target>
   8.557 +    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
   8.558 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.559 +            <attribute default="${includes}" name="includes"/>
   8.560 +            <attribute default="${excludes}" name="excludes"/>
   8.561 +            <attribute default="**" name="testincludes"/>
   8.562 +            <attribute default="" name="testmethods"/>
   8.563 +            <attribute default="${main.class}" name="testClass"/>
   8.564 +            <attribute default="" name="testMethod"/>
   8.565 +            <sequential>
   8.566 +                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   8.567 +                    <customize>
   8.568 +                        <classpath>
   8.569 +                            <path path="${run.test.classpath}"/>
   8.570 +                        </classpath>
   8.571 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   8.572 +                        <jvmarg line="${run.jvmargs}"/>
   8.573 +                        <jvmarg line="${run.jvmargs.ide}"/>
   8.574 +                    </customize>
   8.575 +                </j2seproject3:test-debug-impl>
   8.576 +            </sequential>
   8.577 +        </macrodef>
   8.578 +    </target>
   8.579 +    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
   8.580 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.581 +            <attribute default="${includes}" name="includes"/>
   8.582 +            <attribute default="${excludes}" name="excludes"/>
   8.583 +            <attribute default="**" name="testincludes"/>
   8.584 +            <attribute default="" name="testmethods"/>
   8.585 +            <attribute default="${main.class}" name="testClass"/>
   8.586 +            <attribute default="" name="testMethod"/>
   8.587 +            <sequential>
   8.588 +                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
   8.589 +                    <customize2>
   8.590 +                        <syspropertyset>
   8.591 +                            <propertyref prefix="test-sys-prop."/>
   8.592 +                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.593 +                        </syspropertyset>
   8.594 +                    </customize2>
   8.595 +                </j2seproject3:testng-debug-impl>
   8.596 +            </sequential>
   8.597 +        </macrodef>
   8.598 +    </target>
   8.599 +    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
   8.600 +    <!--
   8.601 +                pre NB7.2 profiling section; consider it deprecated
   8.602 +            -->
   8.603 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
   8.604 +    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
   8.605 +        <!-- Empty placeholder for easier customization. -->
   8.606 +        <!-- You can override this target in the ../build.xml file. -->
   8.607 +    </target>
   8.608 +    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
   8.609 +        <!-- Empty placeholder for easier customization. -->
   8.610 +        <!-- You can override this target in the ../build.xml file. -->
   8.611 +    </target>
   8.612 +    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
   8.613 +        <macrodef name="resolve">
   8.614 +            <attribute name="name"/>
   8.615 +            <attribute name="value"/>
   8.616 +            <sequential>
   8.617 +                <property name="@{name}" value="${env.@{value}}"/>
   8.618 +            </sequential>
   8.619 +        </macrodef>
   8.620 +        <macrodef name="profile">
   8.621 +            <attribute default="${main.class}" name="classname"/>
   8.622 +            <element name="customize" optional="true"/>
   8.623 +            <sequential>
   8.624 +                <property environment="env"/>
   8.625 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   8.626 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   8.627 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   8.628 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   8.629 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   8.630 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   8.631 +                    <arg line="${application.args}"/>
   8.632 +                    <classpath>
   8.633 +                        <path path="${run.classpath}"/>
   8.634 +                    </classpath>
   8.635 +                    <syspropertyset>
   8.636 +                        <propertyref prefix="run-sys-prop."/>
   8.637 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   8.638 +                    </syspropertyset>
   8.639 +                    <customize/>
   8.640 +                </java>
   8.641 +            </sequential>
   8.642 +        </macrodef>
   8.643 +    </target>
   8.644 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
   8.645 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   8.646 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   8.647 +    </target>
   8.648 +    <!--
   8.649 +                end of pre NB7.2 profiling section
   8.650 +            -->
   8.651      <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   8.652          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   8.653              <attribute default="${main.class}" name="name"/>
   8.654 @@ -323,6 +775,7 @@
   8.655                      <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   8.656                      <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   8.657                      <jvmarg line="${run.jvmargs}"/>
   8.658 +                    <jvmarg line="${run.jvmargs.ide}"/>
   8.659                      <classpath>
   8.660                          <path path="@{classpath}"/>
   8.661                      </classpath>
   8.662 @@ -339,6 +792,7 @@
   8.663          <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   8.664              <attribute default="${main.class}" name="classname"/>
   8.665              <attribute default="${run.classpath}" name="classpath"/>
   8.666 +            <attribute default="jvm" name="jvm"/>
   8.667              <element name="customize" optional="true"/>
   8.668              <sequential>
   8.669                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   8.670 @@ -346,6 +800,7 @@
   8.671                      <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   8.672                      <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   8.673                      <jvmarg line="${run.jvmargs}"/>
   8.674 +                    <jvmarg line="${run.jvmargs.ide}"/>
   8.675                      <classpath>
   8.676                          <path path="@{classpath}"/>
   8.677                      </classpath>
   8.678 @@ -358,14 +813,69 @@
   8.679              </sequential>
   8.680          </macrodef>
   8.681      </target>
   8.682 +    <target name="-init-macrodef-copylibs">
   8.683 +        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   8.684 +            <attribute default="${manifest.file}" name="manifest"/>
   8.685 +            <element name="customize" optional="true"/>
   8.686 +            <sequential>
   8.687 +                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   8.688 +                <pathconvert property="run.classpath.without.build.classes.dir">
   8.689 +                    <path path="${run.classpath}"/>
   8.690 +                    <map from="${build.classes.dir.resolved}" to=""/>
   8.691 +                </pathconvert>
   8.692 +                <pathconvert pathsep=" " property="jar.classpath">
   8.693 +                    <path path="${run.classpath.without.build.classes.dir}"/>
   8.694 +                    <chainedmapper>
   8.695 +                        <flattenmapper/>
   8.696 +                        <filtermapper>
   8.697 +                            <replacestring from=" " to="%20"/>
   8.698 +                        </filtermapper>
   8.699 +                        <globmapper from="*" to="lib/*"/>
   8.700 +                    </chainedmapper>
   8.701 +                </pathconvert>
   8.702 +                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   8.703 +                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   8.704 +                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   8.705 +                    <manifest>
   8.706 +                        <attribute name="Class-Path" value="${jar.classpath}"/>
   8.707 +                        <customize/>
   8.708 +                    </manifest>
   8.709 +                </copylibs>
   8.710 +            </sequential>
   8.711 +        </macrodef>
   8.712 +    </target>
   8.713      <target name="-init-presetdef-jar">
   8.714          <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   8.715 -            <jar compress="${jar.compress}" jarfile="${dist.jar}">
   8.716 -                <j2seproject1:fileset dir="${build.classes.dir}"/>
   8.717 +            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   8.718 +                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   8.719              </jar>
   8.720          </presetdef>
   8.721      </target>
   8.722 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
   8.723 +    <target name="-init-ap-cmdline-properties">
   8.724 +        <property name="annotation.processing.enabled" value="true"/>
   8.725 +        <property name="annotation.processing.processors.list" value=""/>
   8.726 +        <property name="annotation.processing.processor.options" value=""/>
   8.727 +        <property name="annotation.processing.run.all.processors" value="true"/>
   8.728 +        <property name="javac.processorpath" value="${javac.classpath}"/>
   8.729 +        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   8.730 +        <condition property="ap.supported.internal" value="true">
   8.731 +            <not>
   8.732 +                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   8.733 +            </not>
   8.734 +        </condition>
   8.735 +    </target>
   8.736 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   8.737 +        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   8.738 +            <isfalse value="${annotation.processing.run.all.processors}"/>
   8.739 +        </condition>
   8.740 +        <condition else="" property="ap.proc.none.internal" value="-proc:none">
   8.741 +            <isfalse value="${annotation.processing.enabled}"/>
   8.742 +        </condition>
   8.743 +    </target>
   8.744 +    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   8.745 +        <property name="ap.cmd.line.internal" value=""/>
   8.746 +    </target>
   8.747 +    <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"/>
   8.748      <!--
   8.749                  ===================
   8.750                  COMPILATION SECTION
   8.751 @@ -409,12 +919,18 @@
   8.752          </pathconvert>
   8.753          <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   8.754      </target>
   8.755 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   8.756 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   8.757          <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   8.758          <copy todir="${build.classes.dir}">
   8.759              <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   8.760          </copy>
   8.761      </target>
   8.762 +    <target if="has.persistence.xml" name="-copy-persistence-xml">
   8.763 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   8.764 +        <copy todir="${build.classes.dir}/META-INF">
   8.765 +            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
   8.766 +        </copy>
   8.767 +    </target>
   8.768      <target name="-post-compile">
   8.769          <!-- Empty placeholder for easier customization. -->
   8.770          <!-- You can override this target in the ../build.xml file. -->
   8.771 @@ -447,99 +963,67 @@
   8.772          <!-- Empty placeholder for easier customization. -->
   8.773          <!-- You can override this target in the ../build.xml file. -->
   8.774      </target>
   8.775 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   8.776 -        <j2seproject1:jar/>
   8.777 +    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
   8.778 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   8.779 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   8.780      </target>
   8.781 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
   8.782 -        <j2seproject1:jar manifest="${manifest.file}"/>
   8.783 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
   8.784 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   8.785 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   8.786      </target>
   8.787 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   8.788 -        <j2seproject1:jar manifest="${manifest.file}">
   8.789 -            <j2seproject1:manifest>
   8.790 -                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   8.791 -            </j2seproject1:manifest>
   8.792 -        </j2seproject1:jar>
   8.793 -        <echo>To run this application from the command line without Ant, try:</echo>
   8.794 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
   8.795 +        <manifest file="${tmp.manifest.file}" mode="update">
   8.796 +            <attribute name="Main-Class" value="${main.class}"/>
   8.797 +        </manifest>
   8.798 +    </target>
   8.799 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
   8.800 +        <manifest file="${tmp.manifest.file}" mode="update">
   8.801 +            <attribute name="Profile" value="${javac.profile}"/>
   8.802 +        </manifest>
   8.803 +    </target>
   8.804 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
   8.805 +        <basename file="${application.splash}" property="splashscreen.basename"/>
   8.806 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   8.807 +        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   8.808 +        <manifest file="${tmp.manifest.file}" mode="update">
   8.809 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   8.810 +        </manifest>
   8.811 +    </target>
   8.812 +    <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">
   8.813 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   8.814 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   8.815 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   8.816 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   8.817 +    </target>
   8.818 +    <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">
   8.819 +        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
   8.820          <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   8.821          <property location="${dist.jar}" name="dist.jar.resolved"/>
   8.822          <pathconvert property="run.classpath.with.dist.jar">
   8.823              <path path="${run.classpath}"/>
   8.824              <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   8.825          </pathconvert>
   8.826 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   8.827 +        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
   8.828 +            <isset property="main.class.available"/>
   8.829 +        </condition>
   8.830 +        <condition else="debug" property="jar.usage.level" value="info">
   8.831 +            <isset property="main.class.available"/>
   8.832 +        </condition>
   8.833 +        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
   8.834      </target>
   8.835 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   8.836 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   8.837 -        <pathconvert property="run.classpath.without.build.classes.dir">
   8.838 -            <path path="${run.classpath}"/>
   8.839 -            <map from="${build.classes.dir.resolved}" to=""/>
   8.840 -        </pathconvert>
   8.841 -        <pathconvert pathsep=" " property="jar.classpath">
   8.842 -            <path path="${run.classpath.without.build.classes.dir}"/>
   8.843 -            <chainedmapper>
   8.844 -                <flattenmapper/>
   8.845 -                <globmapper from="*" to="lib/*"/>
   8.846 -            </chainedmapper>
   8.847 -        </pathconvert>
   8.848 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   8.849 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   8.850 -            <fileset dir="${build.classes.dir}"/>
   8.851 -            <manifest>
   8.852 -                <attribute name="Main-Class" value="${main.class}"/>
   8.853 -                <attribute name="Class-Path" value="${jar.classpath}"/>
   8.854 -            </manifest>
   8.855 -        </copylibs>
   8.856 -        <echo>To run this application from the command line without Ant, try:</echo>
   8.857 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
   8.858 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   8.859 +    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
   8.860 +        <delete>
   8.861 +            <fileset file="${tmp.manifest.file}"/>
   8.862 +        </delete>
   8.863      </target>
   8.864 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
   8.865 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   8.866 -        <pathconvert property="run.classpath.without.build.classes.dir">
   8.867 -            <path path="${run.classpath}"/>
   8.868 -            <map from="${build.classes.dir.resolved}" to=""/>
   8.869 -        </pathconvert>
   8.870 -        <pathconvert pathsep=" " property="jar.classpath">
   8.871 -            <path path="${run.classpath.without.build.classes.dir}"/>
   8.872 -            <chainedmapper>
   8.873 -                <flattenmapper/>
   8.874 -                <globmapper from="*" to="lib/*"/>
   8.875 -            </chainedmapper>
   8.876 -        </pathconvert>
   8.877 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   8.878 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   8.879 -            <fileset dir="${build.classes.dir}"/>
   8.880 -            <manifest>
   8.881 -                <attribute name="Class-Path" value="${jar.classpath}"/>
   8.882 -            </manifest>
   8.883 -        </copylibs>
   8.884 -    </target>
   8.885 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
   8.886 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   8.887 -        <pathconvert property="run.classpath.without.build.classes.dir">
   8.888 -            <path path="${run.classpath}"/>
   8.889 -            <map from="${build.classes.dir.resolved}" to=""/>
   8.890 -        </pathconvert>
   8.891 -        <pathconvert pathsep=" " property="jar.classpath">
   8.892 -            <path path="${run.classpath.without.build.classes.dir}"/>
   8.893 -            <chainedmapper>
   8.894 -                <flattenmapper/>
   8.895 -                <globmapper from="*" to="lib/*"/>
   8.896 -            </chainedmapper>
   8.897 -        </pathconvert>
   8.898 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   8.899 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   8.900 -            <fileset dir="${build.classes.dir}"/>
   8.901 -            <manifest>
   8.902 -                <attribute name="Class-Path" value="${jar.classpath}"/>
   8.903 -            </manifest>
   8.904 -        </copylibs>
   8.905 -    </target>
   8.906 +    <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"/>
   8.907 +    <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"/>
   8.908      <target name="-post-jar">
   8.909          <!-- Empty placeholder for easier customization. -->
   8.910          <!-- You can override this target in the ../build.xml file. -->
   8.911      </target>
   8.912 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
   8.913 +    <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
   8.914 +    <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
   8.915      <!--
   8.916                  =================
   8.917                  EXECUTION SECTION
   8.918 @@ -605,23 +1089,143 @@
   8.919      </target>
   8.920      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   8.921      <!--
   8.922 +                =================
   8.923 +                PROFILING SECTION
   8.924 +                =================
   8.925 +            -->
   8.926 +    <!--
   8.927 +                pre NB7.2 profiler integration
   8.928 +            -->
   8.929 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
   8.930 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   8.931 +        <nbprofiledirect>
   8.932 +            <classpath>
   8.933 +                <path path="${run.classpath}"/>
   8.934 +            </classpath>
   8.935 +        </nbprofiledirect>
   8.936 +        <profile/>
   8.937 +    </target>
   8.938 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
   8.939 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   8.940 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   8.941 +        <nbprofiledirect>
   8.942 +            <classpath>
   8.943 +                <path path="${run.classpath}"/>
   8.944 +            </classpath>
   8.945 +        </nbprofiledirect>
   8.946 +        <profile classname="${profile.class}"/>
   8.947 +    </target>
   8.948 +    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
   8.949 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   8.950 +        <nbprofiledirect>
   8.951 +            <classpath>
   8.952 +                <path path="${run.classpath}"/>
   8.953 +            </classpath>
   8.954 +        </nbprofiledirect>
   8.955 +        <profile classname="sun.applet.AppletViewer">
   8.956 +            <customize>
   8.957 +                <arg value="${applet.url}"/>
   8.958 +            </customize>
   8.959 +        </profile>
   8.960 +    </target>
   8.961 +    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
   8.962 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   8.963 +        <nbprofiledirect>
   8.964 +            <classpath>
   8.965 +                <path path="${run.test.classpath}"/>
   8.966 +            </classpath>
   8.967 +        </nbprofiledirect>
   8.968 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
   8.969 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   8.970 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   8.971 +            <jvmarg line="${profiler.info.jvmargs}"/>
   8.972 +            <test name="${profile.class}"/>
   8.973 +            <classpath>
   8.974 +                <path path="${run.test.classpath}"/>
   8.975 +            </classpath>
   8.976 +            <syspropertyset>
   8.977 +                <propertyref prefix="test-sys-prop."/>
   8.978 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
   8.979 +            </syspropertyset>
   8.980 +            <formatter type="brief" usefile="false"/>
   8.981 +            <formatter type="xml"/>
   8.982 +        </junit>
   8.983 +    </target>
   8.984 +    <!--
   8.985 +                end of pre NB72 profiling section
   8.986 +            -->
   8.987 +    <target if="netbeans.home" name="-profile-check">
   8.988 +        <condition property="profiler.configured">
   8.989 +            <or>
   8.990 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
   8.991 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
   8.992 +            </or>
   8.993 +        </condition>
   8.994 +    </target>
   8.995 +    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
   8.996 +        <startprofiler/>
   8.997 +        <antcall target="run"/>
   8.998 +    </target>
   8.999 +    <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">
  8.1000 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  8.1001 +        <startprofiler/>
  8.1002 +        <antcall target="run-single"/>
  8.1003 +    </target>
  8.1004 +    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  8.1005 +    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  8.1006 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  8.1007 +        <startprofiler/>
  8.1008 +        <antcall target="test-single"/>
  8.1009 +    </target>
  8.1010 +    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  8.1011 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  8.1012 +        <startprofiler/>
  8.1013 +        <antcal target="run-test-with-main"/>
  8.1014 +    </target>
  8.1015 +    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  8.1016 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  8.1017 +        <startprofiler/>
  8.1018 +        <antcall target="run-applet"/>
  8.1019 +    </target>
  8.1020 +    <!--
  8.1021                  ===============
  8.1022                  JAVADOC SECTION
  8.1023                  ===============
  8.1024              -->
  8.1025 -    <target depends="init" name="-javadoc-build">
  8.1026 +    <target depends="init" if="have.sources" name="-javadoc-build">
  8.1027          <mkdir dir="${dist.javadoc.dir}"/>
  8.1028 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  8.1029 +        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  8.1030 +            <and>
  8.1031 +                <isset property="endorsed.classpath.cmd.line.arg"/>
  8.1032 +                <not>
  8.1033 +                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  8.1034 +                </not>
  8.1035 +            </and>
  8.1036 +        </condition>
  8.1037 +        <condition else="" property="bug5101868workaround" value="*.java">
  8.1038 +            <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  8.1039 +        </condition>
  8.1040 +        <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}">
  8.1041              <classpath>
  8.1042                  <path path="${javac.classpath}"/>
  8.1043              </classpath>
  8.1044 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  8.1045 +            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  8.1046                  <filename name="**/*.java"/>
  8.1047              </fileset>
  8.1048              <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  8.1049                  <include name="**/*.java"/>
  8.1050 +                <exclude name="*.java"/>
  8.1051              </fileset>
  8.1052 +            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  8.1053          </javadoc>
  8.1054 +        <copy todir="${dist.javadoc.dir}">
  8.1055 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  8.1056 +                <filename name="**/doc-files/**"/>
  8.1057 +            </fileset>
  8.1058 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  8.1059 +                <include name="**/doc-files/**"/>
  8.1060 +            </fileset>
  8.1061 +        </copy>
  8.1062      </target>
  8.1063      <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  8.1064          <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  8.1065 @@ -629,7 +1233,7 @@
  8.1066      <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  8.1067      <!--
  8.1068                  =========================
  8.1069 -                JUNIT COMPILATION SECTION
  8.1070 +                TEST COMPILATION SECTION
  8.1071                  =========================
  8.1072              -->
  8.1073      <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  8.1074 @@ -642,8 +1246,8 @@
  8.1075      <target if="do.depend.true" name="-compile-test-depend">
  8.1076          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  8.1077      </target>
  8.1078 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  8.1079 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  8.1080 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  8.1081 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
  8.1082          <copy todir="${build.test.classes.dir}">
  8.1083              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  8.1084          </copy>
  8.1085 @@ -657,10 +1261,10 @@
  8.1086          <!-- Empty placeholder for easier customization. -->
  8.1087          <!-- You can override this target in the ../build.xml file. -->
  8.1088      </target>
  8.1089 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  8.1090 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  8.1091          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  8.1092          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  8.1093 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  8.1094 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  8.1095          <copy todir="${build.test.classes.dir}">
  8.1096              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  8.1097          </copy>
  8.1098 @@ -672,14 +1276,14 @@
  8.1099      <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  8.1100      <!--
  8.1101                  =======================
  8.1102 -                JUNIT EXECUTION SECTION
  8.1103 +                TEST EXECUTION SECTION
  8.1104                  =======================
  8.1105              -->
  8.1106      <target depends="init" if="have.tests" name="-pre-test-run">
  8.1107          <mkdir dir="${build.test.results.dir}"/>
  8.1108      </target>
  8.1109      <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  8.1110 -        <j2seproject3:junit testincludes="**/*Test.java"/>
  8.1111 +        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  8.1112      </target>
  8.1113      <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  8.1114          <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  8.1115 @@ -692,39 +1296,40 @@
  8.1116      </target>
  8.1117      <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  8.1118          <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  8.1119 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
  8.1120 +        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  8.1121      </target>
  8.1122      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  8.1123          <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  8.1124      </target>
  8.1125      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  8.1126 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  8.1127 +        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  8.1128 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  8.1129 +        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  8.1130 +    </target>
  8.1131 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  8.1132 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  8.1133 +    </target>
  8.1134 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  8.1135      <!--
  8.1136                  =======================
  8.1137 -                JUNIT DEBUGGING SECTION
  8.1138 +                TEST DEBUGGING SECTION
  8.1139                  =======================
  8.1140              -->
  8.1141 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  8.1142 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  8.1143          <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  8.1144 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  8.1145 -        <delete file="${test.report.file}"/>
  8.1146 -        <mkdir dir="${build.test.results.dir}"/>
  8.1147 -        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  8.1148 -            <customize>
  8.1149 -                <syspropertyset>
  8.1150 -                    <propertyref prefix="test-sys-prop."/>
  8.1151 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
  8.1152 -                </syspropertyset>
  8.1153 -                <arg value="${test.class}"/>
  8.1154 -                <arg value="showoutput=true"/>
  8.1155 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  8.1156 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  8.1157 -            </customize>
  8.1158 -        </j2seproject3:debug>
  8.1159 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  8.1160 +    </target>
  8.1161 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  8.1162 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  8.1163 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  8.1164 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  8.1165      </target>
  8.1166      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  8.1167          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  8.1168      </target>
  8.1169      <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  8.1170 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  8.1171      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  8.1172          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  8.1173      </target>
  8.1174 @@ -789,9 +1394,12 @@
  8.1175      <target name="-check-call-dep">
  8.1176          <property file="${call.built.properties}" prefix="already.built."/>
  8.1177          <condition property="should.call.dep">
  8.1178 -            <not>
  8.1179 -                <isset property="already.built.${call.subproject}"/>
  8.1180 -            </not>
  8.1181 +            <and>
  8.1182 +                <not>
  8.1183 +                    <isset property="already.built.${call.subproject}"/>
  8.1184 +                </not>
  8.1185 +                <available file="${call.script}"/>
  8.1186 +            </and>
  8.1187          </condition>
  8.1188      </target>
  8.1189      <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
     9.1 --- a/samples/unionfs/nbproject/genfiles.properties	Thu Oct 30 20:46:27 2014 +0100
     9.2 +++ b/samples/unionfs/nbproject/genfiles.properties	Thu Oct 30 21:30:10 2014 +0100
     9.3 @@ -1,8 +1,8 @@
     9.4  build.xml.data.CRC32=31076a65
     9.5 -build.xml.script.CRC32=64c09767
     9.6 -build.xml.stylesheet.CRC32=958a1d3e@1.34.0.45
     9.7 +build.xml.script.CRC32=c8e917b3
     9.8 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48
     9.9  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    9.10  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    9.11  nbproject/build-impl.xml.data.CRC32=31076a65
    9.12 -nbproject/build-impl.xml.script.CRC32=d7a2cae8
    9.13 -nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
    9.14 +nbproject/build-impl.xml.script.CRC32=2b5267d2
    9.15 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48