java/rozsirene-atributy/nbproject/build-impl.xml
changeset 25 8f2d112a3635
parent 18 907c5c7c20ce
     1.1 --- a/java/rozsirene-atributy/nbproject/build-impl.xml	Sat Aug 18 13:22:45 2012 +0200
     1.2 +++ b/java/rozsirene-atributy/nbproject/build-impl.xml	Sun Dec 10 23:59:24 2023 +0100
     1.3 @@ -12,14 +12,14 @@
     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="rozsirene-atributy-impl">
    1.18 +<project xmlns:if="ant:if" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" xmlns:unless="ant:unless" basedir=".." default="default" name="rozsirene-atributy-impl">
    1.19      <fail message="Please build using Ant 1.8.0 or higher.">
    1.20          <condition>
    1.21              <not>
    1.22 @@ -46,14 +46,80 @@
    1.23          <property file="${user.properties.file}"/>
    1.24          <!-- The two properties below are usually overridden -->
    1.25          <!-- by the active platform. Just a fallback. -->
    1.26 -        <property name="default.javac.source" value="1.4"/>
    1.27 -        <property name="default.javac.target" value="1.4"/>
    1.28 +        <property name="default.javac.source" value="1.8"/>
    1.29 +        <property name="default.javac.target" value="1.8"/>
    1.30      </target>
    1.31      <target depends="-pre-init,-init-private,-init-user" name="-init-project">
    1.32          <property file="nbproject/configs/${config}.properties"/>
    1.33          <property file="nbproject/project.properties"/>
    1.34      </target>
    1.35 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
    1.36 +    <target name="-init-modules-supported">
    1.37 +        <condition property="modules.supported.internal" value="true">
    1.38 +            <not>
    1.39 +                <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
    1.40 +            </not>
    1.41 +        </condition>
    1.42 +    </target>
    1.43 +    <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
    1.44 +        <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
    1.45 +            <attribute name="property"/>
    1.46 +            <attribute name="sourcepath"/>
    1.47 +            <sequential>
    1.48 +                <loadresource property="@{property}" quiet="true">
    1.49 +                    <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
    1.50 +                    <filterchain>
    1.51 +                        <stripjavacomments/>
    1.52 +                        <linecontainsregexp>
    1.53 +                            <regexp pattern="module .* \{"/>
    1.54 +                        </linecontainsregexp>
    1.55 +                        <tokenfilter>
    1.56 +                            <linetokenizer/>
    1.57 +                            <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
    1.58 +                        </tokenfilter>
    1.59 +                        <striplinebreaks/>
    1.60 +                    </filterchain>
    1.61 +                </loadresource>
    1.62 +            </sequential>
    1.63 +        </macrodef>
    1.64 +    </target>
    1.65 +    <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
    1.66 +        <fail message="Java 9 support requires Ant 1.10.0 or higher.">
    1.67 +            <condition>
    1.68 +                <not>
    1.69 +                    <antversion atleast="1.10.0"/>
    1.70 +                </not>
    1.71 +            </condition>
    1.72 +        </fail>
    1.73 +        <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
    1.74 +        <condition property="named.module.internal">
    1.75 +            <and>
    1.76 +                <isset property="module.name"/>
    1.77 +                <length length="0" string="${module.name}" when="greater"/>
    1.78 +            </and>
    1.79 +        </condition>
    1.80 +        <condition property="unnamed.module.internal">
    1.81 +            <not>
    1.82 +                <isset property="named.module.internal"/>
    1.83 +            </not>
    1.84 +        </condition>
    1.85 +        <property name="javac.modulepath" value=""/>
    1.86 +        <property name="run.modulepath" value="${javac.modulepath}"/>
    1.87 +        <property name="module.build.classes.dir" value="${build.classes.dir}"/>
    1.88 +        <property name="debug.modulepath" value="${run.modulepath}"/>
    1.89 +        <property name="javac.upgrademodulepath" value=""/>
    1.90 +        <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
    1.91 +        <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
    1.92 +            <and>
    1.93 +                <isset property="javac.systemmodulepath"/>
    1.94 +                <length length="0" string="${javac.systemmodulepath}" when="greater"/>
    1.95 +            </and>
    1.96 +        </condition>
    1.97 +        <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
    1.98 +        <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
    1.99 +        <property name="module.name" value=""/>
   1.100 +    </target>
   1.101 +    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
   1.102 +        <property name="platform.java" value="${java.home}/bin/java"/>
   1.103          <available file="${manifest.file}" property="manifest.available"/>
   1.104          <condition property="splashscreen.available">
   1.105              <and>
   1.106 @@ -71,31 +137,22 @@
   1.107                  </not>
   1.108              </and>
   1.109          </condition>
   1.110 -        <condition property="manifest.available+main.class">
   1.111 +        <condition property="profile.available">
   1.112              <and>
   1.113 -                <isset property="manifest.available"/>
   1.114 -                <isset property="main.class.available"/>
   1.115 +                <isset property="javac.profile"/>
   1.116 +                <length length="0" string="${javac.profile}" when="greater"/>
   1.117 +                <not>
   1.118 +                    <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
   1.119 +                </not>
   1.120              </and>
   1.121          </condition>
   1.122          <condition property="do.archive">
   1.123 -            <not>
   1.124 -                <istrue value="${jar.archive.disabled}"/>
   1.125 -            </not>
   1.126 -        </condition>
   1.127 -        <condition property="do.mkdist">
   1.128 -            <and>
   1.129 -                <isset property="do.archive"/>
   1.130 -                <isset property="libs.CopyLibs.classpath"/>
   1.131 +            <or>
   1.132                  <not>
   1.133 -                    <istrue value="${mkdist.disabled}"/>
   1.134 +                    <istrue value="${jar.archive.disabled}"/>
   1.135                  </not>
   1.136 -            </and>
   1.137 -        </condition>
   1.138 -        <condition property="manifest.available+main.class+mkdist.available">
   1.139 -            <and>
   1.140 -                <istrue value="${manifest.available+main.class}"/>
   1.141 -                <isset property="do.mkdist"/>
   1.142 -            </and>
   1.143 +                <istrue value="${not.archive.disabled}"/>
   1.144 +            </or>
   1.145          </condition>
   1.146          <condition property="do.archive+manifest.available">
   1.147              <and>
   1.148 @@ -115,24 +172,12 @@
   1.149                  <istrue value="${do.archive}"/>
   1.150              </and>
   1.151          </condition>
   1.152 -        <condition property="do.archive+manifest.available+main.class">
   1.153 +        <condition property="do.archive+profile.available">
   1.154              <and>
   1.155 -                <istrue value="${manifest.available+main.class}"/>
   1.156 +                <isset property="profile.available"/>
   1.157                  <istrue value="${do.archive}"/>
   1.158              </and>
   1.159          </condition>
   1.160 -        <condition property="manifest.available-mkdist.available">
   1.161 -            <or>
   1.162 -                <istrue value="${manifest.available}"/>
   1.163 -                <isset property="do.mkdist"/>
   1.164 -            </or>
   1.165 -        </condition>
   1.166 -        <condition property="manifest.available+main.class-mkdist.available">
   1.167 -            <or>
   1.168 -                <istrue value="${manifest.available+main.class}"/>
   1.169 -                <isset property="do.mkdist"/>
   1.170 -            </or>
   1.171 -        </condition>
   1.172          <condition property="have.tests">
   1.173              <or>
   1.174                  <available file="${test.src.dir}"/>
   1.175 @@ -156,6 +201,7 @@
   1.176              </and>
   1.177          </condition>
   1.178          <property name="run.jvmargs" value=""/>
   1.179 +        <property name="run.jvmargs.ide" value=""/>
   1.180          <property name="javac.compilerargs" value=""/>
   1.181          <property name="work.dir" value="${basedir}"/>
   1.182          <condition property="no.deps">
   1.183 @@ -168,6 +214,7 @@
   1.184          <property name="application.args" value=""/>
   1.185          <property name="source.encoding" value="${file.encoding}"/>
   1.186          <property name="runtime.encoding" value="${source.encoding}"/>
   1.187 +        <property name="manifest.encoding" value="${source.encoding}"/>
   1.188          <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
   1.189              <and>
   1.190                  <isset property="javadoc.encoding"/>
   1.191 @@ -185,7 +232,15 @@
   1.192          </condition>
   1.193          <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   1.194          <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   1.195 -            <length length="0" string="${endorsed.classpath}" when="greater"/>
   1.196 +            <and>
   1.197 +                <isset property="endorsed.classpath"/>
   1.198 +                <not>
   1.199 +                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
   1.200 +                </not>
   1.201 +            </and>
   1.202 +        </condition>
   1.203 +        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
   1.204 +            <isset property="profile.available"/>
   1.205          </condition>
   1.206          <condition else="false" property="jdkBug6558476">
   1.207              <and>
   1.208 @@ -195,11 +250,38 @@
   1.209                  </not>
   1.210              </and>
   1.211          </condition>
   1.212 -        <property name="javac.fork" value="${jdkBug6558476}"/>
   1.213 +        <condition else="false" property="javac.fork">
   1.214 +            <or>
   1.215 +                <istrue value="${jdkBug6558476}"/>
   1.216 +                <istrue value="${javac.external.vm}"/>
   1.217 +            </or>
   1.218 +        </condition>
   1.219          <property name="jar.index" value="false"/>
   1.220          <property name="jar.index.metainf" value="${jar.index}"/>
   1.221          <property name="copylibs.rebase" value="true"/>
   1.222          <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
   1.223 +        <condition property="junit.available">
   1.224 +            <or>
   1.225 +                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
   1.226 +                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
   1.227 +            </or>
   1.228 +        </condition>
   1.229 +        <condition property="testng.available">
   1.230 +            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
   1.231 +        </condition>
   1.232 +        <condition property="junit+testng.available">
   1.233 +            <and>
   1.234 +                <istrue value="${junit.available}"/>
   1.235 +                <istrue value="${testng.available}"/>
   1.236 +            </and>
   1.237 +        </condition>
   1.238 +        <condition else="testng" property="testng.mode" value="mixed">
   1.239 +            <istrue value="${junit+testng.available}"/>
   1.240 +        </condition>
   1.241 +        <condition else="" property="testng.debug.mode" value="-mixed">
   1.242 +            <istrue value="${junit+testng.available}"/>
   1.243 +        </condition>
   1.244 +        <property name="java.failonerror" value="true"/>
   1.245      </target>
   1.246      <target name="-post-init">
   1.247          <!-- Empty placeholder for easier customization. -->
   1.248 @@ -226,11 +308,80 @@
   1.249              </sequential>
   1.250          </macrodef>
   1.251      </target>
   1.252 -    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
   1.253 +    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
   1.254          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.255              <attribute default="${src.dir}" name="srcdir"/>
   1.256              <attribute default="${build.classes.dir}" name="destdir"/>
   1.257              <attribute default="${javac.classpath}" name="classpath"/>
   1.258 +            <attribute default="${javac.modulepath}" name="modulepath"/>
   1.259 +            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
   1.260 +            <attribute default="${javac.processorpath}" name="processorpath"/>
   1.261 +            <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
   1.262 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   1.263 +            <attribute default="${includes}" name="includes"/>
   1.264 +            <attribute default="${excludes}" name="excludes"/>
   1.265 +            <attribute default="${javac.debug}" name="debug"/>
   1.266 +            <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
   1.267 +            <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
   1.268 +            <attribute default="${empty.dir}" name="gensrcdir"/>
   1.269 +            <element name="customize" optional="true"/>
   1.270 +            <sequential>
   1.271 +                <condition property="warn.excludes.internal">
   1.272 +                    <and>
   1.273 +                        <isset property="named.module.internal"/>
   1.274 +                        <length length="0" string="@{excludes}" trim="true" when="greater"/>
   1.275 +                    </and>
   1.276 +                </condition>
   1.277 +                <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
   1.278 +                <property location="${build.dir}/empty" name="empty.dir"/>
   1.279 +                <mkdir dir="${empty.dir}"/>
   1.280 +                <mkdir dir="@{apgeneratedsrcdir}"/>
   1.281 +                <condition property="processormodulepath.set">
   1.282 +                    <resourcecount count="0" when="greater">
   1.283 +                        <path>
   1.284 +                            <pathelement path="@{processormodulepath}"/>
   1.285 +                        </path>
   1.286 +                    </resourcecount>
   1.287 +                </condition>
   1.288 +                <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.289 +                    <src>
   1.290 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
   1.291 +                            <include name="*"/>
   1.292 +                        </dirset>
   1.293 +                    </src>
   1.294 +                    <classpath>
   1.295 +                        <path path="@{classpath}"/>
   1.296 +                    </classpath>
   1.297 +                    <modulepath>
   1.298 +                        <path path="@{modulepath}"/>
   1.299 +                    </modulepath>
   1.300 +                    <upgrademodulepath>
   1.301 +                        <path path="@{upgrademodulepath}"/>
   1.302 +                    </upgrademodulepath>
   1.303 +                    <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
   1.304 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   1.305 +                    <compilerarg line="${javac.compilerargs}"/>
   1.306 +                    <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
   1.307 +                    <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
   1.308 +                    <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
   1.309 +                    <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
   1.310 +                    <compilerarg line="${ap.processors.internal}"/>
   1.311 +                    <compilerarg line="${annotation.processing.processor.options}"/>
   1.312 +                    <compilerarg value="-s"/>
   1.313 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
   1.314 +                    <compilerarg line="${ap.proc.none.internal}"/>
   1.315 +                    <customize/>
   1.316 +                </javac>
   1.317 +            </sequential>
   1.318 +        </macrodef>
   1.319 +    </target>
   1.320 +    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
   1.321 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.322 +            <attribute default="${src.dir}" name="srcdir"/>
   1.323 +            <attribute default="${build.classes.dir}" name="destdir"/>
   1.324 +            <attribute default="${javac.classpath}" name="classpath"/>
   1.325 +            <attribute default="${javac.modulepath}" name="modulepath"/>
   1.326 +            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
   1.327              <attribute default="${javac.processorpath}" name="processorpath"/>
   1.328              <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   1.329              <attribute default="${includes}" name="includes"/>
   1.330 @@ -253,6 +404,7 @@
   1.331                          <path path="@{classpath}"/>
   1.332                      </classpath>
   1.333                      <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.334 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   1.335                      <compilerarg line="${javac.compilerargs}"/>
   1.336                      <compilerarg value="-processorpath"/>
   1.337                      <compilerarg path="@{processorpath}:${empty.dir}"/>
   1.338 @@ -266,11 +418,13 @@
   1.339              </sequential>
   1.340          </macrodef>
   1.341      </target>
   1.342 -    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   1.343 +    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
   1.344          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.345              <attribute default="${src.dir}" name="srcdir"/>
   1.346              <attribute default="${build.classes.dir}" name="destdir"/>
   1.347              <attribute default="${javac.classpath}" name="classpath"/>
   1.348 +            <attribute default="${javac.modulepath}" name="modulepath"/>
   1.349 +            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
   1.350              <attribute default="${javac.processorpath}" name="processorpath"/>
   1.351              <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
   1.352              <attribute default="${includes}" name="includes"/>
   1.353 @@ -292,13 +446,14 @@
   1.354                          <path path="@{classpath}"/>
   1.355                      </classpath>
   1.356                      <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.357 +                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
   1.358                      <compilerarg line="${javac.compilerargs}"/>
   1.359                      <customize/>
   1.360                  </javac>
   1.361              </sequential>
   1.362          </macrodef>
   1.363      </target>
   1.364 -    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   1.365 +    <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
   1.366          <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.367              <attribute default="${src.dir}" name="srcdir"/>
   1.368              <attribute default="${build.classes.dir}" name="destdir"/>
   1.369 @@ -332,45 +487,317 @@
   1.370              </sequential>
   1.371          </macrodef>
   1.372      </target>
   1.373 -    <target name="-init-macrodef-junit">
   1.374 +    <target if="${junit.available}" name="-init-macrodef-junit-init">
   1.375 +        <condition else="false" property="nb.junit.batch" value="true">
   1.376 +            <and>
   1.377 +                <istrue value="${junit.available}"/>
   1.378 +                <not>
   1.379 +                    <isset property="test.method"/>
   1.380 +                </not>
   1.381 +            </and>
   1.382 +        </condition>
   1.383 +        <condition else="false" property="nb.junit.single" value="true">
   1.384 +            <and>
   1.385 +                <istrue value="${junit.available}"/>
   1.386 +                <isset property="test.method"/>
   1.387 +            </and>
   1.388 +        </condition>
   1.389 +    </target>
   1.390 +    <target name="-init-test-properties">
   1.391 +        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
   1.392 +        <property name="test.binarytestincludes" value=""/>
   1.393 +        <property name="test.binaryexcludes" value=""/>
   1.394 +    </target>
   1.395 +    <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
   1.396 +        <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.397 +            <attribute default="${includes}" name="includes"/>
   1.398 +            <attribute default="${excludes}" name="excludes"/>
   1.399 +            <element name="customizePrototype" optional="true"/>
   1.400 +            <sequential>
   1.401 +                <property name="junit.forkmode" value="perTest"/>
   1.402 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.403 +                    <syspropertyset>
   1.404 +                        <propertyref prefix="test-sys-prop."/>
   1.405 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.406 +                    </syspropertyset>
   1.407 +                    <classpath>
   1.408 +                        <path path="${run.test.classpath}"/>
   1.409 +                    </classpath>
   1.410 +                    <modulepath>
   1.411 +                        <path path="${run.test.modulepath}"/>
   1.412 +                    </modulepath>
   1.413 +                    <formatter type="brief" usefile="false"/>
   1.414 +                    <formatter type="xml"/>
   1.415 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.416 +                    <jvmarg value="-ea"/>
   1.417 +                    <jvmarg line="${run.test.jvmargs}"/>
   1.418 +                    <customizePrototype/>
   1.419 +                </junit>
   1.420 +            </sequential>
   1.421 +        </macrodef>
   1.422 +    </target>
   1.423 +    <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
   1.424 +        <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.425 +            <attribute default="${includes}" name="includes"/>
   1.426 +            <attribute default="${excludes}" name="excludes"/>
   1.427 +            <element name="customizePrototype" optional="true"/>
   1.428 +            <sequential>
   1.429 +                <property name="junit.forkmode" value="perTest"/>
   1.430 +                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.431 +                    <syspropertyset>
   1.432 +                        <propertyref prefix="test-sys-prop."/>
   1.433 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.434 +                    </syspropertyset>
   1.435 +                    <classpath>
   1.436 +                        <path path="${run.test.classpath}"/>
   1.437 +                    </classpath>
   1.438 +                    <formatter type="brief" usefile="false"/>
   1.439 +                    <formatter type="xml"/>
   1.440 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.441 +                    <jvmarg value="-ea"/>
   1.442 +                    <customizePrototype/>
   1.443 +                </junit>
   1.444 +            </sequential>
   1.445 +        </macrodef>
   1.446 +    </target>
   1.447 +    <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
   1.448          <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.449              <attribute default="${includes}" name="includes"/>
   1.450              <attribute default="${excludes}" name="excludes"/>
   1.451              <attribute default="**" name="testincludes"/>
   1.452 +            <attribute default="" name="testmethods"/>
   1.453 +            <element name="customize" optional="true"/>
   1.454              <sequential>
   1.455 -                <property name="junit.forkmode" value="perTest"/>
   1.456 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
   1.457 -                    <batchtest todir="${build.test.results.dir}">
   1.458 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.459 -                            <filename name="@{testincludes}"/>
   1.460 -                        </fileset>
   1.461 -                    </batchtest>
   1.462 +                <j2seproject3:junit-prototype>
   1.463 +                    <customizePrototype>
   1.464 +                        <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
   1.465 +                        <customize/>
   1.466 +                    </customizePrototype>
   1.467 +                </j2seproject3:junit-prototype>
   1.468 +            </sequential>
   1.469 +        </macrodef>
   1.470 +    </target>
   1.471 +    <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
   1.472 +        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.473 +            <attribute default="${includes}" name="includes"/>
   1.474 +            <attribute default="${excludes}" name="excludes"/>
   1.475 +            <attribute default="**" name="testincludes"/>
   1.476 +            <attribute default="" name="testmethods"/>
   1.477 +            <element name="customize" optional="true"/>
   1.478 +            <sequential>
   1.479 +                <j2seproject3:junit-prototype>
   1.480 +                    <customizePrototype>
   1.481 +                        <batchtest todir="${build.test.results.dir}">
   1.482 +                            <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
   1.483 +                                <filename name="@{testincludes}"/>
   1.484 +                            </fileset>
   1.485 +                            <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
   1.486 +                                <filename name="${test.binarytestincludes}"/>
   1.487 +                            </fileset>
   1.488 +                        </batchtest>
   1.489 +                        <customize/>
   1.490 +                    </customizePrototype>
   1.491 +                </j2seproject3:junit-prototype>
   1.492 +            </sequential>
   1.493 +        </macrodef>
   1.494 +    </target>
   1.495 +    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
   1.496 +    <target if="${testng.available}" name="-init-macrodef-testng">
   1.497 +        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.498 +            <attribute default="${includes}" name="includes"/>
   1.499 +            <attribute default="${excludes}" name="excludes"/>
   1.500 +            <attribute default="**" name="testincludes"/>
   1.501 +            <attribute default="" name="testmethods"/>
   1.502 +            <element name="customize" optional="true"/>
   1.503 +            <sequential>
   1.504 +                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
   1.505 +                    <isset property="test.method"/>
   1.506 +                </condition>
   1.507 +                <union id="test.set">
   1.508 +                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
   1.509 +                        <filename name="@{testincludes}"/>
   1.510 +                    </fileset>
   1.511 +                </union>
   1.512 +                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
   1.513 +                <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="rozsirene-atributy" testname="TestNG tests" workingDir="${work.dir}">
   1.514 +                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
   1.515 +                    <propertyset>
   1.516 +                        <propertyref prefix="test-sys-prop."/>
   1.517 +                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.518 +                    </propertyset>
   1.519                      <classpath>
   1.520                          <path path="${run.test.classpath}"/>
   1.521                      </classpath>
   1.522 -                    <syspropertyset>
   1.523 -                        <propertyref prefix="test-sys-prop."/>
   1.524 -                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.525 -                    </syspropertyset>
   1.526 -                    <formatter type="brief" usefile="false"/>
   1.527 -                    <formatter type="xml"/>
   1.528                      <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.529 -                    <jvmarg value="-ea"/>
   1.530 -                    <jvmarg line="${run.jvmargs}"/>
   1.531 -                </junit>
   1.532 +                    <customize/>
   1.533 +                </testng>
   1.534              </sequential>
   1.535          </macrodef>
   1.536      </target>
   1.537 -    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
   1.538 -    <target name="-profile-pre-init">
   1.539 +    <target name="-init-macrodef-test-impl">
   1.540 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.541 +            <attribute default="${includes}" name="includes"/>
   1.542 +            <attribute default="${excludes}" name="excludes"/>
   1.543 +            <attribute default="**" name="testincludes"/>
   1.544 +            <attribute default="" name="testmethods"/>
   1.545 +            <element implicit="true" name="customize" optional="true"/>
   1.546 +            <sequential>
   1.547 +                <echo>No tests executed.</echo>
   1.548 +            </sequential>
   1.549 +        </macrodef>
   1.550 +    </target>
   1.551 +    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
   1.552 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.553 +            <attribute default="${includes}" name="includes"/>
   1.554 +            <attribute default="${excludes}" name="excludes"/>
   1.555 +            <attribute default="**" name="testincludes"/>
   1.556 +            <attribute default="" name="testmethods"/>
   1.557 +            <element implicit="true" name="customize" optional="true"/>
   1.558 +            <sequential>
   1.559 +                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.560 +                    <customize/>
   1.561 +                </j2seproject3:junit>
   1.562 +            </sequential>
   1.563 +        </macrodef>
   1.564 +    </target>
   1.565 +    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
   1.566 +        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.567 +            <attribute default="${includes}" name="includes"/>
   1.568 +            <attribute default="${excludes}" name="excludes"/>
   1.569 +            <attribute default="**" name="testincludes"/>
   1.570 +            <attribute default="" name="testmethods"/>
   1.571 +            <element implicit="true" name="customize" optional="true"/>
   1.572 +            <sequential>
   1.573 +                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.574 +                    <customize/>
   1.575 +                </j2seproject3:testng>
   1.576 +            </sequential>
   1.577 +        </macrodef>
   1.578 +    </target>
   1.579 +    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
   1.580 +        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.581 +            <attribute default="${includes}" name="includes"/>
   1.582 +            <attribute default="${excludes}" name="excludes"/>
   1.583 +            <attribute default="**" name="testincludes"/>
   1.584 +            <attribute default="" name="testmethods"/>
   1.585 +            <sequential>
   1.586 +                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.587 +                    <customize>
   1.588 +                        <jvmarg line="${run.jvmargs}"/>
   1.589 +                        <jvmarg line="${run.jvmargs.ide}"/>
   1.590 +                    </customize>
   1.591 +                </j2seproject3:test-impl>
   1.592 +            </sequential>
   1.593 +        </macrodef>
   1.594 +    </target>
   1.595 +    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
   1.596 +        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.597 +            <attribute default="${includes}" name="includes"/>
   1.598 +            <attribute default="${excludes}" name="excludes"/>
   1.599 +            <attribute default="**" name="testincludes"/>
   1.600 +            <attribute default="" name="testmethods"/>
   1.601 +            <element name="customizeDebuggee" optional="true"/>
   1.602 +            <sequential>
   1.603 +                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.604 +                    <customize>
   1.605 +                        <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
   1.606 +                        <customizeDebuggee/>
   1.607 +                    </customize>
   1.608 +                </j2seproject3:junit>
   1.609 +            </sequential>
   1.610 +        </macrodef>
   1.611 +    </target>
   1.612 +    <target if="${testng.available}" name="-init-macrodef-testng-debug">
   1.613 +        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.614 +            <attribute default="${main.class}" name="testClass"/>
   1.615 +            <attribute default="" name="testMethod"/>
   1.616 +            <element name="customize2" optional="true"/>
   1.617 +            <sequential>
   1.618 +                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
   1.619 +                    <isset property="test.method"/>
   1.620 +                </condition>
   1.621 +                <condition else="-suitename rozsirene-atributy -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
   1.622 +                    <matches pattern=".*\.xml" string="@{testClass}"/>
   1.623 +                </condition>
   1.624 +                <delete dir="${build.test.results.dir}" quiet="true"/>
   1.625 +                <mkdir dir="${build.test.results.dir}"/>
   1.626 +                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
   1.627 +                    <customizeDebuggee>
   1.628 +                        <customize2/>
   1.629 +                        <jvmarg value="-ea"/>
   1.630 +                        <arg line="${testng.debug.mode}"/>
   1.631 +                        <arg line="-d ${build.test.results.dir}"/>
   1.632 +                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
   1.633 +                        <arg line="${testng.cmd.args}"/>
   1.634 +                    </customizeDebuggee>
   1.635 +                </j2seproject3:debug>
   1.636 +            </sequential>
   1.637 +        </macrodef>
   1.638 +    </target>
   1.639 +    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
   1.640 +        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.641 +            <attribute default="${main.class}" name="testClass"/>
   1.642 +            <attribute default="" name="testMethod"/>
   1.643 +            <element implicit="true" name="customize2" optional="true"/>
   1.644 +            <sequential>
   1.645 +                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
   1.646 +                    <customize2/>
   1.647 +                </j2seproject3:testng-debug>
   1.648 +            </sequential>
   1.649 +        </macrodef>
   1.650 +    </target>
   1.651 +    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
   1.652 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.653 +            <attribute default="${includes}" name="includes"/>
   1.654 +            <attribute default="${excludes}" name="excludes"/>
   1.655 +            <attribute default="**" name="testincludes"/>
   1.656 +            <attribute default="" name="testmethods"/>
   1.657 +            <attribute default="${main.class}" name="testClass"/>
   1.658 +            <attribute default="" name="testMethod"/>
   1.659 +            <sequential>
   1.660 +                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
   1.661 +                    <customizeDebuggee>
   1.662 +                        <jvmarg line="${run.jvmargs}"/>
   1.663 +                        <jvmarg line="${run.jvmargs.ide}"/>
   1.664 +                    </customizeDebuggee>
   1.665 +                </j2seproject3:test-debug-impl>
   1.666 +            </sequential>
   1.667 +        </macrodef>
   1.668 +    </target>
   1.669 +    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
   1.670 +        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.671 +            <attribute default="${includes}" name="includes"/>
   1.672 +            <attribute default="${excludes}" name="excludes"/>
   1.673 +            <attribute default="**" name="testincludes"/>
   1.674 +            <attribute default="" name="testmethods"/>
   1.675 +            <attribute default="${main.class}" name="testClass"/>
   1.676 +            <attribute default="" name="testMethod"/>
   1.677 +            <sequential>
   1.678 +                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
   1.679 +                    <customize2>
   1.680 +                        <syspropertyset>
   1.681 +                            <propertyref prefix="test-sys-prop."/>
   1.682 +                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.683 +                        </syspropertyset>
   1.684 +                    </customize2>
   1.685 +                </j2seproject3:testng-debug-impl>
   1.686 +            </sequential>
   1.687 +        </macrodef>
   1.688 +    </target>
   1.689 +    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
   1.690 +    <!--
   1.691 +                pre NB7.2 profiling section; consider it deprecated
   1.692 +            -->
   1.693 +    <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.694 +    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
   1.695          <!-- Empty placeholder for easier customization. -->
   1.696          <!-- You can override this target in the ../build.xml file. -->
   1.697      </target>
   1.698 -    <target name="-profile-post-init">
   1.699 +    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
   1.700          <!-- Empty placeholder for easier customization. -->
   1.701          <!-- You can override this target in the ../build.xml file. -->
   1.702      </target>
   1.703 -    <target name="-profile-init-macrodef-profile">
   1.704 +    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
   1.705          <macrodef name="resolve">
   1.706              <attribute name="name"/>
   1.707              <attribute name="value"/>
   1.708 @@ -384,7 +811,7 @@
   1.709              <sequential>
   1.710                  <property environment="env"/>
   1.711                  <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
   1.712 -                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
   1.713 +                <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
   1.714                      <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.715                      <jvmarg value="${profiler.info.jvmargs.agent}"/>
   1.716                      <jvmarg line="${profiler.info.jvmargs}"/>
   1.717 @@ -402,17 +829,24 @@
   1.718              </sequential>
   1.719          </macrodef>
   1.720      </target>
   1.721 -    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
   1.722 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
   1.723          <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
   1.724          <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
   1.725      </target>
   1.726 +    <!--
   1.727 +                end of pre NB7.2 profiling section
   1.728 +            -->
   1.729      <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
   1.730          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.731              <attribute default="${main.class}" name="name"/>
   1.732 +            <attribute default="${debug.modulepath}" name="modulepath"/>
   1.733              <attribute default="${debug.classpath}" name="classpath"/>
   1.734              <attribute default="" name="stopclassname"/>
   1.735              <sequential>
   1.736                  <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
   1.737 +                    <modulepath>
   1.738 +                        <path path="@{modulepath}"/>
   1.739 +                    </modulepath>
   1.740                      <classpath>
   1.741                          <path path="@{classpath}"/>
   1.742                      </classpath>
   1.743 @@ -431,18 +865,6 @@
   1.744          </macrodef>
   1.745      </target>
   1.746      <target name="-init-debug-args">
   1.747 -        <property name="version-output" value="java version &quot;${ant.java.version}"/>
   1.748 -        <condition property="have-jdk-older-than-1.4">
   1.749 -            <or>
   1.750 -                <contains string="${version-output}" substring="java version &quot;1.0"/>
   1.751 -                <contains string="${version-output}" substring="java version &quot;1.1"/>
   1.752 -                <contains string="${version-output}" substring="java version &quot;1.2"/>
   1.753 -                <contains string="${version-output}" substring="java version &quot;1.3"/>
   1.754 -            </or>
   1.755 -        </condition>
   1.756 -        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   1.757 -            <istrue value="${have-jdk-older-than-1.4}"/>
   1.758 -        </condition>
   1.759          <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
   1.760              <os family="windows"/>
   1.761          </condition>
   1.762 @@ -452,17 +874,103 @@
   1.763      </target>
   1.764      <target depends="-init-debug-args" name="-init-macrodef-debug">
   1.765          <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.766 +            <attribute default="${module.name}" name="modulename"/>
   1.767              <attribute default="${main.class}" name="classname"/>
   1.768 +            <attribute default="${debug.modulepath}" name="modulepath"/>
   1.769              <attribute default="${debug.classpath}" name="classpath"/>
   1.770 +            <element name="customizeDebuggee" optional="true"/>
   1.771 +            <sequential>
   1.772 +                <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
   1.773 +                    <customize>
   1.774 +                        <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
   1.775 +                        <customizeDebuggee/>
   1.776 +                    </customize>
   1.777 +                </j2seproject1:java>
   1.778 +            </sequential>
   1.779 +        </macrodef>
   1.780 +    </target>
   1.781 +    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
   1.782 +        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.783 +            <attribute default="${module.name}" name="modulename"/>
   1.784 +            <attribute default="${main.class}" name="classname"/>
   1.785 +            <attribute default="${run.modulepath}" name="modulepath"/>
   1.786 +            <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
   1.787 +            <attribute default="${run.classpath}" name="classpath"/>
   1.788 +            <attribute default="jvm" name="jvm"/>
   1.789              <element name="customize" optional="true"/>
   1.790              <sequential>
   1.791 -                <java classname="@{classname}" dir="${work.dir}" fork="true">
   1.792 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.793 -                    <jvmarg line="${debug-args-line}"/>
   1.794 -                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.795 +                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
   1.796 +                    <classpath>
   1.797 +                        <path path="@{classpath}"/>
   1.798 +                    </classpath>
   1.799 +                    <modulepath>
   1.800 +                        <pathelement path="@{modulepath}"/>
   1.801 +                        <pathelement location="${module.build.classes.dir}"/>
   1.802 +                    </modulepath>
   1.803 +                    <upgrademodulepath>
   1.804 +                        <path path="@{upgrademodulepath}"/>
   1.805 +                    </upgrademodulepath>
   1.806                      <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.807                      <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.808                      <jvmarg line="${run.jvmargs}"/>
   1.809 +                    <jvmarg line="${run.jvmargs.ide}"/>
   1.810 +                    <syspropertyset>
   1.811 +                        <propertyref prefix="run-sys-prop."/>
   1.812 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.813 +                    </syspropertyset>
   1.814 +                    <customize/>
   1.815 +                </java>
   1.816 +            </sequential>
   1.817 +        </macrodef>
   1.818 +    </target>
   1.819 +    <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
   1.820 +        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.821 +            <attribute default="" name="modulename"/>
   1.822 +            <attribute default="${main.class}" name="classname"/>
   1.823 +            <attribute default="${run.modulepath}" name="modulepath"/>
   1.824 +            <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
   1.825 +            <attribute default="${run.classpath}" name="classpath"/>
   1.826 +            <attribute default="jvm" name="jvm"/>
   1.827 +            <element name="customize" optional="true"/>
   1.828 +            <sequential>
   1.829 +                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
   1.830 +                    <classpath>
   1.831 +                        <path path="@{classpath}"/>
   1.832 +                    </classpath>
   1.833 +                    <modulepath>
   1.834 +                        <path path="@{modulepath}"/>
   1.835 +                    </modulepath>
   1.836 +                    <upgrademodulepath>
   1.837 +                        <path path="@{upgrademodulepath}"/>
   1.838 +                    </upgrademodulepath>
   1.839 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.840 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.841 +                    <jvmarg line="${run.jvmargs}"/>
   1.842 +                    <jvmarg line="${run.jvmargs.ide}"/>
   1.843 +                    <syspropertyset>
   1.844 +                        <propertyref prefix="run-sys-prop."/>
   1.845 +                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.846 +                    </syspropertyset>
   1.847 +                    <customize/>
   1.848 +                </java>
   1.849 +            </sequential>
   1.850 +        </macrodef>
   1.851 +    </target>
   1.852 +    <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
   1.853 +        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.854 +            <attribute default="" name="modulename"/>
   1.855 +            <attribute default="${main.class}" name="classname"/>
   1.856 +            <attribute default="" name="modulepath"/>
   1.857 +            <attribute default="${run.classpath}" name="classpath"/>
   1.858 +            <attribute default="jvm" name="jvm"/>
   1.859 +            <element name="customize" optional="true"/>
   1.860 +            <sequential>
   1.861 +                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
   1.862 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.863 +                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.864 +                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.865 +                    <jvmarg line="${run.jvmargs}"/>
   1.866 +                    <jvmarg line="${run.jvmargs.ide}"/>
   1.867                      <classpath>
   1.868                          <path path="@{classpath}"/>
   1.869                      </classpath>
   1.870 @@ -475,29 +983,7 @@
   1.871              </sequential>
   1.872          </macrodef>
   1.873      </target>
   1.874 -    <target name="-init-macrodef-java">
   1.875 -        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.876 -            <attribute default="${main.class}" name="classname"/>
   1.877 -            <attribute default="${run.classpath}" name="classpath"/>
   1.878 -            <element name="customize" optional="true"/>
   1.879 -            <sequential>
   1.880 -                <java classname="@{classname}" dir="${work.dir}" fork="true">
   1.881 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   1.882 -                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
   1.883 -                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
   1.884 -                    <jvmarg line="${run.jvmargs}"/>
   1.885 -                    <classpath>
   1.886 -                        <path path="@{classpath}"/>
   1.887 -                    </classpath>
   1.888 -                    <syspropertyset>
   1.889 -                        <propertyref prefix="run-sys-prop."/>
   1.890 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
   1.891 -                    </syspropertyset>
   1.892 -                    <customize/>
   1.893 -                </java>
   1.894 -            </sequential>
   1.895 -        </macrodef>
   1.896 -    </target>
   1.897 +    <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
   1.898      <target name="-init-macrodef-copylibs">
   1.899          <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
   1.900              <attribute default="${manifest.file}" name="manifest"/>
   1.901 @@ -512,12 +998,15 @@
   1.902                      <path path="${run.classpath.without.build.classes.dir}"/>
   1.903                      <chainedmapper>
   1.904                          <flattenmapper/>
   1.905 +                        <filtermapper>
   1.906 +                            <replacestring from=" " to="%20"/>
   1.907 +                        </filtermapper>
   1.908                          <globmapper from="*" to="lib/*"/>
   1.909                      </chainedmapper>
   1.910                  </pathconvert>
   1.911                  <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
   1.912 -                <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}">
   1.913 -                    <fileset dir="${build.classes.dir}"/>
   1.914 +                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
   1.915 +                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   1.916                      <manifest>
   1.917                          <attribute name="Class-Path" value="${jar.classpath}"/>
   1.918                          <customize/>
   1.919 @@ -528,8 +1017,8 @@
   1.920      </target>
   1.921      <target name="-init-presetdef-jar">
   1.922          <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
   1.923 -            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
   1.924 -                <j2seproject1:fileset dir="${build.classes.dir}"/>
   1.925 +            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
   1.926 +                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
   1.927              </jar>
   1.928          </presetdef>
   1.929      </target>
   1.930 @@ -557,7 +1046,7 @@
   1.931      <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   1.932          <property name="ap.cmd.line.internal" value=""/>
   1.933      </target>
   1.934 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
   1.935 +    <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.936      <!--
   1.937                  ===================
   1.938                  COMPILATION SECTION
   1.939 @@ -584,7 +1073,9 @@
   1.940          <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
   1.941      </target>
   1.942      <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
   1.943 -        <antcall target="clean"/>
   1.944 +        <antcall target="clean">
   1.945 +            <param name="no.dependencies" value="true"/>
   1.946 +        </antcall>
   1.947      </target>
   1.948      <target depends="init,deps-jar" name="-pre-pre-compile">
   1.949          <mkdir dir="${build.classes.dir}"/>
   1.950 @@ -610,7 +1101,7 @@
   1.951      <target if="has.persistence.xml" name="-copy-persistence-xml">
   1.952          <mkdir dir="${build.classes.dir}/META-INF"/>
   1.953          <copy todir="${build.classes.dir}/META-INF">
   1.954 -            <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
   1.955 +            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
   1.956          </copy>
   1.957      </target>
   1.958      <target name="-post-compile">
   1.959 @@ -625,7 +1116,7 @@
   1.960      <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
   1.961          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   1.962          <j2seproject3:force-recompile/>
   1.963 -        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
   1.964 +        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
   1.965      </target>
   1.966      <target name="-post-compile-single">
   1.967          <!-- Empty placeholder for easier customization. -->
   1.968 @@ -645,65 +1136,191 @@
   1.969          <!-- Empty placeholder for easier customization. -->
   1.970          <!-- You can override this target in the ../build.xml file. -->
   1.971      </target>
   1.972 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
   1.973 -        <j2seproject1:jar/>
   1.974 +    <target depends="init,compile" name="-check-module-main-class">
   1.975 +        <pathconvert property="main.class.file">
   1.976 +            <string value="${main.class}"/>
   1.977 +            <unpackagemapper from="*" to="*.class"/>
   1.978 +        </pathconvert>
   1.979 +        <condition property="do.module.main.class">
   1.980 +            <and>
   1.981 +                <isset property="main.class.available"/>
   1.982 +                <available file="${build.classes.dir}/module-info.class"/>
   1.983 +                <available file="${build.classes.dir}/${main.class.file}"/>
   1.984 +                <isset property="libs.CopyLibs.classpath"/>
   1.985 +                <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
   1.986 +            </and>
   1.987 +        </condition>
   1.988      </target>
   1.989 -    <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">
   1.990 -        <j2seproject1:jar manifest="${manifest.file}"/>
   1.991 +    <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
   1.992 +        <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
   1.993 +        <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
   1.994      </target>
   1.995 -    <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">
   1.996 -        <j2seproject1:jar manifest="${manifest.file}">
   1.997 -            <j2seproject1:manifest>
   1.998 -                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
   1.999 -            </j2seproject1:manifest>
  1.1000 -        </j2seproject1:jar>
  1.1001 -        <echo level="info">To run this application from the command line without Ant, try:</echo>
  1.1002 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1.1003 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
  1.1004 -        <pathconvert property="run.classpath.with.dist.jar">
  1.1005 -            <path path="${run.classpath}"/>
  1.1006 -            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  1.1007 -        </pathconvert>
  1.1008 -        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  1.1009 -    </target>
  1.1010 -    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
  1.1011 +    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
  1.1012          <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  1.1013          <touch file="${tmp.manifest.file}" verbose="false"/>
  1.1014      </target>
  1.1015 -    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
  1.1016 +    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
  1.1017          <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  1.1018 -        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
  1.1019 +        <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
  1.1020      </target>
  1.1021 -    <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">
  1.1022 -        <manifest file="${tmp.manifest.file}" mode="update">
  1.1023 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
  1.1024 +        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1.1025              <attribute name="Main-Class" value="${main.class}"/>
  1.1026          </manifest>
  1.1027      </target>
  1.1028 -    <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">
  1.1029 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
  1.1030 +        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1.1031 +            <attribute name="Profile" value="${javac.profile}"/>
  1.1032 +        </manifest>
  1.1033 +    </target>
  1.1034 +    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
  1.1035          <basename file="${application.splash}" property="splashscreen.basename"/>
  1.1036          <mkdir dir="${build.classes.dir}/META-INF"/>
  1.1037          <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  1.1038 -        <manifest file="${tmp.manifest.file}" mode="update">
  1.1039 +        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1.1040              <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  1.1041          </manifest>
  1.1042      </target>
  1.1043 -    <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">
  1.1044 +    <target depends="init,compile" name="-check-do-mkdist">
  1.1045 +        <condition property="do.mkdist">
  1.1046 +            <and>
  1.1047 +                <isset property="do.archive"/>
  1.1048 +                <isset property="libs.CopyLibs.classpath"/>
  1.1049 +                <not>
  1.1050 +                    <istrue value="${mkdist.disabled}"/>
  1.1051 +                </not>
  1.1052 +                <not>
  1.1053 +                    <available file="${build.classes.dir}/module-info.class"/>
  1.1054 +                </not>
  1.1055 +            </and>
  1.1056 +        </condition>
  1.1057 +    </target>
  1.1058 +    <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,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs">
  1.1059          <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  1.1060          <echo level="info">To run this application from the command line without Ant, try:</echo>
  1.1061          <property location="${dist.jar}" name="dist.jar.resolved"/>
  1.1062          <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  1.1063      </target>
  1.1064 -    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
  1.1065 +    <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,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
  1.1066 +        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
  1.1067 +        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1.1068 +        <property location="${dist.jar}" name="dist.jar.resolved"/>
  1.1069 +        <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
  1.1070 +            <isset property="named.module.internal"/>
  1.1071 +        </condition>
  1.1072 +        <pathconvert property="run.classpath.with.dist.jar">
  1.1073 +            <path path="${run.classpath}"/>
  1.1074 +            <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
  1.1075 +        </pathconvert>
  1.1076 +        <pathconvert property="run.modulepath.with.dist.jar">
  1.1077 +            <path location="${dist.jar.resolved}"/>
  1.1078 +            <path path="${run.modulepath}"/>
  1.1079 +            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  1.1080 +        </pathconvert>
  1.1081 +        <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
  1.1082 +            <isset property="named.module.internal"/>
  1.1083 +        </condition>
  1.1084 +        <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
  1.1085 +            <and>
  1.1086 +                <isset property="modules.supported.internal"/>
  1.1087 +                <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
  1.1088 +            </and>
  1.1089 +        </condition>
  1.1090 +        <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
  1.1091 +            <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
  1.1092 +        </condition>
  1.1093 +        <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
  1.1094 +            <isset property="do.module.main.class"/>
  1.1095 +        </condition>
  1.1096 +        <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
  1.1097 +            <isset property="named.module.internal"/>
  1.1098 +        </condition>
  1.1099 +        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
  1.1100 +            <isset property="main.class.available"/>
  1.1101 +        </condition>
  1.1102 +        <condition else="debug" property="jar.usage.level" value="info">
  1.1103 +            <isset property="main.class.available"/>
  1.1104 +        </condition>
  1.1105 +        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
  1.1106 +    </target>
  1.1107 +    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
  1.1108          <delete>
  1.1109              <fileset file="${tmp.manifest.file}"/>
  1.1110          </delete>
  1.1111      </target>
  1.1112 -    <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"/>
  1.1113 +    <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.1114 +    <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.1115      <target name="-post-jar">
  1.1116          <!-- Empty placeholder for easier customization. -->
  1.1117          <!-- You can override this target in the ../build.xml file. -->
  1.1118      </target>
  1.1119 -    <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.1120 +    <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
  1.1121 +    <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
  1.1122 +    <!--
  1.1123 +                =================
  1.1124 +                DEPLOY SECTION
  1.1125 +                =================
  1.1126 +            -->
  1.1127 +    <target name="-pre-deploy">
  1.1128 +        <!-- Empty placeholder for easier customization. -->
  1.1129 +        <!-- You can override this target in the ../build.xml file. -->
  1.1130 +    </target>
  1.1131 +    <target depends="init" name="-check-jlink">
  1.1132 +        <condition property="do.jlink.internal">
  1.1133 +            <and>
  1.1134 +                <istrue value="${do.jlink}"/>
  1.1135 +                <isset property="do.archive"/>
  1.1136 +                <isset property="named.module.internal"/>
  1.1137 +            </and>
  1.1138 +        </condition>
  1.1139 +    </target>
  1.1140 +    <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
  1.1141 +        <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
  1.1142 +        <property name="jlink.launcher.name" value="${application.title}"/>
  1.1143 +        <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
  1.1144 +            <and>
  1.1145 +                <isset property="jlink.additionalmodules"/>
  1.1146 +                <length length="0" string="${jlink.additionalmodules}" when="greater"/>
  1.1147 +            </and>
  1.1148 +        </condition>
  1.1149 +        <condition property="jlink.do.strip.internal">
  1.1150 +            <and>
  1.1151 +                <isset property="jlink.strip"/>
  1.1152 +                <istrue value="${jlink.strip}"/>
  1.1153 +            </and>
  1.1154 +        </condition>
  1.1155 +        <condition property="jlink.do.additionalparam.internal">
  1.1156 +            <and>
  1.1157 +                <isset property="jlink.additionalparam"/>
  1.1158 +                <length length="0" string="${jlink.additionalparam}" when="greater"/>
  1.1159 +            </and>
  1.1160 +        </condition>
  1.1161 +        <condition property="jlink.do.launcher.internal">
  1.1162 +            <and>
  1.1163 +                <istrue value="${jlink.launcher}"/>
  1.1164 +                <isset property="main.class.available"/>
  1.1165 +            </and>
  1.1166 +        </condition>
  1.1167 +        <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
  1.1168 +        <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
  1.1169 +        <exec executable="${platform.jlink}">
  1.1170 +            <arg value="--module-path"/>
  1.1171 +            <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
  1.1172 +            <arg value="--add-modules"/>
  1.1173 +            <arg value="${jlink.add.modules}"/>
  1.1174 +            <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
  1.1175 +            <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
  1.1176 +            <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
  1.1177 +            <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
  1.1178 +            <arg value="--output"/>
  1.1179 +            <arg value="${dist.jlink.output}"/>
  1.1180 +        </exec>
  1.1181 +    </target>
  1.1182 +    <target name="-post-deploy">
  1.1183 +        <!-- Empty placeholder for easier customization. -->
  1.1184 +        <!-- You can override this target in the ../build.xml file. -->
  1.1185 +    </target>
  1.1186 +    <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
  1.1187      <!--
  1.1188                  =================
  1.1189                  EXECUTION SECTION
  1.1190 @@ -740,9 +1357,9 @@
  1.1191      </target>
  1.1192      <target depends="init,compile" name="-debug-start-debuggee">
  1.1193          <j2seproject3:debug>
  1.1194 -            <customize>
  1.1195 +            <customizeDebuggee>
  1.1196                  <arg line="${application.args}"/>
  1.1197 -            </customize>
  1.1198 +            </customizeDebuggee>
  1.1199          </j2seproject3:debug>
  1.1200      </target>
  1.1201      <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  1.1202 @@ -773,7 +1390,11 @@
  1.1203                  PROFILING SECTION
  1.1204                  =================
  1.1205              -->
  1.1206 -    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
  1.1207 +    <!--
  1.1208 +                pre NB7.2 profiler integration
  1.1209 +            -->
  1.1210 +    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
  1.1211 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1.1212          <nbprofiledirect>
  1.1213              <classpath>
  1.1214                  <path path="${run.classpath}"/>
  1.1215 @@ -781,8 +1402,9 @@
  1.1216          </nbprofiledirect>
  1.1217          <profile/>
  1.1218      </target>
  1.1219 -    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
  1.1220 +    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
  1.1221          <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  1.1222 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1.1223          <nbprofiledirect>
  1.1224              <classpath>
  1.1225                  <path path="${run.classpath}"/>
  1.1226 @@ -790,12 +1412,8 @@
  1.1227          </nbprofiledirect>
  1.1228          <profile classname="${profile.class}"/>
  1.1229      </target>
  1.1230 -    <!--
  1.1231 -                =========================
  1.1232 -                APPLET PROFILING  SECTION
  1.1233 -                =========================
  1.1234 -            -->
  1.1235 -    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
  1.1236 +    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
  1.1237 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1.1238          <nbprofiledirect>
  1.1239              <classpath>
  1.1240                  <path path="${run.classpath}"/>
  1.1241 @@ -807,32 +1425,60 @@
  1.1242              </customize>
  1.1243          </profile>
  1.1244      </target>
  1.1245 -    <!--
  1.1246 -                =========================
  1.1247 -                TESTS PROFILING  SECTION
  1.1248 -                =========================
  1.1249 -            -->
  1.1250 -    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
  1.1251 +    <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  1.1252 +        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1.1253          <nbprofiledirect>
  1.1254              <classpath>
  1.1255                  <path path="${run.test.classpath}"/>
  1.1256              </classpath>
  1.1257          </nbprofiledirect>
  1.1258 -        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  1.1259 -            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1.1260 -            <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1.1261 -            <jvmarg line="${profiler.info.jvmargs}"/>
  1.1262 -            <test name="${profile.class}"/>
  1.1263 -            <classpath>
  1.1264 -                <path path="${run.test.classpath}"/>
  1.1265 -            </classpath>
  1.1266 -            <syspropertyset>
  1.1267 -                <propertyref prefix="test-sys-prop."/>
  1.1268 -                <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1.1269 -            </syspropertyset>
  1.1270 -            <formatter type="brief" usefile="false"/>
  1.1271 -            <formatter type="xml"/>
  1.1272 -        </junit>
  1.1273 +        <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
  1.1274 +            <customize>
  1.1275 +                <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
  1.1276 +                <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1.1277 +                <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1.1278 +                <jvmarg line="${profiler.info.jvmargs}"/>
  1.1279 +                <classpath>
  1.1280 +                    <path path="${run.test.classpath}"/>
  1.1281 +                </classpath>
  1.1282 +            </customize>
  1.1283 +        </j2seproject3:junit>
  1.1284 +    </target>
  1.1285 +    <!--
  1.1286 +                end of pre NB72 profiling section
  1.1287 +            -->
  1.1288 +    <target if="netbeans.home" name="-profile-check">
  1.1289 +        <condition property="profiler.configured">
  1.1290 +            <or>
  1.1291 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  1.1292 +                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  1.1293 +            </or>
  1.1294 +        </condition>
  1.1295 +    </target>
  1.1296 +    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  1.1297 +        <startprofiler/>
  1.1298 +        <antcall target="run"/>
  1.1299 +    </target>
  1.1300 +    <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.1301 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1.1302 +        <startprofiler/>
  1.1303 +        <antcall target="run-single"/>
  1.1304 +    </target>
  1.1305 +    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  1.1306 +    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  1.1307 +        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1.1308 +        <startprofiler/>
  1.1309 +        <antcall target="test-single"/>
  1.1310 +    </target>
  1.1311 +    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  1.1312 +        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1.1313 +        <startprofiler/>
  1.1314 +        <antcall target="run-test-with-main"/>
  1.1315 +    </target>
  1.1316 +    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  1.1317 +        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1.1318 +        <startprofiler/>
  1.1319 +        <antcall target="run-applet"/>
  1.1320      </target>
  1.1321      <!--
  1.1322                  ===============
  1.1323 @@ -849,11 +1495,20 @@
  1.1324                  </not>
  1.1325              </and>
  1.1326          </condition>
  1.1327 -        <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.1328 +        <condition else="" property="bug5101868workaround" value="*.java">
  1.1329 +            <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  1.1330 +        </condition>
  1.1331 +        <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
  1.1332 +            <and>
  1.1333 +                <isset property="javadoc.html5"/>
  1.1334 +                <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
  1.1335 +            </and>
  1.1336 +        </condition>
  1.1337 +        <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.1338              <classpath>
  1.1339                  <path path="${javac.classpath}"/>
  1.1340              </classpath>
  1.1341 -            <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
  1.1342 +            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1.1343                  <filename name="**/*.java"/>
  1.1344              </fileset>
  1.1345              <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1.1346 @@ -861,6 +1516,7 @@
  1.1347                  <exclude name="*.java"/>
  1.1348              </fileset>
  1.1349              <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  1.1350 +            <arg line="${javadoc.html5.cmd.line.arg}"/>
  1.1351          </javadoc>
  1.1352          <copy todir="${dist.javadoc.dir}">
  1.1353              <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  1.1354 @@ -877,7 +1533,7 @@
  1.1355      <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1.1356      <!--
  1.1357                  =========================
  1.1358 -                JUNIT COMPILATION SECTION
  1.1359 +                TEST COMPILATION SECTION
  1.1360                  =========================
  1.1361              -->
  1.1362      <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1.1363 @@ -887,11 +1543,63 @@
  1.1364          <!-- Empty placeholder for easier customization. -->
  1.1365          <!-- You can override this target in the ../build.xml file. -->
  1.1366      </target>
  1.1367 +    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
  1.1368 +        <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
  1.1369 +        <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
  1.1370 +            <and>
  1.1371 +                <isset property="test.module.name"/>
  1.1372 +                <length length="0" string="${test.module.name}" when="greater"/>
  1.1373 +            </and>
  1.1374 +        </condition>
  1.1375 +        <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
  1.1376 +            <and>
  1.1377 +                <isset property="test.module.name"/>
  1.1378 +                <length length="0" string="${test.module.name}" when="greater"/>
  1.1379 +            </and>
  1.1380 +        </condition>
  1.1381 +    </target>
  1.1382 +    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
  1.1383 +        <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
  1.1384 +            <and>
  1.1385 +                <isset property="test.module.name"/>
  1.1386 +                <length length="0" string="${test.module.name}" when="greater"/>
  1.1387 +            </and>
  1.1388 +        </condition>
  1.1389 +        <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
  1.1390 +        <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
  1.1391 +        <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
  1.1392 +            <chainedmapper>
  1.1393 +                <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
  1.1394 +                <filtermapper>
  1.1395 +                    <uniqfilter/>
  1.1396 +                    <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
  1.1397 +                </filtermapper>
  1.1398 +                <cutdirsmapper dirs="1"/>
  1.1399 +                <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
  1.1400 +            </chainedmapper>
  1.1401 +        </pathconvert>
  1.1402 +        <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
  1.1403 +            <and>
  1.1404 +                <isset property="test.module.name"/>
  1.1405 +                <length length="0" string="${test.module.name}" when="greater"/>
  1.1406 +            </and>
  1.1407 +        </condition>
  1.1408 +    </target>
  1.1409 +    <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
  1.1410 +        <property name="javac.test.sourcepath" value="${empty.dir}"/>
  1.1411 +        <property name="javac.test.compilerargs" value=""/>
  1.1412 +        <property name="run.test.jvmargs" value=""/>
  1.1413 +    </target>
  1.1414 +    <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
  1.1415      <target if="do.depend.true" name="-compile-test-depend">
  1.1416          <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  1.1417      </target>
  1.1418 -    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1.1419 -        <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.1420 +    <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1.1421 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}">
  1.1422 +            <customize>
  1.1423 +                <compilerarg line="${javac.test.compilerargs}"/>
  1.1424 +            </customize>
  1.1425 +        </j2seproject3:javac>
  1.1426          <copy todir="${build.test.classes.dir}">
  1.1427              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1.1428          </copy>
  1.1429 @@ -905,10 +1613,14 @@
  1.1430          <!-- Empty placeholder for easier customization. -->
  1.1431          <!-- You can override this target in the ../build.xml file. -->
  1.1432      </target>
  1.1433 -    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1.1434 +    <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1.1435          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1.1436          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1.1437 -        <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.1438 +        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}">
  1.1439 +            <customize>
  1.1440 +                <compilerarg line="${javac.test.compilerargs}"/>
  1.1441 +            </customize>
  1.1442 +        </j2seproject3:javac>
  1.1443          <copy todir="${build.test.classes.dir}">
  1.1444              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1.1445          </copy>
  1.1446 @@ -920,14 +1632,14 @@
  1.1447      <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.1448      <!--
  1.1449                  =======================
  1.1450 -                JUNIT EXECUTION SECTION
  1.1451 +                TEST EXECUTION SECTION
  1.1452                  =======================
  1.1453              -->
  1.1454      <target depends="init" if="have.tests" name="-pre-test-run">
  1.1455          <mkdir dir="${build.test.results.dir}"/>
  1.1456      </target>
  1.1457 -    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  1.1458 -        <j2seproject3:junit testincludes="**/*Test.java"/>
  1.1459 +    <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
  1.1460 +        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  1.1461      </target>
  1.1462      <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1.1463          <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1464 @@ -938,41 +1650,43 @@
  1.1465      <target depends="init" if="have.tests" name="-pre-test-run-single">
  1.1466          <mkdir dir="${build.test.results.dir}"/>
  1.1467      </target>
  1.1468 -    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1.1469 +    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1.1470          <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1.1471 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
  1.1472 +        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  1.1473      </target>
  1.1474      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1.1475          <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1476      </target>
  1.1477 -    <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.1478 +    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  1.1479 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  1.1480 +        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  1.1481 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1.1482 +        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  1.1483 +    </target>
  1.1484 +    <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.1485 +        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1.1486 +    </target>
  1.1487 +    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  1.1488      <!--
  1.1489                  =======================
  1.1490 -                JUNIT DEBUGGING SECTION
  1.1491 +                TEST DEBUGGING SECTION
  1.1492                  =======================
  1.1493              -->
  1.1494 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  1.1495 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  1.1496          <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1.1497 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  1.1498 -        <delete file="${test.report.file}"/>
  1.1499 -        <mkdir dir="${build.test.results.dir}"/>
  1.1500 -        <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.1501 -            <customize>
  1.1502 -                <syspropertyset>
  1.1503 -                    <propertyref prefix="test-sys-prop."/>
  1.1504 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1.1505 -                </syspropertyset>
  1.1506 -                <arg value="${test.class}"/>
  1.1507 -                <arg value="showoutput=true"/>
  1.1508 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  1.1509 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  1.1510 -            </customize>
  1.1511 -        </j2seproject3:debug>
  1.1512 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  1.1513 +    </target>
  1.1514 +    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  1.1515 +        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1.1516 +        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1.1517 +        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  1.1518      </target>
  1.1519      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1.1520          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1.1521      </target>
  1.1522 -    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1.1523 +    <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1.1524 +    <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  1.1525 +    <target depends="debug-test-method" name="debug-single-method"/>
  1.1526      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1.1527          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1.1528      </target>
  1.1529 @@ -998,9 +1712,9 @@
  1.1530      <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1.1531          <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1.1532          <j2seproject3:debug classname="sun.applet.AppletViewer">
  1.1533 -            <customize>
  1.1534 +            <customizeDebuggee>
  1.1535                  <arg value="${applet.url}"/>
  1.1536 -            </customize>
  1.1537 +            </customizeDebuggee>
  1.1538          </j2seproject3:debug>
  1.1539      </target>
  1.1540      <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1.1541 @@ -1027,6 +1741,7 @@
  1.1542      </target>
  1.1543      <target depends="init" name="-do-clean">
  1.1544          <delete dir="${build.dir}"/>
  1.1545 +        <delete dir="${dist.jlink.output}"/>
  1.1546          <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1.1547      </target>
  1.1548      <target name="-post-clean">
  1.1549 @@ -1037,9 +1752,12 @@
  1.1550      <target name="-check-call-dep">
  1.1551          <property file="${call.built.properties}" prefix="already.built."/>
  1.1552          <condition property="should.call.dep">
  1.1553 -            <not>
  1.1554 -                <isset property="already.built.${call.subproject}"/>
  1.1555 -            </not>
  1.1556 +            <and>
  1.1557 +                <not>
  1.1558 +                    <isset property="already.built.${call.subproject}"/>
  1.1559 +                </not>
  1.1560 +                <available file="${call.script}"/>
  1.1561 +            </and>
  1.1562          </condition>
  1.1563      </target>
  1.1564      <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">