Andrei: Hide in the book the fact that in the code Playback is an innerclass
authorJaroslav Tulach <jtulach@netbeans.org>
Wed, 08 Aug 2012 22:42:33 +0200
changeset 394ee6bd6cf2bf3
parent 393 5319f085d966
child 395 837ae5b09036
Andrei: Hide in the book the fact that in the code Playback is an innerclass
samples/individualsamples/build.xml
samples/individualsamples/nbproject/build-impl.xml
samples/individualsamples/nbproject/genfiles.properties
samples/individualsamples/nbproject/project.properties
samples/individualsamples/src/org/apidesign/samples/XMMS.java
     1.1 --- a/samples/individualsamples/build.xml	Wed Aug 08 22:35:26 2012 +0200
     1.2 +++ b/samples/individualsamples/build.xml	Wed Aug 08 22:42:33 2012 +0200
     1.3 @@ -2,6 +2,11 @@
     1.4  <!-- You may freely edit this file. See commented blocks below for -->
     1.5  <!-- some examples of how to customize the build. -->
     1.6  <!-- (If you delete it and reopen the project it will be recreated.) -->
     1.7 +<!-- By default, only the Clean and Build commands use this build script. -->
     1.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
     1.9 +<!-- the Compile on Save feature is turned off for the project. -->
    1.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    1.11 +<!-- in the project's Project Properties dialog box.-->
    1.12  <project name="individualsamples" default="default" basedir=".">
    1.13      <description>Builds, tests, and runs the project individualsamples.</description>
    1.14      <import file="nbproject/build-impl.xml"/>
     2.1 --- a/samples/individualsamples/nbproject/build-impl.xml	Wed Aug 08 22:35:26 2012 +0200
     2.2 +++ b/samples/individualsamples/nbproject/build-impl.xml	Wed Aug 08 22:42:33 2012 +0200
     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:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" 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="individualsamples-impl">
    2.18 +<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="individualsamples-impl">
    2.19 +    <fail message="Please build using Ant 1.8.0 or higher.">
    2.20 +        <condition>
    2.21 +            <not>
    2.22 +                <antversion atleast="1.8.0"/>
    2.23 +            </not>
    2.24 +        </condition>
    2.25 +    </fail>
    2.26      <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    2.27      <!-- 
    2.28                  ======================
    2.29 @@ -48,21 +55,84 @@
    2.30      </target>
    2.31      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    2.32          <available file="${manifest.file}" property="manifest.available"/>
    2.33 -        <condition property="manifest.available+main.class">
    2.34 +        <condition property="splashscreen.available">
    2.35              <and>
    2.36 -                <isset property="manifest.available"/>
    2.37 +                <not>
    2.38 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    2.39 +                </not>
    2.40 +                <available file="${application.splash}"/>
    2.41 +            </and>
    2.42 +        </condition>
    2.43 +        <condition property="main.class.available">
    2.44 +            <and>
    2.45                  <isset property="main.class"/>
    2.46                  <not>
    2.47                      <equals arg1="${main.class}" arg2="" trim="true"/>
    2.48                  </not>
    2.49              </and>
    2.50          </condition>
    2.51 +        <condition property="manifest.available+main.class">
    2.52 +            <and>
    2.53 +                <isset property="manifest.available"/>
    2.54 +                <isset property="main.class.available"/>
    2.55 +            </and>
    2.56 +        </condition>
    2.57 +        <condition property="do.archive">
    2.58 +            <not>
    2.59 +                <istrue value="${jar.archive.disabled}"/>
    2.60 +            </not>
    2.61 +        </condition>
    2.62 +        <condition property="do.mkdist">
    2.63 +            <and>
    2.64 +                <isset property="do.archive"/>
    2.65 +                <isset property="libs.CopyLibs.classpath"/>
    2.66 +                <not>
    2.67 +                    <istrue value="${mkdist.disabled}"/>
    2.68 +                </not>
    2.69 +            </and>
    2.70 +        </condition>
    2.71          <condition property="manifest.available+main.class+mkdist.available">
    2.72              <and>
    2.73                  <istrue value="${manifest.available+main.class}"/>
    2.74 -                <isset property="libs.CopyLibs.classpath"/>
    2.75 +                <isset property="do.mkdist"/>
    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+manifest.available+main.class">
    2.97 +            <and>
    2.98 +                <istrue value="${manifest.available+main.class}"/>
    2.99 +                <istrue value="${do.archive}"/>
   2.100 +            </and>
   2.101 +        </condition>
   2.102 +        <condition property="manifest.available-mkdist.available">
   2.103 +            <or>
   2.104 +                <istrue value="${manifest.available}"/>
   2.105 +                <isset property="do.mkdist"/>
   2.106 +            </or>
   2.107 +        </condition>
   2.108 +        <condition property="manifest.available+main.class-mkdist.available">
   2.109 +            <or>
   2.110 +                <istrue value="${manifest.available+main.class}"/>
   2.111 +                <isset property="do.mkdist"/>
   2.112 +            </or>
   2.113 +        </condition>
   2.114          <condition property="have.tests">
   2.115              <or>
   2.116                  <available file="${test.src.dir}"/>
   2.117 @@ -86,6 +156,7 @@
   2.118              </and>
   2.119          </condition>
   2.120          <property name="run.jvmargs" value=""/>
   2.121 +        <property name="run.jvmargs.ide" value=""/>
   2.122          <property name="javac.compilerargs" value=""/>
   2.123          <property name="work.dir" value="${basedir}"/>
   2.124          <condition property="no.deps">
   2.125 @@ -97,6 +168,7 @@
   2.126          <property name="javadoc.preview" value="true"/>
   2.127          <property name="application.args" value=""/>
   2.128          <property name="source.encoding" value="${file.encoding}"/>
   2.129 +        <property name="runtime.encoding" value="${source.encoding}"/>
   2.130          <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   2.131              <and>
   2.132                  <isset property="javadoc.encoding"/>
   2.133 @@ -112,12 +184,44 @@
   2.134          <condition property="do.depend.true">
   2.135              <istrue value="${do.depend}"/>
   2.136          </condition>
   2.137 -        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
   2.138 +        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   2.139 +        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   2.140 +            <length length="0" string="${endorsed.classpath}" when="greater"/>
   2.141 +        </condition>
   2.142 +        <condition else="false" property="jdkBug6558476">
   2.143              <and>
   2.144 -                <isset property="jaxws.endorsed.dir"/>
   2.145 -                <available file="nbproject/jaxws-build.xml"/>
   2.146 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   2.147 +                <not>
   2.148 +                    <os family="unix"/>
   2.149 +                </not>
   2.150              </and>
   2.151          </condition>
   2.152 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   2.153 +        <property name="jar.index" value="false"/>
   2.154 +        <property name="jar.index.metainf" value="${jar.index}"/>
   2.155 +        <property name="copylibs.rebase" value="true"/>
   2.156 +        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   2.157 +        <condition property="junit.available">
   2.158 +            <or>
   2.159 +                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
   2.160 +                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
   2.161 +            </or>
   2.162 +        </condition>
   2.163 +        <condition property="testng.available">
   2.164 +            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
   2.165 +        </condition>
   2.166 +        <condition property="junit+testng.available">
   2.167 +            <and>
   2.168 +                <istrue value="${junit.available}"/>
   2.169 +                <istrue value="${testng.available}"/>
   2.170 +            </and>
   2.171 +        </condition>
   2.172 +        <condition else="testng" property="testng.mode" value="mixed">
   2.173 +            <istrue value="${junit+testng.available}"/>
   2.174 +        </condition>
   2.175 +        <condition else="" property="testng.debug.mode" value="-mixed">
   2.176 +            <istrue value="${junit+testng.available}"/>
   2.177 +        </condition>
   2.178      </target>
   2.179      <target name="-post-init">
   2.180          <!-- Empty placeholder for easier customization. -->
   2.181 @@ -144,26 +248,79 @@
   2.182              </sequential>
   2.183          </macrodef>
   2.184      </target>
   2.185 -    <target name="-init-macrodef-javac">
   2.186 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   2.187          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.188              <attribute default="${src.dir}" name="srcdir"/>
   2.189              <attribute default="${build.classes.dir}" name="destdir"/>
   2.190              <attribute default="${javac.classpath}" name="classpath"/>
   2.191 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   2.192 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   2.193              <attribute default="${includes}" name="includes"/>
   2.194              <attribute default="${excludes}" name="excludes"/>
   2.195              <attribute default="${javac.debug}" name="debug"/>
   2.196 -            <attribute default="" name="sourcepath"/>
   2.197 +            <attribute default="${empty.dir}" name="sourcepath"/>
   2.198 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   2.199              <element name="customize" optional="true"/>
   2.200              <sequential>
   2.201 -                <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.202 +                <property location="${build.dir}/empty" name="empty.dir"/>
   2.203 +                <mkdir dir="${empty.dir}"/>
   2.204 +                <mkdir dir="@{apgeneratedsrcdir}"/>
   2.205 +                <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.206 +                    <src>
   2.207 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   2.208 +                            <include name="*"/>
   2.209 +                        </dirset>
   2.210 +                    </src>
   2.211                      <classpath>
   2.212                          <path path="@{classpath}"/>
   2.213                      </classpath>
   2.214 -                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
   2.215 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.216 +                    <compilerarg line="${javac.compilerargs}"/>
   2.217 +                    <compilerarg value="-processorpath"/>
   2.218 +                    <compilerarg path="@{processorpath}:${empty.dir}"/>
   2.219 +                    <compilerarg line="${ap.processors.internal}"/>
   2.220 +                    <compilerarg line="${annotation.processing.processor.options}"/>
   2.221 +                    <compilerarg value="-s"/>
   2.222 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
   2.223 +                    <compilerarg line="${ap.proc.none.internal}"/>
   2.224                      <customize/>
   2.225                  </javac>
   2.226              </sequential>
   2.227          </macrodef>
   2.228 +    </target>
   2.229 +    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   2.230 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.231 +            <attribute default="${src.dir}" name="srcdir"/>
   2.232 +            <attribute default="${build.classes.dir}" name="destdir"/>
   2.233 +            <attribute default="${javac.classpath}" name="classpath"/>
   2.234 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   2.235 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   2.236 +            <attribute default="${includes}" name="includes"/>
   2.237 +            <attribute default="${excludes}" name="excludes"/>
   2.238 +            <attribute default="${javac.debug}" name="debug"/>
   2.239 +            <attribute default="${empty.dir}" name="sourcepath"/>
   2.240 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   2.241 +            <element name="customize" optional="true"/>
   2.242 +            <sequential>
   2.243 +                <property location="${build.dir}/empty" name="empty.dir"/>
   2.244 +                <mkdir dir="${empty.dir}"/>
   2.245 +                <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.246 +                    <src>
   2.247 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   2.248 +                            <include name="*"/>
   2.249 +                        </dirset>
   2.250 +                    </src>
   2.251 +                    <classpath>
   2.252 +                        <path path="@{classpath}"/>
   2.253 +                    </classpath>
   2.254 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.255 +                    <compilerarg line="${javac.compilerargs}"/>
   2.256 +                    <customize/>
   2.257 +                </javac>
   2.258 +            </sequential>
   2.259 +        </macrodef>
   2.260 +    </target>
   2.261 +    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   2.262          <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.263              <attribute default="${src.dir}" name="srcdir"/>
   2.264              <attribute default="${build.classes.dir}" name="destdir"/>
   2.265 @@ -180,51 +337,386 @@
   2.266              <attribute default="${build.classes.dir}" name="destdir"/>
   2.267              <sequential>
   2.268                  <fail unless="javac.includes">Must set javac.includes</fail>
   2.269 -                <pathconvert pathsep="," property="javac.includes.binary">
   2.270 +                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   2.271                      <path>
   2.272                          <filelist dir="@{destdir}" files="${javac.includes}"/>
   2.273                      </path>
   2.274                      <globmapper from="*.java" to="*.class"/>
   2.275                  </pathconvert>
   2.276 +                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   2.277 +                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   2.278                  <delete>
   2.279 -                    <files includes="${javac.includes.binary}"/>
   2.280 +                    <files includesfile="${javac.includesfile.binary}"/>
   2.281 +                </delete>
   2.282 +                <delete>
   2.283 +                    <fileset file="${javac.includesfile.binary}"/>
   2.284                  </delete>
   2.285              </sequential>
   2.286          </macrodef>
   2.287      </target>
   2.288 -    <target name="-init-macrodef-junit">
   2.289 +    <target if="${junit.available}" name="-init-macrodef-junit-init">
   2.290 +        <condition else="false" property="nb.junit.batch" value="true">
   2.291 +            <and>
   2.292 +                <istrue value="${junit.available}"/>
   2.293 +                <not>
   2.294 +                    <isset property="test.method"/>
   2.295 +                </not>
   2.296 +            </and>
   2.297 +        </condition>
   2.298 +        <condition else="false" property="nb.junit.single" value="true">
   2.299 +            <and>
   2.300 +                <istrue value="${junit.available}"/>
   2.301 +                <isset property="test.method"/>
   2.302 +            </and>
   2.303 +        </condition>
   2.304 +    </target>
   2.305 +    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
   2.306          <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.307              <attribute default="${includes}" name="includes"/>
   2.308              <attribute default="${excludes}" name="excludes"/>
   2.309              <attribute default="**" name="testincludes"/>
   2.310 +            <attribute default="" name="testmethods"/>
   2.311 +            <element name="customize" optional="true"/>
   2.312              <sequential>
   2.313 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   2.314 -                    <batchtest todir="${build.test.results.dir}">
   2.315 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.316 -                            <filename name="@{testincludes}"/>
   2.317 -                        </fileset>
   2.318 -                    </batchtest>
   2.319 -                    <classpath>
   2.320 -                        <path path="${run.test.classpath}"/>
   2.321 -                    </classpath>
   2.322 +                <property name="junit.forkmode" value="perTest"/>
   2.323 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.324 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   2.325                      <syspropertyset>
   2.326                          <propertyref prefix="test-sys-prop."/>
   2.327                          <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.328                      </syspropertyset>
   2.329                      <formatter type="brief" usefile="false"/>
   2.330                      <formatter type="xml"/>
   2.331 -                    <jvmarg line="${run.jvmargs}"/>
   2.332 +                    <jvmarg value="-ea"/>
   2.333 +                    <customize/>
   2.334                  </junit>
   2.335              </sequential>
   2.336          </macrodef>
   2.337      </target>
   2.338 -    <target name="-init-macrodef-nbjpda">
   2.339 +    <target 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 +                    </batchtest>
   2.354 +                    <syspropertyset>
   2.355 +                        <propertyref prefix="test-sys-prop."/>
   2.356 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.357 +                    </syspropertyset>
   2.358 +                    <formatter type="brief" usefile="false"/>
   2.359 +                    <formatter type="xml"/>
   2.360 +                    <jvmarg value="-ea"/>
   2.361 +                    <customize/>
   2.362 +                </junit>
   2.363 +            </sequential>
   2.364 +        </macrodef>
   2.365 +    </target>
   2.366 +    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
   2.367 +    <target if="${testng.available}" name="-init-macrodef-testng">
   2.368 +        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.369 +            <attribute default="${includes}" name="includes"/>
   2.370 +            <attribute default="${excludes}" name="excludes"/>
   2.371 +            <attribute default="**" name="testincludes"/>
   2.372 +            <attribute default="" name="testmethods"/>
   2.373 +            <element name="customize" optional="true"/>
   2.374 +            <sequential>
   2.375 +                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
   2.376 +                    <isset property="test.method"/>
   2.377 +                </condition>
   2.378 +                <union id="test.set">
   2.379 +                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
   2.380 +                        <filename name="@{testincludes}"/>
   2.381 +                    </fileset>
   2.382 +                </union>
   2.383 +                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
   2.384 +                <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="individualsamples" testname="TestNG tests" workingDir="${work.dir}">
   2.385 +                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
   2.386 +                    <propertyset>
   2.387 +                        <propertyref prefix="test-sys-prop."/>
   2.388 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.389 +                    </propertyset>
   2.390 +                    <customize/>
   2.391 +                </testng>
   2.392 +            </sequential>
   2.393 +        </macrodef>
   2.394 +    </target>
   2.395 +    <target name="-init-macrodef-test-impl">
   2.396 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.397 +            <attribute default="${includes}" name="includes"/>
   2.398 +            <attribute default="${excludes}" name="excludes"/>
   2.399 +            <attribute default="**" name="testincludes"/>
   2.400 +            <attribute default="" name="testmethods"/>
   2.401 +            <element implicit="true" name="customize" optional="true"/>
   2.402 +            <sequential>
   2.403 +                <echo>No tests executed.</echo>
   2.404 +            </sequential>
   2.405 +        </macrodef>
   2.406 +    </target>
   2.407 +    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
   2.408 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.409 +            <attribute default="${includes}" name="includes"/>
   2.410 +            <attribute default="${excludes}" name="excludes"/>
   2.411 +            <attribute default="**" name="testincludes"/>
   2.412 +            <attribute default="" name="testmethods"/>
   2.413 +            <element implicit="true" name="customize" optional="true"/>
   2.414 +            <sequential>
   2.415 +                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.416 +                    <customize/>
   2.417 +                </j2seproject3:junit>
   2.418 +            </sequential>
   2.419 +        </macrodef>
   2.420 +    </target>
   2.421 +    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
   2.422 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.423 +            <attribute default="${includes}" name="includes"/>
   2.424 +            <attribute default="${excludes}" name="excludes"/>
   2.425 +            <attribute default="**" name="testincludes"/>
   2.426 +            <attribute default="" name="testmethods"/>
   2.427 +            <element implicit="true" name="customize" optional="true"/>
   2.428 +            <sequential>
   2.429 +                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.430 +                    <customize/>
   2.431 +                </j2seproject3:testng>
   2.432 +            </sequential>
   2.433 +        </macrodef>
   2.434 +    </target>
   2.435 +    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
   2.436 +        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.437 +            <attribute default="${includes}" name="includes"/>
   2.438 +            <attribute default="${excludes}" name="excludes"/>
   2.439 +            <attribute default="**" name="testincludes"/>
   2.440 +            <attribute default="" name="testmethods"/>
   2.441 +            <sequential>
   2.442 +                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.443 +                    <customize>
   2.444 +                        <classpath>
   2.445 +                            <path path="${run.test.classpath}"/>
   2.446 +                        </classpath>
   2.447 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.448 +                        <jvmarg line="${run.jvmargs}"/>
   2.449 +                        <jvmarg line="${run.jvmargs.ide}"/>
   2.450 +                    </customize>
   2.451 +                </j2seproject3:test-impl>
   2.452 +            </sequential>
   2.453 +        </macrodef>
   2.454 +    </target>
   2.455 +    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
   2.456 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.457 +            <attribute default="${includes}" name="includes"/>
   2.458 +            <attribute default="${excludes}" name="excludes"/>
   2.459 +            <attribute default="**" name="testincludes"/>
   2.460 +            <attribute default="" name="testmethods"/>
   2.461 +            <element name="customize" optional="true"/>
   2.462 +            <sequential>
   2.463 +                <property name="junit.forkmode" value="perTest"/>
   2.464 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.465 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   2.466 +                    <syspropertyset>
   2.467 +                        <propertyref prefix="test-sys-prop."/>
   2.468 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.469 +                    </syspropertyset>
   2.470 +                    <formatter type="brief" usefile="false"/>
   2.471 +                    <formatter type="xml"/>
   2.472 +                    <jvmarg value="-ea"/>
   2.473 +                    <jvmarg line="${debug-args-line}"/>
   2.474 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   2.475 +                    <customize/>
   2.476 +                </junit>
   2.477 +            </sequential>
   2.478 +        </macrodef>
   2.479 +    </target>
   2.480 +    <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
   2.481 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.482 +            <attribute default="${includes}" name="includes"/>
   2.483 +            <attribute default="${excludes}" name="excludes"/>
   2.484 +            <attribute default="**" name="testincludes"/>
   2.485 +            <attribute default="" name="testmethods"/>
   2.486 +            <element name="customize" optional="true"/>
   2.487 +            <sequential>
   2.488 +                <property name="junit.forkmode" value="perTest"/>
   2.489 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   2.490 +                    <batchtest todir="${build.test.results.dir}">
   2.491 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   2.492 +                            <filename name="@{testincludes}"/>
   2.493 +                        </fileset>
   2.494 +                    </batchtest>
   2.495 +                    <syspropertyset>
   2.496 +                        <propertyref prefix="test-sys-prop."/>
   2.497 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.498 +                    </syspropertyset>
   2.499 +                    <formatter type="brief" usefile="false"/>
   2.500 +                    <formatter type="xml"/>
   2.501 +                    <jvmarg value="-ea"/>
   2.502 +                    <jvmarg line="${debug-args-line}"/>
   2.503 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   2.504 +                    <customize/>
   2.505 +                </junit>
   2.506 +            </sequential>
   2.507 +        </macrodef>
   2.508 +    </target>
   2.509 +    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
   2.510 +        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.511 +            <attribute default="${includes}" name="includes"/>
   2.512 +            <attribute default="${excludes}" name="excludes"/>
   2.513 +            <attribute default="**" name="testincludes"/>
   2.514 +            <attribute default="" name="testmethods"/>
   2.515 +            <element implicit="true" name="customize" optional="true"/>
   2.516 +            <sequential>
   2.517 +                <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.518 +                    <customize/>
   2.519 +                </j2seproject3:junit-debug>
   2.520 +            </sequential>
   2.521 +        </macrodef>
   2.522 +    </target>
   2.523 +    <target if="${testng.available}" name="-init-macrodef-testng-debug">
   2.524 +        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.525 +            <attribute default="${main.class}" name="testClass"/>
   2.526 +            <attribute default="" name="testMethod"/>
   2.527 +            <element name="customize2" optional="true"/>
   2.528 +            <sequential>
   2.529 +                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
   2.530 +                    <isset property="test.method"/>
   2.531 +                </condition>
   2.532 +                <condition else="-suitename individualsamples -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
   2.533 +                    <matches pattern=".*\.xml" string="@{testClass}"/>
   2.534 +                </condition>
   2.535 +                <delete dir="${build.test.results.dir}" quiet="true"/>
   2.536 +                <mkdir dir="${build.test.results.dir}"/>
   2.537 +                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
   2.538 +                    <customize>
   2.539 +                        <customize2/>
   2.540 +                        <jvmarg value="-ea"/>
   2.541 +                        <arg line="${testng.debug.mode}"/>
   2.542 +                        <arg line="-d ${build.test.results.dir}"/>
   2.543 +                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
   2.544 +                        <arg line="${testng.cmd.args}"/>
   2.545 +                    </customize>
   2.546 +                </j2seproject3:debug>
   2.547 +            </sequential>
   2.548 +        </macrodef>
   2.549 +    </target>
   2.550 +    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
   2.551 +        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.552 +            <attribute default="${main.class}" name="testClass"/>
   2.553 +            <attribute default="" name="testMethod"/>
   2.554 +            <element implicit="true" name="customize2" optional="true"/>
   2.555 +            <sequential>
   2.556 +                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
   2.557 +                    <customize2/>
   2.558 +                </j2seproject3:testng-debug>
   2.559 +            </sequential>
   2.560 +        </macrodef>
   2.561 +    </target>
   2.562 +    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
   2.563 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.564 +            <attribute default="${includes}" name="includes"/>
   2.565 +            <attribute default="${excludes}" name="excludes"/>
   2.566 +            <attribute default="**" name="testincludes"/>
   2.567 +            <attribute default="" name="testmethods"/>
   2.568 +            <attribute default="${main.class}" name="testClass"/>
   2.569 +            <attribute default="" name="testMethod"/>
   2.570 +            <sequential>
   2.571 +                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   2.572 +                    <customize>
   2.573 +                        <classpath>
   2.574 +                            <path path="${run.test.classpath}"/>
   2.575 +                        </classpath>
   2.576 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.577 +                        <jvmarg line="${run.jvmargs}"/>
   2.578 +                        <jvmarg line="${run.jvmargs.ide}"/>
   2.579 +                    </customize>
   2.580 +                </j2seproject3:test-debug-impl>
   2.581 +            </sequential>
   2.582 +        </macrodef>
   2.583 +    </target>
   2.584 +    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
   2.585 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.586 +            <attribute default="${includes}" name="includes"/>
   2.587 +            <attribute default="${excludes}" name="excludes"/>
   2.588 +            <attribute default="**" name="testincludes"/>
   2.589 +            <attribute default="" name="testmethods"/>
   2.590 +            <attribute default="${main.class}" name="testClass"/>
   2.591 +            <attribute default="" name="testMethod"/>
   2.592 +            <sequential>
   2.593 +                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
   2.594 +                    <customize2>
   2.595 +                        <syspropertyset>
   2.596 +                            <propertyref prefix="test-sys-prop."/>
   2.597 +                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
   2.598 +                        </syspropertyset>
   2.599 +                    </customize2>
   2.600 +                </j2seproject3:testng-debug-impl>
   2.601 +            </sequential>
   2.602 +        </macrodef>
   2.603 +    </target>
   2.604 +    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
   2.605 +    <!--
   2.606 +                pre NB7.2 profiling section; consider it deprecated
   2.607 +            -->
   2.608 +    <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.609 +    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
   2.610 +        <!-- Empty placeholder for easier customization. -->
   2.611 +        <!-- You can override this target in the ../build.xml file. -->
   2.612 +    </target>
   2.613 +    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
   2.614 +        <!-- Empty placeholder for easier customization. -->
   2.615 +        <!-- You can override this target in the ../build.xml file. -->
   2.616 +    </target>
   2.617 +    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
   2.618 +        <macrodef name="resolve">
   2.619 +            <attribute name="name"/>
   2.620 +            <attribute name="value"/>
   2.621 +            <sequential>
   2.622 +                <property name="@{name}" value="${env.@{value}}"/>
   2.623 +            </sequential>
   2.624 +        </macrodef>
   2.625 +        <macrodef name="profile">
   2.626 +            <attribute default="${main.class}" name="classname"/>
   2.627 +            <element name="customize" optional="true"/>
   2.628 +            <sequential>
   2.629 +                <property environment="env"/>
   2.630 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   2.631 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   2.632 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.633 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   2.634 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   2.635 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   2.636 +                    <arg line="${application.args}"/>
   2.637 +                    <classpath>
   2.638 +                        <path path="${run.classpath}"/>
   2.639 +                    </classpath>
   2.640 +                    <syspropertyset>
   2.641 +                        <propertyref prefix="run-sys-prop."/>
   2.642 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   2.643 +                    </syspropertyset>
   2.644 +                    <customize/>
   2.645 +                </java>
   2.646 +            </sequential>
   2.647 +        </macrodef>
   2.648 +    </target>
   2.649 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
   2.650 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   2.651 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   2.652 +    </target>
   2.653 +    <!--
   2.654 +                end of pre NB7.2 profiling section
   2.655 +            -->
   2.656 +    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   2.657          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.658              <attribute default="${main.class}" name="name"/>
   2.659              <attribute default="${debug.classpath}" name="classpath"/>
   2.660              <attribute default="" name="stopclassname"/>
   2.661              <sequential>
   2.662 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
   2.663 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   2.664                      <classpath>
   2.665                          <path path="@{classpath}"/>
   2.666                      </classpath>
   2.667 @@ -235,7 +727,9 @@
   2.668              <attribute default="${build.classes.dir}" name="dir"/>
   2.669              <sequential>
   2.670                  <nbjpdareload>
   2.671 -                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
   2.672 +                    <fileset dir="@{dir}" includes="${fix.classes}">
   2.673 +                        <include name="${fix.includes}*.class"/>
   2.674 +                    </fileset>
   2.675                  </nbjpdareload>
   2.676              </sequential>
   2.677          </macrodef>
   2.678 @@ -253,6 +747,12 @@
   2.679          <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   2.680              <istrue value="${have-jdk-older-than-1.4}"/>
   2.681          </condition>
   2.682 +        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   2.683 +            <os family="windows"/>
   2.684 +        </condition>
   2.685 +        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
   2.686 +            <isset property="debug.transport"/>
   2.687 +        </condition>
   2.688      </target>
   2.689      <target depends="-init-debug-args" name="-init-macrodef-debug">
   2.690          <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.691 @@ -261,9 +761,13 @@
   2.692              <element name="customize" optional="true"/>
   2.693              <sequential>
   2.694                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   2.695 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.696                      <jvmarg line="${debug-args-line}"/>
   2.697 -                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
   2.698 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   2.699 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   2.700 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   2.701                      <jvmarg line="${run.jvmargs}"/>
   2.702 +                    <jvmarg line="${run.jvmargs.ide}"/>
   2.703                      <classpath>
   2.704                          <path path="@{classpath}"/>
   2.705                      </classpath>
   2.706 @@ -279,12 +783,18 @@
   2.707      <target name="-init-macrodef-java">
   2.708          <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.709              <attribute default="${main.class}" name="classname"/>
   2.710 +            <attribute default="${run.classpath}" name="classpath"/>
   2.711 +            <attribute default="jvm" name="jvm"/>
   2.712              <element name="customize" optional="true"/>
   2.713              <sequential>
   2.714                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   2.715 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   2.716 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   2.717 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   2.718                      <jvmarg line="${run.jvmargs}"/>
   2.719 +                    <jvmarg line="${run.jvmargs.ide}"/>
   2.720                      <classpath>
   2.721 -                        <path path="${run.classpath}"/>
   2.722 +                        <path path="@{classpath}"/>
   2.723                      </classpath>
   2.724                      <syspropertyset>
   2.725                          <propertyref prefix="run-sys-prop."/>
   2.726 @@ -295,20 +805,97 @@
   2.727              </sequential>
   2.728          </macrodef>
   2.729      </target>
   2.730 +    <target name="-init-macrodef-copylibs">
   2.731 +        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   2.732 +            <attribute default="${manifest.file}" name="manifest"/>
   2.733 +            <element name="customize" optional="true"/>
   2.734 +            <sequential>
   2.735 +                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.736 +                <pathconvert property="run.classpath.without.build.classes.dir">
   2.737 +                    <path path="${run.classpath}"/>
   2.738 +                    <map from="${build.classes.dir.resolved}" to=""/>
   2.739 +                </pathconvert>
   2.740 +                <pathconvert pathsep=" " property="jar.classpath">
   2.741 +                    <path path="${run.classpath.without.build.classes.dir}"/>
   2.742 +                    <chainedmapper>
   2.743 +                        <flattenmapper/>
   2.744 +                        <filtermapper>
   2.745 +                            <replacestring from=" " to="%20"/>
   2.746 +                        </filtermapper>
   2.747 +                        <globmapper from="*" to="lib/*"/>
   2.748 +                    </chainedmapper>
   2.749 +                </pathconvert>
   2.750 +                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   2.751 +                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.752 +                    <fileset dir="${build.classes.dir}"/>
   2.753 +                    <manifest>
   2.754 +                        <attribute name="Class-Path" value="${jar.classpath}"/>
   2.755 +                        <customize/>
   2.756 +                    </manifest>
   2.757 +                </copylibs>
   2.758 +            </sequential>
   2.759 +        </macrodef>
   2.760 +    </target>
   2.761      <target name="-init-presetdef-jar">
   2.762          <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   2.763 -            <jar compress="${jar.compress}" jarfile="${dist.jar}">
   2.764 +            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   2.765                  <j2seproject1:fileset dir="${build.classes.dir}"/>
   2.766              </jar>
   2.767          </presetdef>
   2.768      </target>
   2.769 -    <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.770 +    <target name="-init-ap-cmdline-properties">
   2.771 +        <property name="annotation.processing.enabled" value="true"/>
   2.772 +        <property name="annotation.processing.processors.list" value=""/>
   2.773 +        <property name="annotation.processing.processor.options" value=""/>
   2.774 +        <property name="annotation.processing.run.all.processors" value="true"/>
   2.775 +        <property name="javac.processorpath" value="${javac.classpath}"/>
   2.776 +        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   2.777 +        <condition property="ap.supported.internal" value="true">
   2.778 +            <not>
   2.779 +                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   2.780 +            </not>
   2.781 +        </condition>
   2.782 +    </target>
   2.783 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   2.784 +        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   2.785 +            <isfalse value="${annotation.processing.run.all.processors}"/>
   2.786 +        </condition>
   2.787 +        <condition else="" property="ap.proc.none.internal" value="-proc:none">
   2.788 +            <isfalse value="${annotation.processing.enabled}"/>
   2.789 +        </condition>
   2.790 +    </target>
   2.791 +    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   2.792 +        <property name="ap.cmd.line.internal" value=""/>
   2.793 +    </target>
   2.794 +    <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.795      <!--
   2.796                  ===================
   2.797                  COMPILATION SECTION
   2.798                  ===================
   2.799              -->
   2.800 -    <target depends="init" name="deps-jar" unless="no.deps"/>
   2.801 +    <target name="-deps-jar-init" unless="built-jar.properties">
   2.802 +        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   2.803 +        <delete file="${built-jar.properties}" quiet="true"/>
   2.804 +    </target>
   2.805 +    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   2.806 +        <echo level="warn" message="Cycle detected: individualsamples was already built"/>
   2.807 +    </target>
   2.808 +    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   2.809 +        <mkdir dir="${build.dir}"/>
   2.810 +        <touch file="${built-jar.properties}" verbose="false"/>
   2.811 +        <property file="${built-jar.properties}" prefix="already.built.jar."/>
   2.812 +        <antcall target="-warn-already-built-jar"/>
   2.813 +        <propertyfile file="${built-jar.properties}">
   2.814 +            <entry key="${basedir}" value=""/>
   2.815 +        </propertyfile>
   2.816 +    </target>
   2.817 +    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   2.818 +    <target depends="init" name="-check-automatic-build">
   2.819 +        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   2.820 +    </target>
   2.821 +    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   2.822 +        <antcall target="clean"/>
   2.823 +    </target>
   2.824      <target depends="init,deps-jar" name="-pre-pre-compile">
   2.825          <mkdir dir="${build.classes.dir}"/>
   2.826      </target>
   2.827 @@ -317,19 +904,30 @@
   2.828          <!-- You can override this target in the ../build.xml file. -->
   2.829      </target>
   2.830      <target if="do.depend.true" name="-compile-depend">
   2.831 -        <j2seproject3:depend/>
   2.832 +        <pathconvert property="build.generated.subdirs">
   2.833 +            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   2.834 +                <include name="*"/>
   2.835 +            </dirset>
   2.836 +        </pathconvert>
   2.837 +        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   2.838      </target>
   2.839 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   2.840 -        <j2seproject3:javac/>
   2.841 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   2.842 +        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   2.843          <copy todir="${build.classes.dir}">
   2.844              <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   2.845          </copy>
   2.846      </target>
   2.847 +    <target if="has.persistence.xml" name="-copy-persistence-xml">
   2.848 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   2.849 +        <copy todir="${build.classes.dir}/META-INF">
   2.850 +            <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
   2.851 +        </copy>
   2.852 +    </target>
   2.853      <target name="-post-compile">
   2.854          <!-- Empty placeholder for easier customization. -->
   2.855          <!-- You can override this target in the ../build.xml file. -->
   2.856      </target>
   2.857 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   2.858 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
   2.859      <target name="-pre-compile-single">
   2.860          <!-- Empty placeholder for easier customization. -->
   2.861          <!-- You can override this target in the ../build.xml file. -->
   2.862 @@ -337,13 +935,13 @@
   2.863      <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   2.864          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   2.865          <j2seproject3:force-recompile/>
   2.866 -        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
   2.867 +        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   2.868      </target>
   2.869      <target name="-post-compile-single">
   2.870          <!-- Empty placeholder for easier customization. -->
   2.871          <!-- You can override this target in the ../build.xml file. -->
   2.872      </target>
   2.873 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   2.874 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
   2.875      <!--
   2.876                  ====================
   2.877                  JAR BUILDING SECTION
   2.878 @@ -357,52 +955,60 @@
   2.879          <!-- Empty placeholder for easier customization. -->
   2.880          <!-- You can override this target in the ../build.xml file. -->
   2.881      </target>
   2.882 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   2.883 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   2.884          <j2seproject1:jar/>
   2.885      </target>
   2.886 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   2.887 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
   2.888          <j2seproject1:jar manifest="${manifest.file}"/>
   2.889      </target>
   2.890 -    <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.891 +    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   2.892          <j2seproject1:jar manifest="${manifest.file}">
   2.893              <j2seproject1:manifest>
   2.894                  <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   2.895              </j2seproject1:manifest>
   2.896          </j2seproject1:jar>
   2.897 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.898 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   2.899          <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.900          <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.901          <pathconvert property="run.classpath.with.dist.jar">
   2.902              <path path="${run.classpath}"/>
   2.903              <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   2.904          </pathconvert>
   2.905 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   2.906 +        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   2.907      </target>
   2.908 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   2.909 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   2.910 -        <pathconvert property="run.classpath.without.build.classes.dir">
   2.911 -            <path path="${run.classpath}"/>
   2.912 -            <map from="${build.classes.dir.resolved}" to=""/>
   2.913 -        </pathconvert>
   2.914 -        <pathconvert pathsep=" " property="jar.classpath">
   2.915 -            <path path="${run.classpath.without.build.classes.dir}"/>
   2.916 -            <chainedmapper>
   2.917 -                <flattenmapper/>
   2.918 -                <globmapper from="*" to="lib/*"/>
   2.919 -            </chainedmapper>
   2.920 -        </pathconvert>
   2.921 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   2.922 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   2.923 -            <fileset dir="${build.classes.dir}"/>
   2.924 -            <manifest>
   2.925 -                <attribute name="Main-Class" value="${main.class}"/>
   2.926 -                <attribute name="Class-Path" value="${jar.classpath}"/>
   2.927 -            </manifest>
   2.928 -        </copylibs>
   2.929 -        <echo>To run this application from the command line without Ant, try:</echo>
   2.930 +    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
   2.931 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   2.932 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   2.933 +    </target>
   2.934 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
   2.935 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   2.936 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   2.937 +    </target>
   2.938 +    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
   2.939 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.940 +            <attribute name="Main-Class" value="${main.class}"/>
   2.941 +        </manifest>
   2.942 +    </target>
   2.943 +    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
   2.944 +        <basename file="${application.splash}" property="splashscreen.basename"/>
   2.945 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   2.946 +        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   2.947 +        <manifest file="${tmp.manifest.file}" mode="update">
   2.948 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   2.949 +        </manifest>
   2.950 +    </target>
   2.951 +    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
   2.952 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   2.953 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   2.954          <property location="${dist.jar}" name="dist.jar.resolved"/>
   2.955 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   2.956 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   2.957      </target>
   2.958 +    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
   2.959 +        <delete>
   2.960 +            <fileset file="${tmp.manifest.file}"/>
   2.961 +        </delete>
   2.962 +    </target>
   2.963 +    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
   2.964      <target name="-post-jar">
   2.965          <!-- Empty placeholder for easier customization. -->
   2.966          <!-- You can override this target in the ../build.xml file. -->
   2.967 @@ -423,10 +1029,14 @@
   2.968      <target name="-do-not-recompile">
   2.969          <property name="javac.includes.binary" value=""/>
   2.970      </target>
   2.971 -    <target depends="init,-do-not-recompile,compile-single" name="run-single">
   2.972 +    <target depends="init,compile-single" name="run-single">
   2.973          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   2.974          <j2seproject1:java classname="${run.class}"/>
   2.975      </target>
   2.976 +    <target depends="init,compile-test-single" name="run-test-with-main">
   2.977 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   2.978 +        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   2.979 +    </target>
   2.980      <!--
   2.981                  =================
   2.982                  DEBUGGING SECTION
   2.983 @@ -435,6 +1045,9 @@
   2.984      <target depends="init" if="netbeans.home" name="-debug-start-debugger">
   2.985          <j2seproject1:nbjpdastart name="${debug.class}"/>
   2.986      </target>
   2.987 +    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
   2.988 +        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
   2.989 +    </target>
   2.990      <target depends="init,compile" name="-debug-start-debuggee">
   2.991          <j2seproject3:debug>
   2.992              <customize>
   2.993 @@ -451,7 +1064,12 @@
   2.994          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   2.995          <j2seproject3:debug classname="${debug.class}"/>
   2.996      </target>
   2.997 -    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   2.998 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   2.999 +    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  2.1000 +        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  2.1001 +        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  2.1002 +    </target>
  2.1003 +    <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.1004      <target depends="init" name="-pre-debug-fix">
  2.1005          <fail unless="fix.includes">Must set fix.includes</fail>
  2.1006          <property name="javac.includes" value="${fix.includes}.java"/>
  2.1007 @@ -461,20 +1079,140 @@
  2.1008      </target>
  2.1009      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  2.1010      <!--
  2.1011 +                =================
  2.1012 +                PROFILING SECTION
  2.1013 +                =================
  2.1014 +            -->
  2.1015 +    <!--
  2.1016 +                pre NB7.2 profiler integration
  2.1017 +            -->
  2.1018 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
  2.1019 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  2.1020 +        <nbprofiledirect>
  2.1021 +            <classpath>
  2.1022 +                <path path="${run.classpath}"/>
  2.1023 +            </classpath>
  2.1024 +        </nbprofiledirect>
  2.1025 +        <profile/>
  2.1026 +    </target>
  2.1027 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
  2.1028 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  2.1029 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  2.1030 +        <nbprofiledirect>
  2.1031 +            <classpath>
  2.1032 +                <path path="${run.classpath}"/>
  2.1033 +            </classpath>
  2.1034 +        </nbprofiledirect>
  2.1035 +        <profile classname="${profile.class}"/>
  2.1036 +    </target>
  2.1037 +    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
  2.1038 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  2.1039 +        <nbprofiledirect>
  2.1040 +            <classpath>
  2.1041 +                <path path="${run.classpath}"/>
  2.1042 +            </classpath>
  2.1043 +        </nbprofiledirect>
  2.1044 +        <profile classname="sun.applet.AppletViewer">
  2.1045 +            <customize>
  2.1046 +                <arg value="${applet.url}"/>
  2.1047 +            </customize>
  2.1048 +        </profile>
  2.1049 +    </target>
  2.1050 +    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  2.1051 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  2.1052 +        <nbprofiledirect>
  2.1053 +            <classpath>
  2.1054 +                <path path="${run.test.classpath}"/>
  2.1055 +            </classpath>
  2.1056 +        </nbprofiledirect>
  2.1057 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  2.1058 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  2.1059 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
  2.1060 +            <jvmarg line="${profiler.info.jvmargs}"/>
  2.1061 +            <test name="${profile.class}"/>
  2.1062 +            <classpath>
  2.1063 +                <path path="${run.test.classpath}"/>
  2.1064 +            </classpath>
  2.1065 +            <syspropertyset>
  2.1066 +                <propertyref prefix="test-sys-prop."/>
  2.1067 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
  2.1068 +            </syspropertyset>
  2.1069 +            <formatter type="brief" usefile="false"/>
  2.1070 +            <formatter type="xml"/>
  2.1071 +        </junit>
  2.1072 +    </target>
  2.1073 +    <!--
  2.1074 +                end of pre NB72 profiling section
  2.1075 +            -->
  2.1076 +    <target if="netbeans.home" name="-profile-check">
  2.1077 +        <condition property="profiler.configured">
  2.1078 +            <or>
  2.1079 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  2.1080 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  2.1081 +            </or>
  2.1082 +        </condition>
  2.1083 +    </target>
  2.1084 +    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  2.1085 +        <startprofiler/>
  2.1086 +        <antcall target="run"/>
  2.1087 +    </target>
  2.1088 +    <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.1089 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  2.1090 +        <startprofiler/>
  2.1091 +        <antcall target="run-single"/>
  2.1092 +    </target>
  2.1093 +    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  2.1094 +    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  2.1095 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  2.1096 +        <startprofiler/>
  2.1097 +        <antcall target="test-single"/>
  2.1098 +    </target>
  2.1099 +    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  2.1100 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  2.1101 +        <startprofiler/>
  2.1102 +        <antcal target="run-test-with-main"/>
  2.1103 +    </target>
  2.1104 +    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  2.1105 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  2.1106 +        <startprofiler/>
  2.1107 +        <antcall target="run-applet"/>
  2.1108 +    </target>
  2.1109 +    <!--
  2.1110                  ===============
  2.1111                  JAVADOC SECTION
  2.1112                  ===============
  2.1113              -->
  2.1114 -    <target depends="init" name="-javadoc-build">
  2.1115 +    <target depends="init" if="have.sources" name="-javadoc-build">
  2.1116          <mkdir dir="${dist.javadoc.dir}"/>
  2.1117 +        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  2.1118 +            <and>
  2.1119 +                <isset property="endorsed.classpath.cmd.line.arg"/>
  2.1120 +                <not>
  2.1121 +                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  2.1122 +                </not>
  2.1123 +            </and>
  2.1124 +        </condition>
  2.1125          <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.1126              <classpath>
  2.1127                  <path path="${javac.classpath}"/>
  2.1128              </classpath>
  2.1129 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  2.1130 +            <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
  2.1131                  <filename name="**/*.java"/>
  2.1132              </fileset>
  2.1133 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  2.1134 +                <include name="**/*.java"/>
  2.1135 +                <exclude name="*.java"/>
  2.1136 +            </fileset>
  2.1137 +            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  2.1138          </javadoc>
  2.1139 +        <copy todir="${dist.javadoc.dir}">
  2.1140 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  2.1141 +                <filename name="**/doc-files/**"/>
  2.1142 +            </fileset>
  2.1143 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  2.1144 +                <include name="**/doc-files/**"/>
  2.1145 +            </fileset>
  2.1146 +        </copy>
  2.1147      </target>
  2.1148      <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  2.1149          <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  2.1150 @@ -482,7 +1220,7 @@
  2.1151      <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  2.1152      <!--
  2.1153                  =========================
  2.1154 -                JUNIT COMPILATION SECTION
  2.1155 +                TEST COMPILATION SECTION
  2.1156                  =========================
  2.1157              -->
  2.1158      <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  2.1159 @@ -495,8 +1233,8 @@
  2.1160      <target if="do.depend.true" name="-compile-test-depend">
  2.1161          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  2.1162      </target>
  2.1163 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  2.1164 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  2.1165 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  2.1166 +        <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.1167          <copy todir="${build.test.classes.dir}">
  2.1168              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  2.1169          </copy>
  2.1170 @@ -510,10 +1248,10 @@
  2.1171          <!-- Empty placeholder for easier customization. -->
  2.1172          <!-- You can override this target in the ../build.xml file. -->
  2.1173      </target>
  2.1174 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  2.1175 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  2.1176          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  2.1177          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  2.1178 -        <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.1179 +        <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.1180          <copy todir="${build.test.classes.dir}">
  2.1181              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  2.1182          </copy>
  2.1183 @@ -525,17 +1263,17 @@
  2.1184      <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.1185      <!--
  2.1186                  =======================
  2.1187 -                JUNIT EXECUTION SECTION
  2.1188 +                TEST EXECUTION SECTION
  2.1189                  =======================
  2.1190              -->
  2.1191      <target depends="init" if="have.tests" name="-pre-test-run">
  2.1192          <mkdir dir="${build.test.results.dir}"/>
  2.1193      </target>
  2.1194      <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  2.1195 -        <j2seproject3:junit testincludes="**/*Test.java"/>
  2.1196 +        <j2seproject3:test testincludes="**/*Test.java"/>
  2.1197      </target>
  2.1198      <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  2.1199 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  2.1200 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  2.1201      </target>
  2.1202      <target depends="init" if="have.tests" name="test-report"/>
  2.1203      <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  2.1204 @@ -545,39 +1283,40 @@
  2.1205      </target>
  2.1206      <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  2.1207          <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  2.1208 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
  2.1209 +        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  2.1210      </target>
  2.1211      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  2.1212 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  2.1213 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  2.1214      </target>
  2.1215 -    <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.1216 +    <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.1217 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  2.1218 +        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  2.1219 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  2.1220 +        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  2.1221 +    </target>
  2.1222 +    <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.1223 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  2.1224 +    </target>
  2.1225 +    <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.1226      <!--
  2.1227                  =======================
  2.1228 -                JUNIT DEBUGGING SECTION
  2.1229 +                TEST DEBUGGING SECTION
  2.1230                  =======================
  2.1231              -->
  2.1232 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  2.1233 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  2.1234          <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  2.1235 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  2.1236 -        <delete file="${test.report.file}"/>
  2.1237 -        <mkdir dir="${build.test.results.dir}"/>
  2.1238 -        <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.1239 -            <customize>
  2.1240 -                <syspropertyset>
  2.1241 -                    <propertyref prefix="test-sys-prop."/>
  2.1242 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
  2.1243 -                </syspropertyset>
  2.1244 -                <arg value="${test.class}"/>
  2.1245 -                <arg value="showoutput=true"/>
  2.1246 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  2.1247 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  2.1248 -            </customize>
  2.1249 -        </j2seproject3:debug>
  2.1250 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  2.1251 +    </target>
  2.1252 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  2.1253 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  2.1254 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  2.1255 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  2.1256      </target>
  2.1257      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  2.1258          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  2.1259      </target>
  2.1260 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  2.1261 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  2.1262 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  2.1263      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  2.1264          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  2.1265      </target>
  2.1266 @@ -614,14 +1353,48 @@
  2.1267                  CLEANUP SECTION
  2.1268                  ===============
  2.1269              -->
  2.1270 -    <target depends="init" name="deps-clean" unless="no.deps"/>
  2.1271 +    <target name="-deps-clean-init" unless="built-clean.properties">
  2.1272 +        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  2.1273 +        <delete file="${built-clean.properties}" quiet="true"/>
  2.1274 +    </target>
  2.1275 +    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  2.1276 +        <echo level="warn" message="Cycle detected: individualsamples was already built"/>
  2.1277 +    </target>
  2.1278 +    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  2.1279 +        <mkdir dir="${build.dir}"/>
  2.1280 +        <touch file="${built-clean.properties}" verbose="false"/>
  2.1281 +        <property file="${built-clean.properties}" prefix="already.built.clean."/>
  2.1282 +        <antcall target="-warn-already-built-clean"/>
  2.1283 +        <propertyfile file="${built-clean.properties}">
  2.1284 +            <entry key="${basedir}" value=""/>
  2.1285 +        </propertyfile>
  2.1286 +    </target>
  2.1287      <target depends="init" name="-do-clean">
  2.1288          <delete dir="${build.dir}"/>
  2.1289 -        <delete dir="${dist.dir}"/>
  2.1290 +        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  2.1291      </target>
  2.1292      <target name="-post-clean">
  2.1293          <!-- Empty placeholder for easier customization. -->
  2.1294          <!-- You can override this target in the ../build.xml file. -->
  2.1295      </target>
  2.1296      <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  2.1297 +    <target name="-check-call-dep">
  2.1298 +        <property file="${call.built.properties}" prefix="already.built."/>
  2.1299 +        <condition property="should.call.dep">
  2.1300 +            <and>
  2.1301 +                <not>
  2.1302 +                    <isset property="already.built.${call.subproject}"/>
  2.1303 +                </not>
  2.1304 +                <available file="${call.script}"/>
  2.1305 +            </and>
  2.1306 +        </condition>
  2.1307 +    </target>
  2.1308 +    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  2.1309 +        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  2.1310 +            <propertyset>
  2.1311 +                <propertyref prefix="transfer."/>
  2.1312 +                <mapper from="transfer.*" to="*" type="glob"/>
  2.1313 +            </propertyset>
  2.1314 +        </ant>
  2.1315 +    </target>
  2.1316  </project>
     3.1 --- a/samples/individualsamples/nbproject/genfiles.properties	Wed Aug 08 22:35:26 2012 +0200
     3.2 +++ b/samples/individualsamples/nbproject/genfiles.properties	Wed Aug 08 22:42:33 2012 +0200
     3.3 @@ -1,8 +1,8 @@
     3.4  build.xml.data.CRC32=b3e64e2a
     3.5 -build.xml.script.CRC32=fc7f81ad
     3.6 -build.xml.stylesheet.CRC32=be360661
     3.7 +build.xml.script.CRC32=33aaef08
     3.8 +build.xml.stylesheet.CRC32=28e38971@1.54.0.46
     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=b3e64e2a
    3.12 -nbproject/build-impl.xml.script.CRC32=330c4cd3
    3.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
    3.14 +nbproject/build-impl.xml.script.CRC32=8d71c369
    3.15 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46
     4.1 --- a/samples/individualsamples/nbproject/project.properties	Wed Aug 08 22:35:26 2012 +0200
     4.2 +++ b/samples/individualsamples/nbproject/project.properties	Wed Aug 08 22:42:33 2012 +0200
     4.3 @@ -5,6 +5,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/individualsamples/src/org/apidesign/samples/XMMS.java	Wed Aug 08 22:35:26 2012 +0200
     5.2 +++ b/samples/individualsamples/src/org/apidesign/samples/XMMS.java	Wed Aug 08 22:42:33 2012 +0200
     5.3 @@ -1,6 +1,9 @@
     5.4  package org.apidesign.samples;
     5.5  
     5.6  // BEGIN: xmms.java.api.ext
     5.7 +
     5.8 +import org.apidesign.samples.XMMS.Playback.Volume;
     5.9 +
    5.10  // BEGIN: xmms.java.api
    5.11  public final class XMMS {
    5.12      public void play() { 
    5.13 @@ -47,8 +50,8 @@
    5.14      }
    5.15      // BEGIN: xmms.java.spi.instanceof
    5.16      private void doSetVolume(int volume) {
    5.17 -        if (callback instanceof Playback.Volume) {
    5.18 -            Playback.Volume pv = (Playback.Volume) callback;
    5.19 +        if (callback instanceof Volume) {
    5.20 +            Volume pv = (Volume) callback;
    5.21              pv.setVolume(volume);
    5.22          }
    5.23      }