samples/aserverinfo/nbproject/build-impl.xml
changeset 409 40cabcdcd2be
parent 338 2ed9d213455e
child 413 f11943a373a7
     1.1 --- a/samples/aserverinfo/nbproject/build-impl.xml	Tue Aug 25 12:39:59 2009 +0200
     1.2 +++ b/samples/aserverinfo/nbproject/build-impl.xml	Thu Oct 30 21:30:10 2014 +0100
     1.3 @@ -12,14 +12,21 @@
     1.4    - execution
     1.5    - debugging
     1.6    - javadoc
     1.7 -  - junit compilation
     1.8 -  - junit execution
     1.9 -  - junit debugging
    1.10 +  - test compilation
    1.11 +  - test execution
    1.12 +  - test debugging
    1.13    - applet
    1.14    - cleanup
    1.15  
    1.16          -->
    1.17  <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="aserverinfo-impl">
    1.18 +    <fail message="Please build using Ant 1.8.0 or higher.">
    1.19 +        <condition>
    1.20 +            <not>
    1.21 +                <antversion atleast="1.8.0"/>
    1.22 +            </not>
    1.23 +        </condition>
    1.24 +    </fail>
    1.25      <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    1.26      <!-- 
    1.27                  ======================
    1.28 @@ -47,20 +54,70 @@
    1.29          <property file="nbproject/project.properties"/>
    1.30      </target>
    1.31      <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    1.32 +        <property name="platform.java" value="${java.home}/bin/java"/>
    1.33          <available file="${manifest.file}" property="manifest.available"/>
    1.34 -        <condition property="manifest.available+main.class">
    1.35 +        <condition property="splashscreen.available">
    1.36              <and>
    1.37 -                <isset property="manifest.available"/>
    1.38 +                <not>
    1.39 +                    <equals arg1="${application.splash}" arg2="" trim="true"/>
    1.40 +                </not>
    1.41 +                <available file="${application.splash}"/>
    1.42 +            </and>
    1.43 +        </condition>
    1.44 +        <condition property="main.class.available">
    1.45 +            <and>
    1.46                  <isset property="main.class"/>
    1.47                  <not>
    1.48                      <equals arg1="${main.class}" arg2="" trim="true"/>
    1.49                  </not>
    1.50              </and>
    1.51          </condition>
    1.52 -        <condition property="manifest.available+main.class+mkdist.available">
    1.53 +        <condition property="profile.available">
    1.54              <and>
    1.55 -                <istrue value="${manifest.available+main.class}"/>
    1.56 +                <isset property="javac.profile"/>
    1.57 +                <length length="0" string="${javac.profile}" when="greater"/>
    1.58 +                <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
    1.59 +            </and>
    1.60 +        </condition>
    1.61 +        <condition property="do.archive">
    1.62 +            <or>
    1.63 +                <not>
    1.64 +                    <istrue value="${jar.archive.disabled}"/>
    1.65 +                </not>
    1.66 +                <istrue value="${not.archive.disabled}"/>
    1.67 +            </or>
    1.68 +        </condition>
    1.69 +        <condition property="do.mkdist">
    1.70 +            <and>
    1.71 +                <isset property="do.archive"/>
    1.72                  <isset property="libs.CopyLibs.classpath"/>
    1.73 +                <not>
    1.74 +                    <istrue value="${mkdist.disabled}"/>
    1.75 +                </not>
    1.76 +            </and>
    1.77 +        </condition>
    1.78 +        <condition property="do.archive+manifest.available">
    1.79 +            <and>
    1.80 +                <isset property="manifest.available"/>
    1.81 +                <istrue value="${do.archive}"/>
    1.82 +            </and>
    1.83 +        </condition>
    1.84 +        <condition property="do.archive+main.class.available">
    1.85 +            <and>
    1.86 +                <isset property="main.class.available"/>
    1.87 +                <istrue value="${do.archive}"/>
    1.88 +            </and>
    1.89 +        </condition>
    1.90 +        <condition property="do.archive+splashscreen.available">
    1.91 +            <and>
    1.92 +                <isset property="splashscreen.available"/>
    1.93 +                <istrue value="${do.archive}"/>
    1.94 +            </and>
    1.95 +        </condition>
    1.96 +        <condition property="do.archive+profile.available">
    1.97 +            <and>
    1.98 +                <isset property="profile.available"/>
    1.99 +                <istrue value="${do.archive}"/>
   1.100              </and>
   1.101          </condition>
   1.102          <condition property="have.tests">
   1.103 @@ -86,6 +143,7 @@
   1.104              </and>
   1.105          </condition>
   1.106          <property name="run.jvmargs" value=""/>
   1.107 +        <property name="run.jvmargs.ide" value=""/>
   1.108          <property name="javac.compilerargs" value=""/>
   1.109          <property name="work.dir" value="${basedir}"/>
   1.110          <condition property="no.deps">
   1.111 @@ -97,6 +155,7 @@
   1.112          <property name="javadoc.preview" value="true"/>
   1.113          <property name="application.args" value=""/>
   1.114          <property name="source.encoding" value="${file.encoding}"/>
   1.115 +        <property name="runtime.encoding" value="${source.encoding}"/>
   1.116          <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   1.117              <and>
   1.118                  <isset property="javadoc.encoding"/>
   1.119 @@ -112,12 +171,52 @@
   1.120          <condition property="do.depend.true">
   1.121              <istrue value="${do.depend}"/>
   1.122          </condition>
   1.123 -        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
   1.124 +        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   1.125 +        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   1.126              <and>
   1.127 -                <isset property="jaxws.endorsed.dir"/>
   1.128 -                <available file="nbproject/jaxws-build.xml"/>
   1.129 +                <isset property="endorsed.classpath"/>
   1.130 +                <not>
   1.131 +                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
   1.132 +                </not>
   1.133              </and>
   1.134          </condition>
   1.135 +        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
   1.136 +            <isset property="profile.available"/>
   1.137 +        </condition>
   1.138 +        <condition else="false" property="jdkBug6558476">
   1.139 +            <and>
   1.140 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
   1.141 +                <not>
   1.142 +                    <os family="unix"/>
   1.143 +                </not>
   1.144 +            </and>
   1.145 +        </condition>
   1.146 +        <property name="javac.fork" value="${jdkBug6558476}"/>
   1.147 +        <property name="jar.index" value="false"/>
   1.148 +        <property name="jar.index.metainf" value="${jar.index}"/>
   1.149 +        <property name="copylibs.rebase" value="true"/>
   1.150 +        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   1.151 +        <condition property="junit.available">
   1.152 +            <or>
   1.153 +                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
   1.154 +                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
   1.155 +            </or>
   1.156 +        </condition>
   1.157 +        <condition property="testng.available">
   1.158 +            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
   1.159 +        </condition>
   1.160 +        <condition property="junit+testng.available">
   1.161 +            <and>
   1.162 +                <istrue value="${junit.available}"/>
   1.163 +                <istrue value="${testng.available}"/>
   1.164 +            </and>
   1.165 +        </condition>
   1.166 +        <condition else="testng" property="testng.mode" value="mixed">
   1.167 +            <istrue value="${junit+testng.available}"/>
   1.168 +        </condition>
   1.169 +        <condition else="" property="testng.debug.mode" value="-mixed">
   1.170 +            <istrue value="${junit+testng.available}"/>
   1.171 +        </condition>
   1.172      </target>
   1.173      <target name="-post-init">
   1.174          <!-- Empty placeholder for easier customization. -->
   1.175 @@ -144,26 +243,81 @@
   1.176              </sequential>
   1.177          </macrodef>
   1.178      </target>
   1.179 -    <target name="-init-macrodef-javac">
   1.180 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   1.181          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.182              <attribute default="${src.dir}" name="srcdir"/>
   1.183              <attribute default="${build.classes.dir}" name="destdir"/>
   1.184              <attribute default="${javac.classpath}" name="classpath"/>
   1.185 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   1.186 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   1.187              <attribute default="${includes}" name="includes"/>
   1.188              <attribute default="${excludes}" name="excludes"/>
   1.189              <attribute default="${javac.debug}" name="debug"/>
   1.190 -            <attribute default="" name="sourcepath"/>
   1.191 +            <attribute default="${empty.dir}" name="sourcepath"/>
   1.192 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   1.193              <element name="customize" optional="true"/>
   1.194              <sequential>
   1.195 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
   1.196 +                <property location="${build.dir}/empty" name="empty.dir"/>
   1.197 +                <mkdir dir="${empty.dir}"/>
   1.198 +                <mkdir dir="@{apgeneratedsrcdir}"/>
   1.199 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   1.200 +                    <src>
   1.201 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   1.202 +                            <include name="*"/>
   1.203 +                        </dirset>
   1.204 +                    </src>
   1.205                      <classpath>
   1.206                          <path path="@{classpath}"/>
   1.207                      </classpath>
   1.208 -                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
   1.209 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.210 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   1.211 +                    <compilerarg line="${javac.compilerargs}"/>
   1.212 +                    <compilerarg value="-processorpath"/>
   1.213 +                    <compilerarg path="@{processorpath}:${empty.dir}"/>
   1.214 +                    <compilerarg line="${ap.processors.internal}"/>
   1.215 +                    <compilerarg line="${annotation.processing.processor.options}"/>
   1.216 +                    <compilerarg value="-s"/>
   1.217 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
   1.218 +                    <compilerarg line="${ap.proc.none.internal}"/>
   1.219                      <customize/>
   1.220                  </javac>
   1.221              </sequential>
   1.222          </macrodef>
   1.223 +    </target>
   1.224 +    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   1.225 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.226 +            <attribute default="${src.dir}" name="srcdir"/>
   1.227 +            <attribute default="${build.classes.dir}" name="destdir"/>
   1.228 +            <attribute default="${javac.classpath}" name="classpath"/>
   1.229 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   1.230 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   1.231 +            <attribute default="${includes}" name="includes"/>
   1.232 +            <attribute default="${excludes}" name="excludes"/>
   1.233 +            <attribute default="${javac.debug}" name="debug"/>
   1.234 +            <attribute default="${empty.dir}" name="sourcepath"/>
   1.235 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   1.236 +            <element name="customize" optional="true"/>
   1.237 +            <sequential>
   1.238 +                <property location="${build.dir}/empty" name="empty.dir"/>
   1.239 +                <mkdir dir="${empty.dir}"/>
   1.240 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
   1.241 +                    <src>
   1.242 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   1.243 +                            <include name="*"/>
   1.244 +                        </dirset>
   1.245 +                    </src>
   1.246 +                    <classpath>
   1.247 +                        <path path="@{classpath}"/>
   1.248 +                    </classpath>
   1.249 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.250 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   1.251 +                    <compilerarg line="${javac.compilerargs}"/>
   1.252 +                    <customize/>
   1.253 +                </javac>
   1.254 +            </sequential>
   1.255 +        </macrodef>
   1.256 +    </target>
   1.257 +    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   1.258          <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.259              <attribute default="${src.dir}" name="srcdir"/>
   1.260              <attribute default="${build.classes.dir}" name="destdir"/>
   1.261 @@ -180,44 +334,390 @@
   1.262              <attribute default="${build.classes.dir}" name="destdir"/>
   1.263              <sequential>
   1.264                  <fail unless="javac.includes">Must set javac.includes</fail>
   1.265 -                <pathconvert pathsep="," property="javac.includes.binary">
   1.266 +                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
   1.267                      <path>
   1.268                          <filelist dir="@{destdir}" files="${javac.includes}"/>
   1.269                      </path>
   1.270                      <globmapper from="*.java" to="*.class"/>
   1.271                  </pathconvert>
   1.272 +                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
   1.273 +                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
   1.274                  <delete>
   1.275 -                    <files includes="${javac.includes.binary}"/>
   1.276 +                    <files includesfile="${javac.includesfile.binary}"/>
   1.277 +                </delete>
   1.278 +                <delete>
   1.279 +                    <fileset file="${javac.includesfile.binary}"/>
   1.280                  </delete>
   1.281              </sequential>
   1.282          </macrodef>
   1.283      </target>
   1.284 -    <target name="-init-macrodef-junit">
   1.285 +    <target if="${junit.available}" name="-init-macrodef-junit-init">
   1.286 +        <condition else="false" property="nb.junit.batch" value="true">
   1.287 +            <and>
   1.288 +                <istrue value="${junit.available}"/>
   1.289 +                <not>
   1.290 +                    <isset property="test.method"/>
   1.291 +                </not>
   1.292 +            </and>
   1.293 +        </condition>
   1.294 +        <condition else="false" property="nb.junit.single" value="true">
   1.295 +            <and>
   1.296 +                <istrue value="${junit.available}"/>
   1.297 +                <isset property="test.method"/>
   1.298 +            </and>
   1.299 +        </condition>
   1.300 +    </target>
   1.301 +    <target name="-init-test-properties">
   1.302 +        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
   1.303 +        <property name="test.binarytestincludes" value=""/>
   1.304 +        <property name="test.binaryexcludes" value=""/>
   1.305 +    </target>
   1.306 +    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
   1.307          <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.308              <attribute default="${includes}" name="includes"/>
   1.309              <attribute default="${excludes}" name="excludes"/>
   1.310              <attribute default="**" name="testincludes"/>
   1.311 +            <attribute default="" name="testmethods"/>
   1.312 +            <element name="customize" optional="true"/>
   1.313              <sequential>
   1.314 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
   1.315 -                    <batchtest todir="${build.test.results.dir}">
   1.316 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.317 -                            <filename name="@{testincludes}"/>
   1.318 -                        </fileset>
   1.319 -                    </batchtest>
   1.320 -                    <classpath>
   1.321 -                        <path path="${run.test.classpath}"/>
   1.322 -                    </classpath>
   1.323 +                <property name="junit.forkmode" value="perTest"/>
   1.324 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.325 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   1.326                      <syspropertyset>
   1.327                          <propertyref prefix="test-sys-prop."/>
   1.328                          <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.329                      </syspropertyset>
   1.330                      <formatter type="brief" usefile="false"/>
   1.331                      <formatter type="xml"/>
   1.332 -                    <jvmarg line="${run.jvmargs}"/>
   1.333 +                    <jvmarg value="-ea"/>
   1.334 +                    <customize/>
   1.335                  </junit>
   1.336              </sequential>
   1.337          </macrodef>
   1.338      </target>
   1.339 +    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
   1.340 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.341 +            <attribute default="${includes}" name="includes"/>
   1.342 +            <attribute default="${excludes}" name="excludes"/>
   1.343 +            <attribute default="**" name="testincludes"/>
   1.344 +            <attribute default="" name="testmethods"/>
   1.345 +            <element name="customize" optional="true"/>
   1.346 +            <sequential>
   1.347 +                <property name="junit.forkmode" value="perTest"/>
   1.348 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.349 +                    <batchtest todir="${build.test.results.dir}">
   1.350 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.351 +                            <filename name="@{testincludes}"/>
   1.352 +                        </fileset>
   1.353 +                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   1.354 +                            <filename name="${test.binarytestincludes}"/>
   1.355 +                        </fileset>
   1.356 +                    </batchtest>
   1.357 +                    <syspropertyset>
   1.358 +                        <propertyref prefix="test-sys-prop."/>
   1.359 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.360 +                    </syspropertyset>
   1.361 +                    <formatter type="brief" usefile="false"/>
   1.362 +                    <formatter type="xml"/>
   1.363 +                    <jvmarg value="-ea"/>
   1.364 +                    <customize/>
   1.365 +                </junit>
   1.366 +            </sequential>
   1.367 +        </macrodef>
   1.368 +    </target>
   1.369 +    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
   1.370 +    <target if="${testng.available}" name="-init-macrodef-testng">
   1.371 +        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.372 +            <attribute default="${includes}" name="includes"/>
   1.373 +            <attribute default="${excludes}" name="excludes"/>
   1.374 +            <attribute default="**" name="testincludes"/>
   1.375 +            <attribute default="" name="testmethods"/>
   1.376 +            <element name="customize" optional="true"/>
   1.377 +            <sequential>
   1.378 +                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
   1.379 +                    <isset property="test.method"/>
   1.380 +                </condition>
   1.381 +                <union id="test.set">
   1.382 +                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
   1.383 +                        <filename name="@{testincludes}"/>
   1.384 +                    </fileset>
   1.385 +                </union>
   1.386 +                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
   1.387 +                <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="aserverinfo" testname="TestNG tests" workingDir="${work.dir}">
   1.388 +                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
   1.389 +                    <propertyset>
   1.390 +                        <propertyref prefix="test-sys-prop."/>
   1.391 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.392 +                    </propertyset>
   1.393 +                    <customize/>
   1.394 +                </testng>
   1.395 +            </sequential>
   1.396 +        </macrodef>
   1.397 +    </target>
   1.398 +    <target name="-init-macrodef-test-impl">
   1.399 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.400 +            <attribute default="${includes}" name="includes"/>
   1.401 +            <attribute default="${excludes}" name="excludes"/>
   1.402 +            <attribute default="**" name="testincludes"/>
   1.403 +            <attribute default="" name="testmethods"/>
   1.404 +            <element implicit="true" name="customize" optional="true"/>
   1.405 +            <sequential>
   1.406 +                <echo>No tests executed.</echo>
   1.407 +            </sequential>
   1.408 +        </macrodef>
   1.409 +    </target>
   1.410 +    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
   1.411 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.412 +            <attribute default="${includes}" name="includes"/>
   1.413 +            <attribute default="${excludes}" name="excludes"/>
   1.414 +            <attribute default="**" name="testincludes"/>
   1.415 +            <attribute default="" name="testmethods"/>
   1.416 +            <element implicit="true" name="customize" optional="true"/>
   1.417 +            <sequential>
   1.418 +                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.419 +                    <customize/>
   1.420 +                </j2seproject3:junit>
   1.421 +            </sequential>
   1.422 +        </macrodef>
   1.423 +    </target>
   1.424 +    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
   1.425 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.426 +            <attribute default="${includes}" name="includes"/>
   1.427 +            <attribute default="${excludes}" name="excludes"/>
   1.428 +            <attribute default="**" name="testincludes"/>
   1.429 +            <attribute default="" name="testmethods"/>
   1.430 +            <element implicit="true" name="customize" optional="true"/>
   1.431 +            <sequential>
   1.432 +                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.433 +                    <customize/>
   1.434 +                </j2seproject3:testng>
   1.435 +            </sequential>
   1.436 +        </macrodef>
   1.437 +    </target>
   1.438 +    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
   1.439 +        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.440 +            <attribute default="${includes}" name="includes"/>
   1.441 +            <attribute default="${excludes}" name="excludes"/>
   1.442 +            <attribute default="**" name="testincludes"/>
   1.443 +            <attribute default="" name="testmethods"/>
   1.444 +            <sequential>
   1.445 +                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.446 +                    <customize>
   1.447 +                        <classpath>
   1.448 +                            <path path="${run.test.classpath}"/>
   1.449 +                        </classpath>
   1.450 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.451 +                        <jvmarg line="${run.jvmargs}"/>
   1.452 +                        <jvmarg line="${run.jvmargs.ide}"/>
   1.453 +                    </customize>
   1.454 +                </j2seproject3:test-impl>
   1.455 +            </sequential>
   1.456 +        </macrodef>
   1.457 +    </target>
   1.458 +    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
   1.459 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.460 +            <attribute default="${includes}" name="includes"/>
   1.461 +            <attribute default="${excludes}" name="excludes"/>
   1.462 +            <attribute default="**" name="testincludes"/>
   1.463 +            <attribute default="" name="testmethods"/>
   1.464 +            <element name="customize" optional="true"/>
   1.465 +            <sequential>
   1.466 +                <property name="junit.forkmode" value="perTest"/>
   1.467 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.468 +                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   1.469 +                    <syspropertyset>
   1.470 +                        <propertyref prefix="test-sys-prop."/>
   1.471 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.472 +                    </syspropertyset>
   1.473 +                    <formatter type="brief" usefile="false"/>
   1.474 +                    <formatter type="xml"/>
   1.475 +                    <jvmarg value="-ea"/>
   1.476 +                    <jvmarg line="${debug-args-line}"/>
   1.477 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.478 +                    <customize/>
   1.479 +                </junit>
   1.480 +            </sequential>
   1.481 +        </macrodef>
   1.482 +    </target>
   1.483 +    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
   1.484 +        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.485 +            <attribute default="${includes}" name="includes"/>
   1.486 +            <attribute default="${excludes}" name="excludes"/>
   1.487 +            <attribute default="**" name="testincludes"/>
   1.488 +            <attribute default="" name="testmethods"/>
   1.489 +            <element name="customize" optional="true"/>
   1.490 +            <sequential>
   1.491 +                <property name="junit.forkmode" value="perTest"/>
   1.492 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.493 +                    <batchtest todir="${build.test.results.dir}">
   1.494 +                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.495 +                            <filename name="@{testincludes}"/>
   1.496 +                        </fileset>
   1.497 +                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   1.498 +                            <filename name="${test.binarytestincludes}"/>
   1.499 +                        </fileset>
   1.500 +                    </batchtest>
   1.501 +                    <syspropertyset>
   1.502 +                        <propertyref prefix="test-sys-prop."/>
   1.503 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.504 +                    </syspropertyset>
   1.505 +                    <formatter type="brief" usefile="false"/>
   1.506 +                    <formatter type="xml"/>
   1.507 +                    <jvmarg value="-ea"/>
   1.508 +                    <jvmarg line="${debug-args-line}"/>
   1.509 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.510 +                    <customize/>
   1.511 +                </junit>
   1.512 +            </sequential>
   1.513 +        </macrodef>
   1.514 +    </target>
   1.515 +    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
   1.516 +        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.517 +            <attribute default="${includes}" name="includes"/>
   1.518 +            <attribute default="${excludes}" name="excludes"/>
   1.519 +            <attribute default="**" name="testincludes"/>
   1.520 +            <attribute default="" name="testmethods"/>
   1.521 +            <element implicit="true" name="customize" optional="true"/>
   1.522 +            <sequential>
   1.523 +                <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.524 +                    <customize/>
   1.525 +                </j2seproject3:junit-debug>
   1.526 +            </sequential>
   1.527 +        </macrodef>
   1.528 +    </target>
   1.529 +    <target if="${testng.available}" name="-init-macrodef-testng-debug">
   1.530 +        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.531 +            <attribute default="${main.class}" name="testClass"/>
   1.532 +            <attribute default="" name="testMethod"/>
   1.533 +            <element name="customize2" optional="true"/>
   1.534 +            <sequential>
   1.535 +                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
   1.536 +                    <isset property="test.method"/>
   1.537 +                </condition>
   1.538 +                <condition else="-suitename aserverinfo -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
   1.539 +                    <matches pattern=".*\.xml" string="@{testClass}"/>
   1.540 +                </condition>
   1.541 +                <delete dir="${build.test.results.dir}" quiet="true"/>
   1.542 +                <mkdir dir="${build.test.results.dir}"/>
   1.543 +                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
   1.544 +                    <customize>
   1.545 +                        <customize2/>
   1.546 +                        <jvmarg value="-ea"/>
   1.547 +                        <arg line="${testng.debug.mode}"/>
   1.548 +                        <arg line="-d ${build.test.results.dir}"/>
   1.549 +                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
   1.550 +                        <arg line="${testng.cmd.args}"/>
   1.551 +                    </customize>
   1.552 +                </j2seproject3:debug>
   1.553 +            </sequential>
   1.554 +        </macrodef>
   1.555 +    </target>
   1.556 +    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
   1.557 +        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.558 +            <attribute default="${main.class}" name="testClass"/>
   1.559 +            <attribute default="" name="testMethod"/>
   1.560 +            <element implicit="true" name="customize2" optional="true"/>
   1.561 +            <sequential>
   1.562 +                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
   1.563 +                    <customize2/>
   1.564 +                </j2seproject3:testng-debug>
   1.565 +            </sequential>
   1.566 +        </macrodef>
   1.567 +    </target>
   1.568 +    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
   1.569 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.570 +            <attribute default="${includes}" name="includes"/>
   1.571 +            <attribute default="${excludes}" name="excludes"/>
   1.572 +            <attribute default="**" name="testincludes"/>
   1.573 +            <attribute default="" name="testmethods"/>
   1.574 +            <attribute default="${main.class}" name="testClass"/>
   1.575 +            <attribute default="" name="testMethod"/>
   1.576 +            <sequential>
   1.577 +                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.578 +                    <customize>
   1.579 +                        <classpath>
   1.580 +                            <path path="${run.test.classpath}"/>
   1.581 +                        </classpath>
   1.582 +                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.583 +                        <jvmarg line="${run.jvmargs}"/>
   1.584 +                        <jvmarg line="${run.jvmargs.ide}"/>
   1.585 +                    </customize>
   1.586 +                </j2seproject3:test-debug-impl>
   1.587 +            </sequential>
   1.588 +        </macrodef>
   1.589 +    </target>
   1.590 +    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
   1.591 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.592 +            <attribute default="${includes}" name="includes"/>
   1.593 +            <attribute default="${excludes}" name="excludes"/>
   1.594 +            <attribute default="**" name="testincludes"/>
   1.595 +            <attribute default="" name="testmethods"/>
   1.596 +            <attribute default="${main.class}" name="testClass"/>
   1.597 +            <attribute default="" name="testMethod"/>
   1.598 +            <sequential>
   1.599 +                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
   1.600 +                    <customize2>
   1.601 +                        <syspropertyset>
   1.602 +                            <propertyref prefix="test-sys-prop."/>
   1.603 +                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.604 +                        </syspropertyset>
   1.605 +                    </customize2>
   1.606 +                </j2seproject3:testng-debug-impl>
   1.607 +            </sequential>
   1.608 +        </macrodef>
   1.609 +    </target>
   1.610 +    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
   1.611 +    <!--
   1.612 +                pre NB7.2 profiling section; consider it deprecated
   1.613 +            -->
   1.614 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
   1.615 +    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
   1.616 +        <!-- Empty placeholder for easier customization. -->
   1.617 +        <!-- You can override this target in the ../build.xml file. -->
   1.618 +    </target>
   1.619 +    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
   1.620 +        <!-- Empty placeholder for easier customization. -->
   1.621 +        <!-- You can override this target in the ../build.xml file. -->
   1.622 +    </target>
   1.623 +    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
   1.624 +        <macrodef name="resolve">
   1.625 +            <attribute name="name"/>
   1.626 +            <attribute name="value"/>
   1.627 +            <sequential>
   1.628 +                <property name="@{name}" value="${env.@{value}}"/>
   1.629 +            </sequential>
   1.630 +        </macrodef>
   1.631 +        <macrodef name="profile">
   1.632 +            <attribute default="${main.class}" name="classname"/>
   1.633 +            <element name="customize" optional="true"/>
   1.634 +            <sequential>
   1.635 +                <property environment="env"/>
   1.636 +                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   1.637 +                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   1.638 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.639 +                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
   1.640 +                    <jvmarg line="${profiler.info.jvmargs}"/>
   1.641 +                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   1.642 +                    <arg line="${application.args}"/>
   1.643 +                    <classpath>
   1.644 +                        <path path="${run.classpath}"/>
   1.645 +                    </classpath>
   1.646 +                    <syspropertyset>
   1.647 +                        <propertyref prefix="run-sys-prop."/>
   1.648 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.649 +                    </syspropertyset>
   1.650 +                    <customize/>
   1.651 +                </java>
   1.652 +            </sequential>
   1.653 +        </macrodef>
   1.654 +    </target>
   1.655 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
   1.656 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   1.657 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   1.658 +    </target>
   1.659 +    <!--
   1.660 +                end of pre NB7.2 profiling section
   1.661 +            -->
   1.662      <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   1.663          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.664              <attribute default="${main.class}" name="name"/>
   1.665 @@ -269,9 +769,13 @@
   1.666              <element name="customize" optional="true"/>
   1.667              <sequential>
   1.668                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   1.669 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.670                      <jvmarg line="${debug-args-line}"/>
   1.671                      <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.672 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.673 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.674                      <jvmarg line="${run.jvmargs}"/>
   1.675 +                    <jvmarg line="${run.jvmargs.ide}"/>
   1.676                      <classpath>
   1.677                          <path path="@{classpath}"/>
   1.678                      </classpath>
   1.679 @@ -288,10 +792,15 @@
   1.680          <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.681              <attribute default="${main.class}" name="classname"/>
   1.682              <attribute default="${run.classpath}" name="classpath"/>
   1.683 +            <attribute default="jvm" name="jvm"/>
   1.684              <element name="customize" optional="true"/>
   1.685              <sequential>
   1.686                  <java classname="@{classname}" dir="${work.dir}" fork="true">
   1.687 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.688 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.689 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.690                      <jvmarg line="${run.jvmargs}"/>
   1.691 +                    <jvmarg line="${run.jvmargs.ide}"/>
   1.692                      <classpath>
   1.693                          <path path="@{classpath}"/>
   1.694                      </classpath>
   1.695 @@ -304,20 +813,90 @@
   1.696              </sequential>
   1.697          </macrodef>
   1.698      </target>
   1.699 +    <target name="-init-macrodef-copylibs">
   1.700 +        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.701 +            <attribute default="${manifest.file}" name="manifest"/>
   1.702 +            <element name="customize" optional="true"/>
   1.703 +            <sequential>
   1.704 +                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   1.705 +                <pathconvert property="run.classpath.without.build.classes.dir">
   1.706 +                    <path path="${run.classpath}"/>
   1.707 +                    <map from="${build.classes.dir.resolved}" to=""/>
   1.708 +                </pathconvert>
   1.709 +                <pathconvert pathsep=" " property="jar.classpath">
   1.710 +                    <path path="${run.classpath.without.build.classes.dir}"/>
   1.711 +                    <chainedmapper>
   1.712 +                        <flattenmapper/>
   1.713 +                        <filtermapper>
   1.714 +                            <replacestring from=" " to="%20"/>
   1.715 +                        </filtermapper>
   1.716 +                        <globmapper from="*" to="lib/*"/>
   1.717 +                    </chainedmapper>
   1.718 +                </pathconvert>
   1.719 +                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   1.720 +                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   1.721 +                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   1.722 +                    <manifest>
   1.723 +                        <attribute name="Class-Path" value="${jar.classpath}"/>
   1.724 +                        <customize/>
   1.725 +                    </manifest>
   1.726 +                </copylibs>
   1.727 +            </sequential>
   1.728 +        </macrodef>
   1.729 +    </target>
   1.730      <target name="-init-presetdef-jar">
   1.731          <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.732 -            <jar compress="${jar.compress}" jarfile="${dist.jar}">
   1.733 -                <j2seproject1:fileset dir="${build.classes.dir}"/>
   1.734 +            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   1.735 +                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   1.736              </jar>
   1.737          </presetdef>
   1.738      </target>
   1.739 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
   1.740 +    <target name="-init-ap-cmdline-properties">
   1.741 +        <property name="annotation.processing.enabled" value="true"/>
   1.742 +        <property name="annotation.processing.processors.list" value=""/>
   1.743 +        <property name="annotation.processing.processor.options" value=""/>
   1.744 +        <property name="annotation.processing.run.all.processors" value="true"/>
   1.745 +        <property name="javac.processorpath" value="${javac.classpath}"/>
   1.746 +        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   1.747 +        <condition property="ap.supported.internal" value="true">
   1.748 +            <not>
   1.749 +                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   1.750 +            </not>
   1.751 +        </condition>
   1.752 +    </target>
   1.753 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   1.754 +        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   1.755 +            <isfalse value="${annotation.processing.run.all.processors}"/>
   1.756 +        </condition>
   1.757 +        <condition else="" property="ap.proc.none.internal" value="-proc:none">
   1.758 +            <isfalse value="${annotation.processing.enabled}"/>
   1.759 +        </condition>
   1.760 +    </target>
   1.761 +    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   1.762 +        <property name="ap.cmd.line.internal" value=""/>
   1.763 +    </target>
   1.764 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
   1.765      <!--
   1.766                  ===================
   1.767                  COMPILATION SECTION
   1.768                  ===================
   1.769              -->
   1.770 -    <target depends="init" name="deps-jar" unless="no.deps"/>
   1.771 +    <target name="-deps-jar-init" unless="built-jar.properties">
   1.772 +        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
   1.773 +        <delete file="${built-jar.properties}" quiet="true"/>
   1.774 +    </target>
   1.775 +    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
   1.776 +        <echo level="warn" message="Cycle detected: aserverinfo was already built"/>
   1.777 +    </target>
   1.778 +    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
   1.779 +        <mkdir dir="${build.dir}"/>
   1.780 +        <touch file="${built-jar.properties}" verbose="false"/>
   1.781 +        <property file="${built-jar.properties}" prefix="already.built.jar."/>
   1.782 +        <antcall target="-warn-already-built-jar"/>
   1.783 +        <propertyfile file="${built-jar.properties}">
   1.784 +            <entry key="${basedir}" value=""/>
   1.785 +        </propertyfile>
   1.786 +    </target>
   1.787      <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
   1.788      <target depends="init" name="-check-automatic-build">
   1.789          <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   1.790 @@ -333,14 +912,25 @@
   1.791          <!-- You can override this target in the ../build.xml file. -->
   1.792      </target>
   1.793      <target if="do.depend.true" name="-compile-depend">
   1.794 -        <j2seproject3:depend/>
   1.795 +        <pathconvert property="build.generated.subdirs">
   1.796 +            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
   1.797 +                <include name="*"/>
   1.798 +            </dirset>
   1.799 +        </pathconvert>
   1.800 +        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
   1.801      </target>
   1.802 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
   1.803 -        <j2seproject3:javac/>
   1.804 +    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
   1.805 +        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
   1.806          <copy todir="${build.classes.dir}">
   1.807              <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.808          </copy>
   1.809      </target>
   1.810 +    <target if="has.persistence.xml" name="-copy-persistence-xml">
   1.811 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   1.812 +        <copy todir="${build.classes.dir}/META-INF">
   1.813 +            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
   1.814 +        </copy>
   1.815 +    </target>
   1.816      <target name="-post-compile">
   1.817          <!-- Empty placeholder for easier customization. -->
   1.818          <!-- You can override this target in the ../build.xml file. -->
   1.819 @@ -353,7 +943,7 @@
   1.820      <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   1.821          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   1.822          <j2seproject3:force-recompile/>
   1.823 -        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
   1.824 +        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   1.825      </target>
   1.826      <target name="-post-compile-single">
   1.827          <!-- Empty placeholder for easier customization. -->
   1.828 @@ -373,57 +963,67 @@
   1.829          <!-- Empty placeholder for easier customization. -->
   1.830          <!-- You can override this target in the ../build.xml file. -->
   1.831      </target>
   1.832 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
   1.833 -        <j2seproject1:jar/>
   1.834 +    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
   1.835 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   1.836 +        <touch file="${tmp.manifest.file}" verbose="false"/>
   1.837      </target>
   1.838 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
   1.839 -        <j2seproject1:jar manifest="${manifest.file}"/>
   1.840 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
   1.841 +        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
   1.842 +        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
   1.843      </target>
   1.844 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
   1.845 -        <j2seproject1:jar manifest="${manifest.file}">
   1.846 -            <j2seproject1:manifest>
   1.847 -                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   1.848 -            </j2seproject1:manifest>
   1.849 -        </j2seproject1:jar>
   1.850 -        <echo>To run this application from the command line without Ant, try:</echo>
   1.851 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
   1.852 +        <manifest file="${tmp.manifest.file}" mode="update">
   1.853 +            <attribute name="Main-Class" value="${main.class}"/>
   1.854 +        </manifest>
   1.855 +    </target>
   1.856 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
   1.857 +        <manifest file="${tmp.manifest.file}" mode="update">
   1.858 +            <attribute name="Profile" value="${javac.profile}"/>
   1.859 +        </manifest>
   1.860 +    </target>
   1.861 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
   1.862 +        <basename file="${application.splash}" property="splashscreen.basename"/>
   1.863 +        <mkdir dir="${build.classes.dir}/META-INF"/>
   1.864 +        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
   1.865 +        <manifest file="${tmp.manifest.file}" mode="update">
   1.866 +            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
   1.867 +        </manifest>
   1.868 +    </target>
   1.869 +    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
   1.870 +        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
   1.871 +        <echo level="info">To run this application from the command line without Ant, try:</echo>
   1.872 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
   1.873 +        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
   1.874 +    </target>
   1.875 +    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
   1.876 +        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
   1.877          <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   1.878          <property location="${dist.jar}" name="dist.jar.resolved"/>
   1.879          <pathconvert property="run.classpath.with.dist.jar">
   1.880              <path path="${run.classpath}"/>
   1.881              <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
   1.882          </pathconvert>
   1.883 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
   1.884 +        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
   1.885 +            <isset property="main.class.available"/>
   1.886 +        </condition>
   1.887 +        <condition else="debug" property="jar.usage.level" value="info">
   1.888 +            <isset property="main.class.available"/>
   1.889 +        </condition>
   1.890 +        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
   1.891      </target>
   1.892 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
   1.893 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
   1.894 -        <pathconvert property="run.classpath.without.build.classes.dir">
   1.895 -            <path path="${run.classpath}"/>
   1.896 -            <map from="${build.classes.dir.resolved}" to=""/>
   1.897 -        </pathconvert>
   1.898 -        <pathconvert pathsep=" " property="jar.classpath">
   1.899 -            <path path="${run.classpath.without.build.classes.dir}"/>
   1.900 -            <chainedmapper>
   1.901 -                <flattenmapper/>
   1.902 -                <globmapper from="*" to="lib/*"/>
   1.903 -            </chainedmapper>
   1.904 -        </pathconvert>
   1.905 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   1.906 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   1.907 -            <fileset dir="${build.classes.dir}"/>
   1.908 -            <manifest>
   1.909 -                <attribute name="Main-Class" value="${main.class}"/>
   1.910 -                <attribute name="Class-Path" value="${jar.classpath}"/>
   1.911 -            </manifest>
   1.912 -        </copylibs>
   1.913 -        <echo>To run this application from the command line without Ant, try:</echo>
   1.914 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
   1.915 -        <echo>java -jar "${dist.jar.resolved}"</echo>
   1.916 +    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
   1.917 +        <delete>
   1.918 +            <fileset file="${tmp.manifest.file}"/>
   1.919 +        </delete>
   1.920      </target>
   1.921 +    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
   1.922 +    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
   1.923      <target name="-post-jar">
   1.924          <!-- Empty placeholder for easier customization. -->
   1.925          <!-- You can override this target in the ../build.xml file. -->
   1.926      </target>
   1.927 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
   1.928 +    <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
   1.929 +    <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
   1.930      <!--
   1.931                  =================
   1.932                  EXECUTION SECTION
   1.933 @@ -439,11 +1039,11 @@
   1.934      <target name="-do-not-recompile">
   1.935          <property name="javac.includes.binary" value=""/>
   1.936      </target>
   1.937 -    <target depends="init,-do-not-recompile,compile-single" name="run-single">
   1.938 +    <target depends="init,compile-single" name="run-single">
   1.939          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.940          <j2seproject1:java classname="${run.class}"/>
   1.941      </target>
   1.942 -    <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
   1.943 +    <target depends="init,compile-test-single" name="run-test-with-main">
   1.944          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
   1.945          <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
   1.946      </target>
   1.947 @@ -474,12 +1074,12 @@
   1.948          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.949          <j2seproject3:debug classname="${debug.class}"/>
   1.950      </target>
   1.951 -    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   1.952 +    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
   1.953      <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
   1.954          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
   1.955          <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
   1.956      </target>
   1.957 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   1.958 +    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
   1.959      <target depends="init" name="-pre-debug-fix">
   1.960          <fail unless="fix.includes">Must set fix.includes</fail>
   1.961          <property name="javac.includes" value="${fix.includes}.java"/>
   1.962 @@ -489,20 +1089,143 @@
   1.963      </target>
   1.964      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   1.965      <!--
   1.966 +                =================
   1.967 +                PROFILING SECTION
   1.968 +                =================
   1.969 +            -->
   1.970 +    <!--
   1.971 +                pre NB7.2 profiler integration
   1.972 +            -->
   1.973 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
   1.974 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   1.975 +        <nbprofiledirect>
   1.976 +            <classpath>
   1.977 +                <path path="${run.classpath}"/>
   1.978 +            </classpath>
   1.979 +        </nbprofiledirect>
   1.980 +        <profile/>
   1.981 +    </target>
   1.982 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
   1.983 +        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
   1.984 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   1.985 +        <nbprofiledirect>
   1.986 +            <classpath>
   1.987 +                <path path="${run.classpath}"/>
   1.988 +            </classpath>
   1.989 +        </nbprofiledirect>
   1.990 +        <profile classname="${profile.class}"/>
   1.991 +    </target>
   1.992 +    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
   1.993 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
   1.994 +        <nbprofiledirect>
   1.995 +            <classpath>
   1.996 +                <path path="${run.classpath}"/>
   1.997 +            </classpath>
   1.998 +        </nbprofiledirect>
   1.999 +        <profile classname="sun.applet.AppletViewer">
  1.1000 +            <customize>
  1.1001 +                <arg value="${applet.url}"/>
  1.1002 +            </customize>
  1.1003 +        </profile>
  1.1004 +    </target>
  1.1005 +    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  1.1006 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1.1007 +        <nbprofiledirect>
  1.1008 +            <classpath>
  1.1009 +                <path path="${run.test.classpath}"/>
  1.1010 +            </classpath>
  1.1011 +        </nbprofiledirect>
  1.1012 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  1.1013 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1.1014 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1.1015 +            <jvmarg line="${profiler.info.jvmargs}"/>
  1.1016 +            <test name="${profile.class}"/>
  1.1017 +            <classpath>
  1.1018 +                <path path="${run.test.classpath}"/>
  1.1019 +            </classpath>
  1.1020 +            <syspropertyset>
  1.1021 +                <propertyref prefix="test-sys-prop."/>
  1.1022 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1.1023 +            </syspropertyset>
  1.1024 +            <formatter type="brief" usefile="false"/>
  1.1025 +            <formatter type="xml"/>
  1.1026 +        </junit>
  1.1027 +    </target>
  1.1028 +    <!--
  1.1029 +                end of pre NB72 profiling section
  1.1030 +            -->
  1.1031 +    <target if="netbeans.home" name="-profile-check">
  1.1032 +        <condition property="profiler.configured">
  1.1033 +            <or>
  1.1034 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  1.1035 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  1.1036 +            </or>
  1.1037 +        </condition>
  1.1038 +    </target>
  1.1039 +    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  1.1040 +        <startprofiler/>
  1.1041 +        <antcall target="run"/>
  1.1042 +    </target>
  1.1043 +    <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
  1.1044 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1.1045 +        <startprofiler/>
  1.1046 +        <antcall target="run-single"/>
  1.1047 +    </target>
  1.1048 +    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  1.1049 +    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  1.1050 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1.1051 +        <startprofiler/>
  1.1052 +        <antcall target="test-single"/>
  1.1053 +    </target>
  1.1054 +    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  1.1055 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1.1056 +        <startprofiler/>
  1.1057 +        <antcal target="run-test-with-main"/>
  1.1058 +    </target>
  1.1059 +    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  1.1060 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1.1061 +        <startprofiler/>
  1.1062 +        <antcall target="run-applet"/>
  1.1063 +    </target>
  1.1064 +    <!--
  1.1065                  ===============
  1.1066                  JAVADOC SECTION
  1.1067                  ===============
  1.1068              -->
  1.1069 -    <target depends="init" name="-javadoc-build">
  1.1070 +    <target depends="init" if="have.sources" name="-javadoc-build">
  1.1071          <mkdir dir="${dist.javadoc.dir}"/>
  1.1072 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  1.1073 +        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  1.1074 +            <and>
  1.1075 +                <isset property="endorsed.classpath.cmd.line.arg"/>
  1.1076 +                <not>
  1.1077 +                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  1.1078 +                </not>
  1.1079 +            </and>
  1.1080 +        </condition>
  1.1081 +        <condition else="" property="bug5101868workaround" value="*.java">
  1.1082 +            <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  1.1083 +        </condition>
  1.1084 +        <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  1.1085              <classpath>
  1.1086                  <path path="${javac.classpath}"/>
  1.1087              </classpath>
  1.1088 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  1.1089 +            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1.1090                  <filename name="**/*.java"/>
  1.1091              </fileset>
  1.1092 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1.1093 +                <include name="**/*.java"/>
  1.1094 +                <exclude name="*.java"/>
  1.1095 +            </fileset>
  1.1096 +            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  1.1097          </javadoc>
  1.1098 +        <copy todir="${dist.javadoc.dir}">
  1.1099 +            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  1.1100 +                <filename name="**/doc-files/**"/>
  1.1101 +            </fileset>
  1.1102 +            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1.1103 +                <include name="**/doc-files/**"/>
  1.1104 +            </fileset>
  1.1105 +        </copy>
  1.1106      </target>
  1.1107      <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  1.1108          <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1.1109 @@ -510,7 +1233,7 @@
  1.1110      <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1.1111      <!--
  1.1112                  =========================
  1.1113 -                JUNIT COMPILATION SECTION
  1.1114 +                TEST COMPILATION SECTION
  1.1115                  =========================
  1.1116              -->
  1.1117      <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1.1118 @@ -523,8 +1246,8 @@
  1.1119      <target if="do.depend.true" name="-compile-test-depend">
  1.1120          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  1.1121      </target>
  1.1122 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1.1123 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  1.1124 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1.1125 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
  1.1126          <copy todir="${build.test.classes.dir}">
  1.1127              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1.1128          </copy>
  1.1129 @@ -538,10 +1261,10 @@
  1.1130          <!-- Empty placeholder for easier customization. -->
  1.1131          <!-- You can override this target in the ../build.xml file. -->
  1.1132      </target>
  1.1133 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1.1134 +    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1.1135          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1.1136          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1.1137 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  1.1138 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  1.1139          <copy todir="${build.test.classes.dir}">
  1.1140              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1.1141          </copy>
  1.1142 @@ -553,17 +1276,17 @@
  1.1143      <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  1.1144      <!--
  1.1145                  =======================
  1.1146 -                JUNIT EXECUTION SECTION
  1.1147 +                TEST EXECUTION SECTION
  1.1148                  =======================
  1.1149              -->
  1.1150      <target depends="init" if="have.tests" name="-pre-test-run">
  1.1151          <mkdir dir="${build.test.results.dir}"/>
  1.1152      </target>
  1.1153      <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  1.1154 -        <j2seproject3:junit testincludes="**/*Test.java"/>
  1.1155 +        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  1.1156      </target>
  1.1157      <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1.1158 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  1.1159 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1160      </target>
  1.1161      <target depends="init" if="have.tests" name="test-report"/>
  1.1162      <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1.1163 @@ -573,39 +1296,40 @@
  1.1164      </target>
  1.1165      <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1.1166          <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1.1167 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
  1.1168 +        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  1.1169      </target>
  1.1170      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1.1171 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  1.1172 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1173      </target>
  1.1174 -    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  1.1175 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  1.1176 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  1.1177 +        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  1.1178 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1.1179 +        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  1.1180 +    </target>
  1.1181 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  1.1182 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1183 +    </target>
  1.1184 +    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  1.1185      <!--
  1.1186                  =======================
  1.1187 -                JUNIT DEBUGGING SECTION
  1.1188 +                TEST DEBUGGING SECTION
  1.1189                  =======================
  1.1190              -->
  1.1191 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  1.1192 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  1.1193          <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1.1194 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  1.1195 -        <delete file="${test.report.file}"/>
  1.1196 -        <mkdir dir="${build.test.results.dir}"/>
  1.1197 -        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  1.1198 -            <customize>
  1.1199 -                <syspropertyset>
  1.1200 -                    <propertyref prefix="test-sys-prop."/>
  1.1201 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1.1202 -                </syspropertyset>
  1.1203 -                <arg value="${test.class}"/>
  1.1204 -                <arg value="showoutput=true"/>
  1.1205 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  1.1206 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  1.1207 -            </customize>
  1.1208 -        </j2seproject3:debug>
  1.1209 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  1.1210 +    </target>
  1.1211 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  1.1212 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1.1213 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1.1214 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  1.1215      </target>
  1.1216      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1.1217          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1.1218      </target>
  1.1219 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1.1220 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1.1221 +    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  1.1222      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1.1223          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1.1224      </target>
  1.1225 @@ -642,14 +1366,48 @@
  1.1226                  CLEANUP SECTION
  1.1227                  ===============
  1.1228              -->
  1.1229 -    <target depends="init" name="deps-clean" unless="no.deps"/>
  1.1230 +    <target name="-deps-clean-init" unless="built-clean.properties">
  1.1231 +        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1.1232 +        <delete file="${built-clean.properties}" quiet="true"/>
  1.1233 +    </target>
  1.1234 +    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1.1235 +        <echo level="warn" message="Cycle detected: aserverinfo was already built"/>
  1.1236 +    </target>
  1.1237 +    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1.1238 +        <mkdir dir="${build.dir}"/>
  1.1239 +        <touch file="${built-clean.properties}" verbose="false"/>
  1.1240 +        <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1.1241 +        <antcall target="-warn-already-built-clean"/>
  1.1242 +        <propertyfile file="${built-clean.properties}">
  1.1243 +            <entry key="${basedir}" value=""/>
  1.1244 +        </propertyfile>
  1.1245 +    </target>
  1.1246      <target depends="init" name="-do-clean">
  1.1247          <delete dir="${build.dir}"/>
  1.1248 -        <delete dir="${dist.dir}"/>
  1.1249 +        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1.1250      </target>
  1.1251      <target name="-post-clean">
  1.1252          <!-- Empty placeholder for easier customization. -->
  1.1253          <!-- You can override this target in the ../build.xml file. -->
  1.1254      </target>
  1.1255      <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1.1256 +    <target name="-check-call-dep">
  1.1257 +        <property file="${call.built.properties}" prefix="already.built."/>
  1.1258 +        <condition property="should.call.dep">
  1.1259 +            <and>
  1.1260 +                <not>
  1.1261 +                    <isset property="already.built.${call.subproject}"/>
  1.1262 +                </not>
  1.1263 +                <available file="${call.script}"/>
  1.1264 +            </and>
  1.1265 +        </condition>
  1.1266 +    </target>
  1.1267 +    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1.1268 +        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1.1269 +            <propertyset>
  1.1270 +                <propertyref prefix="transfer."/>
  1.1271 +                <mapper from="transfer.*" to="*" type="glob"/>
  1.1272 +            </propertyset>
  1.1273 +        </ant>
  1.1274 +    </target>
  1.1275  </project>