1.1 --- a/samples/aserverinfo/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
1.2 +++ b/samples/aserverinfo/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
1.3 @@ -19,7 +19,7 @@
1.4 - cleanup
1.5
1.6 -->
1.7 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="aserverinfo-impl">
1.8 +<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="aserverinfo-impl">
1.9 <fail message="Please build using Ant 1.8.0 or higher.">
1.10 <condition>
1.11 <not>
1.12 @@ -46,14 +46,79 @@
1.13 <property file="${user.properties.file}"/>
1.14 <!-- The two properties below are usually overridden -->
1.15 <!-- by the active platform. Just a fallback. -->
1.16 - <property name="default.javac.source" value="1.4"/>
1.17 - <property name="default.javac.target" value="1.4"/>
1.18 + <property name="default.javac.source" value="1.6"/>
1.19 + <property name="default.javac.target" value="1.6"/>
1.20 </target>
1.21 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
1.22 <property file="nbproject/configs/${config}.properties"/>
1.23 <property file="nbproject/project.properties"/>
1.24 </target>
1.25 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
1.26 + <target name="-init-modules-supported">
1.27 + <condition property="modules.supported.internal" value="true">
1.28 + <not>
1.29 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
1.30 + </not>
1.31 + </condition>
1.32 + </target>
1.33 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
1.34 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
1.35 + <attribute name="property"/>
1.36 + <attribute name="sourcepath"/>
1.37 + <sequential>
1.38 + <loadresource property="@{property}" quiet="true">
1.39 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
1.40 + <filterchain>
1.41 + <stripjavacomments/>
1.42 + <linecontainsregexp>
1.43 + <regexp pattern="module .* \{"/>
1.44 + </linecontainsregexp>
1.45 + <tokenfilter>
1.46 + <linetokenizer/>
1.47 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
1.48 + </tokenfilter>
1.49 + <striplinebreaks/>
1.50 + </filterchain>
1.51 + </loadresource>
1.52 + </sequential>
1.53 + </macrodef>
1.54 + </target>
1.55 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
1.56 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
1.57 + <condition>
1.58 + <not>
1.59 + <antversion atleast="1.10.0"/>
1.60 + </not>
1.61 + </condition>
1.62 + </fail>
1.63 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
1.64 + <condition property="named.module.internal">
1.65 + <and>
1.66 + <isset property="module.name"/>
1.67 + <length length="0" string="${module.name}" when="greater"/>
1.68 + </and>
1.69 + </condition>
1.70 + <condition property="unnamed.module.internal">
1.71 + <not>
1.72 + <isset property="named.module.internal"/>
1.73 + </not>
1.74 + </condition>
1.75 + <property name="javac.modulepath" value=""/>
1.76 + <property name="run.modulepath" value="${javac.modulepath}"/>
1.77 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
1.78 + <property name="debug.modulepath" value="${run.modulepath}"/>
1.79 + <property name="javac.upgrademodulepath" value=""/>
1.80 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
1.81 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
1.82 + <and>
1.83 + <isset property="javac.systemmodulepath"/>
1.84 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
1.85 + </and>
1.86 + </condition>
1.87 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
1.88 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
1.89 + <property name="module.name" value=""/>
1.90 + </target>
1.91 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
1.92 <property name="platform.java" value="${java.home}/bin/java"/>
1.93 <available file="${manifest.file}" property="manifest.available"/>
1.94 <condition property="splashscreen.available">
1.95 @@ -76,7 +141,9 @@
1.96 <and>
1.97 <isset property="javac.profile"/>
1.98 <length length="0" string="${javac.profile}" when="greater"/>
1.99 - <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
1.100 + <not>
1.101 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
1.102 + </not>
1.103 </and>
1.104 </condition>
1.105 <condition property="do.archive">
1.106 @@ -87,15 +154,6 @@
1.107 <istrue value="${not.archive.disabled}"/>
1.108 </or>
1.109 </condition>
1.110 - <condition property="do.mkdist">
1.111 - <and>
1.112 - <isset property="do.archive"/>
1.113 - <isset property="libs.CopyLibs.classpath"/>
1.114 - <not>
1.115 - <istrue value="${mkdist.disabled}"/>
1.116 - </not>
1.117 - </and>
1.118 - </condition>
1.119 <condition property="do.archive+manifest.available">
1.120 <and>
1.121 <isset property="manifest.available"/>
1.122 @@ -156,6 +214,7 @@
1.123 <property name="application.args" value=""/>
1.124 <property name="source.encoding" value="${file.encoding}"/>
1.125 <property name="runtime.encoding" value="${source.encoding}"/>
1.126 + <property name="manifest.encoding" value="${source.encoding}"/>
1.127 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
1.128 <and>
1.129 <isset property="javadoc.encoding"/>
1.130 @@ -191,7 +250,12 @@
1.131 </not>
1.132 </and>
1.133 </condition>
1.134 - <property name="javac.fork" value="${jdkBug6558476}"/>
1.135 + <condition else="false" property="javac.fork">
1.136 + <or>
1.137 + <istrue value="${jdkBug6558476}"/>
1.138 + <istrue value="${javac.external.vm}"/>
1.139 + </or>
1.140 + </condition>
1.141 <property name="jar.index" value="false"/>
1.142 <property name="jar.index.metainf" value="${jar.index}"/>
1.143 <property name="copylibs.rebase" value="true"/>
1.144 @@ -217,6 +281,7 @@
1.145 <condition else="" property="testng.debug.mode" value="-mixed">
1.146 <istrue value="${junit+testng.available}"/>
1.147 </condition>
1.148 + <property name="java.failonerror" value="true"/>
1.149 </target>
1.150 <target name="-post-init">
1.151 <!-- Empty placeholder for easier customization. -->
1.152 @@ -243,11 +308,80 @@
1.153 </sequential>
1.154 </macrodef>
1.155 </target>
1.156 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
1.157 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
1.158 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
1.159 <attribute default="${src.dir}" name="srcdir"/>
1.160 <attribute default="${build.classes.dir}" name="destdir"/>
1.161 <attribute default="${javac.classpath}" name="classpath"/>
1.162 + <attribute default="${javac.modulepath}" name="modulepath"/>
1.163 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
1.164 + <attribute default="${javac.processorpath}" name="processorpath"/>
1.165 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
1.166 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
1.167 + <attribute default="${includes}" name="includes"/>
1.168 + <attribute default="${excludes}" name="excludes"/>
1.169 + <attribute default="${javac.debug}" name="debug"/>
1.170 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
1.171 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
1.172 + <attribute default="${empty.dir}" name="gensrcdir"/>
1.173 + <element name="customize" optional="true"/>
1.174 + <sequential>
1.175 + <condition property="warn.excludes.internal">
1.176 + <and>
1.177 + <isset property="named.module.internal"/>
1.178 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
1.179 + </and>
1.180 + </condition>
1.181 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
1.182 + <property location="${build.dir}/empty" name="empty.dir"/>
1.183 + <mkdir dir="${empty.dir}"/>
1.184 + <mkdir dir="@{apgeneratedsrcdir}"/>
1.185 + <condition property="processormodulepath.set">
1.186 + <resourcecount count="0" when="greater">
1.187 + <path>
1.188 + <pathelement path="@{processormodulepath}"/>
1.189 + </path>
1.190 + </resourcecount>
1.191 + </condition>
1.192 + <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.193 + <src>
1.194 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
1.195 + <include name="*"/>
1.196 + </dirset>
1.197 + </src>
1.198 + <classpath>
1.199 + <path path="@{classpath}"/>
1.200 + </classpath>
1.201 + <modulepath>
1.202 + <path path="@{modulepath}"/>
1.203 + </modulepath>
1.204 + <upgrademodulepath>
1.205 + <path path="@{upgrademodulepath}"/>
1.206 + </upgrademodulepath>
1.207 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
1.208 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
1.209 + <compilerarg line="${javac.compilerargs}"/>
1.210 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
1.211 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
1.212 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
1.213 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
1.214 + <compilerarg line="${ap.processors.internal}"/>
1.215 + <compilerarg line="${annotation.processing.processor.options}"/>
1.216 + <compilerarg value="-s"/>
1.217 + <compilerarg path="@{apgeneratedsrcdir}"/>
1.218 + <compilerarg line="${ap.proc.none.internal}"/>
1.219 + <customize/>
1.220 + </javac>
1.221 + </sequential>
1.222 + </macrodef>
1.223 + </target>
1.224 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
1.225 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
1.226 + <attribute default="${src.dir}" name="srcdir"/>
1.227 + <attribute default="${build.classes.dir}" name="destdir"/>
1.228 + <attribute default="${javac.classpath}" name="classpath"/>
1.229 + <attribute default="${javac.modulepath}" name="modulepath"/>
1.230 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
1.231 <attribute default="${javac.processorpath}" name="processorpath"/>
1.232 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
1.233 <attribute default="${includes}" name="includes"/>
1.234 @@ -284,11 +418,13 @@
1.235 </sequential>
1.236 </macrodef>
1.237 </target>
1.238 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
1.239 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
1.240 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
1.241 <attribute default="${src.dir}" name="srcdir"/>
1.242 <attribute default="${build.classes.dir}" name="destdir"/>
1.243 <attribute default="${javac.classpath}" name="classpath"/>
1.244 + <attribute default="${javac.modulepath}" name="modulepath"/>
1.245 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
1.246 <attribute default="${javac.processorpath}" name="processorpath"/>
1.247 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
1.248 <attribute default="${includes}" name="includes"/>
1.249 @@ -317,7 +453,7 @@
1.250 </sequential>
1.251 </macrodef>
1.252 </target>
1.253 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
1.254 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
1.255 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
1.256 <attribute default="${src.dir}" name="srcdir"/>
1.257 <attribute default="${build.classes.dir}" name="destdir"/>
1.258 @@ -372,7 +508,59 @@
1.259 <property name="test.binarytestincludes" value=""/>
1.260 <property name="test.binaryexcludes" value=""/>
1.261 </target>
1.262 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
1.263 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
1.264 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
1.265 + <attribute default="${includes}" name="includes"/>
1.266 + <attribute default="${excludes}" name="excludes"/>
1.267 + <element name="customizePrototype" optional="true"/>
1.268 + <sequential>
1.269 + <property name="junit.forkmode" value="perTest"/>
1.270 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.271 + <syspropertyset>
1.272 + <propertyref prefix="test-sys-prop."/>
1.273 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.274 + </syspropertyset>
1.275 + <classpath>
1.276 + <path path="${run.test.classpath}"/>
1.277 + </classpath>
1.278 + <modulepath>
1.279 + <path path="${run.test.modulepath}"/>
1.280 + </modulepath>
1.281 + <formatter type="brief" usefile="false"/>
1.282 + <formatter type="xml"/>
1.283 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.284 + <jvmarg value="-ea"/>
1.285 + <jvmarg line="${run.test.jvmargs}"/>
1.286 + <customizePrototype/>
1.287 + </junit>
1.288 + </sequential>
1.289 + </macrodef>
1.290 + </target>
1.291 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
1.292 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
1.293 + <attribute default="${includes}" name="includes"/>
1.294 + <attribute default="${excludes}" name="excludes"/>
1.295 + <element name="customizePrototype" optional="true"/>
1.296 + <sequential>
1.297 + <property name="junit.forkmode" value="perTest"/>
1.298 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.299 + <syspropertyset>
1.300 + <propertyref prefix="test-sys-prop."/>
1.301 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.302 + </syspropertyset>
1.303 + <classpath>
1.304 + <path path="${run.test.classpath}"/>
1.305 + </classpath>
1.306 + <formatter type="brief" usefile="false"/>
1.307 + <formatter type="xml"/>
1.308 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.309 + <jvmarg value="-ea"/>
1.310 + <customizePrototype/>
1.311 + </junit>
1.312 + </sequential>
1.313 + </macrodef>
1.314 + </target>
1.315 + <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.316 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
1.317 <attribute default="${includes}" name="includes"/>
1.318 <attribute default="${excludes}" name="excludes"/>
1.319 @@ -380,22 +568,16 @@
1.320 <attribute default="" name="testmethods"/>
1.321 <element name="customize" optional="true"/>
1.322 <sequential>
1.323 - <property name="junit.forkmode" value="perTest"/>
1.324 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.325 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
1.326 - <syspropertyset>
1.327 - <propertyref prefix="test-sys-prop."/>
1.328 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.329 - </syspropertyset>
1.330 - <formatter type="brief" usefile="false"/>
1.331 - <formatter type="xml"/>
1.332 - <jvmarg value="-ea"/>
1.333 - <customize/>
1.334 - </junit>
1.335 + <j2seproject3:junit-prototype>
1.336 + <customizePrototype>
1.337 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
1.338 + <customize/>
1.339 + </customizePrototype>
1.340 + </j2seproject3:junit-prototype>
1.341 </sequential>
1.342 </macrodef>
1.343 </target>
1.344 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
1.345 + <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.346 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
1.347 <attribute default="${includes}" name="includes"/>
1.348 <attribute default="${excludes}" name="excludes"/>
1.349 @@ -403,25 +585,19 @@
1.350 <attribute default="" name="testmethods"/>
1.351 <element name="customize" optional="true"/>
1.352 <sequential>
1.353 - <property name="junit.forkmode" value="perTest"/>
1.354 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.355 - <batchtest todir="${build.test.results.dir}">
1.356 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
1.357 - <filename name="@{testincludes}"/>
1.358 - </fileset>
1.359 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
1.360 - <filename name="${test.binarytestincludes}"/>
1.361 - </fileset>
1.362 - </batchtest>
1.363 - <syspropertyset>
1.364 - <propertyref prefix="test-sys-prop."/>
1.365 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.366 - </syspropertyset>
1.367 - <formatter type="brief" usefile="false"/>
1.368 - <formatter type="xml"/>
1.369 - <jvmarg value="-ea"/>
1.370 - <customize/>
1.371 - </junit>
1.372 + <j2seproject3:junit-prototype>
1.373 + <customizePrototype>
1.374 + <batchtest todir="${build.test.results.dir}">
1.375 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
1.376 + <filename name="@{testincludes}"/>
1.377 + </fileset>
1.378 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
1.379 + <filename name="${test.binarytestincludes}"/>
1.380 + </fileset>
1.381 + </batchtest>
1.382 + <customize/>
1.383 + </customizePrototype>
1.384 + </j2seproject3:junit-prototype>
1.385 </sequential>
1.386 </macrodef>
1.387 </target>
1.388 @@ -449,6 +625,10 @@
1.389 <propertyref prefix="test-sys-prop."/>
1.390 <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.391 </propertyset>
1.392 + <classpath>
1.393 + <path path="${run.test.classpath}"/>
1.394 + </classpath>
1.395 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.396 <customize/>
1.397 </testng>
1.398 </sequential>
1.399 @@ -503,10 +683,6 @@
1.400 <sequential>
1.401 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
1.402 <customize>
1.403 - <classpath>
1.404 - <path path="${run.test.classpath}"/>
1.405 - </classpath>
1.406 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.407 <jvmarg line="${run.jvmargs}"/>
1.408 <jvmarg line="${run.jvmargs.ide}"/>
1.409 </customize>
1.410 @@ -514,74 +690,20 @@
1.411 </sequential>
1.412 </macrodef>
1.413 </target>
1.414 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
1.415 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
1.416 - <attribute default="${includes}" name="includes"/>
1.417 - <attribute default="${excludes}" name="excludes"/>
1.418 - <attribute default="**" name="testincludes"/>
1.419 - <attribute default="" name="testmethods"/>
1.420 - <element name="customize" optional="true"/>
1.421 - <sequential>
1.422 - <property name="junit.forkmode" value="perTest"/>
1.423 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.424 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
1.425 - <syspropertyset>
1.426 - <propertyref prefix="test-sys-prop."/>
1.427 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.428 - </syspropertyset>
1.429 - <formatter type="brief" usefile="false"/>
1.430 - <formatter type="xml"/>
1.431 - <jvmarg value="-ea"/>
1.432 - <jvmarg line="${debug-args-line}"/>
1.433 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
1.434 - <customize/>
1.435 - </junit>
1.436 - </sequential>
1.437 - </macrodef>
1.438 - </target>
1.439 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
1.440 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
1.441 - <attribute default="${includes}" name="includes"/>
1.442 - <attribute default="${excludes}" name="excludes"/>
1.443 - <attribute default="**" name="testincludes"/>
1.444 - <attribute default="" name="testmethods"/>
1.445 - <element name="customize" optional="true"/>
1.446 - <sequential>
1.447 - <property name="junit.forkmode" value="perTest"/>
1.448 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
1.449 - <batchtest todir="${build.test.results.dir}">
1.450 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
1.451 - <filename name="@{testincludes}"/>
1.452 - </fileset>
1.453 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
1.454 - <filename name="${test.binarytestincludes}"/>
1.455 - </fileset>
1.456 - </batchtest>
1.457 - <syspropertyset>
1.458 - <propertyref prefix="test-sys-prop."/>
1.459 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.460 - </syspropertyset>
1.461 - <formatter type="brief" usefile="false"/>
1.462 - <formatter type="xml"/>
1.463 - <jvmarg value="-ea"/>
1.464 - <jvmarg line="${debug-args-line}"/>
1.465 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
1.466 - <customize/>
1.467 - </junit>
1.468 - </sequential>
1.469 - </macrodef>
1.470 - </target>
1.471 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
1.472 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
1.473 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
1.474 <attribute default="${includes}" name="includes"/>
1.475 <attribute default="${excludes}" name="excludes"/>
1.476 <attribute default="**" name="testincludes"/>
1.477 <attribute default="" name="testmethods"/>
1.478 - <element implicit="true" name="customize" optional="true"/>
1.479 + <element name="customizeDebuggee" optional="true"/>
1.480 <sequential>
1.481 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
1.482 - <customize/>
1.483 - </j2seproject3:junit-debug>
1.484 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
1.485 + <customize>
1.486 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
1.487 + <customizeDebuggee/>
1.488 + </customize>
1.489 + </j2seproject3:junit>
1.490 </sequential>
1.491 </macrodef>
1.492 </target>
1.493 @@ -600,14 +722,14 @@
1.494 <delete dir="${build.test.results.dir}" quiet="true"/>
1.495 <mkdir dir="${build.test.results.dir}"/>
1.496 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
1.497 - <customize>
1.498 + <customizeDebuggee>
1.499 <customize2/>
1.500 <jvmarg value="-ea"/>
1.501 <arg line="${testng.debug.mode}"/>
1.502 <arg line="-d ${build.test.results.dir}"/>
1.503 <arg line="-listener org.testng.reporters.VerboseReporter"/>
1.504 <arg line="${testng.cmd.args}"/>
1.505 - </customize>
1.506 + </customizeDebuggee>
1.507 </j2seproject3:debug>
1.508 </sequential>
1.509 </macrodef>
1.510 @@ -634,14 +756,10 @@
1.511 <attribute default="" name="testMethod"/>
1.512 <sequential>
1.513 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
1.514 - <customize>
1.515 - <classpath>
1.516 - <path path="${run.test.classpath}"/>
1.517 - </classpath>
1.518 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.519 + <customizeDebuggee>
1.520 <jvmarg line="${run.jvmargs}"/>
1.521 <jvmarg line="${run.jvmargs.ide}"/>
1.522 - </customize>
1.523 + </customizeDebuggee>
1.524 </j2seproject3:test-debug-impl>
1.525 </sequential>
1.526 </macrodef>
1.527 @@ -693,7 +811,7 @@
1.528 <sequential>
1.529 <property environment="env"/>
1.530 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
1.531 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
1.532 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
1.533 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.534 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1.535 <jvmarg line="${profiler.info.jvmargs}"/>
1.536 @@ -721,10 +839,14 @@
1.537 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
1.538 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
1.539 <attribute default="${main.class}" name="name"/>
1.540 + <attribute default="${debug.modulepath}" name="modulepath"/>
1.541 <attribute default="${debug.classpath}" name="classpath"/>
1.542 <attribute default="" name="stopclassname"/>
1.543 <sequential>
1.544 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
1.545 + <modulepath>
1.546 + <path path="@{modulepath}"/>
1.547 + </modulepath>
1.548 <classpath>
1.549 <path path="@{classpath}"/>
1.550 </classpath>
1.551 @@ -743,18 +865,6 @@
1.552 </macrodef>
1.553 </target>
1.554 <target name="-init-debug-args">
1.555 - <property name="version-output" value="java version "${ant.java.version}"/>
1.556 - <condition property="have-jdk-older-than-1.4">
1.557 - <or>
1.558 - <contains string="${version-output}" substring="java version "1.0"/>
1.559 - <contains string="${version-output}" substring="java version "1.1"/>
1.560 - <contains string="${version-output}" substring="java version "1.2"/>
1.561 - <contains string="${version-output}" substring="java version "1.3"/>
1.562 - </or>
1.563 - </condition>
1.564 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
1.565 - <istrue value="${have-jdk-older-than-1.4}"/>
1.566 - </condition>
1.567 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
1.568 <os family="windows"/>
1.569 </condition>
1.570 @@ -764,21 +874,46 @@
1.571 </target>
1.572 <target depends="-init-debug-args" name="-init-macrodef-debug">
1.573 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
1.574 + <attribute default="${module.name}" name="modulename"/>
1.575 <attribute default="${main.class}" name="classname"/>
1.576 + <attribute default="${debug.modulepath}" name="modulepath"/>
1.577 <attribute default="${debug.classpath}" name="classpath"/>
1.578 + <element name="customizeDebuggee" optional="true"/>
1.579 + <sequential>
1.580 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
1.581 + <customize>
1.582 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
1.583 + <customizeDebuggee/>
1.584 + </customize>
1.585 + </j2seproject1:java>
1.586 + </sequential>
1.587 + </macrodef>
1.588 + </target>
1.589 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
1.590 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
1.591 + <attribute default="${module.name}" name="modulename"/>
1.592 + <attribute default="${main.class}" name="classname"/>
1.593 + <attribute default="${run.modulepath}" name="modulepath"/>
1.594 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
1.595 + <attribute default="${run.classpath}" name="classpath"/>
1.596 + <attribute default="jvm" name="jvm"/>
1.597 <element name="customize" optional="true"/>
1.598 <sequential>
1.599 - <java classname="@{classname}" dir="${work.dir}" fork="true">
1.600 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.601 - <jvmarg line="${debug-args-line}"/>
1.602 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
1.603 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
1.604 + <classpath>
1.605 + <path path="@{classpath}"/>
1.606 + </classpath>
1.607 + <modulepath>
1.608 + <pathelement path="@{modulepath}"/>
1.609 + <pathelement location="${module.build.classes.dir}"/>
1.610 + </modulepath>
1.611 + <upgrademodulepath>
1.612 + <path path="@{upgrademodulepath}"/>
1.613 + </upgrademodulepath>
1.614 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
1.615 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
1.616 <jvmarg line="${run.jvmargs}"/>
1.617 <jvmarg line="${run.jvmargs.ide}"/>
1.618 - <classpath>
1.619 - <path path="@{classpath}"/>
1.620 - </classpath>
1.621 <syspropertyset>
1.622 <propertyref prefix="run-sys-prop."/>
1.623 <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.624 @@ -788,14 +923,49 @@
1.625 </sequential>
1.626 </macrodef>
1.627 </target>
1.628 - <target name="-init-macrodef-java">
1.629 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
1.630 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
1.631 + <attribute default="" name="modulename"/>
1.632 <attribute default="${main.class}" name="classname"/>
1.633 + <attribute default="${run.modulepath}" name="modulepath"/>
1.634 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
1.635 <attribute default="${run.classpath}" name="classpath"/>
1.636 <attribute default="jvm" name="jvm"/>
1.637 <element name="customize" optional="true"/>
1.638 <sequential>
1.639 - <java classname="@{classname}" dir="${work.dir}" fork="true">
1.640 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
1.641 + <classpath>
1.642 + <path path="@{classpath}"/>
1.643 + </classpath>
1.644 + <modulepath>
1.645 + <path path="@{modulepath}"/>
1.646 + </modulepath>
1.647 + <upgrademodulepath>
1.648 + <path path="@{upgrademodulepath}"/>
1.649 + </upgrademodulepath>
1.650 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
1.651 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
1.652 + <jvmarg line="${run.jvmargs}"/>
1.653 + <jvmarg line="${run.jvmargs.ide}"/>
1.654 + <syspropertyset>
1.655 + <propertyref prefix="run-sys-prop."/>
1.656 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.657 + </syspropertyset>
1.658 + <customize/>
1.659 + </java>
1.660 + </sequential>
1.661 + </macrodef>
1.662 + </target>
1.663 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
1.664 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
1.665 + <attribute default="" name="modulename"/>
1.666 + <attribute default="${main.class}" name="classname"/>
1.667 + <attribute default="" name="modulepath"/>
1.668 + <attribute default="${run.classpath}" name="classpath"/>
1.669 + <attribute default="jvm" name="jvm"/>
1.670 + <element name="customize" optional="true"/>
1.671 + <sequential>
1.672 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
1.673 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
1.674 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
1.675 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
1.676 @@ -813,6 +983,7 @@
1.677 </sequential>
1.678 </macrodef>
1.679 </target>
1.680 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
1.681 <target name="-init-macrodef-copylibs">
1.682 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
1.683 <attribute default="${manifest.file}" name="manifest"/>
1.684 @@ -834,7 +1005,7 @@
1.685 </chainedmapper>
1.686 </pathconvert>
1.687 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
1.688 - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1.689 + <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.690 <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
1.691 <manifest>
1.692 <attribute name="Class-Path" value="${jar.classpath}"/>
1.693 @@ -846,7 +1017,7 @@
1.694 </target>
1.695 <target name="-init-presetdef-jar">
1.696 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
1.697 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
1.698 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
1.699 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
1.700 </jar>
1.701 </presetdef>
1.702 @@ -902,7 +1073,9 @@
1.703 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
1.704 </target>
1.705 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
1.706 - <antcall target="clean"/>
1.707 + <antcall target="clean">
1.708 + <param name="no.dependencies" value="true"/>
1.709 + </antcall>
1.710 </target>
1.711 <target depends="init,deps-jar" name="-pre-pre-compile">
1.712 <mkdir dir="${build.classes.dir}"/>
1.713 @@ -943,7 +1116,7 @@
1.714 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
1.715 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.716 <j2seproject3:force-recompile/>
1.717 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
1.718 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
1.719 </target>
1.720 <target name="-post-compile-single">
1.721 <!-- Empty placeholder for easier customization. -->
1.722 @@ -963,21 +1136,40 @@
1.723 <!-- Empty placeholder for easier customization. -->
1.724 <!-- You can override this target in the ../build.xml file. -->
1.725 </target>
1.726 + <target depends="init,compile" name="-check-module-main-class">
1.727 + <pathconvert property="main.class.file">
1.728 + <string value="${main.class}"/>
1.729 + <unpackagemapper from="*" to="*.class"/>
1.730 + </pathconvert>
1.731 + <condition property="do.module.main.class">
1.732 + <and>
1.733 + <isset property="main.class.available"/>
1.734 + <available file="${build.classes.dir}/module-info.class"/>
1.735 + <available file="${build.classes.dir}/${main.class.file}"/>
1.736 + <isset property="libs.CopyLibs.classpath"/>
1.737 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
1.738 + </and>
1.739 + </condition>
1.740 + </target>
1.741 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
1.742 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
1.743 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
1.744 + </target>
1.745 <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
1.746 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
1.747 <touch file="${tmp.manifest.file}" verbose="false"/>
1.748 </target>
1.749 <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
1.750 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
1.751 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
1.752 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
1.753 </target>
1.754 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
1.755 - <manifest file="${tmp.manifest.file}" mode="update">
1.756 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1.757 <attribute name="Main-Class" value="${main.class}"/>
1.758 </manifest>
1.759 </target>
1.760 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
1.761 - <manifest file="${tmp.manifest.file}" mode="update">
1.762 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1.763 <attribute name="Profile" value="${javac.profile}"/>
1.764 </manifest>
1.765 </target>
1.766 @@ -985,25 +1177,65 @@
1.767 <basename file="${application.splash}" property="splashscreen.basename"/>
1.768 <mkdir dir="${build.classes.dir}/META-INF"/>
1.769 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
1.770 - <manifest file="${tmp.manifest.file}" mode="update">
1.771 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
1.772 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
1.773 </manifest>
1.774 </target>
1.775 - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
1.776 + <target depends="init,compile" name="-check-do-mkdist">
1.777 + <condition property="do.mkdist">
1.778 + <and>
1.779 + <isset property="do.archive"/>
1.780 + <isset property="libs.CopyLibs.classpath"/>
1.781 + <not>
1.782 + <istrue value="${mkdist.disabled}"/>
1.783 + </not>
1.784 + <not>
1.785 + <available file="${build.classes.dir}/module-info.class"/>
1.786 + </not>
1.787 + </and>
1.788 + </condition>
1.789 + </target>
1.790 + <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.791 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
1.792 <echo level="info">To run this application from the command line without Ant, try:</echo>
1.793 <property location="${dist.jar}" name="dist.jar.resolved"/>
1.794 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
1.795 </target>
1.796 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
1.797 + <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.798 <j2seproject1:jar manifest="${tmp.manifest.file}"/>
1.799 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.800 <property location="${dist.jar}" name="dist.jar.resolved"/>
1.801 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
1.802 + <isset property="named.module.internal"/>
1.803 + </condition>
1.804 <pathconvert property="run.classpath.with.dist.jar">
1.805 <path path="${run.classpath}"/>
1.806 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
1.807 + </pathconvert>
1.808 + <pathconvert property="run.modulepath.with.dist.jar">
1.809 + <path location="${dist.jar.resolved}"/>
1.810 + <path path="${run.modulepath}"/>
1.811 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1.812 </pathconvert>
1.813 - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
1.814 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
1.815 + <isset property="named.module.internal"/>
1.816 + </condition>
1.817 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
1.818 + <and>
1.819 + <isset property="modules.supported.internal"/>
1.820 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
1.821 + </and>
1.822 + </condition>
1.823 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
1.824 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
1.825 + </condition>
1.826 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
1.827 + <isset property="do.module.main.class"/>
1.828 + </condition>
1.829 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
1.830 + <isset property="named.module.internal"/>
1.831 + </condition>
1.832 + <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.833 <isset property="main.class.available"/>
1.834 </condition>
1.835 <condition else="debug" property="jar.usage.level" value="info">
1.836 @@ -1022,8 +1254,73 @@
1.837 <!-- Empty placeholder for easier customization. -->
1.838 <!-- You can override this target in the ../build.xml file. -->
1.839 </target>
1.840 - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1.841 - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
1.842 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1.843 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
1.844 + <!--
1.845 + =================
1.846 + DEPLOY SECTION
1.847 + =================
1.848 + -->
1.849 + <target name="-pre-deploy">
1.850 + <!-- Empty placeholder for easier customization. -->
1.851 + <!-- You can override this target in the ../build.xml file. -->
1.852 + </target>
1.853 + <target depends="init" name="-check-jlink">
1.854 + <condition property="do.jlink.internal">
1.855 + <and>
1.856 + <istrue value="${do.jlink}"/>
1.857 + <isset property="do.archive"/>
1.858 + <isset property="named.module.internal"/>
1.859 + </and>
1.860 + </condition>
1.861 + </target>
1.862 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
1.863 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
1.864 + <property name="jlink.launcher.name" value="${application.title}"/>
1.865 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
1.866 + <and>
1.867 + <isset property="jlink.additionalmodules"/>
1.868 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
1.869 + </and>
1.870 + </condition>
1.871 + <condition property="jlink.do.strip.internal">
1.872 + <and>
1.873 + <isset property="jlink.strip"/>
1.874 + <istrue value="${jlink.strip}"/>
1.875 + </and>
1.876 + </condition>
1.877 + <condition property="jlink.do.additionalparam.internal">
1.878 + <and>
1.879 + <isset property="jlink.additionalparam"/>
1.880 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
1.881 + </and>
1.882 + </condition>
1.883 + <condition property="jlink.do.launcher.internal">
1.884 + <and>
1.885 + <istrue value="${jlink.launcher}"/>
1.886 + <isset property="main.class.available"/>
1.887 + </and>
1.888 + </condition>
1.889 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
1.890 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
1.891 + <exec executable="${platform.jlink}">
1.892 + <arg value="--module-path"/>
1.893 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
1.894 + <arg value="--add-modules"/>
1.895 + <arg value="${jlink.add.modules}"/>
1.896 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
1.897 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
1.898 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
1.899 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
1.900 + <arg value="--output"/>
1.901 + <arg value="${dist.jlink.output}"/>
1.902 + </exec>
1.903 + </target>
1.904 + <target name="-post-deploy">
1.905 + <!-- Empty placeholder for easier customization. -->
1.906 + <!-- You can override this target in the ../build.xml file. -->
1.907 + </target>
1.908 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
1.909 <!--
1.910 =================
1.911 EXECUTION SECTION
1.912 @@ -1060,9 +1357,9 @@
1.913 </target>
1.914 <target depends="init,compile" name="-debug-start-debuggee">
1.915 <j2seproject3:debug>
1.916 - <customize>
1.917 + <customizeDebuggee>
1.918 <arg line="${application.args}"/>
1.919 - </customize>
1.920 + </customizeDebuggee>
1.921 </j2seproject3:debug>
1.922 </target>
1.923 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1.924 @@ -1128,28 +1425,24 @@
1.925 </customize>
1.926 </profile>
1.927 </target>
1.928 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1.929 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1.930 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1.931 <nbprofiledirect>
1.932 <classpath>
1.933 <path path="${run.test.classpath}"/>
1.934 </classpath>
1.935 </nbprofiledirect>
1.936 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1.937 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1.938 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
1.939 - <jvmarg line="${profiler.info.jvmargs}"/>
1.940 - <test name="${profile.class}"/>
1.941 - <classpath>
1.942 - <path path="${run.test.classpath}"/>
1.943 - </classpath>
1.944 - <syspropertyset>
1.945 - <propertyref prefix="test-sys-prop."/>
1.946 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.947 - </syspropertyset>
1.948 - <formatter type="brief" usefile="false"/>
1.949 - <formatter type="xml"/>
1.950 - </junit>
1.951 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
1.952 + <customize>
1.953 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
1.954 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1.955 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
1.956 + <jvmarg line="${profiler.info.jvmargs}"/>
1.957 + <classpath>
1.958 + <path path="${run.test.classpath}"/>
1.959 + </classpath>
1.960 + </customize>
1.961 + </j2seproject3:junit>
1.962 </target>
1.963 <!--
1.964 end of pre NB72 profiling section
1.965 @@ -1180,7 +1473,7 @@
1.966 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
1.967 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1.968 <startprofiler/>
1.969 - <antcal target="run-test-with-main"/>
1.970 + <antcall target="run-test-with-main"/>
1.971 </target>
1.972 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
1.973 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1.974 @@ -1205,6 +1498,12 @@
1.975 <condition else="" property="bug5101868workaround" value="*.java">
1.976 <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
1.977 </condition>
1.978 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
1.979 + <and>
1.980 + <isset property="javadoc.html5"/>
1.981 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
1.982 + </and>
1.983 + </condition>
1.984 <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.985 <classpath>
1.986 <path path="${javac.classpath}"/>
1.987 @@ -1217,6 +1516,7 @@
1.988 <exclude name="*.java"/>
1.989 </fileset>
1.990 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
1.991 + <arg line="${javadoc.html5.cmd.line.arg}"/>
1.992 </javadoc>
1.993 <copy todir="${dist.javadoc.dir}">
1.994 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1.995 @@ -1243,11 +1543,63 @@
1.996 <!-- Empty placeholder for easier customization. -->
1.997 <!-- You can override this target in the ../build.xml file. -->
1.998 </target>
1.999 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
1.1000 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
1.1001 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
1.1002 + <and>
1.1003 + <isset property="test.module.name"/>
1.1004 + <length length="0" string="${test.module.name}" when="greater"/>
1.1005 + </and>
1.1006 + </condition>
1.1007 + <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.1008 + <and>
1.1009 + <isset property="test.module.name"/>
1.1010 + <length length="0" string="${test.module.name}" when="greater"/>
1.1011 + </and>
1.1012 + </condition>
1.1013 + </target>
1.1014 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
1.1015 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
1.1016 + <and>
1.1017 + <isset property="test.module.name"/>
1.1018 + <length length="0" string="${test.module.name}" when="greater"/>
1.1019 + </and>
1.1020 + </condition>
1.1021 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
1.1022 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
1.1023 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
1.1024 + <chainedmapper>
1.1025 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
1.1026 + <filtermapper>
1.1027 + <uniqfilter/>
1.1028 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
1.1029 + </filtermapper>
1.1030 + <cutdirsmapper dirs="1"/>
1.1031 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
1.1032 + </chainedmapper>
1.1033 + </pathconvert>
1.1034 + <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.1035 + <and>
1.1036 + <isset property="test.module.name"/>
1.1037 + <length length="0" string="${test.module.name}" when="greater"/>
1.1038 + </and>
1.1039 + </condition>
1.1040 + </target>
1.1041 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
1.1042 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
1.1043 + <property name="javac.test.compilerargs" value=""/>
1.1044 + <property name="run.test.jvmargs" value=""/>
1.1045 + </target>
1.1046 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
1.1047 <target if="do.depend.true" name="-compile-test-depend">
1.1048 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1.1049 </target>
1.1050 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1.1051 - <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.1052 + <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.1053 + <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.1054 + <customize>
1.1055 + <compilerarg line="${javac.test.compilerargs}"/>
1.1056 + </customize>
1.1057 + </j2seproject3:javac>
1.1058 <copy todir="${build.test.classes.dir}">
1.1059 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.1060 </copy>
1.1061 @@ -1261,10 +1613,14 @@
1.1062 <!-- Empty placeholder for easier customization. -->
1.1063 <!-- You can override this target in the ../build.xml file. -->
1.1064 </target>
1.1065 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1.1066 + <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.1067 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.1068 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1.1069 - <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.1070 + <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.1071 + <customize>
1.1072 + <compilerarg line="${javac.test.compilerargs}"/>
1.1073 + </customize>
1.1074 + </j2seproject3:javac>
1.1075 <copy todir="${build.test.classes.dir}">
1.1076 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.1077 </copy>
1.1078 @@ -1282,7 +1638,7 @@
1.1079 <target depends="init" if="have.tests" name="-pre-test-run">
1.1080 <mkdir dir="${build.test.results.dir}"/>
1.1081 </target>
1.1082 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1.1083 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
1.1084 <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
1.1085 </target>
1.1086 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1.1087 @@ -1294,14 +1650,14 @@
1.1088 <target depends="init" if="have.tests" name="-pre-test-run-single">
1.1089 <mkdir dir="${build.test.results.dir}"/>
1.1090 </target>
1.1091 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1.1092 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1.1093 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1.1094 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1.1095 </target>
1.1096 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1.1097 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1.1098 </target>
1.1099 - <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.1100 + <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.1101 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1.1102 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1.1103 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1.1104 @@ -1310,7 +1666,7 @@
1.1105 <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.1106 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1.1107 </target>
1.1108 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
1.1109 + <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.1110 <!--
1.1111 =======================
1.1112 TEST DEBUGGING SECTION
1.1113 @@ -1328,8 +1684,8 @@
1.1114 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1.1115 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1.1116 </target>
1.1117 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1.1118 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1.1119 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1.1120 + <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.1121 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1.1122 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1.1123 </target>
1.1124 @@ -1355,9 +1711,9 @@
1.1125 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
1.1126 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1.1127 <j2seproject3:debug classname="sun.applet.AppletViewer">
1.1128 - <customize>
1.1129 + <customizeDebuggee>
1.1130 <arg value="${applet.url}"/>
1.1131 - </customize>
1.1132 + </customizeDebuggee>
1.1133 </j2seproject3:debug>
1.1134 </target>
1.1135 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
1.1136 @@ -1384,6 +1740,7 @@
1.1137 </target>
1.1138 <target depends="init" name="-do-clean">
1.1139 <delete dir="${build.dir}"/>
1.1140 + <delete dir="${dist.jlink.output}"/>
1.1141 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1.1142 </target>
1.1143 <target name="-post-clean">
2.1 --- a/samples/aserverinfo/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
2.2 +++ b/samples/aserverinfo/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
2.3 @@ -1,8 +1,8 @@
2.4 build.xml.data.CRC32=c82747ea
2.5 build.xml.script.CRC32=6c4c58c4
2.6 -build.xml.stylesheet.CRC32=8064a381@1.75.2.48
2.7 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
2.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
2.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
2.10 nbproject/build-impl.xml.data.CRC32=c82747ea
2.11 -nbproject/build-impl.xml.script.CRC32=ec37325a
2.12 -nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
2.13 +nbproject/build-impl.xml.script.CRC32=8f5f6e5f
2.14 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
3.1 --- a/samples/aserverinfo/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
3.2 +++ b/samples/aserverinfo/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
3.3 @@ -1,66 +1,61 @@
3.4 +#Mon Nov 11 13:03:28 CET 2019
3.5 +excludes=
3.6 +javac.deprecation=false
3.7 +file.reference.org-netbeans-modules-nbjunit.jar=../libs/dist/org-netbeans-modules-nbjunit.jar
3.8 +build.test.results.dir=${build.dir}/test/results
3.9 +run.classpath=${javac.classpath}\:${build.classes.dir}
3.10 +javadoc.nonavbar=false
3.11 +javac.test.modulepath=${javac.modulepath}
3.12 +run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
3.13 +javac.target=1.6
3.14 +javadoc.noindex=false
3.15 +javac.processormodulepath=
3.16 +javadoc.additionalparam=
3.17 +includes=**
3.18 build.classes.dir=${build.dir}/classes
3.19 +source.encoding=UTF-8
3.20 +javadoc.author=false
3.21 +test.src.dir=test
3.22 +build.dir=build
3.23 +build.test.classes.dir=${build.dir}/test/classes
3.24 +run.modulepath=${javac.modulepath}
3.25 +platform.active=default_platform
3.26 +javac.compilerargs=
3.27 +dist.jar=${dist.dir}/aserverinfo.jar
3.28 +javadoc.use=true
3.29 +build.sysclasspath=ignore
3.30 +debug.test.classpath=${run.test.classpath}
3.31 +dist.dir=dist
3.32 build.classes.excludes=**/*.java,**/*.form
3.33 -# This directory is removed when the project is cleaned:
3.34 -build.dir=build
3.35 +javadoc.splitindex=true
3.36 +javadoc.encoding=${source.encoding}
3.37 +javac.source=1.6
3.38 +javac.modulepath=
3.39 +junit.selected.version=3
3.40 +file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
3.41 +debug.classpath=${run.classpath}
3.42 +run.jvmargs=
3.43 +run.test.modulepath=${javac.test.modulepath}
3.44 build.generated.dir=${build.dir}/generated
3.45 -build.generated.sources.dir=${build.dir}/generated-sources
3.46 -# Only compile against the classpath explicitly listed here:
3.47 -build.sysclasspath=ignore
3.48 -build.test.classes.dir=${build.dir}/test/classes
3.49 -build.test.results.dir=${build.dir}/test/results
3.50 -debug.classpath=\
3.51 - ${run.classpath}
3.52 -debug.test.classpath=\
3.53 - ${run.test.classpath}
3.54 -# This directory is removed when the project is cleaned:
3.55 -dist.dir=dist
3.56 -dist.jar=${dist.dir}/aserverinfo.jar
3.57 -dist.javadoc.dir=${dist.dir}/javadoc
3.58 -excludes=
3.59 -file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
3.60 -file.reference.org-netbeans-insane.jar=../libs/dist/org-netbeans-insane.jar
3.61 -file.reference.org-netbeans-modules-nbjunit.jar=../libs/dist/org-netbeans-modules-nbjunit.jar
3.62 -file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
3.63 -includes=**
3.64 jar.compress=false
3.65 -javac.classpath=\
3.66 - ${file.reference.org-openide-util-lookup.jar}
3.67 -# Space-separated list of extra javac options
3.68 -javac.compilerargs=
3.69 -javac.deprecation=false
3.70 -javac.source=1.5
3.71 -javac.target=1.5
3.72 javac.test.classpath=\
3.73 ${javac.classpath}:\
3.74 ${build.classes.dir}:\
3.75 - ${libs.junit.classpath}:\
3.76 ${libs.junit_4.classpath}:\
3.77 ${file.reference.org-netbeans-modules-nbjunit.jar}:\
3.78 ${file.reference.org-netbeans-insane.jar}:\
3.79 - ${file.reference.junit-4.4.jar}
3.80 -javadoc.additionalparam=
3.81 -javadoc.author=false
3.82 -javadoc.encoding=${source.encoding}
3.83 -javadoc.noindex=false
3.84 -javadoc.nonavbar=false
3.85 -javadoc.notree=false
3.86 + ${file.reference.junit-4.4.jar}:\
3.87 + ${libs.hamcrest.classpath}
3.88 javadoc.private=false
3.89 -javadoc.splitindex=true
3.90 -javadoc.use=true
3.91 +file.reference.org-openide-util-lookup.jar=../libs/dist/org-openide-util-lookup.jar
3.92 +debug.test.modulepath=${run.test.modulepath}
3.93 +meta.inf.dir=${src.dir}/META-INF
3.94 +dist.javadoc.dir=${dist.dir}/javadoc
3.95 +src.dir=src
3.96 +debug.modulepath=${run.modulepath}
3.97 +javac.classpath=${file.reference.org-openide-util-lookup.jar}
3.98 +build.generated.sources.dir=${build.dir}/generated-sources
3.99 javadoc.version=false
3.100 javadoc.windowtitle=
3.101 -meta.inf.dir=${src.dir}/META-INF
3.102 -platform.active=default_platform
3.103 -run.classpath=\
3.104 - ${javac.classpath}:\
3.105 - ${build.classes.dir}
3.106 -# Space-separated list of JVM arguments used when running the project
3.107 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
3.108 -# or test-sys-prop.name=value to set system properties for unit tests):
3.109 -run.jvmargs=
3.110 -run.test.classpath=\
3.111 - ${javac.test.classpath}:\
3.112 - ${build.test.classes.dir}
3.113 -source.encoding=UTF-8
3.114 -src.dir=src
3.115 -test.src.dir=test
3.116 +javadoc.notree=false
3.117 +file.reference.org-netbeans-insane.jar=../libs/dist/org-netbeans-insane.jar
4.1 --- a/samples/cloneproblem/build.xml Mon Nov 11 05:47:32 2019 +0100
4.2 +++ b/samples/cloneproblem/build.xml Mon Nov 11 13:17:34 2019 +0100
4.3 @@ -51,8 +51,7 @@
4.4 -init-macrodef-junit: defines macro for junit execution
4.5 -init-macrodef-debug: defines macro for class debugging
4.6 -init-macrodef-java: defines macro for class execution
4.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
4.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
4.9 + -do-jar: JAR building
4.10 run: execution of project
4.11 -javadoc-build: Javadoc generation
4.12 test-report: JUnit report generation
5.1 --- a/samples/cloneproblem/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
5.2 +++ b/samples/cloneproblem/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
5.3 @@ -12,18 +12,18 @@
5.4 - execution
5.5 - debugging
5.6 - javadoc
5.7 - - junit compilation
5.8 - - junit execution
5.9 - - junit debugging
5.10 + - test compilation
5.11 + - test execution
5.12 + - test debugging
5.13 - applet
5.14 - cleanup
5.15
5.16 -->
5.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="cloneproblem-impl">
5.18 - <fail message="Please build using Ant 1.7.1 or higher.">
5.19 +<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="cloneproblem-impl">
5.20 + <fail message="Please build using Ant 1.8.0 or higher.">
5.21 <condition>
5.22 <not>
5.23 - <antversion atleast="1.7.1"/>
5.24 + <antversion atleast="1.8.0"/>
5.25 </not>
5.26 </condition>
5.27 </fail>
5.28 @@ -46,14 +46,80 @@
5.29 <property file="${user.properties.file}"/>
5.30 <!-- The two properties below are usually overridden -->
5.31 <!-- by the active platform. Just a fallback. -->
5.32 - <property name="default.javac.source" value="1.4"/>
5.33 - <property name="default.javac.target" value="1.4"/>
5.34 + <property name="default.javac.source" value="1.6"/>
5.35 + <property name="default.javac.target" value="1.6"/>
5.36 </target>
5.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
5.38 <property file="nbproject/configs/${config}.properties"/>
5.39 <property file="nbproject/project.properties"/>
5.40 </target>
5.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
5.42 + <target name="-init-modules-supported">
5.43 + <condition property="modules.supported.internal" value="true">
5.44 + <not>
5.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
5.46 + </not>
5.47 + </condition>
5.48 + </target>
5.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
5.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
5.51 + <attribute name="property"/>
5.52 + <attribute name="sourcepath"/>
5.53 + <sequential>
5.54 + <loadresource property="@{property}" quiet="true">
5.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
5.56 + <filterchain>
5.57 + <stripjavacomments/>
5.58 + <linecontainsregexp>
5.59 + <regexp pattern="module .* \{"/>
5.60 + </linecontainsregexp>
5.61 + <tokenfilter>
5.62 + <linetokenizer/>
5.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
5.64 + </tokenfilter>
5.65 + <striplinebreaks/>
5.66 + </filterchain>
5.67 + </loadresource>
5.68 + </sequential>
5.69 + </macrodef>
5.70 + </target>
5.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
5.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
5.73 + <condition>
5.74 + <not>
5.75 + <antversion atleast="1.10.0"/>
5.76 + </not>
5.77 + </condition>
5.78 + </fail>
5.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
5.80 + <condition property="named.module.internal">
5.81 + <and>
5.82 + <isset property="module.name"/>
5.83 + <length length="0" string="${module.name}" when="greater"/>
5.84 + </and>
5.85 + </condition>
5.86 + <condition property="unnamed.module.internal">
5.87 + <not>
5.88 + <isset property="named.module.internal"/>
5.89 + </not>
5.90 + </condition>
5.91 + <property name="javac.modulepath" value=""/>
5.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
5.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
5.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
5.95 + <property name="javac.upgrademodulepath" value=""/>
5.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
5.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
5.98 + <and>
5.99 + <isset property="javac.systemmodulepath"/>
5.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
5.101 + </and>
5.102 + </condition>
5.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
5.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
5.105 + <property name="module.name" value=""/>
5.106 + </target>
5.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
5.108 + <property name="platform.java" value="${java.home}/bin/java"/>
5.109 <available file="${manifest.file}" property="manifest.available"/>
5.110 <condition property="splashscreen.available">
5.111 <and>
5.112 @@ -71,31 +137,22 @@
5.113 </not>
5.114 </and>
5.115 </condition>
5.116 - <condition property="manifest.available+main.class">
5.117 + <condition property="profile.available">
5.118 <and>
5.119 - <isset property="manifest.available"/>
5.120 - <isset property="main.class.available"/>
5.121 + <isset property="javac.profile"/>
5.122 + <length length="0" string="${javac.profile}" when="greater"/>
5.123 + <not>
5.124 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
5.125 + </not>
5.126 </and>
5.127 </condition>
5.128 <condition property="do.archive">
5.129 - <not>
5.130 - <istrue value="${jar.archive.disabled}"/>
5.131 - </not>
5.132 - </condition>
5.133 - <condition property="do.mkdist">
5.134 - <and>
5.135 - <isset property="do.archive"/>
5.136 - <isset property="libs.CopyLibs.classpath"/>
5.137 + <or>
5.138 <not>
5.139 - <istrue value="${mkdist.disabled}"/>
5.140 + <istrue value="${jar.archive.disabled}"/>
5.141 </not>
5.142 - </and>
5.143 - </condition>
5.144 - <condition property="manifest.available+main.class+mkdist.available">
5.145 - <and>
5.146 - <istrue value="${manifest.available+main.class}"/>
5.147 - <isset property="do.mkdist"/>
5.148 - </and>
5.149 + <istrue value="${not.archive.disabled}"/>
5.150 + </or>
5.151 </condition>
5.152 <condition property="do.archive+manifest.available">
5.153 <and>
5.154 @@ -115,24 +172,12 @@
5.155 <istrue value="${do.archive}"/>
5.156 </and>
5.157 </condition>
5.158 - <condition property="do.archive+manifest.available+main.class">
5.159 + <condition property="do.archive+profile.available">
5.160 <and>
5.161 - <istrue value="${manifest.available+main.class}"/>
5.162 + <isset property="profile.available"/>
5.163 <istrue value="${do.archive}"/>
5.164 </and>
5.165 </condition>
5.166 - <condition property="manifest.available-mkdist.available">
5.167 - <or>
5.168 - <istrue value="${manifest.available}"/>
5.169 - <isset property="do.mkdist"/>
5.170 - </or>
5.171 - </condition>
5.172 - <condition property="manifest.available+main.class-mkdist.available">
5.173 - <or>
5.174 - <istrue value="${manifest.available+main.class}"/>
5.175 - <isset property="do.mkdist"/>
5.176 - </or>
5.177 - </condition>
5.178 <condition property="have.tests">
5.179 <or>
5.180 <available file="${test.src.dir}"/>
5.181 @@ -156,6 +201,7 @@
5.182 </and>
5.183 </condition>
5.184 <property name="run.jvmargs" value=""/>
5.185 + <property name="run.jvmargs.ide" value=""/>
5.186 <property name="javac.compilerargs" value=""/>
5.187 <property name="work.dir" value="${basedir}"/>
5.188 <condition property="no.deps">
5.189 @@ -168,6 +214,7 @@
5.190 <property name="application.args" value=""/>
5.191 <property name="source.encoding" value="${file.encoding}"/>
5.192 <property name="runtime.encoding" value="${source.encoding}"/>
5.193 + <property name="manifest.encoding" value="${source.encoding}"/>
5.194 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
5.195 <and>
5.196 <isset property="javadoc.encoding"/>
5.197 @@ -185,12 +232,56 @@
5.198 </condition>
5.199 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
5.200 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
5.201 - <length length="0" string="${endorsed.classpath}" when="greater"/>
5.202 + <and>
5.203 + <isset property="endorsed.classpath"/>
5.204 + <not>
5.205 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
5.206 + </not>
5.207 + </and>
5.208 </condition>
5.209 - <property name="javac.fork" value="true"/>
5.210 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
5.211 + <isset property="profile.available"/>
5.212 + </condition>
5.213 + <condition else="false" property="jdkBug6558476">
5.214 + <and>
5.215 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
5.216 + <not>
5.217 + <os family="unix"/>
5.218 + </not>
5.219 + </and>
5.220 + </condition>
5.221 + <condition else="false" property="javac.fork">
5.222 + <or>
5.223 + <istrue value="${jdkBug6558476}"/>
5.224 + <istrue value="${javac.external.vm}"/>
5.225 + </or>
5.226 + </condition>
5.227 <property name="jar.index" value="false"/>
5.228 <property name="jar.index.metainf" value="${jar.index}"/>
5.229 + <property name="copylibs.rebase" value="true"/>
5.230 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
5.231 + <condition property="junit.available">
5.232 + <or>
5.233 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
5.234 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
5.235 + </or>
5.236 + </condition>
5.237 + <condition property="testng.available">
5.238 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
5.239 + </condition>
5.240 + <condition property="junit+testng.available">
5.241 + <and>
5.242 + <istrue value="${junit.available}"/>
5.243 + <istrue value="${testng.available}"/>
5.244 + </and>
5.245 + </condition>
5.246 + <condition else="testng" property="testng.mode" value="mixed">
5.247 + <istrue value="${junit+testng.available}"/>
5.248 + </condition>
5.249 + <condition else="" property="testng.debug.mode" value="-mixed">
5.250 + <istrue value="${junit+testng.available}"/>
5.251 + </condition>
5.252 + <property name="java.failonerror" value="true"/>
5.253 </target>
5.254 <target name="-post-init">
5.255 <!-- Empty placeholder for easier customization. -->
5.256 @@ -217,11 +308,80 @@
5.257 </sequential>
5.258 </macrodef>
5.259 </target>
5.260 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
5.261 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
5.262 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
5.263 <attribute default="${src.dir}" name="srcdir"/>
5.264 <attribute default="${build.classes.dir}" name="destdir"/>
5.265 <attribute default="${javac.classpath}" name="classpath"/>
5.266 + <attribute default="${javac.modulepath}" name="modulepath"/>
5.267 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
5.268 + <attribute default="${javac.processorpath}" name="processorpath"/>
5.269 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
5.270 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
5.271 + <attribute default="${includes}" name="includes"/>
5.272 + <attribute default="${excludes}" name="excludes"/>
5.273 + <attribute default="${javac.debug}" name="debug"/>
5.274 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
5.275 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
5.276 + <attribute default="${empty.dir}" name="gensrcdir"/>
5.277 + <element name="customize" optional="true"/>
5.278 + <sequential>
5.279 + <condition property="warn.excludes.internal">
5.280 + <and>
5.281 + <isset property="named.module.internal"/>
5.282 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
5.283 + </and>
5.284 + </condition>
5.285 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
5.286 + <property location="${build.dir}/empty" name="empty.dir"/>
5.287 + <mkdir dir="${empty.dir}"/>
5.288 + <mkdir dir="@{apgeneratedsrcdir}"/>
5.289 + <condition property="processormodulepath.set">
5.290 + <resourcecount count="0" when="greater">
5.291 + <path>
5.292 + <pathelement path="@{processormodulepath}"/>
5.293 + </path>
5.294 + </resourcecount>
5.295 + </condition>
5.296 + <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}">
5.297 + <src>
5.298 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
5.299 + <include name="*"/>
5.300 + </dirset>
5.301 + </src>
5.302 + <classpath>
5.303 + <path path="@{classpath}"/>
5.304 + </classpath>
5.305 + <modulepath>
5.306 + <path path="@{modulepath}"/>
5.307 + </modulepath>
5.308 + <upgrademodulepath>
5.309 + <path path="@{upgrademodulepath}"/>
5.310 + </upgrademodulepath>
5.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
5.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
5.313 + <compilerarg line="${javac.compilerargs}"/>
5.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
5.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
5.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
5.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
5.318 + <compilerarg line="${ap.processors.internal}"/>
5.319 + <compilerarg line="${annotation.processing.processor.options}"/>
5.320 + <compilerarg value="-s"/>
5.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
5.322 + <compilerarg line="${ap.proc.none.internal}"/>
5.323 + <customize/>
5.324 + </javac>
5.325 + </sequential>
5.326 + </macrodef>
5.327 + </target>
5.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
5.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
5.330 + <attribute default="${src.dir}" name="srcdir"/>
5.331 + <attribute default="${build.classes.dir}" name="destdir"/>
5.332 + <attribute default="${javac.classpath}" name="classpath"/>
5.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
5.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
5.335 <attribute default="${javac.processorpath}" name="processorpath"/>
5.336 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
5.337 <attribute default="${includes}" name="includes"/>
5.338 @@ -244,6 +404,7 @@
5.339 <path path="@{classpath}"/>
5.340 </classpath>
5.341 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
5.342 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
5.343 <compilerarg line="${javac.compilerargs}"/>
5.344 <compilerarg value="-processorpath"/>
5.345 <compilerarg path="@{processorpath}:${empty.dir}"/>
5.346 @@ -257,11 +418,13 @@
5.347 </sequential>
5.348 </macrodef>
5.349 </target>
5.350 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
5.351 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
5.352 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
5.353 <attribute default="${src.dir}" name="srcdir"/>
5.354 <attribute default="${build.classes.dir}" name="destdir"/>
5.355 <attribute default="${javac.classpath}" name="classpath"/>
5.356 + <attribute default="${javac.modulepath}" name="modulepath"/>
5.357 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
5.358 <attribute default="${javac.processorpath}" name="processorpath"/>
5.359 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
5.360 <attribute default="${includes}" name="includes"/>
5.361 @@ -283,13 +446,14 @@
5.362 <path path="@{classpath}"/>
5.363 </classpath>
5.364 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
5.365 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
5.366 <compilerarg line="${javac.compilerargs}"/>
5.367 <customize/>
5.368 </javac>
5.369 </sequential>
5.370 </macrodef>
5.371 </target>
5.372 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
5.373 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
5.374 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
5.375 <attribute default="${src.dir}" name="srcdir"/>
5.376 <attribute default="${build.classes.dir}" name="destdir"/>
5.377 @@ -323,45 +487,317 @@
5.378 </sequential>
5.379 </macrodef>
5.380 </target>
5.381 - <target name="-init-macrodef-junit">
5.382 + <target if="${junit.available}" name="-init-macrodef-junit-init">
5.383 + <condition else="false" property="nb.junit.batch" value="true">
5.384 + <and>
5.385 + <istrue value="${junit.available}"/>
5.386 + <not>
5.387 + <isset property="test.method"/>
5.388 + </not>
5.389 + </and>
5.390 + </condition>
5.391 + <condition else="false" property="nb.junit.single" value="true">
5.392 + <and>
5.393 + <istrue value="${junit.available}"/>
5.394 + <isset property="test.method"/>
5.395 + </and>
5.396 + </condition>
5.397 + </target>
5.398 + <target name="-init-test-properties">
5.399 + <property name="test.binaryincludes" value="<nothing>"/>
5.400 + <property name="test.binarytestincludes" value=""/>
5.401 + <property name="test.binaryexcludes" value=""/>
5.402 + </target>
5.403 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
5.404 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
5.405 + <attribute default="${includes}" name="includes"/>
5.406 + <attribute default="${excludes}" name="excludes"/>
5.407 + <element name="customizePrototype" optional="true"/>
5.408 + <sequential>
5.409 + <property name="junit.forkmode" value="perTest"/>
5.410 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
5.411 + <syspropertyset>
5.412 + <propertyref prefix="test-sys-prop."/>
5.413 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.414 + </syspropertyset>
5.415 + <classpath>
5.416 + <path path="${run.test.classpath}"/>
5.417 + </classpath>
5.418 + <modulepath>
5.419 + <path path="${run.test.modulepath}"/>
5.420 + </modulepath>
5.421 + <formatter type="brief" usefile="false"/>
5.422 + <formatter type="xml"/>
5.423 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.424 + <jvmarg value="-ea"/>
5.425 + <jvmarg line="${run.test.jvmargs}"/>
5.426 + <customizePrototype/>
5.427 + </junit>
5.428 + </sequential>
5.429 + </macrodef>
5.430 + </target>
5.431 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
5.432 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
5.433 + <attribute default="${includes}" name="includes"/>
5.434 + <attribute default="${excludes}" name="excludes"/>
5.435 + <element name="customizePrototype" optional="true"/>
5.436 + <sequential>
5.437 + <property name="junit.forkmode" value="perTest"/>
5.438 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
5.439 + <syspropertyset>
5.440 + <propertyref prefix="test-sys-prop."/>
5.441 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.442 + </syspropertyset>
5.443 + <classpath>
5.444 + <path path="${run.test.classpath}"/>
5.445 + </classpath>
5.446 + <formatter type="brief" usefile="false"/>
5.447 + <formatter type="xml"/>
5.448 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.449 + <jvmarg value="-ea"/>
5.450 + <customizePrototype/>
5.451 + </junit>
5.452 + </sequential>
5.453 + </macrodef>
5.454 + </target>
5.455 + <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}">
5.456 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
5.457 <attribute default="${includes}" name="includes"/>
5.458 <attribute default="${excludes}" name="excludes"/>
5.459 <attribute default="**" name="testincludes"/>
5.460 + <attribute default="" name="testmethods"/>
5.461 + <element name="customize" optional="true"/>
5.462 <sequential>
5.463 - <property name="junit.forkmode" value="perTest"/>
5.464 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
5.465 - <batchtest todir="${build.test.results.dir}">
5.466 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
5.467 - <filename name="@{testincludes}"/>
5.468 - </fileset>
5.469 - </batchtest>
5.470 + <j2seproject3:junit-prototype>
5.471 + <customizePrototype>
5.472 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
5.473 + <customize/>
5.474 + </customizePrototype>
5.475 + </j2seproject3:junit-prototype>
5.476 + </sequential>
5.477 + </macrodef>
5.478 + </target>
5.479 + <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}">
5.480 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
5.481 + <attribute default="${includes}" name="includes"/>
5.482 + <attribute default="${excludes}" name="excludes"/>
5.483 + <attribute default="**" name="testincludes"/>
5.484 + <attribute default="" name="testmethods"/>
5.485 + <element name="customize" optional="true"/>
5.486 + <sequential>
5.487 + <j2seproject3:junit-prototype>
5.488 + <customizePrototype>
5.489 + <batchtest todir="${build.test.results.dir}">
5.490 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
5.491 + <filename name="@{testincludes}"/>
5.492 + </fileset>
5.493 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
5.494 + <filename name="${test.binarytestincludes}"/>
5.495 + </fileset>
5.496 + </batchtest>
5.497 + <customize/>
5.498 + </customizePrototype>
5.499 + </j2seproject3:junit-prototype>
5.500 + </sequential>
5.501 + </macrodef>
5.502 + </target>
5.503 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
5.504 + <target if="${testng.available}" name="-init-macrodef-testng">
5.505 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
5.506 + <attribute default="${includes}" name="includes"/>
5.507 + <attribute default="${excludes}" name="excludes"/>
5.508 + <attribute default="**" name="testincludes"/>
5.509 + <attribute default="" name="testmethods"/>
5.510 + <element name="customize" optional="true"/>
5.511 + <sequential>
5.512 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
5.513 + <isset property="test.method"/>
5.514 + </condition>
5.515 + <union id="test.set">
5.516 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
5.517 + <filename name="@{testincludes}"/>
5.518 + </fileset>
5.519 + </union>
5.520 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
5.521 + <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="cloneproblem" testname="TestNG tests" workingDir="${work.dir}">
5.522 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
5.523 + <propertyset>
5.524 + <propertyref prefix="test-sys-prop."/>
5.525 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.526 + </propertyset>
5.527 <classpath>
5.528 <path path="${run.test.classpath}"/>
5.529 </classpath>
5.530 - <syspropertyset>
5.531 - <propertyref prefix="test-sys-prop."/>
5.532 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.533 - </syspropertyset>
5.534 - <formatter type="brief" usefile="false"/>
5.535 - <formatter type="xml"/>
5.536 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.537 - <jvmarg value="-ea"/>
5.538 - <jvmarg line="${run.jvmargs}"/>
5.539 - </junit>
5.540 + <customize/>
5.541 + </testng>
5.542 </sequential>
5.543 </macrodef>
5.544 </target>
5.545 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
5.546 - <target name="-profile-pre-init">
5.547 + <target name="-init-macrodef-test-impl">
5.548 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
5.549 + <attribute default="${includes}" name="includes"/>
5.550 + <attribute default="${excludes}" name="excludes"/>
5.551 + <attribute default="**" name="testincludes"/>
5.552 + <attribute default="" name="testmethods"/>
5.553 + <element implicit="true" name="customize" optional="true"/>
5.554 + <sequential>
5.555 + <echo>No tests executed.</echo>
5.556 + </sequential>
5.557 + </macrodef>
5.558 + </target>
5.559 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
5.560 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
5.561 + <attribute default="${includes}" name="includes"/>
5.562 + <attribute default="${excludes}" name="excludes"/>
5.563 + <attribute default="**" name="testincludes"/>
5.564 + <attribute default="" name="testmethods"/>
5.565 + <element implicit="true" name="customize" optional="true"/>
5.566 + <sequential>
5.567 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
5.568 + <customize/>
5.569 + </j2seproject3:junit>
5.570 + </sequential>
5.571 + </macrodef>
5.572 + </target>
5.573 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
5.574 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
5.575 + <attribute default="${includes}" name="includes"/>
5.576 + <attribute default="${excludes}" name="excludes"/>
5.577 + <attribute default="**" name="testincludes"/>
5.578 + <attribute default="" name="testmethods"/>
5.579 + <element implicit="true" name="customize" optional="true"/>
5.580 + <sequential>
5.581 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
5.582 + <customize/>
5.583 + </j2seproject3:testng>
5.584 + </sequential>
5.585 + </macrodef>
5.586 + </target>
5.587 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
5.588 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
5.589 + <attribute default="${includes}" name="includes"/>
5.590 + <attribute default="${excludes}" name="excludes"/>
5.591 + <attribute default="**" name="testincludes"/>
5.592 + <attribute default="" name="testmethods"/>
5.593 + <sequential>
5.594 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
5.595 + <customize>
5.596 + <jvmarg line="${run.jvmargs}"/>
5.597 + <jvmarg line="${run.jvmargs.ide}"/>
5.598 + </customize>
5.599 + </j2seproject3:test-impl>
5.600 + </sequential>
5.601 + </macrodef>
5.602 + </target>
5.603 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
5.604 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
5.605 + <attribute default="${includes}" name="includes"/>
5.606 + <attribute default="${excludes}" name="excludes"/>
5.607 + <attribute default="**" name="testincludes"/>
5.608 + <attribute default="" name="testmethods"/>
5.609 + <element name="customizeDebuggee" optional="true"/>
5.610 + <sequential>
5.611 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
5.612 + <customize>
5.613 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
5.614 + <customizeDebuggee/>
5.615 + </customize>
5.616 + </j2seproject3:junit>
5.617 + </sequential>
5.618 + </macrodef>
5.619 + </target>
5.620 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
5.621 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
5.622 + <attribute default="${main.class}" name="testClass"/>
5.623 + <attribute default="" name="testMethod"/>
5.624 + <element name="customize2" optional="true"/>
5.625 + <sequential>
5.626 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
5.627 + <isset property="test.method"/>
5.628 + </condition>
5.629 + <condition else="-suitename cloneproblem -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
5.630 + <matches pattern=".*\.xml" string="@{testClass}"/>
5.631 + </condition>
5.632 + <delete dir="${build.test.results.dir}" quiet="true"/>
5.633 + <mkdir dir="${build.test.results.dir}"/>
5.634 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
5.635 + <customizeDebuggee>
5.636 + <customize2/>
5.637 + <jvmarg value="-ea"/>
5.638 + <arg line="${testng.debug.mode}"/>
5.639 + <arg line="-d ${build.test.results.dir}"/>
5.640 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
5.641 + <arg line="${testng.cmd.args}"/>
5.642 + </customizeDebuggee>
5.643 + </j2seproject3:debug>
5.644 + </sequential>
5.645 + </macrodef>
5.646 + </target>
5.647 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
5.648 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
5.649 + <attribute default="${main.class}" name="testClass"/>
5.650 + <attribute default="" name="testMethod"/>
5.651 + <element implicit="true" name="customize2" optional="true"/>
5.652 + <sequential>
5.653 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
5.654 + <customize2/>
5.655 + </j2seproject3:testng-debug>
5.656 + </sequential>
5.657 + </macrodef>
5.658 + </target>
5.659 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
5.660 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
5.661 + <attribute default="${includes}" name="includes"/>
5.662 + <attribute default="${excludes}" name="excludes"/>
5.663 + <attribute default="**" name="testincludes"/>
5.664 + <attribute default="" name="testmethods"/>
5.665 + <attribute default="${main.class}" name="testClass"/>
5.666 + <attribute default="" name="testMethod"/>
5.667 + <sequential>
5.668 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
5.669 + <customizeDebuggee>
5.670 + <jvmarg line="${run.jvmargs}"/>
5.671 + <jvmarg line="${run.jvmargs.ide}"/>
5.672 + </customizeDebuggee>
5.673 + </j2seproject3:test-debug-impl>
5.674 + </sequential>
5.675 + </macrodef>
5.676 + </target>
5.677 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
5.678 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
5.679 + <attribute default="${includes}" name="includes"/>
5.680 + <attribute default="${excludes}" name="excludes"/>
5.681 + <attribute default="**" name="testincludes"/>
5.682 + <attribute default="" name="testmethods"/>
5.683 + <attribute default="${main.class}" name="testClass"/>
5.684 + <attribute default="" name="testMethod"/>
5.685 + <sequential>
5.686 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
5.687 + <customize2>
5.688 + <syspropertyset>
5.689 + <propertyref prefix="test-sys-prop."/>
5.690 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.691 + </syspropertyset>
5.692 + </customize2>
5.693 + </j2seproject3:testng-debug-impl>
5.694 + </sequential>
5.695 + </macrodef>
5.696 + </target>
5.697 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
5.698 + <!--
5.699 + pre NB7.2 profiling section; consider it deprecated
5.700 + -->
5.701 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
5.702 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
5.703 <!-- Empty placeholder for easier customization. -->
5.704 <!-- You can override this target in the ../build.xml file. -->
5.705 </target>
5.706 - <target name="-profile-post-init">
5.707 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
5.708 <!-- Empty placeholder for easier customization. -->
5.709 <!-- You can override this target in the ../build.xml file. -->
5.710 </target>
5.711 - <target name="-profile-init-macrodef-profile">
5.712 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
5.713 <macrodef name="resolve">
5.714 <attribute name="name"/>
5.715 <attribute name="value"/>
5.716 @@ -375,7 +811,8 @@
5.717 <sequential>
5.718 <property environment="env"/>
5.719 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
5.720 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
5.721 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
5.722 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.723 <jvmarg value="${profiler.info.jvmargs.agent}"/>
5.724 <jvmarg line="${profiler.info.jvmargs}"/>
5.725 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
5.726 @@ -392,17 +829,24 @@
5.727 </sequential>
5.728 </macrodef>
5.729 </target>
5.730 - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
5.731 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
5.732 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
5.733 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
5.734 </target>
5.735 + <!--
5.736 + end of pre NB7.2 profiling section
5.737 + -->
5.738 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
5.739 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
5.740 <attribute default="${main.class}" name="name"/>
5.741 + <attribute default="${debug.modulepath}" name="modulepath"/>
5.742 <attribute default="${debug.classpath}" name="classpath"/>
5.743 <attribute default="" name="stopclassname"/>
5.744 <sequential>
5.745 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
5.746 + <modulepath>
5.747 + <path path="@{modulepath}"/>
5.748 + </modulepath>
5.749 <classpath>
5.750 <path path="@{classpath}"/>
5.751 </classpath>
5.752 @@ -421,18 +865,6 @@
5.753 </macrodef>
5.754 </target>
5.755 <target name="-init-debug-args">
5.756 - <property name="version-output" value="java version "${ant.java.version}"/>
5.757 - <condition property="have-jdk-older-than-1.4">
5.758 - <or>
5.759 - <contains string="${version-output}" substring="java version "1.0"/>
5.760 - <contains string="${version-output}" substring="java version "1.1"/>
5.761 - <contains string="${version-output}" substring="java version "1.2"/>
5.762 - <contains string="${version-output}" substring="java version "1.3"/>
5.763 - </or>
5.764 - </condition>
5.765 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
5.766 - <istrue value="${have-jdk-older-than-1.4}"/>
5.767 - </condition>
5.768 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
5.769 <os family="windows"/>
5.770 </condition>
5.771 @@ -442,17 +874,103 @@
5.772 </target>
5.773 <target depends="-init-debug-args" name="-init-macrodef-debug">
5.774 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
5.775 + <attribute default="${module.name}" name="modulename"/>
5.776 <attribute default="${main.class}" name="classname"/>
5.777 + <attribute default="${debug.modulepath}" name="modulepath"/>
5.778 <attribute default="${debug.classpath}" name="classpath"/>
5.779 + <element name="customizeDebuggee" optional="true"/>
5.780 + <sequential>
5.781 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
5.782 + <customize>
5.783 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
5.784 + <customizeDebuggee/>
5.785 + </customize>
5.786 + </j2seproject1:java>
5.787 + </sequential>
5.788 + </macrodef>
5.789 + </target>
5.790 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
5.791 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
5.792 + <attribute default="${module.name}" name="modulename"/>
5.793 + <attribute default="${main.class}" name="classname"/>
5.794 + <attribute default="${run.modulepath}" name="modulepath"/>
5.795 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
5.796 + <attribute default="${run.classpath}" name="classpath"/>
5.797 + <attribute default="jvm" name="jvm"/>
5.798 <element name="customize" optional="true"/>
5.799 <sequential>
5.800 - <java classname="@{classname}" dir="${work.dir}" fork="true">
5.801 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.802 - <jvmarg line="${debug-args-line}"/>
5.803 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
5.804 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
5.805 + <classpath>
5.806 + <path path="@{classpath}"/>
5.807 + </classpath>
5.808 + <modulepath>
5.809 + <pathelement path="@{modulepath}"/>
5.810 + <pathelement location="${module.build.classes.dir}"/>
5.811 + </modulepath>
5.812 + <upgrademodulepath>
5.813 + <path path="@{upgrademodulepath}"/>
5.814 + </upgrademodulepath>
5.815 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
5.816 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
5.817 <jvmarg line="${run.jvmargs}"/>
5.818 + <jvmarg line="${run.jvmargs.ide}"/>
5.819 + <syspropertyset>
5.820 + <propertyref prefix="run-sys-prop."/>
5.821 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
5.822 + </syspropertyset>
5.823 + <customize/>
5.824 + </java>
5.825 + </sequential>
5.826 + </macrodef>
5.827 + </target>
5.828 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
5.829 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
5.830 + <attribute default="" name="modulename"/>
5.831 + <attribute default="${main.class}" name="classname"/>
5.832 + <attribute default="${run.modulepath}" name="modulepath"/>
5.833 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
5.834 + <attribute default="${run.classpath}" name="classpath"/>
5.835 + <attribute default="jvm" name="jvm"/>
5.836 + <element name="customize" optional="true"/>
5.837 + <sequential>
5.838 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
5.839 + <classpath>
5.840 + <path path="@{classpath}"/>
5.841 + </classpath>
5.842 + <modulepath>
5.843 + <path path="@{modulepath}"/>
5.844 + </modulepath>
5.845 + <upgrademodulepath>
5.846 + <path path="@{upgrademodulepath}"/>
5.847 + </upgrademodulepath>
5.848 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
5.849 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
5.850 + <jvmarg line="${run.jvmargs}"/>
5.851 + <jvmarg line="${run.jvmargs.ide}"/>
5.852 + <syspropertyset>
5.853 + <propertyref prefix="run-sys-prop."/>
5.854 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
5.855 + </syspropertyset>
5.856 + <customize/>
5.857 + </java>
5.858 + </sequential>
5.859 + </macrodef>
5.860 + </target>
5.861 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
5.862 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
5.863 + <attribute default="" name="modulename"/>
5.864 + <attribute default="${main.class}" name="classname"/>
5.865 + <attribute default="" name="modulepath"/>
5.866 + <attribute default="${run.classpath}" name="classpath"/>
5.867 + <attribute default="jvm" name="jvm"/>
5.868 + <element name="customize" optional="true"/>
5.869 + <sequential>
5.870 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
5.871 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.872 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
5.873 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
5.874 + <jvmarg line="${run.jvmargs}"/>
5.875 + <jvmarg line="${run.jvmargs.ide}"/>
5.876 <classpath>
5.877 <path path="@{classpath}"/>
5.878 </classpath>
5.879 @@ -465,29 +983,7 @@
5.880 </sequential>
5.881 </macrodef>
5.882 </target>
5.883 - <target name="-init-macrodef-java">
5.884 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
5.885 - <attribute default="${main.class}" name="classname"/>
5.886 - <attribute default="${run.classpath}" name="classpath"/>
5.887 - <element name="customize" optional="true"/>
5.888 - <sequential>
5.889 - <java classname="@{classname}" dir="${work.dir}" fork="true">
5.890 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
5.891 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
5.892 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
5.893 - <jvmarg line="${run.jvmargs}"/>
5.894 - <classpath>
5.895 - <path path="@{classpath}"/>
5.896 - </classpath>
5.897 - <syspropertyset>
5.898 - <propertyref prefix="run-sys-prop."/>
5.899 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
5.900 - </syspropertyset>
5.901 - <customize/>
5.902 - </java>
5.903 - </sequential>
5.904 - </macrodef>
5.905 - </target>
5.906 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
5.907 <target name="-init-macrodef-copylibs">
5.908 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
5.909 <attribute default="${manifest.file}" name="manifest"/>
5.910 @@ -502,12 +998,15 @@
5.911 <path path="${run.classpath.without.build.classes.dir}"/>
5.912 <chainedmapper>
5.913 <flattenmapper/>
5.914 + <filtermapper>
5.915 + <replacestring from=" " to="%20"/>
5.916 + </filtermapper>
5.917 <globmapper from="*" to="lib/*"/>
5.918 </chainedmapper>
5.919 </pathconvert>
5.920 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
5.921 - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
5.922 - <fileset dir="${build.classes.dir}"/>
5.923 + <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}">
5.924 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
5.925 <manifest>
5.926 <attribute name="Class-Path" value="${jar.classpath}"/>
5.927 <customize/>
5.928 @@ -518,8 +1017,8 @@
5.929 </target>
5.930 <target name="-init-presetdef-jar">
5.931 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
5.932 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
5.933 - <j2seproject1:fileset dir="${build.classes.dir}"/>
5.934 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
5.935 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
5.936 </jar>
5.937 </presetdef>
5.938 </target>
5.939 @@ -547,7 +1046,7 @@
5.940 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
5.941 <property name="ap.cmd.line.internal" value=""/>
5.942 </target>
5.943 - <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"/>
5.944 + <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"/>
5.945 <!--
5.946 ===================
5.947 COMPILATION SECTION
5.948 @@ -574,7 +1073,9 @@
5.949 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
5.950 </target>
5.951 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
5.952 - <antcall target="clean"/>
5.953 + <antcall target="clean">
5.954 + <param name="no.dependencies" value="true"/>
5.955 + </antcall>
5.956 </target>
5.957 <target depends="init,deps-jar" name="-pre-pre-compile">
5.958 <mkdir dir="${build.classes.dir}"/>
5.959 @@ -600,7 +1101,7 @@
5.960 <target if="has.persistence.xml" name="-copy-persistence-xml">
5.961 <mkdir dir="${build.classes.dir}/META-INF"/>
5.962 <copy todir="${build.classes.dir}/META-INF">
5.963 - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
5.964 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
5.965 </copy>
5.966 </target>
5.967 <target name="-post-compile">
5.968 @@ -615,7 +1116,7 @@
5.969 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
5.970 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
5.971 <j2seproject3:force-recompile/>
5.972 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
5.973 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
5.974 </target>
5.975 <target name="-post-compile-single">
5.976 <!-- Empty placeholder for easier customization. -->
5.977 @@ -635,65 +1136,191 @@
5.978 <!-- Empty placeholder for easier customization. -->
5.979 <!-- You can override this target in the ../build.xml file. -->
5.980 </target>
5.981 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
5.982 - <j2seproject1:jar/>
5.983 + <target depends="init,compile" name="-check-module-main-class">
5.984 + <pathconvert property="main.class.file">
5.985 + <string value="${main.class}"/>
5.986 + <unpackagemapper from="*" to="*.class"/>
5.987 + </pathconvert>
5.988 + <condition property="do.module.main.class">
5.989 + <and>
5.990 + <isset property="main.class.available"/>
5.991 + <available file="${build.classes.dir}/module-info.class"/>
5.992 + <available file="${build.classes.dir}/${main.class.file}"/>
5.993 + <isset property="libs.CopyLibs.classpath"/>
5.994 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
5.995 + </and>
5.996 + </condition>
5.997 </target>
5.998 - <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">
5.999 - <j2seproject1:jar manifest="${manifest.file}"/>
5.1000 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
5.1001 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
5.1002 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
5.1003 </target>
5.1004 - <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">
5.1005 - <j2seproject1:jar manifest="${manifest.file}">
5.1006 - <j2seproject1:manifest>
5.1007 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
5.1008 - </j2seproject1:manifest>
5.1009 - </j2seproject1:jar>
5.1010 - <echo level="info">To run this application from the command line without Ant, try:</echo>
5.1011 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
5.1012 - <property location="${dist.jar}" name="dist.jar.resolved"/>
5.1013 - <pathconvert property="run.classpath.with.dist.jar">
5.1014 - <path path="${run.classpath}"/>
5.1015 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
5.1016 - </pathconvert>
5.1017 - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
5.1018 - </target>
5.1019 - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
5.1020 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
5.1021 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
5.1022 <touch file="${tmp.manifest.file}" verbose="false"/>
5.1023 </target>
5.1024 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
5.1025 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
5.1026 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
5.1027 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
5.1028 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
5.1029 </target>
5.1030 - <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">
5.1031 - <manifest file="${tmp.manifest.file}" mode="update">
5.1032 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
5.1033 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
5.1034 <attribute name="Main-Class" value="${main.class}"/>
5.1035 </manifest>
5.1036 </target>
5.1037 - <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">
5.1038 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
5.1039 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
5.1040 + <attribute name="Profile" value="${javac.profile}"/>
5.1041 + </manifest>
5.1042 + </target>
5.1043 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
5.1044 <basename file="${application.splash}" property="splashscreen.basename"/>
5.1045 <mkdir dir="${build.classes.dir}/META-INF"/>
5.1046 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
5.1047 - <manifest file="${tmp.manifest.file}" mode="update">
5.1048 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
5.1049 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
5.1050 </manifest>
5.1051 </target>
5.1052 - <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">
5.1053 + <target depends="init,compile" name="-check-do-mkdist">
5.1054 + <condition property="do.mkdist">
5.1055 + <and>
5.1056 + <isset property="do.archive"/>
5.1057 + <isset property="libs.CopyLibs.classpath"/>
5.1058 + <not>
5.1059 + <istrue value="${mkdist.disabled}"/>
5.1060 + </not>
5.1061 + <not>
5.1062 + <available file="${build.classes.dir}/module-info.class"/>
5.1063 + </not>
5.1064 + </and>
5.1065 + </condition>
5.1066 + </target>
5.1067 + <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">
5.1068 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
5.1069 <echo level="info">To run this application from the command line without Ant, try:</echo>
5.1070 <property location="${dist.jar}" name="dist.jar.resolved"/>
5.1071 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
5.1072 </target>
5.1073 - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
5.1074 + <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">
5.1075 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
5.1076 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
5.1077 + <property location="${dist.jar}" name="dist.jar.resolved"/>
5.1078 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
5.1079 + <isset property="named.module.internal"/>
5.1080 + </condition>
5.1081 + <pathconvert property="run.classpath.with.dist.jar">
5.1082 + <path path="${run.classpath}"/>
5.1083 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
5.1084 + </pathconvert>
5.1085 + <pathconvert property="run.modulepath.with.dist.jar">
5.1086 + <path location="${dist.jar.resolved}"/>
5.1087 + <path path="${run.modulepath}"/>
5.1088 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
5.1089 + </pathconvert>
5.1090 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
5.1091 + <isset property="named.module.internal"/>
5.1092 + </condition>
5.1093 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
5.1094 + <and>
5.1095 + <isset property="modules.supported.internal"/>
5.1096 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
5.1097 + </and>
5.1098 + </condition>
5.1099 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
5.1100 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
5.1101 + </condition>
5.1102 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
5.1103 + <isset property="do.module.main.class"/>
5.1104 + </condition>
5.1105 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
5.1106 + <isset property="named.module.internal"/>
5.1107 + </condition>
5.1108 + <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}">
5.1109 + <isset property="main.class.available"/>
5.1110 + </condition>
5.1111 + <condition else="debug" property="jar.usage.level" value="info">
5.1112 + <isset property="main.class.available"/>
5.1113 + </condition>
5.1114 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
5.1115 + </target>
5.1116 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
5.1117 <delete>
5.1118 <fileset file="${tmp.manifest.file}"/>
5.1119 </delete>
5.1120 </target>
5.1121 - <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"/>
5.1122 + <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"/>
5.1123 + <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"/>
5.1124 <target name="-post-jar">
5.1125 <!-- Empty placeholder for easier customization. -->
5.1126 <!-- You can override this target in the ../build.xml file. -->
5.1127 </target>
5.1128 - <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"/>
5.1129 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
5.1130 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
5.1131 + <!--
5.1132 + =================
5.1133 + DEPLOY SECTION
5.1134 + =================
5.1135 + -->
5.1136 + <target name="-pre-deploy">
5.1137 + <!-- Empty placeholder for easier customization. -->
5.1138 + <!-- You can override this target in the ../build.xml file. -->
5.1139 + </target>
5.1140 + <target depends="init" name="-check-jlink">
5.1141 + <condition property="do.jlink.internal">
5.1142 + <and>
5.1143 + <istrue value="${do.jlink}"/>
5.1144 + <isset property="do.archive"/>
5.1145 + <isset property="named.module.internal"/>
5.1146 + </and>
5.1147 + </condition>
5.1148 + </target>
5.1149 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
5.1150 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
5.1151 + <property name="jlink.launcher.name" value="${application.title}"/>
5.1152 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
5.1153 + <and>
5.1154 + <isset property="jlink.additionalmodules"/>
5.1155 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
5.1156 + </and>
5.1157 + </condition>
5.1158 + <condition property="jlink.do.strip.internal">
5.1159 + <and>
5.1160 + <isset property="jlink.strip"/>
5.1161 + <istrue value="${jlink.strip}"/>
5.1162 + </and>
5.1163 + </condition>
5.1164 + <condition property="jlink.do.additionalparam.internal">
5.1165 + <and>
5.1166 + <isset property="jlink.additionalparam"/>
5.1167 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
5.1168 + </and>
5.1169 + </condition>
5.1170 + <condition property="jlink.do.launcher.internal">
5.1171 + <and>
5.1172 + <istrue value="${jlink.launcher}"/>
5.1173 + <isset property="main.class.available"/>
5.1174 + </and>
5.1175 + </condition>
5.1176 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
5.1177 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
5.1178 + <exec executable="${platform.jlink}">
5.1179 + <arg value="--module-path"/>
5.1180 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
5.1181 + <arg value="--add-modules"/>
5.1182 + <arg value="${jlink.add.modules}"/>
5.1183 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
5.1184 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
5.1185 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
5.1186 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
5.1187 + <arg value="--output"/>
5.1188 + <arg value="${dist.jlink.output}"/>
5.1189 + </exec>
5.1190 + </target>
5.1191 + <target name="-post-deploy">
5.1192 + <!-- Empty placeholder for easier customization. -->
5.1193 + <!-- You can override this target in the ../build.xml file. -->
5.1194 + </target>
5.1195 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
5.1196 <!--
5.1197 =================
5.1198 EXECUTION SECTION
5.1199 @@ -730,9 +1357,9 @@
5.1200 </target>
5.1201 <target depends="init,compile" name="-debug-start-debuggee">
5.1202 <j2seproject3:debug>
5.1203 - <customize>
5.1204 + <customizeDebuggee>
5.1205 <arg line="${application.args}"/>
5.1206 - </customize>
5.1207 + </customizeDebuggee>
5.1208 </j2seproject3:debug>
5.1209 </target>
5.1210 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
5.1211 @@ -763,7 +1390,11 @@
5.1212 PROFILING SECTION
5.1213 =================
5.1214 -->
5.1215 - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
5.1216 + <!--
5.1217 + pre NB7.2 profiler integration
5.1218 + -->
5.1219 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
5.1220 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
5.1221 <nbprofiledirect>
5.1222 <classpath>
5.1223 <path path="${run.classpath}"/>
5.1224 @@ -771,8 +1402,9 @@
5.1225 </nbprofiledirect>
5.1226 <profile/>
5.1227 </target>
5.1228 - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
5.1229 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
5.1230 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
5.1231 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
5.1232 <nbprofiledirect>
5.1233 <classpath>
5.1234 <path path="${run.classpath}"/>
5.1235 @@ -780,12 +1412,8 @@
5.1236 </nbprofiledirect>
5.1237 <profile classname="${profile.class}"/>
5.1238 </target>
5.1239 - <!--
5.1240 - =========================
5.1241 - APPLET PROFILING SECTION
5.1242 - =========================
5.1243 - -->
5.1244 - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
5.1245 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
5.1246 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
5.1247 <nbprofiledirect>
5.1248 <classpath>
5.1249 <path path="${run.classpath}"/>
5.1250 @@ -797,32 +1425,60 @@
5.1251 </customize>
5.1252 </profile>
5.1253 </target>
5.1254 - <!--
5.1255 - =========================
5.1256 - TESTS PROFILING SECTION
5.1257 - =========================
5.1258 - -->
5.1259 - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
5.1260 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
5.1261 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
5.1262 <nbprofiledirect>
5.1263 <classpath>
5.1264 <path path="${run.test.classpath}"/>
5.1265 </classpath>
5.1266 </nbprofiledirect>
5.1267 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
5.1268 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
5.1269 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
5.1270 - <jvmarg line="${profiler.info.jvmargs}"/>
5.1271 - <test name="${profile.class}"/>
5.1272 - <classpath>
5.1273 - <path path="${run.test.classpath}"/>
5.1274 - </classpath>
5.1275 - <syspropertyset>
5.1276 - <propertyref prefix="test-sys-prop."/>
5.1277 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.1278 - </syspropertyset>
5.1279 - <formatter type="brief" usefile="false"/>
5.1280 - <formatter type="xml"/>
5.1281 - </junit>
5.1282 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
5.1283 + <customize>
5.1284 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
5.1285 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
5.1286 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
5.1287 + <jvmarg line="${profiler.info.jvmargs}"/>
5.1288 + <classpath>
5.1289 + <path path="${run.test.classpath}"/>
5.1290 + </classpath>
5.1291 + </customize>
5.1292 + </j2seproject3:junit>
5.1293 + </target>
5.1294 + <!--
5.1295 + end of pre NB72 profiling section
5.1296 + -->
5.1297 + <target if="netbeans.home" name="-profile-check">
5.1298 + <condition property="profiler.configured">
5.1299 + <or>
5.1300 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
5.1301 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
5.1302 + </or>
5.1303 + </condition>
5.1304 + </target>
5.1305 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
5.1306 + <startprofiler/>
5.1307 + <antcall target="run"/>
5.1308 + </target>
5.1309 + <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">
5.1310 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
5.1311 + <startprofiler/>
5.1312 + <antcall target="run-single"/>
5.1313 + </target>
5.1314 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
5.1315 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
5.1316 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
5.1317 + <startprofiler/>
5.1318 + <antcall target="test-single"/>
5.1319 + </target>
5.1320 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
5.1321 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
5.1322 + <startprofiler/>
5.1323 + <antcall target="run-test-with-main"/>
5.1324 + </target>
5.1325 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
5.1326 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
5.1327 + <startprofiler/>
5.1328 + <antcall target="run-applet"/>
5.1329 </target>
5.1330 <!--
5.1331 ===============
5.1332 @@ -831,16 +1487,36 @@
5.1333 -->
5.1334 <target depends="init" if="have.sources" name="-javadoc-build">
5.1335 <mkdir dir="${dist.javadoc.dir}"/>
5.1336 - <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}">
5.1337 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
5.1338 + <and>
5.1339 + <isset property="endorsed.classpath.cmd.line.arg"/>
5.1340 + <not>
5.1341 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
5.1342 + </not>
5.1343 + </and>
5.1344 + </condition>
5.1345 + <condition else="" property="bug5101868workaround" value="*.java">
5.1346 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
5.1347 + </condition>
5.1348 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
5.1349 + <and>
5.1350 + <isset property="javadoc.html5"/>
5.1351 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
5.1352 + </and>
5.1353 + </condition>
5.1354 + <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}">
5.1355 <classpath>
5.1356 <path path="${javac.classpath}"/>
5.1357 </classpath>
5.1358 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
5.1359 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
5.1360 <filename name="**/*.java"/>
5.1361 </fileset>
5.1362 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
5.1363 <include name="**/*.java"/>
5.1364 + <exclude name="*.java"/>
5.1365 </fileset>
5.1366 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
5.1367 + <arg line="${javadoc.html5.cmd.line.arg}"/>
5.1368 </javadoc>
5.1369 <copy todir="${dist.javadoc.dir}">
5.1370 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
5.1371 @@ -857,7 +1533,7 @@
5.1372 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
5.1373 <!--
5.1374 =========================
5.1375 - JUNIT COMPILATION SECTION
5.1376 + TEST COMPILATION SECTION
5.1377 =========================
5.1378 -->
5.1379 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
5.1380 @@ -867,11 +1543,63 @@
5.1381 <!-- Empty placeholder for easier customization. -->
5.1382 <!-- You can override this target in the ../build.xml file. -->
5.1383 </target>
5.1384 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
5.1385 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
5.1386 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
5.1387 + <and>
5.1388 + <isset property="test.module.name"/>
5.1389 + <length length="0" string="${test.module.name}" when="greater"/>
5.1390 + </and>
5.1391 + </condition>
5.1392 + <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">
5.1393 + <and>
5.1394 + <isset property="test.module.name"/>
5.1395 + <length length="0" string="${test.module.name}" when="greater"/>
5.1396 + </and>
5.1397 + </condition>
5.1398 + </target>
5.1399 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
5.1400 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
5.1401 + <and>
5.1402 + <isset property="test.module.name"/>
5.1403 + <length length="0" string="${test.module.name}" when="greater"/>
5.1404 + </and>
5.1405 + </condition>
5.1406 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
5.1407 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
5.1408 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
5.1409 + <chainedmapper>
5.1410 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
5.1411 + <filtermapper>
5.1412 + <uniqfilter/>
5.1413 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
5.1414 + </filtermapper>
5.1415 + <cutdirsmapper dirs="1"/>
5.1416 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
5.1417 + </chainedmapper>
5.1418 + </pathconvert>
5.1419 + <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}">
5.1420 + <and>
5.1421 + <isset property="test.module.name"/>
5.1422 + <length length="0" string="${test.module.name}" when="greater"/>
5.1423 + </and>
5.1424 + </condition>
5.1425 + </target>
5.1426 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
5.1427 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
5.1428 + <property name="javac.test.compilerargs" value=""/>
5.1429 + <property name="run.test.jvmargs" value=""/>
5.1430 + </target>
5.1431 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
5.1432 <target if="do.depend.true" name="-compile-test-depend">
5.1433 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
5.1434 </target>
5.1435 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
5.1436 - <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}"/>
5.1437 + <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">
5.1438 + <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}">
5.1439 + <customize>
5.1440 + <compilerarg line="${javac.test.compilerargs}"/>
5.1441 + </customize>
5.1442 + </j2seproject3:javac>
5.1443 <copy todir="${build.test.classes.dir}">
5.1444 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
5.1445 </copy>
5.1446 @@ -885,10 +1613,14 @@
5.1447 <!-- Empty placeholder for easier customization. -->
5.1448 <!-- You can override this target in the ../build.xml file. -->
5.1449 </target>
5.1450 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
5.1451 + <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">
5.1452 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
5.1453 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
5.1454 - <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}"/>
5.1455 + <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}">
5.1456 + <customize>
5.1457 + <compilerarg line="${javac.test.compilerargs}"/>
5.1458 + </customize>
5.1459 + </j2seproject3:javac>
5.1460 <copy todir="${build.test.classes.dir}">
5.1461 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
5.1462 </copy>
5.1463 @@ -900,14 +1632,14 @@
5.1464 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
5.1465 <!--
5.1466 =======================
5.1467 - JUNIT EXECUTION SECTION
5.1468 + TEST EXECUTION SECTION
5.1469 =======================
5.1470 -->
5.1471 <target depends="init" if="have.tests" name="-pre-test-run">
5.1472 <mkdir dir="${build.test.results.dir}"/>
5.1473 </target>
5.1474 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
5.1475 - <j2seproject3:junit testincludes="**/*Test.java"/>
5.1476 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
5.1477 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
5.1478 </target>
5.1479 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
5.1480 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
5.1481 @@ -918,41 +1650,42 @@
5.1482 <target depends="init" if="have.tests" name="-pre-test-run-single">
5.1483 <mkdir dir="${build.test.results.dir}"/>
5.1484 </target>
5.1485 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
5.1486 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
5.1487 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
5.1488 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
5.1489 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
5.1490 </target>
5.1491 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
5.1492 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
5.1493 </target>
5.1494 - <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"/>
5.1495 + <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"/>
5.1496 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
5.1497 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
5.1498 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
5.1499 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
5.1500 + </target>
5.1501 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
5.1502 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
5.1503 + </target>
5.1504 + <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"/>
5.1505 <!--
5.1506 =======================
5.1507 - JUNIT DEBUGGING SECTION
5.1508 + TEST DEBUGGING SECTION
5.1509 =======================
5.1510 -->
5.1511 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
5.1512 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
5.1513 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
5.1514 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
5.1515 - <delete file="${test.report.file}"/>
5.1516 - <mkdir dir="${build.test.results.dir}"/>
5.1517 - <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}">
5.1518 - <customize>
5.1519 - <syspropertyset>
5.1520 - <propertyref prefix="test-sys-prop."/>
5.1521 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.1522 - </syspropertyset>
5.1523 - <arg value="${test.class}"/>
5.1524 - <arg value="showoutput=true"/>
5.1525 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
5.1526 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
5.1527 - </customize>
5.1528 - </j2seproject3:debug>
5.1529 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
5.1530 + </target>
5.1531 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
5.1532 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
5.1533 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
5.1534 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
5.1535 </target>
5.1536 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
5.1537 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
5.1538 </target>
5.1539 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
5.1540 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
5.1541 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
5.1542 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
5.1543 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
5.1544 </target>
5.1545 @@ -978,9 +1711,9 @@
5.1546 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
5.1547 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
5.1548 <j2seproject3:debug classname="sun.applet.AppletViewer">
5.1549 - <customize>
5.1550 + <customizeDebuggee>
5.1551 <arg value="${applet.url}"/>
5.1552 - </customize>
5.1553 + </customizeDebuggee>
5.1554 </j2seproject3:debug>
5.1555 </target>
5.1556 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
5.1557 @@ -1007,6 +1740,7 @@
5.1558 </target>
5.1559 <target depends="init" name="-do-clean">
5.1560 <delete dir="${build.dir}"/>
5.1561 + <delete dir="${dist.jlink.output}"/>
5.1562 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
5.1563 </target>
5.1564 <target name="-post-clean">
5.1565 @@ -1017,9 +1751,12 @@
5.1566 <target name="-check-call-dep">
5.1567 <property file="${call.built.properties}" prefix="already.built."/>
5.1568 <condition property="should.call.dep">
5.1569 - <not>
5.1570 - <isset property="already.built.${call.subproject}"/>
5.1571 - </not>
5.1572 + <and>
5.1573 + <not>
5.1574 + <isset property="already.built.${call.subproject}"/>
5.1575 + </not>
5.1576 + <available file="${call.script}"/>
5.1577 + </and>
5.1578 </condition>
5.1579 </target>
5.1580 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
6.1 --- a/samples/cloneproblem/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
6.2 +++ b/samples/cloneproblem/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
6.3 @@ -1,8 +1,8 @@
6.4 build.xml.data.CRC32=2edef413
6.5 -build.xml.script.CRC32=dba6e1dd
6.6 -build.xml.stylesheet.CRC32=28e38971@1.42.0.45
6.7 +build.xml.script.CRC32=b3286d36
6.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
6.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
6.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6.11 nbproject/build-impl.xml.data.CRC32=2edef413
6.12 -nbproject/build-impl.xml.script.CRC32=53b45d06
6.13 -nbproject/build-impl.xml.stylesheet.CRC32=7bd59c26@1.42.0.45
6.14 +nbproject/build-impl.xml.script.CRC32=e41d3d3d
6.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
7.1 --- a/samples/cloneproblem/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
7.2 +++ b/samples/cloneproblem/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
7.3 @@ -18,8 +18,12 @@
7.4 #debug.transport=dt_socket
7.5 debug.classpath=\
7.6 ${run.classpath}
7.7 +debug.modulepath=\
7.8 + ${run.modulepath}
7.9 debug.test.classpath=\
7.10 ${run.test.classpath}
7.11 +debug.test.modulepath=\
7.12 + ${run.test.modulepath}
7.13 # This directory is removed when the project is cleaned:
7.14 dist.dir=dist
7.15 dist.jar=${dist.dir}/cloneproblem.jar
7.16 @@ -32,6 +36,8 @@
7.17 # Space-separated list of extra javac options
7.18 javac.compilerargs=
7.19 javac.deprecation=false
7.20 +javac.modulepath=
7.21 +javac.processormodulepath=
7.22 javac.processorpath=\
7.23 ${javac.classpath}
7.24 javac.source=1.6
7.25 @@ -40,6 +46,8 @@
7.26 ${javac.classpath}:\
7.27 ${build.classes.dir}:\
7.28 ${file.reference.junit-4.4.jar}
7.29 +javac.test.modulepath=\
7.30 + ${javac.modulepath}
7.31 javac.test.processorpath=\
7.32 ${javac.test.classpath}
7.33 javadoc.additionalparam=
7.34 @@ -63,9 +71,13 @@
7.35 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
7.36 # or test-sys-prop.name=value to set system properties for unit tests):
7.37 run.jvmargs=
7.38 +run.modulepath=\
7.39 + ${javac.modulepath}
7.40 run.test.classpath=\
7.41 ${javac.test.classpath}:\
7.42 ${build.test.classes.dir}
7.43 +run.test.modulepath=\
7.44 + ${javac.test.modulepath}
7.45 source.encoding=UTF-8
7.46 src.dir=src
7.47 test.src.dir=test
8.1 --- a/samples/codeinjection/build.xml Mon Nov 11 05:47:32 2019 +0100
8.2 +++ b/samples/codeinjection/build.xml Mon Nov 11 13:17:34 2019 +0100
8.3 @@ -51,8 +51,7 @@
8.4 -init-macrodef-junit: defines macro for junit execution
8.5 -init-macrodef-debug: defines macro for class debugging
8.6 -init-macrodef-java: defines macro for class execution
8.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
8.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
8.9 + -do-jar: JAR building
8.10 run: execution of project
8.11 -javadoc-build: Javadoc generation
8.12 test-report: JUnit report generation
9.1 --- a/samples/codeinjection/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
9.2 +++ b/samples/codeinjection/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
9.3 @@ -19,7 +19,7 @@
9.4 - cleanup
9.5
9.6 -->
9.7 -<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="codeinjection-impl">
9.8 +<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="codeinjection-impl">
9.9 <fail message="Please build using Ant 1.8.0 or higher.">
9.10 <condition>
9.11 <not>
9.12 @@ -46,14 +46,80 @@
9.13 <property file="${user.properties.file}"/>
9.14 <!-- The two properties below are usually overridden -->
9.15 <!-- by the active platform. Just a fallback. -->
9.16 - <property name="default.javac.source" value="1.4"/>
9.17 - <property name="default.javac.target" value="1.4"/>
9.18 + <property name="default.javac.source" value="1.6"/>
9.19 + <property name="default.javac.target" value="1.6"/>
9.20 </target>
9.21 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
9.22 <property file="nbproject/configs/${config}.properties"/>
9.23 <property file="nbproject/project.properties"/>
9.24 </target>
9.25 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
9.26 + <target name="-init-modules-supported">
9.27 + <condition property="modules.supported.internal" value="true">
9.28 + <not>
9.29 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
9.30 + </not>
9.31 + </condition>
9.32 + </target>
9.33 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
9.34 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
9.35 + <attribute name="property"/>
9.36 + <attribute name="sourcepath"/>
9.37 + <sequential>
9.38 + <loadresource property="@{property}" quiet="true">
9.39 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
9.40 + <filterchain>
9.41 + <stripjavacomments/>
9.42 + <linecontainsregexp>
9.43 + <regexp pattern="module .* \{"/>
9.44 + </linecontainsregexp>
9.45 + <tokenfilter>
9.46 + <linetokenizer/>
9.47 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
9.48 + </tokenfilter>
9.49 + <striplinebreaks/>
9.50 + </filterchain>
9.51 + </loadresource>
9.52 + </sequential>
9.53 + </macrodef>
9.54 + </target>
9.55 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
9.56 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
9.57 + <condition>
9.58 + <not>
9.59 + <antversion atleast="1.10.0"/>
9.60 + </not>
9.61 + </condition>
9.62 + </fail>
9.63 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
9.64 + <condition property="named.module.internal">
9.65 + <and>
9.66 + <isset property="module.name"/>
9.67 + <length length="0" string="${module.name}" when="greater"/>
9.68 + </and>
9.69 + </condition>
9.70 + <condition property="unnamed.module.internal">
9.71 + <not>
9.72 + <isset property="named.module.internal"/>
9.73 + </not>
9.74 + </condition>
9.75 + <property name="javac.modulepath" value=""/>
9.76 + <property name="run.modulepath" value="${javac.modulepath}"/>
9.77 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
9.78 + <property name="debug.modulepath" value="${run.modulepath}"/>
9.79 + <property name="javac.upgrademodulepath" value=""/>
9.80 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
9.81 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
9.82 + <and>
9.83 + <isset property="javac.systemmodulepath"/>
9.84 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
9.85 + </and>
9.86 + </condition>
9.87 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
9.88 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
9.89 + <property name="module.name" value=""/>
9.90 + </target>
9.91 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
9.92 + <property name="platform.java" value="${java.home}/bin/java"/>
9.93 <available file="${manifest.file}" property="manifest.available"/>
9.94 <condition property="splashscreen.available">
9.95 <and>
9.96 @@ -71,31 +137,22 @@
9.97 </not>
9.98 </and>
9.99 </condition>
9.100 - <condition property="manifest.available+main.class">
9.101 + <condition property="profile.available">
9.102 <and>
9.103 - <isset property="manifest.available"/>
9.104 - <isset property="main.class.available"/>
9.105 + <isset property="javac.profile"/>
9.106 + <length length="0" string="${javac.profile}" when="greater"/>
9.107 + <not>
9.108 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
9.109 + </not>
9.110 </and>
9.111 </condition>
9.112 <condition property="do.archive">
9.113 - <not>
9.114 - <istrue value="${jar.archive.disabled}"/>
9.115 - </not>
9.116 - </condition>
9.117 - <condition property="do.mkdist">
9.118 - <and>
9.119 - <isset property="do.archive"/>
9.120 - <isset property="libs.CopyLibs.classpath"/>
9.121 + <or>
9.122 <not>
9.123 - <istrue value="${mkdist.disabled}"/>
9.124 + <istrue value="${jar.archive.disabled}"/>
9.125 </not>
9.126 - </and>
9.127 - </condition>
9.128 - <condition property="manifest.available+main.class+mkdist.available">
9.129 - <and>
9.130 - <istrue value="${manifest.available+main.class}"/>
9.131 - <isset property="do.mkdist"/>
9.132 - </and>
9.133 + <istrue value="${not.archive.disabled}"/>
9.134 + </or>
9.135 </condition>
9.136 <condition property="do.archive+manifest.available">
9.137 <and>
9.138 @@ -115,24 +172,12 @@
9.139 <istrue value="${do.archive}"/>
9.140 </and>
9.141 </condition>
9.142 - <condition property="do.archive+manifest.available+main.class">
9.143 + <condition property="do.archive+profile.available">
9.144 <and>
9.145 - <istrue value="${manifest.available+main.class}"/>
9.146 + <isset property="profile.available"/>
9.147 <istrue value="${do.archive}"/>
9.148 </and>
9.149 </condition>
9.150 - <condition property="manifest.available-mkdist.available">
9.151 - <or>
9.152 - <istrue value="${manifest.available}"/>
9.153 - <isset property="do.mkdist"/>
9.154 - </or>
9.155 - </condition>
9.156 - <condition property="manifest.available+main.class-mkdist.available">
9.157 - <or>
9.158 - <istrue value="${manifest.available+main.class}"/>
9.159 - <isset property="do.mkdist"/>
9.160 - </or>
9.161 - </condition>
9.162 <condition property="have.tests">
9.163 <or>
9.164 <available file="${test.src.dir}"/>
9.165 @@ -169,6 +214,7 @@
9.166 <property name="application.args" value=""/>
9.167 <property name="source.encoding" value="${file.encoding}"/>
9.168 <property name="runtime.encoding" value="${source.encoding}"/>
9.169 + <property name="manifest.encoding" value="${source.encoding}"/>
9.170 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
9.171 <and>
9.172 <isset property="javadoc.encoding"/>
9.173 @@ -186,7 +232,15 @@
9.174 </condition>
9.175 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
9.176 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
9.177 - <length length="0" string="${endorsed.classpath}" when="greater"/>
9.178 + <and>
9.179 + <isset property="endorsed.classpath"/>
9.180 + <not>
9.181 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
9.182 + </not>
9.183 + </and>
9.184 + </condition>
9.185 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
9.186 + <isset property="profile.available"/>
9.187 </condition>
9.188 <condition else="false" property="jdkBug6558476">
9.189 <and>
9.190 @@ -196,7 +250,12 @@
9.191 </not>
9.192 </and>
9.193 </condition>
9.194 - <property name="javac.fork" value="${jdkBug6558476}"/>
9.195 + <condition else="false" property="javac.fork">
9.196 + <or>
9.197 + <istrue value="${jdkBug6558476}"/>
9.198 + <istrue value="${javac.external.vm}"/>
9.199 + </or>
9.200 + </condition>
9.201 <property name="jar.index" value="false"/>
9.202 <property name="jar.index.metainf" value="${jar.index}"/>
9.203 <property name="copylibs.rebase" value="true"/>
9.204 @@ -222,6 +281,7 @@
9.205 <condition else="" property="testng.debug.mode" value="-mixed">
9.206 <istrue value="${junit+testng.available}"/>
9.207 </condition>
9.208 + <property name="java.failonerror" value="true"/>
9.209 </target>
9.210 <target name="-post-init">
9.211 <!-- Empty placeholder for easier customization. -->
9.212 @@ -248,11 +308,80 @@
9.213 </sequential>
9.214 </macrodef>
9.215 </target>
9.216 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
9.217 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
9.218 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
9.219 <attribute default="${src.dir}" name="srcdir"/>
9.220 <attribute default="${build.classes.dir}" name="destdir"/>
9.221 <attribute default="${javac.classpath}" name="classpath"/>
9.222 + <attribute default="${javac.modulepath}" name="modulepath"/>
9.223 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
9.224 + <attribute default="${javac.processorpath}" name="processorpath"/>
9.225 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
9.226 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
9.227 + <attribute default="${includes}" name="includes"/>
9.228 + <attribute default="${excludes}" name="excludes"/>
9.229 + <attribute default="${javac.debug}" name="debug"/>
9.230 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
9.231 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
9.232 + <attribute default="${empty.dir}" name="gensrcdir"/>
9.233 + <element name="customize" optional="true"/>
9.234 + <sequential>
9.235 + <condition property="warn.excludes.internal">
9.236 + <and>
9.237 + <isset property="named.module.internal"/>
9.238 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
9.239 + </and>
9.240 + </condition>
9.241 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
9.242 + <property location="${build.dir}/empty" name="empty.dir"/>
9.243 + <mkdir dir="${empty.dir}"/>
9.244 + <mkdir dir="@{apgeneratedsrcdir}"/>
9.245 + <condition property="processormodulepath.set">
9.246 + <resourcecount count="0" when="greater">
9.247 + <path>
9.248 + <pathelement path="@{processormodulepath}"/>
9.249 + </path>
9.250 + </resourcecount>
9.251 + </condition>
9.252 + <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}">
9.253 + <src>
9.254 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
9.255 + <include name="*"/>
9.256 + </dirset>
9.257 + </src>
9.258 + <classpath>
9.259 + <path path="@{classpath}"/>
9.260 + </classpath>
9.261 + <modulepath>
9.262 + <path path="@{modulepath}"/>
9.263 + </modulepath>
9.264 + <upgrademodulepath>
9.265 + <path path="@{upgrademodulepath}"/>
9.266 + </upgrademodulepath>
9.267 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
9.268 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
9.269 + <compilerarg line="${javac.compilerargs}"/>
9.270 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
9.271 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
9.272 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
9.273 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
9.274 + <compilerarg line="${ap.processors.internal}"/>
9.275 + <compilerarg line="${annotation.processing.processor.options}"/>
9.276 + <compilerarg value="-s"/>
9.277 + <compilerarg path="@{apgeneratedsrcdir}"/>
9.278 + <compilerarg line="${ap.proc.none.internal}"/>
9.279 + <customize/>
9.280 + </javac>
9.281 + </sequential>
9.282 + </macrodef>
9.283 + </target>
9.284 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
9.285 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
9.286 + <attribute default="${src.dir}" name="srcdir"/>
9.287 + <attribute default="${build.classes.dir}" name="destdir"/>
9.288 + <attribute default="${javac.classpath}" name="classpath"/>
9.289 + <attribute default="${javac.modulepath}" name="modulepath"/>
9.290 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
9.291 <attribute default="${javac.processorpath}" name="processorpath"/>
9.292 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
9.293 <attribute default="${includes}" name="includes"/>
9.294 @@ -275,6 +404,7 @@
9.295 <path path="@{classpath}"/>
9.296 </classpath>
9.297 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
9.298 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
9.299 <compilerarg line="${javac.compilerargs}"/>
9.300 <compilerarg value="-processorpath"/>
9.301 <compilerarg path="@{processorpath}:${empty.dir}"/>
9.302 @@ -288,11 +418,13 @@
9.303 </sequential>
9.304 </macrodef>
9.305 </target>
9.306 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
9.307 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
9.308 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
9.309 <attribute default="${src.dir}" name="srcdir"/>
9.310 <attribute default="${build.classes.dir}" name="destdir"/>
9.311 <attribute default="${javac.classpath}" name="classpath"/>
9.312 + <attribute default="${javac.modulepath}" name="modulepath"/>
9.313 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
9.314 <attribute default="${javac.processorpath}" name="processorpath"/>
9.315 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
9.316 <attribute default="${includes}" name="includes"/>
9.317 @@ -314,13 +446,14 @@
9.318 <path path="@{classpath}"/>
9.319 </classpath>
9.320 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
9.321 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
9.322 <compilerarg line="${javac.compilerargs}"/>
9.323 <customize/>
9.324 </javac>
9.325 </sequential>
9.326 </macrodef>
9.327 </target>
9.328 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
9.329 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
9.330 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
9.331 <attribute default="${src.dir}" name="srcdir"/>
9.332 <attribute default="${build.classes.dir}" name="destdir"/>
9.333 @@ -370,7 +503,64 @@
9.334 </and>
9.335 </condition>
9.336 </target>
9.337 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
9.338 + <target name="-init-test-properties">
9.339 + <property name="test.binaryincludes" value="<nothing>"/>
9.340 + <property name="test.binarytestincludes" value=""/>
9.341 + <property name="test.binaryexcludes" value=""/>
9.342 + </target>
9.343 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
9.344 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
9.345 + <attribute default="${includes}" name="includes"/>
9.346 + <attribute default="${excludes}" name="excludes"/>
9.347 + <element name="customizePrototype" optional="true"/>
9.348 + <sequential>
9.349 + <property name="junit.forkmode" value="perTest"/>
9.350 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
9.351 + <syspropertyset>
9.352 + <propertyref prefix="test-sys-prop."/>
9.353 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.354 + </syspropertyset>
9.355 + <classpath>
9.356 + <path path="${run.test.classpath}"/>
9.357 + </classpath>
9.358 + <modulepath>
9.359 + <path path="${run.test.modulepath}"/>
9.360 + </modulepath>
9.361 + <formatter type="brief" usefile="false"/>
9.362 + <formatter type="xml"/>
9.363 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.364 + <jvmarg value="-ea"/>
9.365 + <jvmarg line="${run.test.jvmargs}"/>
9.366 + <customizePrototype/>
9.367 + </junit>
9.368 + </sequential>
9.369 + </macrodef>
9.370 + </target>
9.371 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
9.372 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
9.373 + <attribute default="${includes}" name="includes"/>
9.374 + <attribute default="${excludes}" name="excludes"/>
9.375 + <element name="customizePrototype" optional="true"/>
9.376 + <sequential>
9.377 + <property name="junit.forkmode" value="perTest"/>
9.378 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
9.379 + <syspropertyset>
9.380 + <propertyref prefix="test-sys-prop."/>
9.381 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.382 + </syspropertyset>
9.383 + <classpath>
9.384 + <path path="${run.test.classpath}"/>
9.385 + </classpath>
9.386 + <formatter type="brief" usefile="false"/>
9.387 + <formatter type="xml"/>
9.388 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.389 + <jvmarg value="-ea"/>
9.390 + <customizePrototype/>
9.391 + </junit>
9.392 + </sequential>
9.393 + </macrodef>
9.394 + </target>
9.395 + <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}">
9.396 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
9.397 <attribute default="${includes}" name="includes"/>
9.398 <attribute default="${excludes}" name="excludes"/>
9.399 @@ -378,22 +568,16 @@
9.400 <attribute default="" name="testmethods"/>
9.401 <element name="customize" optional="true"/>
9.402 <sequential>
9.403 - <property name="junit.forkmode" value="perTest"/>
9.404 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
9.405 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
9.406 - <syspropertyset>
9.407 - <propertyref prefix="test-sys-prop."/>
9.408 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.409 - </syspropertyset>
9.410 - <formatter type="brief" usefile="false"/>
9.411 - <formatter type="xml"/>
9.412 - <jvmarg value="-ea"/>
9.413 - <customize/>
9.414 - </junit>
9.415 + <j2seproject3:junit-prototype>
9.416 + <customizePrototype>
9.417 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
9.418 + <customize/>
9.419 + </customizePrototype>
9.420 + </j2seproject3:junit-prototype>
9.421 </sequential>
9.422 </macrodef>
9.423 </target>
9.424 - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
9.425 + <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}">
9.426 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
9.427 <attribute default="${includes}" name="includes"/>
9.428 <attribute default="${excludes}" name="excludes"/>
9.429 @@ -401,22 +585,19 @@
9.430 <attribute default="" name="testmethods"/>
9.431 <element name="customize" optional="true"/>
9.432 <sequential>
9.433 - <property name="junit.forkmode" value="perTest"/>
9.434 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
9.435 - <batchtest todir="${build.test.results.dir}">
9.436 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
9.437 - <filename name="@{testincludes}"/>
9.438 - </fileset>
9.439 - </batchtest>
9.440 - <syspropertyset>
9.441 - <propertyref prefix="test-sys-prop."/>
9.442 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.443 - </syspropertyset>
9.444 - <formatter type="brief" usefile="false"/>
9.445 - <formatter type="xml"/>
9.446 - <jvmarg value="-ea"/>
9.447 - <customize/>
9.448 - </junit>
9.449 + <j2seproject3:junit-prototype>
9.450 + <customizePrototype>
9.451 + <batchtest todir="${build.test.results.dir}">
9.452 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
9.453 + <filename name="@{testincludes}"/>
9.454 + </fileset>
9.455 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
9.456 + <filename name="${test.binarytestincludes}"/>
9.457 + </fileset>
9.458 + </batchtest>
9.459 + <customize/>
9.460 + </customizePrototype>
9.461 + </j2seproject3:junit-prototype>
9.462 </sequential>
9.463 </macrodef>
9.464 </target>
9.465 @@ -438,12 +619,16 @@
9.466 </fileset>
9.467 </union>
9.468 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
9.469 - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="codeinjection" testname="TestNG tests" workingDir="${work.dir}">
9.470 + <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="codeinjection" testname="TestNG tests" workingDir="${work.dir}">
9.471 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
9.472 <propertyset>
9.473 <propertyref prefix="test-sys-prop."/>
9.474 <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.475 </propertyset>
9.476 + <classpath>
9.477 + <path path="${run.test.classpath}"/>
9.478 + </classpath>
9.479 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.480 <customize/>
9.481 </testng>
9.482 </sequential>
9.483 @@ -498,10 +683,6 @@
9.484 <sequential>
9.485 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
9.486 <customize>
9.487 - <classpath>
9.488 - <path path="${run.test.classpath}"/>
9.489 - </classpath>
9.490 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.491 <jvmarg line="${run.jvmargs}"/>
9.492 <jvmarg line="${run.jvmargs.ide}"/>
9.493 </customize>
9.494 @@ -509,71 +690,20 @@
9.495 </sequential>
9.496 </macrodef>
9.497 </target>
9.498 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
9.499 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
9.500 - <attribute default="${includes}" name="includes"/>
9.501 - <attribute default="${excludes}" name="excludes"/>
9.502 - <attribute default="**" name="testincludes"/>
9.503 - <attribute default="" name="testmethods"/>
9.504 - <element name="customize" optional="true"/>
9.505 - <sequential>
9.506 - <property name="junit.forkmode" value="perTest"/>
9.507 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
9.508 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
9.509 - <syspropertyset>
9.510 - <propertyref prefix="test-sys-prop."/>
9.511 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.512 - </syspropertyset>
9.513 - <formatter type="brief" usefile="false"/>
9.514 - <formatter type="xml"/>
9.515 - <jvmarg value="-ea"/>
9.516 - <jvmarg line="${debug-args-line}"/>
9.517 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
9.518 - <customize/>
9.519 - </junit>
9.520 - </sequential>
9.521 - </macrodef>
9.522 - </target>
9.523 - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
9.524 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
9.525 - <attribute default="${includes}" name="includes"/>
9.526 - <attribute default="${excludes}" name="excludes"/>
9.527 - <attribute default="**" name="testincludes"/>
9.528 - <attribute default="" name="testmethods"/>
9.529 - <element name="customize" optional="true"/>
9.530 - <sequential>
9.531 - <property name="junit.forkmode" value="perTest"/>
9.532 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
9.533 - <batchtest todir="${build.test.results.dir}">
9.534 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
9.535 - <filename name="@{testincludes}"/>
9.536 - </fileset>
9.537 - </batchtest>
9.538 - <syspropertyset>
9.539 - <propertyref prefix="test-sys-prop."/>
9.540 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.541 - </syspropertyset>
9.542 - <formatter type="brief" usefile="false"/>
9.543 - <formatter type="xml"/>
9.544 - <jvmarg value="-ea"/>
9.545 - <jvmarg line="${debug-args-line}"/>
9.546 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
9.547 - <customize/>
9.548 - </junit>
9.549 - </sequential>
9.550 - </macrodef>
9.551 - </target>
9.552 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
9.553 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
9.554 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
9.555 <attribute default="${includes}" name="includes"/>
9.556 <attribute default="${excludes}" name="excludes"/>
9.557 <attribute default="**" name="testincludes"/>
9.558 <attribute default="" name="testmethods"/>
9.559 - <element implicit="true" name="customize" optional="true"/>
9.560 + <element name="customizeDebuggee" optional="true"/>
9.561 <sequential>
9.562 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
9.563 - <customize/>
9.564 - </j2seproject3:junit-debug>
9.565 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
9.566 + <customize>
9.567 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
9.568 + <customizeDebuggee/>
9.569 + </customize>
9.570 + </j2seproject3:junit>
9.571 </sequential>
9.572 </macrodef>
9.573 </target>
9.574 @@ -592,14 +722,14 @@
9.575 <delete dir="${build.test.results.dir}" quiet="true"/>
9.576 <mkdir dir="${build.test.results.dir}"/>
9.577 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
9.578 - <customize>
9.579 + <customizeDebuggee>
9.580 <customize2/>
9.581 <jvmarg value="-ea"/>
9.582 <arg line="${testng.debug.mode}"/>
9.583 <arg line="-d ${build.test.results.dir}"/>
9.584 <arg line="-listener org.testng.reporters.VerboseReporter"/>
9.585 <arg line="${testng.cmd.args}"/>
9.586 - </customize>
9.587 + </customizeDebuggee>
9.588 </j2seproject3:debug>
9.589 </sequential>
9.590 </macrodef>
9.591 @@ -626,14 +756,10 @@
9.592 <attribute default="" name="testMethod"/>
9.593 <sequential>
9.594 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
9.595 - <customize>
9.596 - <classpath>
9.597 - <path path="${run.test.classpath}"/>
9.598 - </classpath>
9.599 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.600 + <customizeDebuggee>
9.601 <jvmarg line="${run.jvmargs}"/>
9.602 <jvmarg line="${run.jvmargs.ide}"/>
9.603 - </customize>
9.604 + </customizeDebuggee>
9.605 </j2seproject3:test-debug-impl>
9.606 </sequential>
9.607 </macrodef>
9.608 @@ -685,7 +811,7 @@
9.609 <sequential>
9.610 <property environment="env"/>
9.611 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
9.612 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
9.613 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
9.614 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.615 <jvmarg value="${profiler.info.jvmargs.agent}"/>
9.616 <jvmarg line="${profiler.info.jvmargs}"/>
9.617 @@ -713,10 +839,14 @@
9.618 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
9.619 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
9.620 <attribute default="${main.class}" name="name"/>
9.621 + <attribute default="${debug.modulepath}" name="modulepath"/>
9.622 <attribute default="${debug.classpath}" name="classpath"/>
9.623 <attribute default="" name="stopclassname"/>
9.624 <sequential>
9.625 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
9.626 + <modulepath>
9.627 + <path path="@{modulepath}"/>
9.628 + </modulepath>
9.629 <classpath>
9.630 <path path="@{classpath}"/>
9.631 </classpath>
9.632 @@ -735,18 +865,6 @@
9.633 </macrodef>
9.634 </target>
9.635 <target name="-init-debug-args">
9.636 - <property name="version-output" value="java version "${ant.java.version}"/>
9.637 - <condition property="have-jdk-older-than-1.4">
9.638 - <or>
9.639 - <contains string="${version-output}" substring="java version "1.0"/>
9.640 - <contains string="${version-output}" substring="java version "1.1"/>
9.641 - <contains string="${version-output}" substring="java version "1.2"/>
9.642 - <contains string="${version-output}" substring="java version "1.3"/>
9.643 - </or>
9.644 - </condition>
9.645 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
9.646 - <istrue value="${have-jdk-older-than-1.4}"/>
9.647 - </condition>
9.648 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
9.649 <os family="windows"/>
9.650 </condition>
9.651 @@ -756,21 +874,46 @@
9.652 </target>
9.653 <target depends="-init-debug-args" name="-init-macrodef-debug">
9.654 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
9.655 + <attribute default="${module.name}" name="modulename"/>
9.656 <attribute default="${main.class}" name="classname"/>
9.657 + <attribute default="${debug.modulepath}" name="modulepath"/>
9.658 <attribute default="${debug.classpath}" name="classpath"/>
9.659 + <element name="customizeDebuggee" optional="true"/>
9.660 + <sequential>
9.661 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
9.662 + <customize>
9.663 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
9.664 + <customizeDebuggee/>
9.665 + </customize>
9.666 + </j2seproject1:java>
9.667 + </sequential>
9.668 + </macrodef>
9.669 + </target>
9.670 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
9.671 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
9.672 + <attribute default="${module.name}" name="modulename"/>
9.673 + <attribute default="${main.class}" name="classname"/>
9.674 + <attribute default="${run.modulepath}" name="modulepath"/>
9.675 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
9.676 + <attribute default="${run.classpath}" name="classpath"/>
9.677 + <attribute default="jvm" name="jvm"/>
9.678 <element name="customize" optional="true"/>
9.679 <sequential>
9.680 - <java classname="@{classname}" dir="${work.dir}" fork="true">
9.681 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.682 - <jvmarg line="${debug-args-line}"/>
9.683 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
9.684 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
9.685 + <classpath>
9.686 + <path path="@{classpath}"/>
9.687 + </classpath>
9.688 + <modulepath>
9.689 + <pathelement path="@{modulepath}"/>
9.690 + <pathelement location="${module.build.classes.dir}"/>
9.691 + </modulepath>
9.692 + <upgrademodulepath>
9.693 + <path path="@{upgrademodulepath}"/>
9.694 + </upgrademodulepath>
9.695 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
9.696 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
9.697 <jvmarg line="${run.jvmargs}"/>
9.698 <jvmarg line="${run.jvmargs.ide}"/>
9.699 - <classpath>
9.700 - <path path="@{classpath}"/>
9.701 - </classpath>
9.702 <syspropertyset>
9.703 <propertyref prefix="run-sys-prop."/>
9.704 <mapper from="run-sys-prop.*" to="*" type="glob"/>
9.705 @@ -780,14 +923,49 @@
9.706 </sequential>
9.707 </macrodef>
9.708 </target>
9.709 - <target name="-init-macrodef-java">
9.710 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
9.711 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
9.712 + <attribute default="" name="modulename"/>
9.713 <attribute default="${main.class}" name="classname"/>
9.714 + <attribute default="${run.modulepath}" name="modulepath"/>
9.715 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
9.716 <attribute default="${run.classpath}" name="classpath"/>
9.717 <attribute default="jvm" name="jvm"/>
9.718 <element name="customize" optional="true"/>
9.719 <sequential>
9.720 - <java classname="@{classname}" dir="${work.dir}" fork="true">
9.721 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
9.722 + <classpath>
9.723 + <path path="@{classpath}"/>
9.724 + </classpath>
9.725 + <modulepath>
9.726 + <path path="@{modulepath}"/>
9.727 + </modulepath>
9.728 + <upgrademodulepath>
9.729 + <path path="@{upgrademodulepath}"/>
9.730 + </upgrademodulepath>
9.731 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
9.732 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
9.733 + <jvmarg line="${run.jvmargs}"/>
9.734 + <jvmarg line="${run.jvmargs.ide}"/>
9.735 + <syspropertyset>
9.736 + <propertyref prefix="run-sys-prop."/>
9.737 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
9.738 + </syspropertyset>
9.739 + <customize/>
9.740 + </java>
9.741 + </sequential>
9.742 + </macrodef>
9.743 + </target>
9.744 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
9.745 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
9.746 + <attribute default="" name="modulename"/>
9.747 + <attribute default="${main.class}" name="classname"/>
9.748 + <attribute default="" name="modulepath"/>
9.749 + <attribute default="${run.classpath}" name="classpath"/>
9.750 + <attribute default="jvm" name="jvm"/>
9.751 + <element name="customize" optional="true"/>
9.752 + <sequential>
9.753 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
9.754 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
9.755 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
9.756 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
9.757 @@ -805,6 +983,7 @@
9.758 </sequential>
9.759 </macrodef>
9.760 </target>
9.761 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
9.762 <target name="-init-macrodef-copylibs">
9.763 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
9.764 <attribute default="${manifest.file}" name="manifest"/>
9.765 @@ -826,8 +1005,8 @@
9.766 </chainedmapper>
9.767 </pathconvert>
9.768 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
9.769 - <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}">
9.770 - <fileset dir="${build.classes.dir}"/>
9.771 + <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}">
9.772 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
9.773 <manifest>
9.774 <attribute name="Class-Path" value="${jar.classpath}"/>
9.775 <customize/>
9.776 @@ -838,8 +1017,8 @@
9.777 </target>
9.778 <target name="-init-presetdef-jar">
9.779 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
9.780 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
9.781 - <j2seproject1:fileset dir="${build.classes.dir}"/>
9.782 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
9.783 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
9.784 </jar>
9.785 </presetdef>
9.786 </target>
9.787 @@ -894,7 +1073,9 @@
9.788 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
9.789 </target>
9.790 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
9.791 - <antcall target="clean"/>
9.792 + <antcall target="clean">
9.793 + <param name="no.dependencies" value="true"/>
9.794 + </antcall>
9.795 </target>
9.796 <target depends="init,deps-jar" name="-pre-pre-compile">
9.797 <mkdir dir="${build.classes.dir}"/>
9.798 @@ -920,7 +1101,7 @@
9.799 <target if="has.persistence.xml" name="-copy-persistence-xml">
9.800 <mkdir dir="${build.classes.dir}/META-INF"/>
9.801 <copy todir="${build.classes.dir}/META-INF">
9.802 - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
9.803 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
9.804 </copy>
9.805 </target>
9.806 <target name="-post-compile">
9.807 @@ -935,7 +1116,7 @@
9.808 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
9.809 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
9.810 <j2seproject3:force-recompile/>
9.811 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
9.812 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
9.813 </target>
9.814 <target name="-post-compile-single">
9.815 <!-- Empty placeholder for easier customization. -->
9.816 @@ -955,65 +1136,191 @@
9.817 <!-- Empty placeholder for easier customization. -->
9.818 <!-- You can override this target in the ../build.xml file. -->
9.819 </target>
9.820 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
9.821 - <j2seproject1:jar/>
9.822 + <target depends="init,compile" name="-check-module-main-class">
9.823 + <pathconvert property="main.class.file">
9.824 + <string value="${main.class}"/>
9.825 + <unpackagemapper from="*" to="*.class"/>
9.826 + </pathconvert>
9.827 + <condition property="do.module.main.class">
9.828 + <and>
9.829 + <isset property="main.class.available"/>
9.830 + <available file="${build.classes.dir}/module-info.class"/>
9.831 + <available file="${build.classes.dir}/${main.class.file}"/>
9.832 + <isset property="libs.CopyLibs.classpath"/>
9.833 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
9.834 + </and>
9.835 + </condition>
9.836 </target>
9.837 - <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">
9.838 - <j2seproject1:jar manifest="${manifest.file}"/>
9.839 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
9.840 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
9.841 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
9.842 </target>
9.843 - <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">
9.844 - <j2seproject1:jar manifest="${manifest.file}">
9.845 - <j2seproject1:manifest>
9.846 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
9.847 - </j2seproject1:manifest>
9.848 - </j2seproject1:jar>
9.849 - <echo level="info">To run this application from the command line without Ant, try:</echo>
9.850 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
9.851 - <property location="${dist.jar}" name="dist.jar.resolved"/>
9.852 - <pathconvert property="run.classpath.with.dist.jar">
9.853 - <path path="${run.classpath}"/>
9.854 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
9.855 - </pathconvert>
9.856 - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
9.857 - </target>
9.858 - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
9.859 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
9.860 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
9.861 <touch file="${tmp.manifest.file}" verbose="false"/>
9.862 </target>
9.863 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
9.864 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
9.865 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
9.866 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
9.867 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
9.868 </target>
9.869 - <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">
9.870 - <manifest file="${tmp.manifest.file}" mode="update">
9.871 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
9.872 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
9.873 <attribute name="Main-Class" value="${main.class}"/>
9.874 </manifest>
9.875 </target>
9.876 - <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">
9.877 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
9.878 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
9.879 + <attribute name="Profile" value="${javac.profile}"/>
9.880 + </manifest>
9.881 + </target>
9.882 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
9.883 <basename file="${application.splash}" property="splashscreen.basename"/>
9.884 <mkdir dir="${build.classes.dir}/META-INF"/>
9.885 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
9.886 - <manifest file="${tmp.manifest.file}" mode="update">
9.887 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
9.888 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
9.889 </manifest>
9.890 </target>
9.891 - <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">
9.892 + <target depends="init,compile" name="-check-do-mkdist">
9.893 + <condition property="do.mkdist">
9.894 + <and>
9.895 + <isset property="do.archive"/>
9.896 + <isset property="libs.CopyLibs.classpath"/>
9.897 + <not>
9.898 + <istrue value="${mkdist.disabled}"/>
9.899 + </not>
9.900 + <not>
9.901 + <available file="${build.classes.dir}/module-info.class"/>
9.902 + </not>
9.903 + </and>
9.904 + </condition>
9.905 + </target>
9.906 + <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">
9.907 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
9.908 <echo level="info">To run this application from the command line without Ant, try:</echo>
9.909 <property location="${dist.jar}" name="dist.jar.resolved"/>
9.910 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
9.911 </target>
9.912 - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
9.913 + <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">
9.914 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
9.915 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
9.916 + <property location="${dist.jar}" name="dist.jar.resolved"/>
9.917 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
9.918 + <isset property="named.module.internal"/>
9.919 + </condition>
9.920 + <pathconvert property="run.classpath.with.dist.jar">
9.921 + <path path="${run.classpath}"/>
9.922 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
9.923 + </pathconvert>
9.924 + <pathconvert property="run.modulepath.with.dist.jar">
9.925 + <path location="${dist.jar.resolved}"/>
9.926 + <path path="${run.modulepath}"/>
9.927 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
9.928 + </pathconvert>
9.929 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
9.930 + <isset property="named.module.internal"/>
9.931 + </condition>
9.932 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
9.933 + <and>
9.934 + <isset property="modules.supported.internal"/>
9.935 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
9.936 + </and>
9.937 + </condition>
9.938 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
9.939 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
9.940 + </condition>
9.941 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
9.942 + <isset property="do.module.main.class"/>
9.943 + </condition>
9.944 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
9.945 + <isset property="named.module.internal"/>
9.946 + </condition>
9.947 + <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}">
9.948 + <isset property="main.class.available"/>
9.949 + </condition>
9.950 + <condition else="debug" property="jar.usage.level" value="info">
9.951 + <isset property="main.class.available"/>
9.952 + </condition>
9.953 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
9.954 + </target>
9.955 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
9.956 <delete>
9.957 <fileset file="${tmp.manifest.file}"/>
9.958 </delete>
9.959 </target>
9.960 - <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"/>
9.961 + <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"/>
9.962 + <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"/>
9.963 <target name="-post-jar">
9.964 <!-- Empty placeholder for easier customization. -->
9.965 <!-- You can override this target in the ../build.xml file. -->
9.966 </target>
9.967 - <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"/>
9.968 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
9.969 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
9.970 + <!--
9.971 + =================
9.972 + DEPLOY SECTION
9.973 + =================
9.974 + -->
9.975 + <target name="-pre-deploy">
9.976 + <!-- Empty placeholder for easier customization. -->
9.977 + <!-- You can override this target in the ../build.xml file. -->
9.978 + </target>
9.979 + <target depends="init" name="-check-jlink">
9.980 + <condition property="do.jlink.internal">
9.981 + <and>
9.982 + <istrue value="${do.jlink}"/>
9.983 + <isset property="do.archive"/>
9.984 + <isset property="named.module.internal"/>
9.985 + </and>
9.986 + </condition>
9.987 + </target>
9.988 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
9.989 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
9.990 + <property name="jlink.launcher.name" value="${application.title}"/>
9.991 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
9.992 + <and>
9.993 + <isset property="jlink.additionalmodules"/>
9.994 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
9.995 + </and>
9.996 + </condition>
9.997 + <condition property="jlink.do.strip.internal">
9.998 + <and>
9.999 + <isset property="jlink.strip"/>
9.1000 + <istrue value="${jlink.strip}"/>
9.1001 + </and>
9.1002 + </condition>
9.1003 + <condition property="jlink.do.additionalparam.internal">
9.1004 + <and>
9.1005 + <isset property="jlink.additionalparam"/>
9.1006 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
9.1007 + </and>
9.1008 + </condition>
9.1009 + <condition property="jlink.do.launcher.internal">
9.1010 + <and>
9.1011 + <istrue value="${jlink.launcher}"/>
9.1012 + <isset property="main.class.available"/>
9.1013 + </and>
9.1014 + </condition>
9.1015 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
9.1016 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
9.1017 + <exec executable="${platform.jlink}">
9.1018 + <arg value="--module-path"/>
9.1019 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
9.1020 + <arg value="--add-modules"/>
9.1021 + <arg value="${jlink.add.modules}"/>
9.1022 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
9.1023 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
9.1024 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
9.1025 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
9.1026 + <arg value="--output"/>
9.1027 + <arg value="${dist.jlink.output}"/>
9.1028 + </exec>
9.1029 + </target>
9.1030 + <target name="-post-deploy">
9.1031 + <!-- Empty placeholder for easier customization. -->
9.1032 + <!-- You can override this target in the ../build.xml file. -->
9.1033 + </target>
9.1034 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
9.1035 <!--
9.1036 =================
9.1037 EXECUTION SECTION
9.1038 @@ -1050,9 +1357,9 @@
9.1039 </target>
9.1040 <target depends="init,compile" name="-debug-start-debuggee">
9.1041 <j2seproject3:debug>
9.1042 - <customize>
9.1043 + <customizeDebuggee>
9.1044 <arg line="${application.args}"/>
9.1045 - </customize>
9.1046 + </customizeDebuggee>
9.1047 </j2seproject3:debug>
9.1048 </target>
9.1049 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
9.1050 @@ -1118,28 +1425,24 @@
9.1051 </customize>
9.1052 </profile>
9.1053 </target>
9.1054 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
9.1055 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
9.1056 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
9.1057 <nbprofiledirect>
9.1058 <classpath>
9.1059 <path path="${run.test.classpath}"/>
9.1060 </classpath>
9.1061 </nbprofiledirect>
9.1062 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
9.1063 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
9.1064 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
9.1065 - <jvmarg line="${profiler.info.jvmargs}"/>
9.1066 - <test name="${profile.class}"/>
9.1067 - <classpath>
9.1068 - <path path="${run.test.classpath}"/>
9.1069 - </classpath>
9.1070 - <syspropertyset>
9.1071 - <propertyref prefix="test-sys-prop."/>
9.1072 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
9.1073 - </syspropertyset>
9.1074 - <formatter type="brief" usefile="false"/>
9.1075 - <formatter type="xml"/>
9.1076 - </junit>
9.1077 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
9.1078 + <customize>
9.1079 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
9.1080 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
9.1081 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
9.1082 + <jvmarg line="${profiler.info.jvmargs}"/>
9.1083 + <classpath>
9.1084 + <path path="${run.test.classpath}"/>
9.1085 + </classpath>
9.1086 + </customize>
9.1087 + </j2seproject3:junit>
9.1088 </target>
9.1089 <!--
9.1090 end of pre NB72 profiling section
9.1091 @@ -1170,7 +1473,7 @@
9.1092 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
9.1093 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
9.1094 <startprofiler/>
9.1095 - <antcal target="run-test-with-main"/>
9.1096 + <antcall target="run-test-with-main"/>
9.1097 </target>
9.1098 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
9.1099 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
9.1100 @@ -1192,11 +1495,20 @@
9.1101 </not>
9.1102 </and>
9.1103 </condition>
9.1104 - <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}">
9.1105 + <condition else="" property="bug5101868workaround" value="*.java">
9.1106 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
9.1107 + </condition>
9.1108 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
9.1109 + <and>
9.1110 + <isset property="javadoc.html5"/>
9.1111 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
9.1112 + </and>
9.1113 + </condition>
9.1114 + <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}">
9.1115 <classpath>
9.1116 <path path="${javac.classpath}"/>
9.1117 </classpath>
9.1118 - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
9.1119 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
9.1120 <filename name="**/*.java"/>
9.1121 </fileset>
9.1122 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
9.1123 @@ -1204,6 +1516,7 @@
9.1124 <exclude name="*.java"/>
9.1125 </fileset>
9.1126 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
9.1127 + <arg line="${javadoc.html5.cmd.line.arg}"/>
9.1128 </javadoc>
9.1129 <copy todir="${dist.javadoc.dir}">
9.1130 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
9.1131 @@ -1230,11 +1543,63 @@
9.1132 <!-- Empty placeholder for easier customization. -->
9.1133 <!-- You can override this target in the ../build.xml file. -->
9.1134 </target>
9.1135 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
9.1136 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
9.1137 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
9.1138 + <and>
9.1139 + <isset property="test.module.name"/>
9.1140 + <length length="0" string="${test.module.name}" when="greater"/>
9.1141 + </and>
9.1142 + </condition>
9.1143 + <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">
9.1144 + <and>
9.1145 + <isset property="test.module.name"/>
9.1146 + <length length="0" string="${test.module.name}" when="greater"/>
9.1147 + </and>
9.1148 + </condition>
9.1149 + </target>
9.1150 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
9.1151 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
9.1152 + <and>
9.1153 + <isset property="test.module.name"/>
9.1154 + <length length="0" string="${test.module.name}" when="greater"/>
9.1155 + </and>
9.1156 + </condition>
9.1157 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
9.1158 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
9.1159 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
9.1160 + <chainedmapper>
9.1161 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
9.1162 + <filtermapper>
9.1163 + <uniqfilter/>
9.1164 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
9.1165 + </filtermapper>
9.1166 + <cutdirsmapper dirs="1"/>
9.1167 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
9.1168 + </chainedmapper>
9.1169 + </pathconvert>
9.1170 + <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}">
9.1171 + <and>
9.1172 + <isset property="test.module.name"/>
9.1173 + <length length="0" string="${test.module.name}" when="greater"/>
9.1174 + </and>
9.1175 + </condition>
9.1176 + </target>
9.1177 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
9.1178 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
9.1179 + <property name="javac.test.compilerargs" value=""/>
9.1180 + <property name="run.test.jvmargs" value=""/>
9.1181 + </target>
9.1182 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
9.1183 <target if="do.depend.true" name="-compile-test-depend">
9.1184 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
9.1185 </target>
9.1186 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
9.1187 - <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}"/>
9.1188 + <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">
9.1189 + <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}">
9.1190 + <customize>
9.1191 + <compilerarg line="${javac.test.compilerargs}"/>
9.1192 + </customize>
9.1193 + </j2seproject3:javac>
9.1194 <copy todir="${build.test.classes.dir}">
9.1195 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
9.1196 </copy>
9.1197 @@ -1248,10 +1613,14 @@
9.1198 <!-- Empty placeholder for easier customization. -->
9.1199 <!-- You can override this target in the ../build.xml file. -->
9.1200 </target>
9.1201 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
9.1202 + <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">
9.1203 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
9.1204 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
9.1205 - <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}"/>
9.1206 + <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}">
9.1207 + <customize>
9.1208 + <compilerarg line="${javac.test.compilerargs}"/>
9.1209 + </customize>
9.1210 + </j2seproject3:javac>
9.1211 <copy todir="${build.test.classes.dir}">
9.1212 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
9.1213 </copy>
9.1214 @@ -1269,8 +1638,8 @@
9.1215 <target depends="init" if="have.tests" name="-pre-test-run">
9.1216 <mkdir dir="${build.test.results.dir}"/>
9.1217 </target>
9.1218 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
9.1219 - <j2seproject3:test testincludes="**/*Test.java"/>
9.1220 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
9.1221 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
9.1222 </target>
9.1223 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
9.1224 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
9.1225 @@ -1281,14 +1650,14 @@
9.1226 <target depends="init" if="have.tests" name="-pre-test-run-single">
9.1227 <mkdir dir="${build.test.results.dir}"/>
9.1228 </target>
9.1229 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
9.1230 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
9.1231 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
9.1232 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
9.1233 </target>
9.1234 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
9.1235 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
9.1236 </target>
9.1237 - <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"/>
9.1238 + <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"/>
9.1239 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
9.1240 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
9.1241 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
9.1242 @@ -1297,7 +1666,7 @@
9.1243 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
9.1244 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
9.1245 </target>
9.1246 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
9.1247 + <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"/>
9.1248 <!--
9.1249 =======================
9.1250 TEST DEBUGGING SECTION
9.1251 @@ -1315,8 +1684,8 @@
9.1252 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
9.1253 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
9.1254 </target>
9.1255 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
9.1256 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
9.1257 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
9.1258 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
9.1259 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
9.1260 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
9.1261 </target>
9.1262 @@ -1342,9 +1711,9 @@
9.1263 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
9.1264 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
9.1265 <j2seproject3:debug classname="sun.applet.AppletViewer">
9.1266 - <customize>
9.1267 + <customizeDebuggee>
9.1268 <arg value="${applet.url}"/>
9.1269 - </customize>
9.1270 + </customizeDebuggee>
9.1271 </j2seproject3:debug>
9.1272 </target>
9.1273 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
9.1274 @@ -1371,6 +1740,7 @@
9.1275 </target>
9.1276 <target depends="init" name="-do-clean">
9.1277 <delete dir="${build.dir}"/>
9.1278 + <delete dir="${dist.jlink.output}"/>
9.1279 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
9.1280 </target>
9.1281 <target name="-post-clean">
10.1 --- a/samples/codeinjection/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
10.2 +++ b/samples/codeinjection/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
10.3 @@ -1,8 +1,8 @@
10.4 build.xml.data.CRC32=4a8b5abf
10.5 -build.xml.script.CRC32=83b773e3
10.6 -build.xml.stylesheet.CRC32=28e38971@1.54.0.46
10.7 +build.xml.script.CRC32=952f48c5
10.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
10.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
10.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
10.11 nbproject/build-impl.xml.data.CRC32=4a8b5abf
10.12 -nbproject/build-impl.xml.script.CRC32=6a821ef7
10.13 -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46
10.14 +nbproject/build-impl.xml.script.CRC32=c5948233
10.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
11.1 --- a/samples/codeinjection/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
11.2 +++ b/samples/codeinjection/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
11.3 @@ -12,8 +12,12 @@
11.4 #debug.transport=dt_socket
11.5 debug.classpath=\
11.6 ${run.classpath}
11.7 +debug.modulepath=\
11.8 + ${run.modulepath}
11.9 debug.test.classpath=\
11.10 ${run.test.classpath}
11.11 +debug.test.modulepath=\
11.12 + ${run.test.modulepath}
11.13 # This directory is removed when the project is cleaned:
11.14 dist.dir=dist
11.15 dist.jar=${dist.dir}/codeinjection.jar
11.16 @@ -28,14 +32,18 @@
11.17 # Space-separated list of extra javac options
11.18 javac.compilerargs=
11.19 javac.deprecation=false
11.20 -javac.source=1.5
11.21 -javac.target=1.5
11.22 +javac.modulepath=
11.23 +javac.processormodulepath=
11.24 +javac.source=1.6
11.25 +javac.target=1.6
11.26 javac.test.classpath=\
11.27 ${javac.classpath}:\
11.28 ${build.classes.dir}:\
11.29 ${file.reference.junit-4.4.jar}:\
11.30 ${file.reference.org-netbeans-insane.jar}:\
11.31 ${file.reference.org-netbeans-modules-nbjunit.jar}
11.32 +javac.test.modulepath=\
11.33 + ${javac.modulepath}
11.34 javadoc.additionalparam=
11.35 javadoc.author=false
11.36 javadoc.encoding=${source.encoding}
11.37 @@ -58,9 +66,13 @@
11.38 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
11.39 # or test-sys-prop.name=value to set system properties for unit tests):
11.40 run.jvmargs=
11.41 +run.modulepath=\
11.42 + ${javac.modulepath}
11.43 run.test.classpath=\
11.44 ${javac.test.classpath}:\
11.45 ${build.test.classes.dir}
11.46 +run.test.modulepath=\
11.47 + ${javac.test.modulepath}
11.48 source.encoding=UTF-8
11.49 src.dir=src
11.50 test.src.dir=test
12.1 --- a/samples/conditionaluseofapi/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
12.2 +++ b/samples/conditionaluseofapi/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
12.3 @@ -12,14 +12,21 @@
12.4 - execution
12.5 - debugging
12.6 - javadoc
12.7 - - junit compilation
12.8 - - junit execution
12.9 - - junit debugging
12.10 + - test compilation
12.11 + - test execution
12.12 + - test debugging
12.13 - applet
12.14 - cleanup
12.15
12.16 -->
12.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="conditionaluseofapi-impl">
12.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="conditionaluseofapi-impl">
12.19 + <fail message="Please build using Ant 1.8.0 or higher.">
12.20 + <condition>
12.21 + <not>
12.22 + <antversion atleast="1.8.0"/>
12.23 + </not>
12.24 + </condition>
12.25 + </fail>
12.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
12.27 <!--
12.28 ======================
12.29 @@ -39,28 +46,136 @@
12.30 <property file="${user.properties.file}"/>
12.31 <!-- The two properties below are usually overridden -->
12.32 <!-- by the active platform. Just a fallback. -->
12.33 - <property name="default.javac.source" value="1.4"/>
12.34 - <property name="default.javac.target" value="1.4"/>
12.35 + <property name="default.javac.source" value="1.6"/>
12.36 + <property name="default.javac.target" value="1.6"/>
12.37 </target>
12.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
12.39 <property file="nbproject/configs/${config}.properties"/>
12.40 <property file="nbproject/project.properties"/>
12.41 </target>
12.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
12.43 + <target name="-init-modules-supported">
12.44 + <condition property="modules.supported.internal" value="true">
12.45 + <not>
12.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
12.47 + </not>
12.48 + </condition>
12.49 + </target>
12.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
12.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
12.52 + <attribute name="property"/>
12.53 + <attribute name="sourcepath"/>
12.54 + <sequential>
12.55 + <loadresource property="@{property}" quiet="true">
12.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
12.57 + <filterchain>
12.58 + <stripjavacomments/>
12.59 + <linecontainsregexp>
12.60 + <regexp pattern="module .* \{"/>
12.61 + </linecontainsregexp>
12.62 + <tokenfilter>
12.63 + <linetokenizer/>
12.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
12.65 + </tokenfilter>
12.66 + <striplinebreaks/>
12.67 + </filterchain>
12.68 + </loadresource>
12.69 + </sequential>
12.70 + </macrodef>
12.71 + </target>
12.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
12.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
12.74 + <condition>
12.75 + <not>
12.76 + <antversion atleast="1.10.0"/>
12.77 + </not>
12.78 + </condition>
12.79 + </fail>
12.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
12.81 + <condition property="named.module.internal">
12.82 + <and>
12.83 + <isset property="module.name"/>
12.84 + <length length="0" string="${module.name}" when="greater"/>
12.85 + </and>
12.86 + </condition>
12.87 + <condition property="unnamed.module.internal">
12.88 + <not>
12.89 + <isset property="named.module.internal"/>
12.90 + </not>
12.91 + </condition>
12.92 + <property name="javac.modulepath" value=""/>
12.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
12.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
12.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
12.96 + <property name="javac.upgrademodulepath" value=""/>
12.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
12.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
12.99 + <and>
12.100 + <isset property="javac.systemmodulepath"/>
12.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
12.102 + </and>
12.103 + </condition>
12.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
12.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
12.106 + <property name="module.name" value=""/>
12.107 + </target>
12.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
12.109 + <property name="platform.java" value="${java.home}/bin/java"/>
12.110 <available file="${manifest.file}" property="manifest.available"/>
12.111 - <condition property="manifest.available+main.class">
12.112 + <condition property="splashscreen.available">
12.113 <and>
12.114 - <isset property="manifest.available"/>
12.115 + <not>
12.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
12.117 + </not>
12.118 + <available file="${application.splash}"/>
12.119 + </and>
12.120 + </condition>
12.121 + <condition property="main.class.available">
12.122 + <and>
12.123 <isset property="main.class"/>
12.124 <not>
12.125 <equals arg1="${main.class}" arg2="" trim="true"/>
12.126 </not>
12.127 </and>
12.128 </condition>
12.129 - <condition property="manifest.available+main.class+mkdist.available">
12.130 + <condition property="profile.available">
12.131 <and>
12.132 - <istrue value="${manifest.available+main.class}"/>
12.133 - <isset property="libs.CopyLibs.classpath"/>
12.134 + <isset property="javac.profile"/>
12.135 + <length length="0" string="${javac.profile}" when="greater"/>
12.136 + <not>
12.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
12.138 + </not>
12.139 + </and>
12.140 + </condition>
12.141 + <condition property="do.archive">
12.142 + <or>
12.143 + <not>
12.144 + <istrue value="${jar.archive.disabled}"/>
12.145 + </not>
12.146 + <istrue value="${not.archive.disabled}"/>
12.147 + </or>
12.148 + </condition>
12.149 + <condition property="do.archive+manifest.available">
12.150 + <and>
12.151 + <isset property="manifest.available"/>
12.152 + <istrue value="${do.archive}"/>
12.153 + </and>
12.154 + </condition>
12.155 + <condition property="do.archive+main.class.available">
12.156 + <and>
12.157 + <isset property="main.class.available"/>
12.158 + <istrue value="${do.archive}"/>
12.159 + </and>
12.160 + </condition>
12.161 + <condition property="do.archive+splashscreen.available">
12.162 + <and>
12.163 + <isset property="splashscreen.available"/>
12.164 + <istrue value="${do.archive}"/>
12.165 + </and>
12.166 + </condition>
12.167 + <condition property="do.archive+profile.available">
12.168 + <and>
12.169 + <isset property="profile.available"/>
12.170 + <istrue value="${do.archive}"/>
12.171 </and>
12.172 </condition>
12.173 <condition property="have.tests">
12.174 @@ -86,6 +201,7 @@
12.175 </and>
12.176 </condition>
12.177 <property name="run.jvmargs" value=""/>
12.178 + <property name="run.jvmargs.ide" value=""/>
12.179 <property name="javac.compilerargs" value=""/>
12.180 <property name="work.dir" value="${basedir}"/>
12.181 <condition property="no.deps">
12.182 @@ -97,6 +213,8 @@
12.183 <property name="javadoc.preview" value="true"/>
12.184 <property name="application.args" value=""/>
12.185 <property name="source.encoding" value="${file.encoding}"/>
12.186 + <property name="runtime.encoding" value="${source.encoding}"/>
12.187 + <property name="manifest.encoding" value="${source.encoding}"/>
12.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
12.189 <and>
12.190 <isset property="javadoc.encoding"/>
12.191 @@ -112,12 +230,58 @@
12.192 <condition property="do.depend.true">
12.193 <istrue value="${do.depend}"/>
12.194 </condition>
12.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
12.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
12.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
12.198 <and>
12.199 - <isset property="jaxws.endorsed.dir"/>
12.200 - <available file="nbproject/jaxws-build.xml"/>
12.201 + <isset property="endorsed.classpath"/>
12.202 + <not>
12.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
12.204 + </not>
12.205 </and>
12.206 </condition>
12.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
12.208 + <isset property="profile.available"/>
12.209 + </condition>
12.210 + <condition else="false" property="jdkBug6558476">
12.211 + <and>
12.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
12.213 + <not>
12.214 + <os family="unix"/>
12.215 + </not>
12.216 + </and>
12.217 + </condition>
12.218 + <condition else="false" property="javac.fork">
12.219 + <or>
12.220 + <istrue value="${jdkBug6558476}"/>
12.221 + <istrue value="${javac.external.vm}"/>
12.222 + </or>
12.223 + </condition>
12.224 + <property name="jar.index" value="false"/>
12.225 + <property name="jar.index.metainf" value="${jar.index}"/>
12.226 + <property name="copylibs.rebase" value="true"/>
12.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
12.228 + <condition property="junit.available">
12.229 + <or>
12.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
12.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
12.232 + </or>
12.233 + </condition>
12.234 + <condition property="testng.available">
12.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
12.236 + </condition>
12.237 + <condition property="junit+testng.available">
12.238 + <and>
12.239 + <istrue value="${junit.available}"/>
12.240 + <istrue value="${testng.available}"/>
12.241 + </and>
12.242 + </condition>
12.243 + <condition else="testng" property="testng.mode" value="mixed">
12.244 + <istrue value="${junit+testng.available}"/>
12.245 + </condition>
12.246 + <condition else="" property="testng.debug.mode" value="-mixed">
12.247 + <istrue value="${junit+testng.available}"/>
12.248 + </condition>
12.249 + <property name="java.failonerror" value="true"/>
12.250 </target>
12.251 <target name="-post-init">
12.252 <!-- Empty placeholder for easier customization. -->
12.253 @@ -144,26 +308,152 @@
12.254 </sequential>
12.255 </macrodef>
12.256 </target>
12.257 - <target name="-init-macrodef-javac">
12.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
12.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
12.260 <attribute default="${src.dir}" name="srcdir"/>
12.261 <attribute default="${build.classes.dir}" name="destdir"/>
12.262 <attribute default="${javac.classpath}" name="classpath"/>
12.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
12.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
12.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
12.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
12.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
12.268 <attribute default="${includes}" name="includes"/>
12.269 <attribute default="${excludes}" name="excludes"/>
12.270 <attribute default="${javac.debug}" name="debug"/>
12.271 - <attribute default="" name="sourcepath"/>
12.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
12.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
12.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
12.275 <element name="customize" optional="true"/>
12.276 <sequential>
12.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
12.278 + <condition property="warn.excludes.internal">
12.279 + <and>
12.280 + <isset property="named.module.internal"/>
12.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
12.282 + </and>
12.283 + </condition>
12.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
12.285 + <property location="${build.dir}/empty" name="empty.dir"/>
12.286 + <mkdir dir="${empty.dir}"/>
12.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
12.288 + <condition property="processormodulepath.set">
12.289 + <resourcecount count="0" when="greater">
12.290 + <path>
12.291 + <pathelement path="@{processormodulepath}"/>
12.292 + </path>
12.293 + </resourcecount>
12.294 + </condition>
12.295 + <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}">
12.296 + <src>
12.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
12.298 + <include name="*"/>
12.299 + </dirset>
12.300 + </src>
12.301 <classpath>
12.302 <path path="@{classpath}"/>
12.303 </classpath>
12.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
12.305 + <modulepath>
12.306 + <path path="@{modulepath}"/>
12.307 + </modulepath>
12.308 + <upgrademodulepath>
12.309 + <path path="@{upgrademodulepath}"/>
12.310 + </upgrademodulepath>
12.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
12.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
12.313 + <compilerarg line="${javac.compilerargs}"/>
12.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
12.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
12.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
12.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
12.318 + <compilerarg line="${ap.processors.internal}"/>
12.319 + <compilerarg line="${annotation.processing.processor.options}"/>
12.320 + <compilerarg value="-s"/>
12.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
12.322 + <compilerarg line="${ap.proc.none.internal}"/>
12.323 <customize/>
12.324 </javac>
12.325 </sequential>
12.326 </macrodef>
12.327 + </target>
12.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
12.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
12.330 + <attribute default="${src.dir}" name="srcdir"/>
12.331 + <attribute default="${build.classes.dir}" name="destdir"/>
12.332 + <attribute default="${javac.classpath}" name="classpath"/>
12.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
12.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
12.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
12.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
12.337 + <attribute default="${includes}" name="includes"/>
12.338 + <attribute default="${excludes}" name="excludes"/>
12.339 + <attribute default="${javac.debug}" name="debug"/>
12.340 + <attribute default="${empty.dir}" name="sourcepath"/>
12.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
12.342 + <element name="customize" optional="true"/>
12.343 + <sequential>
12.344 + <property location="${build.dir}/empty" name="empty.dir"/>
12.345 + <mkdir dir="${empty.dir}"/>
12.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
12.347 + <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}">
12.348 + <src>
12.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
12.350 + <include name="*"/>
12.351 + </dirset>
12.352 + </src>
12.353 + <classpath>
12.354 + <path path="@{classpath}"/>
12.355 + </classpath>
12.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
12.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
12.358 + <compilerarg line="${javac.compilerargs}"/>
12.359 + <compilerarg value="-processorpath"/>
12.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
12.361 + <compilerarg line="${ap.processors.internal}"/>
12.362 + <compilerarg line="${annotation.processing.processor.options}"/>
12.363 + <compilerarg value="-s"/>
12.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
12.365 + <compilerarg line="${ap.proc.none.internal}"/>
12.366 + <customize/>
12.367 + </javac>
12.368 + </sequential>
12.369 + </macrodef>
12.370 + </target>
12.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
12.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
12.373 + <attribute default="${src.dir}" name="srcdir"/>
12.374 + <attribute default="${build.classes.dir}" name="destdir"/>
12.375 + <attribute default="${javac.classpath}" name="classpath"/>
12.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
12.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
12.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
12.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
12.380 + <attribute default="${includes}" name="includes"/>
12.381 + <attribute default="${excludes}" name="excludes"/>
12.382 + <attribute default="${javac.debug}" name="debug"/>
12.383 + <attribute default="${empty.dir}" name="sourcepath"/>
12.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
12.385 + <element name="customize" optional="true"/>
12.386 + <sequential>
12.387 + <property location="${build.dir}/empty" name="empty.dir"/>
12.388 + <mkdir dir="${empty.dir}"/>
12.389 + <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}">
12.390 + <src>
12.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
12.392 + <include name="*"/>
12.393 + </dirset>
12.394 + </src>
12.395 + <classpath>
12.396 + <path path="@{classpath}"/>
12.397 + </classpath>
12.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
12.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
12.400 + <compilerarg line="${javac.compilerargs}"/>
12.401 + <customize/>
12.402 + </javac>
12.403 + </sequential>
12.404 + </macrodef>
12.405 + </target>
12.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
12.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
12.408 <attribute default="${src.dir}" name="srcdir"/>
12.409 <attribute default="${build.classes.dir}" name="destdir"/>
12.410 @@ -180,51 +470,383 @@
12.411 <attribute default="${build.classes.dir}" name="destdir"/>
12.412 <sequential>
12.413 <fail unless="javac.includes">Must set javac.includes</fail>
12.414 - <pathconvert pathsep="," property="javac.includes.binary">
12.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
12.416 <path>
12.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
12.418 </path>
12.419 <globmapper from="*.java" to="*.class"/>
12.420 </pathconvert>
12.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
12.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
12.423 <delete>
12.424 - <files includes="${javac.includes.binary}"/>
12.425 + <files includesfile="${javac.includesfile.binary}"/>
12.426 + </delete>
12.427 + <delete>
12.428 + <fileset file="${javac.includesfile.binary}"/>
12.429 </delete>
12.430 </sequential>
12.431 </macrodef>
12.432 </target>
12.433 - <target name="-init-macrodef-junit">
12.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
12.435 + <condition else="false" property="nb.junit.batch" value="true">
12.436 + <and>
12.437 + <istrue value="${junit.available}"/>
12.438 + <not>
12.439 + <isset property="test.method"/>
12.440 + </not>
12.441 + </and>
12.442 + </condition>
12.443 + <condition else="false" property="nb.junit.single" value="true">
12.444 + <and>
12.445 + <istrue value="${junit.available}"/>
12.446 + <isset property="test.method"/>
12.447 + </and>
12.448 + </condition>
12.449 + </target>
12.450 + <target name="-init-test-properties">
12.451 + <property name="test.binaryincludes" value="<nothing>"/>
12.452 + <property name="test.binarytestincludes" value=""/>
12.453 + <property name="test.binaryexcludes" value=""/>
12.454 + </target>
12.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
12.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
12.457 + <attribute default="${includes}" name="includes"/>
12.458 + <attribute default="${excludes}" name="excludes"/>
12.459 + <element name="customizePrototype" optional="true"/>
12.460 + <sequential>
12.461 + <property name="junit.forkmode" value="perTest"/>
12.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
12.463 + <syspropertyset>
12.464 + <propertyref prefix="test-sys-prop."/>
12.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
12.466 + </syspropertyset>
12.467 + <classpath>
12.468 + <path path="${run.test.classpath}"/>
12.469 + </classpath>
12.470 + <modulepath>
12.471 + <path path="${run.test.modulepath}"/>
12.472 + </modulepath>
12.473 + <formatter type="brief" usefile="false"/>
12.474 + <formatter type="xml"/>
12.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
12.476 + <jvmarg value="-ea"/>
12.477 + <jvmarg line="${run.test.jvmargs}"/>
12.478 + <customizePrototype/>
12.479 + </junit>
12.480 + </sequential>
12.481 + </macrodef>
12.482 + </target>
12.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
12.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
12.485 + <attribute default="${includes}" name="includes"/>
12.486 + <attribute default="${excludes}" name="excludes"/>
12.487 + <element name="customizePrototype" optional="true"/>
12.488 + <sequential>
12.489 + <property name="junit.forkmode" value="perTest"/>
12.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
12.491 + <syspropertyset>
12.492 + <propertyref prefix="test-sys-prop."/>
12.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
12.494 + </syspropertyset>
12.495 + <classpath>
12.496 + <path path="${run.test.classpath}"/>
12.497 + </classpath>
12.498 + <formatter type="brief" usefile="false"/>
12.499 + <formatter type="xml"/>
12.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
12.501 + <jvmarg value="-ea"/>
12.502 + <customizePrototype/>
12.503 + </junit>
12.504 + </sequential>
12.505 + </macrodef>
12.506 + </target>
12.507 + <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}">
12.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
12.509 <attribute default="${includes}" name="includes"/>
12.510 <attribute default="${excludes}" name="excludes"/>
12.511 <attribute default="**" name="testincludes"/>
12.512 + <attribute default="" name="testmethods"/>
12.513 + <element name="customize" optional="true"/>
12.514 <sequential>
12.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
12.516 - <batchtest todir="${build.test.results.dir}">
12.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
12.518 - <filename name="@{testincludes}"/>
12.519 - </fileset>
12.520 - </batchtest>
12.521 + <j2seproject3:junit-prototype>
12.522 + <customizePrototype>
12.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
12.524 + <customize/>
12.525 + </customizePrototype>
12.526 + </j2seproject3:junit-prototype>
12.527 + </sequential>
12.528 + </macrodef>
12.529 + </target>
12.530 + <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}">
12.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
12.532 + <attribute default="${includes}" name="includes"/>
12.533 + <attribute default="${excludes}" name="excludes"/>
12.534 + <attribute default="**" name="testincludes"/>
12.535 + <attribute default="" name="testmethods"/>
12.536 + <element name="customize" optional="true"/>
12.537 + <sequential>
12.538 + <j2seproject3:junit-prototype>
12.539 + <customizePrototype>
12.540 + <batchtest todir="${build.test.results.dir}">
12.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
12.542 + <filename name="@{testincludes}"/>
12.543 + </fileset>
12.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
12.545 + <filename name="${test.binarytestincludes}"/>
12.546 + </fileset>
12.547 + </batchtest>
12.548 + <customize/>
12.549 + </customizePrototype>
12.550 + </j2seproject3:junit-prototype>
12.551 + </sequential>
12.552 + </macrodef>
12.553 + </target>
12.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
12.555 + <target if="${testng.available}" name="-init-macrodef-testng">
12.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
12.557 + <attribute default="${includes}" name="includes"/>
12.558 + <attribute default="${excludes}" name="excludes"/>
12.559 + <attribute default="**" name="testincludes"/>
12.560 + <attribute default="" name="testmethods"/>
12.561 + <element name="customize" optional="true"/>
12.562 + <sequential>
12.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
12.564 + <isset property="test.method"/>
12.565 + </condition>
12.566 + <union id="test.set">
12.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
12.568 + <filename name="@{testincludes}"/>
12.569 + </fileset>
12.570 + </union>
12.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
12.572 + <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="conditionaluseofapi" testname="TestNG tests" workingDir="${work.dir}">
12.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
12.574 + <propertyset>
12.575 + <propertyref prefix="test-sys-prop."/>
12.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
12.577 + </propertyset>
12.578 <classpath>
12.579 <path path="${run.test.classpath}"/>
12.580 </classpath>
12.581 - <syspropertyset>
12.582 - <propertyref prefix="test-sys-prop."/>
12.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
12.584 - </syspropertyset>
12.585 - <formatter type="brief" usefile="false"/>
12.586 - <formatter type="xml"/>
12.587 - <jvmarg line="${run.jvmargs}"/>
12.588 - </junit>
12.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
12.590 + <customize/>
12.591 + </testng>
12.592 </sequential>
12.593 </macrodef>
12.594 </target>
12.595 - <target name="-init-macrodef-nbjpda">
12.596 + <target name="-init-macrodef-test-impl">
12.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
12.598 + <attribute default="${includes}" name="includes"/>
12.599 + <attribute default="${excludes}" name="excludes"/>
12.600 + <attribute default="**" name="testincludes"/>
12.601 + <attribute default="" name="testmethods"/>
12.602 + <element implicit="true" name="customize" optional="true"/>
12.603 + <sequential>
12.604 + <echo>No tests executed.</echo>
12.605 + </sequential>
12.606 + </macrodef>
12.607 + </target>
12.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
12.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
12.610 + <attribute default="${includes}" name="includes"/>
12.611 + <attribute default="${excludes}" name="excludes"/>
12.612 + <attribute default="**" name="testincludes"/>
12.613 + <attribute default="" name="testmethods"/>
12.614 + <element implicit="true" name="customize" optional="true"/>
12.615 + <sequential>
12.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
12.617 + <customize/>
12.618 + </j2seproject3:junit>
12.619 + </sequential>
12.620 + </macrodef>
12.621 + </target>
12.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
12.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
12.624 + <attribute default="${includes}" name="includes"/>
12.625 + <attribute default="${excludes}" name="excludes"/>
12.626 + <attribute default="**" name="testincludes"/>
12.627 + <attribute default="" name="testmethods"/>
12.628 + <element implicit="true" name="customize" optional="true"/>
12.629 + <sequential>
12.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
12.631 + <customize/>
12.632 + </j2seproject3:testng>
12.633 + </sequential>
12.634 + </macrodef>
12.635 + </target>
12.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
12.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
12.638 + <attribute default="${includes}" name="includes"/>
12.639 + <attribute default="${excludes}" name="excludes"/>
12.640 + <attribute default="**" name="testincludes"/>
12.641 + <attribute default="" name="testmethods"/>
12.642 + <sequential>
12.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
12.644 + <customize>
12.645 + <jvmarg line="${run.jvmargs}"/>
12.646 + <jvmarg line="${run.jvmargs.ide}"/>
12.647 + </customize>
12.648 + </j2seproject3:test-impl>
12.649 + </sequential>
12.650 + </macrodef>
12.651 + </target>
12.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
12.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
12.654 + <attribute default="${includes}" name="includes"/>
12.655 + <attribute default="${excludes}" name="excludes"/>
12.656 + <attribute default="**" name="testincludes"/>
12.657 + <attribute default="" name="testmethods"/>
12.658 + <element name="customizeDebuggee" optional="true"/>
12.659 + <sequential>
12.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
12.661 + <customize>
12.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
12.663 + <customizeDebuggee/>
12.664 + </customize>
12.665 + </j2seproject3:junit>
12.666 + </sequential>
12.667 + </macrodef>
12.668 + </target>
12.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
12.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
12.671 + <attribute default="${main.class}" name="testClass"/>
12.672 + <attribute default="" name="testMethod"/>
12.673 + <element name="customize2" optional="true"/>
12.674 + <sequential>
12.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
12.676 + <isset property="test.method"/>
12.677 + </condition>
12.678 + <condition else="-suitename conditionaluseofapi -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
12.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
12.680 + </condition>
12.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
12.682 + <mkdir dir="${build.test.results.dir}"/>
12.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
12.684 + <customizeDebuggee>
12.685 + <customize2/>
12.686 + <jvmarg value="-ea"/>
12.687 + <arg line="${testng.debug.mode}"/>
12.688 + <arg line="-d ${build.test.results.dir}"/>
12.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
12.690 + <arg line="${testng.cmd.args}"/>
12.691 + </customizeDebuggee>
12.692 + </j2seproject3:debug>
12.693 + </sequential>
12.694 + </macrodef>
12.695 + </target>
12.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
12.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
12.698 + <attribute default="${main.class}" name="testClass"/>
12.699 + <attribute default="" name="testMethod"/>
12.700 + <element implicit="true" name="customize2" optional="true"/>
12.701 + <sequential>
12.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
12.703 + <customize2/>
12.704 + </j2seproject3:testng-debug>
12.705 + </sequential>
12.706 + </macrodef>
12.707 + </target>
12.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
12.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
12.710 + <attribute default="${includes}" name="includes"/>
12.711 + <attribute default="${excludes}" name="excludes"/>
12.712 + <attribute default="**" name="testincludes"/>
12.713 + <attribute default="" name="testmethods"/>
12.714 + <attribute default="${main.class}" name="testClass"/>
12.715 + <attribute default="" name="testMethod"/>
12.716 + <sequential>
12.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
12.718 + <customizeDebuggee>
12.719 + <jvmarg line="${run.jvmargs}"/>
12.720 + <jvmarg line="${run.jvmargs.ide}"/>
12.721 + </customizeDebuggee>
12.722 + </j2seproject3:test-debug-impl>
12.723 + </sequential>
12.724 + </macrodef>
12.725 + </target>
12.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
12.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
12.728 + <attribute default="${includes}" name="includes"/>
12.729 + <attribute default="${excludes}" name="excludes"/>
12.730 + <attribute default="**" name="testincludes"/>
12.731 + <attribute default="" name="testmethods"/>
12.732 + <attribute default="${main.class}" name="testClass"/>
12.733 + <attribute default="" name="testMethod"/>
12.734 + <sequential>
12.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
12.736 + <customize2>
12.737 + <syspropertyset>
12.738 + <propertyref prefix="test-sys-prop."/>
12.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
12.740 + </syspropertyset>
12.741 + </customize2>
12.742 + </j2seproject3:testng-debug-impl>
12.743 + </sequential>
12.744 + </macrodef>
12.745 + </target>
12.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
12.747 + <!--
12.748 + pre NB7.2 profiling section; consider it deprecated
12.749 + -->
12.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
12.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
12.752 + <!-- Empty placeholder for easier customization. -->
12.753 + <!-- You can override this target in the ../build.xml file. -->
12.754 + </target>
12.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
12.756 + <!-- Empty placeholder for easier customization. -->
12.757 + <!-- You can override this target in the ../build.xml file. -->
12.758 + </target>
12.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
12.760 + <macrodef name="resolve">
12.761 + <attribute name="name"/>
12.762 + <attribute name="value"/>
12.763 + <sequential>
12.764 + <property name="@{name}" value="${env.@{value}}"/>
12.765 + </sequential>
12.766 + </macrodef>
12.767 + <macrodef name="profile">
12.768 + <attribute default="${main.class}" name="classname"/>
12.769 + <element name="customize" optional="true"/>
12.770 + <sequential>
12.771 + <property environment="env"/>
12.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
12.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
12.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
12.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
12.776 + <jvmarg line="${profiler.info.jvmargs}"/>
12.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
12.778 + <arg line="${application.args}"/>
12.779 + <classpath>
12.780 + <path path="${run.classpath}"/>
12.781 + </classpath>
12.782 + <syspropertyset>
12.783 + <propertyref prefix="run-sys-prop."/>
12.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
12.785 + </syspropertyset>
12.786 + <customize/>
12.787 + </java>
12.788 + </sequential>
12.789 + </macrodef>
12.790 + </target>
12.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
12.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
12.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
12.794 + </target>
12.795 + <!--
12.796 + end of pre NB7.2 profiling section
12.797 + -->
12.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
12.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
12.800 <attribute default="${main.class}" name="name"/>
12.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
12.802 <attribute default="${debug.classpath}" name="classpath"/>
12.803 <attribute default="" name="stopclassname"/>
12.804 <sequential>
12.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
12.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
12.807 + <modulepath>
12.808 + <path path="@{modulepath}"/>
12.809 + </modulepath>
12.810 <classpath>
12.811 <path path="@{classpath}"/>
12.812 </classpath>
12.813 @@ -235,35 +857,120 @@
12.814 <attribute default="${build.classes.dir}" name="dir"/>
12.815 <sequential>
12.816 <nbjpdareload>
12.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
12.818 + <fileset dir="@{dir}" includes="${fix.classes}">
12.819 + <include name="${fix.includes}*.class"/>
12.820 + </fileset>
12.821 </nbjpdareload>
12.822 </sequential>
12.823 </macrodef>
12.824 </target>
12.825 <target name="-init-debug-args">
12.826 - <property name="version-output" value="java version "${ant.java.version}"/>
12.827 - <condition property="have-jdk-older-than-1.4">
12.828 - <or>
12.829 - <contains string="${version-output}" substring="java version "1.0"/>
12.830 - <contains string="${version-output}" substring="java version "1.1"/>
12.831 - <contains string="${version-output}" substring="java version "1.2"/>
12.832 - <contains string="${version-output}" substring="java version "1.3"/>
12.833 - </or>
12.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
12.835 + <os family="windows"/>
12.836 </condition>
12.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
12.838 - <istrue value="${have-jdk-older-than-1.4}"/>
12.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
12.840 + <isset property="debug.transport"/>
12.841 </condition>
12.842 </target>
12.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
12.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
12.845 + <attribute default="${module.name}" name="modulename"/>
12.846 <attribute default="${main.class}" name="classname"/>
12.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
12.848 <attribute default="${debug.classpath}" name="classpath"/>
12.849 + <element name="customizeDebuggee" optional="true"/>
12.850 + <sequential>
12.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
12.852 + <customize>
12.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
12.854 + <customizeDebuggee/>
12.855 + </customize>
12.856 + </j2seproject1:java>
12.857 + </sequential>
12.858 + </macrodef>
12.859 + </target>
12.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
12.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
12.862 + <attribute default="${module.name}" name="modulename"/>
12.863 + <attribute default="${main.class}" name="classname"/>
12.864 + <attribute default="${run.modulepath}" name="modulepath"/>
12.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
12.866 + <attribute default="${run.classpath}" name="classpath"/>
12.867 + <attribute default="jvm" name="jvm"/>
12.868 <element name="customize" optional="true"/>
12.869 <sequential>
12.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
12.871 - <jvmarg line="${debug-args-line}"/>
12.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
12.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
12.874 + <classpath>
12.875 + <path path="@{classpath}"/>
12.876 + </classpath>
12.877 + <modulepath>
12.878 + <pathelement path="@{modulepath}"/>
12.879 + <pathelement location="${module.build.classes.dir}"/>
12.880 + </modulepath>
12.881 + <upgrademodulepath>
12.882 + <path path="@{upgrademodulepath}"/>
12.883 + </upgrademodulepath>
12.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
12.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
12.886 <jvmarg line="${run.jvmargs}"/>
12.887 + <jvmarg line="${run.jvmargs.ide}"/>
12.888 + <syspropertyset>
12.889 + <propertyref prefix="run-sys-prop."/>
12.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
12.891 + </syspropertyset>
12.892 + <customize/>
12.893 + </java>
12.894 + </sequential>
12.895 + </macrodef>
12.896 + </target>
12.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
12.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
12.899 + <attribute default="" name="modulename"/>
12.900 + <attribute default="${main.class}" name="classname"/>
12.901 + <attribute default="${run.modulepath}" name="modulepath"/>
12.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
12.903 + <attribute default="${run.classpath}" name="classpath"/>
12.904 + <attribute default="jvm" name="jvm"/>
12.905 + <element name="customize" optional="true"/>
12.906 + <sequential>
12.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
12.908 + <classpath>
12.909 + <path path="@{classpath}"/>
12.910 + </classpath>
12.911 + <modulepath>
12.912 + <path path="@{modulepath}"/>
12.913 + </modulepath>
12.914 + <upgrademodulepath>
12.915 + <path path="@{upgrademodulepath}"/>
12.916 + </upgrademodulepath>
12.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
12.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
12.919 + <jvmarg line="${run.jvmargs}"/>
12.920 + <jvmarg line="${run.jvmargs.ide}"/>
12.921 + <syspropertyset>
12.922 + <propertyref prefix="run-sys-prop."/>
12.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
12.924 + </syspropertyset>
12.925 + <customize/>
12.926 + </java>
12.927 + </sequential>
12.928 + </macrodef>
12.929 + </target>
12.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
12.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
12.932 + <attribute default="" name="modulename"/>
12.933 + <attribute default="${main.class}" name="classname"/>
12.934 + <attribute default="" name="modulepath"/>
12.935 + <attribute default="${run.classpath}" name="classpath"/>
12.936 + <attribute default="jvm" name="jvm"/>
12.937 + <element name="customize" optional="true"/>
12.938 + <sequential>
12.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
12.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
12.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
12.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
12.943 + <jvmarg line="${run.jvmargs}"/>
12.944 + <jvmarg line="${run.jvmargs.ide}"/>
12.945 <classpath>
12.946 <path path="@{classpath}"/>
12.947 </classpath>
12.948 @@ -276,39 +983,100 @@
12.949 </sequential>
12.950 </macrodef>
12.951 </target>
12.952 - <target name="-init-macrodef-java">
12.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
12.954 - <attribute default="${main.class}" name="classname"/>
12.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
12.956 + <target name="-init-macrodef-copylibs">
12.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
12.958 + <attribute default="${manifest.file}" name="manifest"/>
12.959 <element name="customize" optional="true"/>
12.960 <sequential>
12.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
12.962 - <jvmarg line="${run.jvmargs}"/>
12.963 - <classpath>
12.964 - <path path="${run.classpath}"/>
12.965 - </classpath>
12.966 - <syspropertyset>
12.967 - <propertyref prefix="run-sys-prop."/>
12.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
12.969 - </syspropertyset>
12.970 - <customize/>
12.971 - </java>
12.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
12.973 + <pathconvert property="run.classpath.without.build.classes.dir">
12.974 + <path path="${run.classpath}"/>
12.975 + <map from="${build.classes.dir.resolved}" to=""/>
12.976 + </pathconvert>
12.977 + <pathconvert pathsep=" " property="jar.classpath">
12.978 + <path path="${run.classpath.without.build.classes.dir}"/>
12.979 + <chainedmapper>
12.980 + <flattenmapper/>
12.981 + <filtermapper>
12.982 + <replacestring from=" " to="%20"/>
12.983 + </filtermapper>
12.984 + <globmapper from="*" to="lib/*"/>
12.985 + </chainedmapper>
12.986 + </pathconvert>
12.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
12.988 + <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}">
12.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
12.990 + <manifest>
12.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
12.992 + <customize/>
12.993 + </manifest>
12.994 + </copylibs>
12.995 </sequential>
12.996 </macrodef>
12.997 </target>
12.998 <target name="-init-presetdef-jar">
12.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
12.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
12.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
12.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
12.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
12.1004 </jar>
12.1005 </presetdef>
12.1006 </target>
12.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
12.1008 + <target name="-init-ap-cmdline-properties">
12.1009 + <property name="annotation.processing.enabled" value="true"/>
12.1010 + <property name="annotation.processing.processors.list" value=""/>
12.1011 + <property name="annotation.processing.processor.options" value=""/>
12.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
12.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
12.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
12.1015 + <condition property="ap.supported.internal" value="true">
12.1016 + <not>
12.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
12.1018 + </not>
12.1019 + </condition>
12.1020 + </target>
12.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
12.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
12.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
12.1024 + </condition>
12.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
12.1026 + <isfalse value="${annotation.processing.enabled}"/>
12.1027 + </condition>
12.1028 + </target>
12.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
12.1030 + <property name="ap.cmd.line.internal" value=""/>
12.1031 + </target>
12.1032 + <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"/>
12.1033 <!--
12.1034 ===================
12.1035 COMPILATION SECTION
12.1036 ===================
12.1037 -->
12.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
12.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
12.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
12.1041 + <delete file="${built-jar.properties}" quiet="true"/>
12.1042 + </target>
12.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
12.1044 + <echo level="warn" message="Cycle detected: conditionaluseofapi was already built"/>
12.1045 + </target>
12.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
12.1047 + <mkdir dir="${build.dir}"/>
12.1048 + <touch file="${built-jar.properties}" verbose="false"/>
12.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
12.1050 + <antcall target="-warn-already-built-jar"/>
12.1051 + <propertyfile file="${built-jar.properties}">
12.1052 + <entry key="${basedir}" value=""/>
12.1053 + </propertyfile>
12.1054 + </target>
12.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
12.1056 + <target depends="init" name="-check-automatic-build">
12.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
12.1058 + </target>
12.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
12.1060 + <antcall target="clean">
12.1061 + <param name="no.dependencies" value="true"/>
12.1062 + </antcall>
12.1063 + </target>
12.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
12.1065 <mkdir dir="${build.classes.dir}"/>
12.1066 </target>
12.1067 @@ -317,19 +1085,30 @@
12.1068 <!-- You can override this target in the ../build.xml file. -->
12.1069 </target>
12.1070 <target if="do.depend.true" name="-compile-depend">
12.1071 - <j2seproject3:depend/>
12.1072 + <pathconvert property="build.generated.subdirs">
12.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
12.1074 + <include name="*"/>
12.1075 + </dirset>
12.1076 + </pathconvert>
12.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
12.1078 </target>
12.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
12.1080 - <j2seproject3:javac/>
12.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
12.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
12.1083 <copy todir="${build.classes.dir}">
12.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
12.1085 </copy>
12.1086 </target>
12.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
12.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
12.1089 + <copy todir="${build.classes.dir}/META-INF">
12.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
12.1091 + </copy>
12.1092 + </target>
12.1093 <target name="-post-compile">
12.1094 <!-- Empty placeholder for easier customization. -->
12.1095 <!-- You can override this target in the ../build.xml file. -->
12.1096 </target>
12.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
12.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
12.1099 <target name="-pre-compile-single">
12.1100 <!-- Empty placeholder for easier customization. -->
12.1101 <!-- You can override this target in the ../build.xml file. -->
12.1102 @@ -337,13 +1116,13 @@
12.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
12.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
12.1105 <j2seproject3:force-recompile/>
12.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
12.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
12.1108 </target>
12.1109 <target name="-post-compile-single">
12.1110 <!-- Empty placeholder for easier customization. -->
12.1111 <!-- You can override this target in the ../build.xml file. -->
12.1112 </target>
12.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
12.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
12.1115 <!--
12.1116 ====================
12.1117 JAR BUILDING SECTION
12.1118 @@ -357,57 +1136,191 @@
12.1119 <!-- Empty placeholder for easier customization. -->
12.1120 <!-- You can override this target in the ../build.xml file. -->
12.1121 </target>
12.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
12.1123 - <j2seproject1:jar/>
12.1124 + <target depends="init,compile" name="-check-module-main-class">
12.1125 + <pathconvert property="main.class.file">
12.1126 + <string value="${main.class}"/>
12.1127 + <unpackagemapper from="*" to="*.class"/>
12.1128 + </pathconvert>
12.1129 + <condition property="do.module.main.class">
12.1130 + <and>
12.1131 + <isset property="main.class.available"/>
12.1132 + <available file="${build.classes.dir}/module-info.class"/>
12.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
12.1134 + <isset property="libs.CopyLibs.classpath"/>
12.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
12.1136 + </and>
12.1137 + </condition>
12.1138 </target>
12.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
12.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
12.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
12.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
12.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
12.1144 </target>
12.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
12.1146 - <j2seproject1:jar manifest="${manifest.file}">
12.1147 - <j2seproject1:manifest>
12.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
12.1149 - </j2seproject1:manifest>
12.1150 - </j2seproject1:jar>
12.1151 - <echo>To run this application from the command line without Ant, try:</echo>
12.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
12.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
12.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
12.1155 + </target>
12.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
12.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
12.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
12.1159 + </target>
12.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
12.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
12.1162 + <attribute name="Main-Class" value="${main.class}"/>
12.1163 + </manifest>
12.1164 + </target>
12.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
12.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
12.1167 + <attribute name="Profile" value="${javac.profile}"/>
12.1168 + </manifest>
12.1169 + </target>
12.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
12.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
12.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
12.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
12.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
12.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
12.1176 + </manifest>
12.1177 + </target>
12.1178 + <target depends="init,compile" name="-check-do-mkdist">
12.1179 + <condition property="do.mkdist">
12.1180 + <and>
12.1181 + <isset property="do.archive"/>
12.1182 + <isset property="libs.CopyLibs.classpath"/>
12.1183 + <not>
12.1184 + <istrue value="${mkdist.disabled}"/>
12.1185 + </not>
12.1186 + <not>
12.1187 + <available file="${build.classes.dir}/module-info.class"/>
12.1188 + </not>
12.1189 + </and>
12.1190 + </condition>
12.1191 + </target>
12.1192 + <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">
12.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
12.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
12.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
12.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
12.1197 + </target>
12.1198 + <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">
12.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
12.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
12.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
12.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
12.1203 + <isset property="named.module.internal"/>
12.1204 + </condition>
12.1205 <pathconvert property="run.classpath.with.dist.jar">
12.1206 <path path="${run.classpath}"/>
12.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
12.1208 + </pathconvert>
12.1209 + <pathconvert property="run.modulepath.with.dist.jar">
12.1210 + <path location="${dist.jar.resolved}"/>
12.1211 + <path path="${run.modulepath}"/>
12.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
12.1213 </pathconvert>
12.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
12.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
12.1216 + <isset property="named.module.internal"/>
12.1217 + </condition>
12.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
12.1219 + <and>
12.1220 + <isset property="modules.supported.internal"/>
12.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
12.1222 + </and>
12.1223 + </condition>
12.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
12.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
12.1226 + </condition>
12.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
12.1228 + <isset property="do.module.main.class"/>
12.1229 + </condition>
12.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
12.1231 + <isset property="named.module.internal"/>
12.1232 + </condition>
12.1233 + <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}">
12.1234 + <isset property="main.class.available"/>
12.1235 + </condition>
12.1236 + <condition else="debug" property="jar.usage.level" value="info">
12.1237 + <isset property="main.class.available"/>
12.1238 + </condition>
12.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
12.1240 </target>
12.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
12.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
12.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
12.1244 - <path path="${run.classpath}"/>
12.1245 - <map from="${build.classes.dir.resolved}" to=""/>
12.1246 - </pathconvert>
12.1247 - <pathconvert pathsep=" " property="jar.classpath">
12.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
12.1249 - <chainedmapper>
12.1250 - <flattenmapper/>
12.1251 - <globmapper from="*" to="lib/*"/>
12.1252 - </chainedmapper>
12.1253 - </pathconvert>
12.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
12.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
12.1256 - <fileset dir="${build.classes.dir}"/>
12.1257 - <manifest>
12.1258 - <attribute name="Main-Class" value="${main.class}"/>
12.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
12.1260 - </manifest>
12.1261 - </copylibs>
12.1262 - <echo>To run this application from the command line without Ant, try:</echo>
12.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
12.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
12.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
12.1266 + <delete>
12.1267 + <fileset file="${tmp.manifest.file}"/>
12.1268 + </delete>
12.1269 </target>
12.1270 + <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"/>
12.1271 + <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"/>
12.1272 <target name="-post-jar">
12.1273 <!-- Empty placeholder for easier customization. -->
12.1274 <!-- You can override this target in the ../build.xml file. -->
12.1275 </target>
12.1276 - <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"/>
12.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
12.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
12.1279 + <!--
12.1280 + =================
12.1281 + DEPLOY SECTION
12.1282 + =================
12.1283 + -->
12.1284 + <target name="-pre-deploy">
12.1285 + <!-- Empty placeholder for easier customization. -->
12.1286 + <!-- You can override this target in the ../build.xml file. -->
12.1287 + </target>
12.1288 + <target depends="init" name="-check-jlink">
12.1289 + <condition property="do.jlink.internal">
12.1290 + <and>
12.1291 + <istrue value="${do.jlink}"/>
12.1292 + <isset property="do.archive"/>
12.1293 + <isset property="named.module.internal"/>
12.1294 + </and>
12.1295 + </condition>
12.1296 + </target>
12.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
12.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
12.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
12.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
12.1301 + <and>
12.1302 + <isset property="jlink.additionalmodules"/>
12.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
12.1304 + </and>
12.1305 + </condition>
12.1306 + <condition property="jlink.do.strip.internal">
12.1307 + <and>
12.1308 + <isset property="jlink.strip"/>
12.1309 + <istrue value="${jlink.strip}"/>
12.1310 + </and>
12.1311 + </condition>
12.1312 + <condition property="jlink.do.additionalparam.internal">
12.1313 + <and>
12.1314 + <isset property="jlink.additionalparam"/>
12.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
12.1316 + </and>
12.1317 + </condition>
12.1318 + <condition property="jlink.do.launcher.internal">
12.1319 + <and>
12.1320 + <istrue value="${jlink.launcher}"/>
12.1321 + <isset property="main.class.available"/>
12.1322 + </and>
12.1323 + </condition>
12.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
12.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
12.1326 + <exec executable="${platform.jlink}">
12.1327 + <arg value="--module-path"/>
12.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
12.1329 + <arg value="--add-modules"/>
12.1330 + <arg value="${jlink.add.modules}"/>
12.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
12.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
12.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
12.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
12.1335 + <arg value="--output"/>
12.1336 + <arg value="${dist.jlink.output}"/>
12.1337 + </exec>
12.1338 + </target>
12.1339 + <target name="-post-deploy">
12.1340 + <!-- Empty placeholder for easier customization. -->
12.1341 + <!-- You can override this target in the ../build.xml file. -->
12.1342 + </target>
12.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
12.1344 <!--
12.1345 =================
12.1346 EXECUTION SECTION
12.1347 @@ -423,10 +1336,14 @@
12.1348 <target name="-do-not-recompile">
12.1349 <property name="javac.includes.binary" value=""/>
12.1350 </target>
12.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
12.1352 + <target depends="init,compile-single" name="run-single">
12.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
12.1354 <j2seproject1:java classname="${run.class}"/>
12.1355 </target>
12.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
12.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
12.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
12.1359 + </target>
12.1360 <!--
12.1361 =================
12.1362 DEBUGGING SECTION
12.1363 @@ -435,11 +1352,14 @@
12.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
12.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
12.1366 </target>
12.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
12.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
12.1369 + </target>
12.1370 <target depends="init,compile" name="-debug-start-debuggee">
12.1371 <j2seproject3:debug>
12.1372 - <customize>
12.1373 + <customizeDebuggee>
12.1374 <arg line="${application.args}"/>
12.1375 - </customize>
12.1376 + </customizeDebuggee>
12.1377 </j2seproject3:debug>
12.1378 </target>
12.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
12.1380 @@ -451,7 +1371,12 @@
12.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
12.1382 <j2seproject3:debug classname="${debug.class}"/>
12.1383 </target>
12.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
12.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
12.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
12.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
12.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
12.1389 + </target>
12.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
12.1391 <target depends="init" name="-pre-debug-fix">
12.1392 <fail unless="fix.includes">Must set fix.includes</fail>
12.1393 <property name="javac.includes" value="${fix.includes}.java"/>
12.1394 @@ -461,20 +1386,146 @@
12.1395 </target>
12.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
12.1397 <!--
12.1398 + =================
12.1399 + PROFILING SECTION
12.1400 + =================
12.1401 + -->
12.1402 + <!--
12.1403 + pre NB7.2 profiler integration
12.1404 + -->
12.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
12.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
12.1407 + <nbprofiledirect>
12.1408 + <classpath>
12.1409 + <path path="${run.classpath}"/>
12.1410 + </classpath>
12.1411 + </nbprofiledirect>
12.1412 + <profile/>
12.1413 + </target>
12.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
12.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
12.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
12.1417 + <nbprofiledirect>
12.1418 + <classpath>
12.1419 + <path path="${run.classpath}"/>
12.1420 + </classpath>
12.1421 + </nbprofiledirect>
12.1422 + <profile classname="${profile.class}"/>
12.1423 + </target>
12.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
12.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
12.1426 + <nbprofiledirect>
12.1427 + <classpath>
12.1428 + <path path="${run.classpath}"/>
12.1429 + </classpath>
12.1430 + </nbprofiledirect>
12.1431 + <profile classname="sun.applet.AppletViewer">
12.1432 + <customize>
12.1433 + <arg value="${applet.url}"/>
12.1434 + </customize>
12.1435 + </profile>
12.1436 + </target>
12.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
12.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
12.1439 + <nbprofiledirect>
12.1440 + <classpath>
12.1441 + <path path="${run.test.classpath}"/>
12.1442 + </classpath>
12.1443 + </nbprofiledirect>
12.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
12.1445 + <customize>
12.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
12.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
12.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
12.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
12.1450 + <classpath>
12.1451 + <path path="${run.test.classpath}"/>
12.1452 + </classpath>
12.1453 + </customize>
12.1454 + </j2seproject3:junit>
12.1455 + </target>
12.1456 + <!--
12.1457 + end of pre NB72 profiling section
12.1458 + -->
12.1459 + <target if="netbeans.home" name="-profile-check">
12.1460 + <condition property="profiler.configured">
12.1461 + <or>
12.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
12.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
12.1464 + </or>
12.1465 + </condition>
12.1466 + </target>
12.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
12.1468 + <startprofiler/>
12.1469 + <antcall target="run"/>
12.1470 + </target>
12.1471 + <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">
12.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
12.1473 + <startprofiler/>
12.1474 + <antcall target="run-single"/>
12.1475 + </target>
12.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
12.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
12.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
12.1479 + <startprofiler/>
12.1480 + <antcall target="test-single"/>
12.1481 + </target>
12.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
12.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
12.1484 + <startprofiler/>
12.1485 + <antcall target="run-test-with-main"/>
12.1486 + </target>
12.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
12.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
12.1489 + <startprofiler/>
12.1490 + <antcall target="run-applet"/>
12.1491 + </target>
12.1492 + <!--
12.1493 ===============
12.1494 JAVADOC SECTION
12.1495 ===============
12.1496 -->
12.1497 - <target depends="init" name="-javadoc-build">
12.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
12.1499 <mkdir dir="${dist.javadoc.dir}"/>
12.1500 - <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}">
12.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
12.1502 + <and>
12.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
12.1504 + <not>
12.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
12.1506 + </not>
12.1507 + </and>
12.1508 + </condition>
12.1509 + <condition else="" property="bug5101868workaround" value="*.java">
12.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
12.1511 + </condition>
12.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
12.1513 + <and>
12.1514 + <isset property="javadoc.html5"/>
12.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
12.1516 + </and>
12.1517 + </condition>
12.1518 + <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}">
12.1519 <classpath>
12.1520 <path path="${javac.classpath}"/>
12.1521 </classpath>
12.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
12.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
12.1524 <filename name="**/*.java"/>
12.1525 </fileset>
12.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
12.1527 + <include name="**/*.java"/>
12.1528 + <exclude name="*.java"/>
12.1529 + </fileset>
12.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
12.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
12.1532 </javadoc>
12.1533 + <copy todir="${dist.javadoc.dir}">
12.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
12.1535 + <filename name="**/doc-files/**"/>
12.1536 + </fileset>
12.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
12.1538 + <include name="**/doc-files/**"/>
12.1539 + </fileset>
12.1540 + </copy>
12.1541 </target>
12.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
12.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
12.1544 @@ -482,7 +1533,7 @@
12.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
12.1546 <!--
12.1547 =========================
12.1548 - JUNIT COMPILATION SECTION
12.1549 + TEST COMPILATION SECTION
12.1550 =========================
12.1551 -->
12.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
12.1553 @@ -492,11 +1543,63 @@
12.1554 <!-- Empty placeholder for easier customization. -->
12.1555 <!-- You can override this target in the ../build.xml file. -->
12.1556 </target>
12.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
12.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
12.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
12.1560 + <and>
12.1561 + <isset property="test.module.name"/>
12.1562 + <length length="0" string="${test.module.name}" when="greater"/>
12.1563 + </and>
12.1564 + </condition>
12.1565 + <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">
12.1566 + <and>
12.1567 + <isset property="test.module.name"/>
12.1568 + <length length="0" string="${test.module.name}" when="greater"/>
12.1569 + </and>
12.1570 + </condition>
12.1571 + </target>
12.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
12.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
12.1574 + <and>
12.1575 + <isset property="test.module.name"/>
12.1576 + <length length="0" string="${test.module.name}" when="greater"/>
12.1577 + </and>
12.1578 + </condition>
12.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
12.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
12.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
12.1582 + <chainedmapper>
12.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
12.1584 + <filtermapper>
12.1585 + <uniqfilter/>
12.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
12.1587 + </filtermapper>
12.1588 + <cutdirsmapper dirs="1"/>
12.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
12.1590 + </chainedmapper>
12.1591 + </pathconvert>
12.1592 + <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}">
12.1593 + <and>
12.1594 + <isset property="test.module.name"/>
12.1595 + <length length="0" string="${test.module.name}" when="greater"/>
12.1596 + </and>
12.1597 + </condition>
12.1598 + </target>
12.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
12.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
12.1601 + <property name="javac.test.compilerargs" value=""/>
12.1602 + <property name="run.test.jvmargs" value=""/>
12.1603 + </target>
12.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
12.1605 <target if="do.depend.true" name="-compile-test-depend">
12.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
12.1607 </target>
12.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
12.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
12.1610 + <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">
12.1611 + <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}">
12.1612 + <customize>
12.1613 + <compilerarg line="${javac.test.compilerargs}"/>
12.1614 + </customize>
12.1615 + </j2seproject3:javac>
12.1616 <copy todir="${build.test.classes.dir}">
12.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
12.1618 </copy>
12.1619 @@ -510,10 +1613,14 @@
12.1620 <!-- Empty placeholder for easier customization. -->
12.1621 <!-- You can override this target in the ../build.xml file. -->
12.1622 </target>
12.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
12.1624 + <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">
12.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
12.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
12.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
12.1628 + <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}">
12.1629 + <customize>
12.1630 + <compilerarg line="${javac.test.compilerargs}"/>
12.1631 + </customize>
12.1632 + </j2seproject3:javac>
12.1633 <copy todir="${build.test.classes.dir}">
12.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
12.1635 </copy>
12.1636 @@ -525,17 +1632,17 @@
12.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
12.1638 <!--
12.1639 =======================
12.1640 - JUNIT EXECUTION SECTION
12.1641 + TEST EXECUTION SECTION
12.1642 =======================
12.1643 -->
12.1644 <target depends="init" if="have.tests" name="-pre-test-run">
12.1645 <mkdir dir="${build.test.results.dir}"/>
12.1646 </target>
12.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
12.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
12.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
12.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
12.1651 </target>
12.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
12.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
12.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
12.1655 </target>
12.1656 <target depends="init" if="have.tests" name="test-report"/>
12.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
12.1658 @@ -543,41 +1650,42 @@
12.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
12.1660 <mkdir dir="${build.test.results.dir}"/>
12.1661 </target>
12.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
12.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
12.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
12.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
12.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
12.1667 </target>
12.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
12.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
12.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
12.1671 </target>
12.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
12.1673 + <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"/>
12.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
12.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
12.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
12.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
12.1678 + </target>
12.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
12.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
12.1681 + </target>
12.1682 + <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"/>
12.1683 <!--
12.1684 =======================
12.1685 - JUNIT DEBUGGING SECTION
12.1686 + TEST DEBUGGING SECTION
12.1687 =======================
12.1688 -->
12.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
12.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
12.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
12.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
12.1693 - <delete file="${test.report.file}"/>
12.1694 - <mkdir dir="${build.test.results.dir}"/>
12.1695 - <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}">
12.1696 - <customize>
12.1697 - <syspropertyset>
12.1698 - <propertyref prefix="test-sys-prop."/>
12.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
12.1700 - </syspropertyset>
12.1701 - <arg value="${test.class}"/>
12.1702 - <arg value="showoutput=true"/>
12.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
12.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
12.1705 - </customize>
12.1706 - </j2seproject3:debug>
12.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
12.1708 + </target>
12.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
12.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
12.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
12.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
12.1713 </target>
12.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
12.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
12.1716 </target>
12.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
12.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
12.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
12.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
12.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
12.1722 </target>
12.1723 @@ -603,9 +1711,9 @@
12.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
12.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
12.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
12.1727 - <customize>
12.1728 + <customizeDebuggee>
12.1729 <arg value="${applet.url}"/>
12.1730 - </customize>
12.1731 + </customizeDebuggee>
12.1732 </j2seproject3:debug>
12.1733 </target>
12.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
12.1735 @@ -614,14 +1722,49 @@
12.1736 CLEANUP SECTION
12.1737 ===============
12.1738 -->
12.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
12.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
12.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
12.1742 + <delete file="${built-clean.properties}" quiet="true"/>
12.1743 + </target>
12.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
12.1745 + <echo level="warn" message="Cycle detected: conditionaluseofapi was already built"/>
12.1746 + </target>
12.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
12.1748 + <mkdir dir="${build.dir}"/>
12.1749 + <touch file="${built-clean.properties}" verbose="false"/>
12.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
12.1751 + <antcall target="-warn-already-built-clean"/>
12.1752 + <propertyfile file="${built-clean.properties}">
12.1753 + <entry key="${basedir}" value=""/>
12.1754 + </propertyfile>
12.1755 + </target>
12.1756 <target depends="init" name="-do-clean">
12.1757 <delete dir="${build.dir}"/>
12.1758 - <delete dir="${dist.dir}"/>
12.1759 + <delete dir="${dist.jlink.output}"/>
12.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
12.1761 </target>
12.1762 <target name="-post-clean">
12.1763 <!-- Empty placeholder for easier customization. -->
12.1764 <!-- You can override this target in the ../build.xml file. -->
12.1765 </target>
12.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
12.1767 + <target name="-check-call-dep">
12.1768 + <property file="${call.built.properties}" prefix="already.built."/>
12.1769 + <condition property="should.call.dep">
12.1770 + <and>
12.1771 + <not>
12.1772 + <isset property="already.built.${call.subproject}"/>
12.1773 + </not>
12.1774 + <available file="${call.script}"/>
12.1775 + </and>
12.1776 + </condition>
12.1777 + </target>
12.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
12.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
12.1780 + <propertyset>
12.1781 + <propertyref prefix="transfer."/>
12.1782 + <mapper from="transfer.*" to="*" type="glob"/>
12.1783 + </propertyset>
12.1784 + </ant>
12.1785 + </target>
12.1786 </project>
13.1 --- a/samples/conditionaluseofapi/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
13.2 +++ b/samples/conditionaluseofapi/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
13.3 @@ -4,5 +4,5 @@
13.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
13.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
13.6 nbproject/build-impl.xml.data.CRC32=32385e3b
13.7 -nbproject/build-impl.xml.script.CRC32=7a10d71d
13.8 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
13.9 +nbproject/build-impl.xml.script.CRC32=67abb0d8
13.10 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
14.1 --- a/samples/conditionaluseofapi/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
14.2 +++ b/samples/conditionaluseofapi/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
14.3 @@ -5,14 +5,19 @@
14.4 # This directory is removed when the project is cleaned:
14.5 build.dir=build
14.6 build.generated.dir=${build.dir}/generated
14.7 +build.generated.sources.dir=${build.dir}/generated-sources
14.8 # Only compile against the classpath explicitly listed here:
14.9 build.sysclasspath=ignore
14.10 build.test.classes.dir=${build.dir}/test/classes
14.11 build.test.results.dir=${build.dir}/test/results
14.12 debug.classpath=\
14.13 ${run.classpath}
14.14 +debug.modulepath=\
14.15 + ${run.modulepath}
14.16 debug.test.classpath=\
14.17 ${run.test.classpath}
14.18 +debug.test.modulepath=\
14.19 + ${run.test.modulepath}
14.20 # This directory is removed when the project is cleaned:
14.21 dist.dir=dist
14.22 dist.jar=${dist.dir}/conditionaluseofapi.jar
14.23 @@ -24,13 +29,17 @@
14.24 # Space-separated list of extra javac options
14.25 javac.compilerargs=
14.26 javac.deprecation=false
14.27 -javac.source=1.4
14.28 -javac.target=1.4
14.29 +javac.modulepath=
14.30 +javac.processormodulepath=
14.31 +javac.source=1.6
14.32 +javac.target=1.6
14.33 javac.test.classpath=\
14.34 ${javac.classpath}:\
14.35 ${build.classes.dir}:\
14.36 ${libs.junit.classpath}:\
14.37 ${libs.junit_4.classpath}
14.38 +javac.test.modulepath=\
14.39 + ${javac.modulepath}
14.40 javadoc.additionalparam=
14.41 javadoc.author=false
14.42 javadoc.encoding=${source.encoding}
14.43 @@ -52,9 +61,13 @@
14.44 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
14.45 # or test-sys-prop.name=value to set system properties for unit tests):
14.46 run.jvmargs=
14.47 +run.modulepath=\
14.48 + ${javac.modulepath}
14.49 run.test.classpath=\
14.50 ${javac.test.classpath}:\
14.51 ${build.test.classes.dir}
14.52 +run.test.modulepath=\
14.53 + ${javac.test.modulepath}
14.54 source.encoding=UTF-8
14.55 src.dir=src
14.56 test.src.dir=test
15.1 --- a/samples/deadlock/build.xml Mon Nov 11 05:47:32 2019 +0100
15.2 +++ b/samples/deadlock/build.xml Mon Nov 11 13:17:34 2019 +0100
15.3 @@ -2,6 +2,11 @@
15.4 <!-- You may freely edit this file. See commented blocks below for -->
15.5 <!-- some examples of how to customize the build. -->
15.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
15.7 +<!-- By default, only the Clean and Build commands use this build script. -->
15.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
15.9 +<!-- the Compile on Save feature is turned off for the project. -->
15.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
15.11 +<!-- in the project's Project Properties dialog box.-->
15.12 <project name="deadlock" default="default" basedir=".">
15.13 <description>Builds, tests, and runs the project deadlock.</description>
15.14 <import file="nbproject/build-impl.xml"/>
15.15 @@ -46,8 +51,7 @@
15.16 -init-macrodef-junit: defines macro for junit execution
15.17 -init-macrodef-debug: defines macro for class debugging
15.18 -init-macrodef-java: defines macro for class execution
15.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
15.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
15.21 + -do-jar: JAR building
15.22 run: execution of project
15.23 -javadoc-build: Javadoc generation
15.24 test-report: JUnit report generation
16.1 --- a/samples/deadlock/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
16.2 +++ b/samples/deadlock/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
16.3 @@ -12,14 +12,21 @@
16.4 - execution
16.5 - debugging
16.6 - javadoc
16.7 - - junit compilation
16.8 - - junit execution
16.9 - - junit debugging
16.10 + - test compilation
16.11 + - test execution
16.12 + - test debugging
16.13 - applet
16.14 - cleanup
16.15
16.16 -->
16.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="deadlock-impl">
16.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="deadlock-impl">
16.19 + <fail message="Please build using Ant 1.8.0 or higher.">
16.20 + <condition>
16.21 + <not>
16.22 + <antversion atleast="1.8.0"/>
16.23 + </not>
16.24 + </condition>
16.25 + </fail>
16.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
16.27 <!--
16.28 ======================
16.29 @@ -39,28 +46,136 @@
16.30 <property file="${user.properties.file}"/>
16.31 <!-- The two properties below are usually overridden -->
16.32 <!-- by the active platform. Just a fallback. -->
16.33 - <property name="default.javac.source" value="1.4"/>
16.34 - <property name="default.javac.target" value="1.4"/>
16.35 + <property name="default.javac.source" value="1.6"/>
16.36 + <property name="default.javac.target" value="1.6"/>
16.37 </target>
16.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
16.39 <property file="nbproject/configs/${config}.properties"/>
16.40 <property file="nbproject/project.properties"/>
16.41 </target>
16.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
16.43 + <target name="-init-modules-supported">
16.44 + <condition property="modules.supported.internal" value="true">
16.45 + <not>
16.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
16.47 + </not>
16.48 + </condition>
16.49 + </target>
16.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
16.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
16.52 + <attribute name="property"/>
16.53 + <attribute name="sourcepath"/>
16.54 + <sequential>
16.55 + <loadresource property="@{property}" quiet="true">
16.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
16.57 + <filterchain>
16.58 + <stripjavacomments/>
16.59 + <linecontainsregexp>
16.60 + <regexp pattern="module .* \{"/>
16.61 + </linecontainsregexp>
16.62 + <tokenfilter>
16.63 + <linetokenizer/>
16.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
16.65 + </tokenfilter>
16.66 + <striplinebreaks/>
16.67 + </filterchain>
16.68 + </loadresource>
16.69 + </sequential>
16.70 + </macrodef>
16.71 + </target>
16.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
16.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
16.74 + <condition>
16.75 + <not>
16.76 + <antversion atleast="1.10.0"/>
16.77 + </not>
16.78 + </condition>
16.79 + </fail>
16.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
16.81 + <condition property="named.module.internal">
16.82 + <and>
16.83 + <isset property="module.name"/>
16.84 + <length length="0" string="${module.name}" when="greater"/>
16.85 + </and>
16.86 + </condition>
16.87 + <condition property="unnamed.module.internal">
16.88 + <not>
16.89 + <isset property="named.module.internal"/>
16.90 + </not>
16.91 + </condition>
16.92 + <property name="javac.modulepath" value=""/>
16.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
16.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
16.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
16.96 + <property name="javac.upgrademodulepath" value=""/>
16.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
16.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
16.99 + <and>
16.100 + <isset property="javac.systemmodulepath"/>
16.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
16.102 + </and>
16.103 + </condition>
16.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
16.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
16.106 + <property name="module.name" value=""/>
16.107 + </target>
16.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
16.109 + <property name="platform.java" value="${java.home}/bin/java"/>
16.110 <available file="${manifest.file}" property="manifest.available"/>
16.111 - <condition property="manifest.available+main.class">
16.112 + <condition property="splashscreen.available">
16.113 <and>
16.114 - <isset property="manifest.available"/>
16.115 + <not>
16.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
16.117 + </not>
16.118 + <available file="${application.splash}"/>
16.119 + </and>
16.120 + </condition>
16.121 + <condition property="main.class.available">
16.122 + <and>
16.123 <isset property="main.class"/>
16.124 <not>
16.125 <equals arg1="${main.class}" arg2="" trim="true"/>
16.126 </not>
16.127 </and>
16.128 </condition>
16.129 - <condition property="manifest.available+main.class+mkdist.available">
16.130 + <condition property="profile.available">
16.131 <and>
16.132 - <istrue value="${manifest.available+main.class}"/>
16.133 - <isset property="libs.CopyLibs.classpath"/>
16.134 + <isset property="javac.profile"/>
16.135 + <length length="0" string="${javac.profile}" when="greater"/>
16.136 + <not>
16.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
16.138 + </not>
16.139 + </and>
16.140 + </condition>
16.141 + <condition property="do.archive">
16.142 + <or>
16.143 + <not>
16.144 + <istrue value="${jar.archive.disabled}"/>
16.145 + </not>
16.146 + <istrue value="${not.archive.disabled}"/>
16.147 + </or>
16.148 + </condition>
16.149 + <condition property="do.archive+manifest.available">
16.150 + <and>
16.151 + <isset property="manifest.available"/>
16.152 + <istrue value="${do.archive}"/>
16.153 + </and>
16.154 + </condition>
16.155 + <condition property="do.archive+main.class.available">
16.156 + <and>
16.157 + <isset property="main.class.available"/>
16.158 + <istrue value="${do.archive}"/>
16.159 + </and>
16.160 + </condition>
16.161 + <condition property="do.archive+splashscreen.available">
16.162 + <and>
16.163 + <isset property="splashscreen.available"/>
16.164 + <istrue value="${do.archive}"/>
16.165 + </and>
16.166 + </condition>
16.167 + <condition property="do.archive+profile.available">
16.168 + <and>
16.169 + <isset property="profile.available"/>
16.170 + <istrue value="${do.archive}"/>
16.171 </and>
16.172 </condition>
16.173 <condition property="have.tests">
16.174 @@ -86,6 +201,7 @@
16.175 </and>
16.176 </condition>
16.177 <property name="run.jvmargs" value=""/>
16.178 + <property name="run.jvmargs.ide" value=""/>
16.179 <property name="javac.compilerargs" value=""/>
16.180 <property name="work.dir" value="${basedir}"/>
16.181 <condition property="no.deps">
16.182 @@ -97,6 +213,8 @@
16.183 <property name="javadoc.preview" value="true"/>
16.184 <property name="application.args" value=""/>
16.185 <property name="source.encoding" value="${file.encoding}"/>
16.186 + <property name="runtime.encoding" value="${source.encoding}"/>
16.187 + <property name="manifest.encoding" value="${source.encoding}"/>
16.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
16.189 <and>
16.190 <isset property="javadoc.encoding"/>
16.191 @@ -112,12 +230,58 @@
16.192 <condition property="do.depend.true">
16.193 <istrue value="${do.depend}"/>
16.194 </condition>
16.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
16.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
16.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
16.198 <and>
16.199 - <isset property="jaxws.endorsed.dir"/>
16.200 - <available file="nbproject/jaxws-build.xml"/>
16.201 + <isset property="endorsed.classpath"/>
16.202 + <not>
16.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
16.204 + </not>
16.205 </and>
16.206 </condition>
16.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
16.208 + <isset property="profile.available"/>
16.209 + </condition>
16.210 + <condition else="false" property="jdkBug6558476">
16.211 + <and>
16.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
16.213 + <not>
16.214 + <os family="unix"/>
16.215 + </not>
16.216 + </and>
16.217 + </condition>
16.218 + <condition else="false" property="javac.fork">
16.219 + <or>
16.220 + <istrue value="${jdkBug6558476}"/>
16.221 + <istrue value="${javac.external.vm}"/>
16.222 + </or>
16.223 + </condition>
16.224 + <property name="jar.index" value="false"/>
16.225 + <property name="jar.index.metainf" value="${jar.index}"/>
16.226 + <property name="copylibs.rebase" value="true"/>
16.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
16.228 + <condition property="junit.available">
16.229 + <or>
16.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
16.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
16.232 + </or>
16.233 + </condition>
16.234 + <condition property="testng.available">
16.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
16.236 + </condition>
16.237 + <condition property="junit+testng.available">
16.238 + <and>
16.239 + <istrue value="${junit.available}"/>
16.240 + <istrue value="${testng.available}"/>
16.241 + </and>
16.242 + </condition>
16.243 + <condition else="testng" property="testng.mode" value="mixed">
16.244 + <istrue value="${junit+testng.available}"/>
16.245 + </condition>
16.246 + <condition else="" property="testng.debug.mode" value="-mixed">
16.247 + <istrue value="${junit+testng.available}"/>
16.248 + </condition>
16.249 + <property name="java.failonerror" value="true"/>
16.250 </target>
16.251 <target name="-post-init">
16.252 <!-- Empty placeholder for easier customization. -->
16.253 @@ -144,26 +308,152 @@
16.254 </sequential>
16.255 </macrodef>
16.256 </target>
16.257 - <target name="-init-macrodef-javac">
16.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
16.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
16.260 <attribute default="${src.dir}" name="srcdir"/>
16.261 <attribute default="${build.classes.dir}" name="destdir"/>
16.262 <attribute default="${javac.classpath}" name="classpath"/>
16.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
16.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
16.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
16.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
16.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
16.268 <attribute default="${includes}" name="includes"/>
16.269 <attribute default="${excludes}" name="excludes"/>
16.270 <attribute default="${javac.debug}" name="debug"/>
16.271 - <attribute default="" name="sourcepath"/>
16.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
16.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
16.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
16.275 <element name="customize" optional="true"/>
16.276 <sequential>
16.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
16.278 + <condition property="warn.excludes.internal">
16.279 + <and>
16.280 + <isset property="named.module.internal"/>
16.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
16.282 + </and>
16.283 + </condition>
16.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
16.285 + <property location="${build.dir}/empty" name="empty.dir"/>
16.286 + <mkdir dir="${empty.dir}"/>
16.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
16.288 + <condition property="processormodulepath.set">
16.289 + <resourcecount count="0" when="greater">
16.290 + <path>
16.291 + <pathelement path="@{processormodulepath}"/>
16.292 + </path>
16.293 + </resourcecount>
16.294 + </condition>
16.295 + <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}">
16.296 + <src>
16.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
16.298 + <include name="*"/>
16.299 + </dirset>
16.300 + </src>
16.301 <classpath>
16.302 <path path="@{classpath}"/>
16.303 </classpath>
16.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
16.305 + <modulepath>
16.306 + <path path="@{modulepath}"/>
16.307 + </modulepath>
16.308 + <upgrademodulepath>
16.309 + <path path="@{upgrademodulepath}"/>
16.310 + </upgrademodulepath>
16.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
16.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
16.313 + <compilerarg line="${javac.compilerargs}"/>
16.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
16.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
16.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
16.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
16.318 + <compilerarg line="${ap.processors.internal}"/>
16.319 + <compilerarg line="${annotation.processing.processor.options}"/>
16.320 + <compilerarg value="-s"/>
16.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
16.322 + <compilerarg line="${ap.proc.none.internal}"/>
16.323 <customize/>
16.324 </javac>
16.325 </sequential>
16.326 </macrodef>
16.327 + </target>
16.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
16.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
16.330 + <attribute default="${src.dir}" name="srcdir"/>
16.331 + <attribute default="${build.classes.dir}" name="destdir"/>
16.332 + <attribute default="${javac.classpath}" name="classpath"/>
16.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
16.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
16.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
16.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
16.337 + <attribute default="${includes}" name="includes"/>
16.338 + <attribute default="${excludes}" name="excludes"/>
16.339 + <attribute default="${javac.debug}" name="debug"/>
16.340 + <attribute default="${empty.dir}" name="sourcepath"/>
16.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
16.342 + <element name="customize" optional="true"/>
16.343 + <sequential>
16.344 + <property location="${build.dir}/empty" name="empty.dir"/>
16.345 + <mkdir dir="${empty.dir}"/>
16.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
16.347 + <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}">
16.348 + <src>
16.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
16.350 + <include name="*"/>
16.351 + </dirset>
16.352 + </src>
16.353 + <classpath>
16.354 + <path path="@{classpath}"/>
16.355 + </classpath>
16.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
16.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
16.358 + <compilerarg line="${javac.compilerargs}"/>
16.359 + <compilerarg value="-processorpath"/>
16.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
16.361 + <compilerarg line="${ap.processors.internal}"/>
16.362 + <compilerarg line="${annotation.processing.processor.options}"/>
16.363 + <compilerarg value="-s"/>
16.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
16.365 + <compilerarg line="${ap.proc.none.internal}"/>
16.366 + <customize/>
16.367 + </javac>
16.368 + </sequential>
16.369 + </macrodef>
16.370 + </target>
16.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
16.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
16.373 + <attribute default="${src.dir}" name="srcdir"/>
16.374 + <attribute default="${build.classes.dir}" name="destdir"/>
16.375 + <attribute default="${javac.classpath}" name="classpath"/>
16.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
16.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
16.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
16.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
16.380 + <attribute default="${includes}" name="includes"/>
16.381 + <attribute default="${excludes}" name="excludes"/>
16.382 + <attribute default="${javac.debug}" name="debug"/>
16.383 + <attribute default="${empty.dir}" name="sourcepath"/>
16.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
16.385 + <element name="customize" optional="true"/>
16.386 + <sequential>
16.387 + <property location="${build.dir}/empty" name="empty.dir"/>
16.388 + <mkdir dir="${empty.dir}"/>
16.389 + <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}">
16.390 + <src>
16.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
16.392 + <include name="*"/>
16.393 + </dirset>
16.394 + </src>
16.395 + <classpath>
16.396 + <path path="@{classpath}"/>
16.397 + </classpath>
16.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
16.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
16.400 + <compilerarg line="${javac.compilerargs}"/>
16.401 + <customize/>
16.402 + </javac>
16.403 + </sequential>
16.404 + </macrodef>
16.405 + </target>
16.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
16.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
16.408 <attribute default="${src.dir}" name="srcdir"/>
16.409 <attribute default="${build.classes.dir}" name="destdir"/>
16.410 @@ -180,51 +470,383 @@
16.411 <attribute default="${build.classes.dir}" name="destdir"/>
16.412 <sequential>
16.413 <fail unless="javac.includes">Must set javac.includes</fail>
16.414 - <pathconvert pathsep="," property="javac.includes.binary">
16.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
16.416 <path>
16.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
16.418 </path>
16.419 <globmapper from="*.java" to="*.class"/>
16.420 </pathconvert>
16.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
16.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
16.423 <delete>
16.424 - <files includes="${javac.includes.binary}"/>
16.425 + <files includesfile="${javac.includesfile.binary}"/>
16.426 + </delete>
16.427 + <delete>
16.428 + <fileset file="${javac.includesfile.binary}"/>
16.429 </delete>
16.430 </sequential>
16.431 </macrodef>
16.432 </target>
16.433 - <target name="-init-macrodef-junit">
16.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
16.435 + <condition else="false" property="nb.junit.batch" value="true">
16.436 + <and>
16.437 + <istrue value="${junit.available}"/>
16.438 + <not>
16.439 + <isset property="test.method"/>
16.440 + </not>
16.441 + </and>
16.442 + </condition>
16.443 + <condition else="false" property="nb.junit.single" value="true">
16.444 + <and>
16.445 + <istrue value="${junit.available}"/>
16.446 + <isset property="test.method"/>
16.447 + </and>
16.448 + </condition>
16.449 + </target>
16.450 + <target name="-init-test-properties">
16.451 + <property name="test.binaryincludes" value="<nothing>"/>
16.452 + <property name="test.binarytestincludes" value=""/>
16.453 + <property name="test.binaryexcludes" value=""/>
16.454 + </target>
16.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
16.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
16.457 + <attribute default="${includes}" name="includes"/>
16.458 + <attribute default="${excludes}" name="excludes"/>
16.459 + <element name="customizePrototype" optional="true"/>
16.460 + <sequential>
16.461 + <property name="junit.forkmode" value="perTest"/>
16.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
16.463 + <syspropertyset>
16.464 + <propertyref prefix="test-sys-prop."/>
16.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
16.466 + </syspropertyset>
16.467 + <classpath>
16.468 + <path path="${run.test.classpath}"/>
16.469 + </classpath>
16.470 + <modulepath>
16.471 + <path path="${run.test.modulepath}"/>
16.472 + </modulepath>
16.473 + <formatter type="brief" usefile="false"/>
16.474 + <formatter type="xml"/>
16.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
16.476 + <jvmarg value="-ea"/>
16.477 + <jvmarg line="${run.test.jvmargs}"/>
16.478 + <customizePrototype/>
16.479 + </junit>
16.480 + </sequential>
16.481 + </macrodef>
16.482 + </target>
16.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
16.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
16.485 + <attribute default="${includes}" name="includes"/>
16.486 + <attribute default="${excludes}" name="excludes"/>
16.487 + <element name="customizePrototype" optional="true"/>
16.488 + <sequential>
16.489 + <property name="junit.forkmode" value="perTest"/>
16.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
16.491 + <syspropertyset>
16.492 + <propertyref prefix="test-sys-prop."/>
16.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
16.494 + </syspropertyset>
16.495 + <classpath>
16.496 + <path path="${run.test.classpath}"/>
16.497 + </classpath>
16.498 + <formatter type="brief" usefile="false"/>
16.499 + <formatter type="xml"/>
16.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
16.501 + <jvmarg value="-ea"/>
16.502 + <customizePrototype/>
16.503 + </junit>
16.504 + </sequential>
16.505 + </macrodef>
16.506 + </target>
16.507 + <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}">
16.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
16.509 <attribute default="${includes}" name="includes"/>
16.510 <attribute default="${excludes}" name="excludes"/>
16.511 <attribute default="**" name="testincludes"/>
16.512 + <attribute default="" name="testmethods"/>
16.513 + <element name="customize" optional="true"/>
16.514 <sequential>
16.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
16.516 - <batchtest todir="${build.test.results.dir}">
16.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
16.518 - <filename name="@{testincludes}"/>
16.519 - </fileset>
16.520 - </batchtest>
16.521 + <j2seproject3:junit-prototype>
16.522 + <customizePrototype>
16.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
16.524 + <customize/>
16.525 + </customizePrototype>
16.526 + </j2seproject3:junit-prototype>
16.527 + </sequential>
16.528 + </macrodef>
16.529 + </target>
16.530 + <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}">
16.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
16.532 + <attribute default="${includes}" name="includes"/>
16.533 + <attribute default="${excludes}" name="excludes"/>
16.534 + <attribute default="**" name="testincludes"/>
16.535 + <attribute default="" name="testmethods"/>
16.536 + <element name="customize" optional="true"/>
16.537 + <sequential>
16.538 + <j2seproject3:junit-prototype>
16.539 + <customizePrototype>
16.540 + <batchtest todir="${build.test.results.dir}">
16.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
16.542 + <filename name="@{testincludes}"/>
16.543 + </fileset>
16.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
16.545 + <filename name="${test.binarytestincludes}"/>
16.546 + </fileset>
16.547 + </batchtest>
16.548 + <customize/>
16.549 + </customizePrototype>
16.550 + </j2seproject3:junit-prototype>
16.551 + </sequential>
16.552 + </macrodef>
16.553 + </target>
16.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
16.555 + <target if="${testng.available}" name="-init-macrodef-testng">
16.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
16.557 + <attribute default="${includes}" name="includes"/>
16.558 + <attribute default="${excludes}" name="excludes"/>
16.559 + <attribute default="**" name="testincludes"/>
16.560 + <attribute default="" name="testmethods"/>
16.561 + <element name="customize" optional="true"/>
16.562 + <sequential>
16.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
16.564 + <isset property="test.method"/>
16.565 + </condition>
16.566 + <union id="test.set">
16.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
16.568 + <filename name="@{testincludes}"/>
16.569 + </fileset>
16.570 + </union>
16.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
16.572 + <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="deadlock" testname="TestNG tests" workingDir="${work.dir}">
16.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
16.574 + <propertyset>
16.575 + <propertyref prefix="test-sys-prop."/>
16.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
16.577 + </propertyset>
16.578 <classpath>
16.579 <path path="${run.test.classpath}"/>
16.580 </classpath>
16.581 - <syspropertyset>
16.582 - <propertyref prefix="test-sys-prop."/>
16.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
16.584 - </syspropertyset>
16.585 - <formatter type="brief" usefile="false"/>
16.586 - <formatter type="xml"/>
16.587 - <jvmarg line="${run.jvmargs}"/>
16.588 - </junit>
16.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
16.590 + <customize/>
16.591 + </testng>
16.592 </sequential>
16.593 </macrodef>
16.594 </target>
16.595 - <target name="-init-macrodef-nbjpda">
16.596 + <target name="-init-macrodef-test-impl">
16.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
16.598 + <attribute default="${includes}" name="includes"/>
16.599 + <attribute default="${excludes}" name="excludes"/>
16.600 + <attribute default="**" name="testincludes"/>
16.601 + <attribute default="" name="testmethods"/>
16.602 + <element implicit="true" name="customize" optional="true"/>
16.603 + <sequential>
16.604 + <echo>No tests executed.</echo>
16.605 + </sequential>
16.606 + </macrodef>
16.607 + </target>
16.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
16.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
16.610 + <attribute default="${includes}" name="includes"/>
16.611 + <attribute default="${excludes}" name="excludes"/>
16.612 + <attribute default="**" name="testincludes"/>
16.613 + <attribute default="" name="testmethods"/>
16.614 + <element implicit="true" name="customize" optional="true"/>
16.615 + <sequential>
16.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
16.617 + <customize/>
16.618 + </j2seproject3:junit>
16.619 + </sequential>
16.620 + </macrodef>
16.621 + </target>
16.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
16.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
16.624 + <attribute default="${includes}" name="includes"/>
16.625 + <attribute default="${excludes}" name="excludes"/>
16.626 + <attribute default="**" name="testincludes"/>
16.627 + <attribute default="" name="testmethods"/>
16.628 + <element implicit="true" name="customize" optional="true"/>
16.629 + <sequential>
16.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
16.631 + <customize/>
16.632 + </j2seproject3:testng>
16.633 + </sequential>
16.634 + </macrodef>
16.635 + </target>
16.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
16.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
16.638 + <attribute default="${includes}" name="includes"/>
16.639 + <attribute default="${excludes}" name="excludes"/>
16.640 + <attribute default="**" name="testincludes"/>
16.641 + <attribute default="" name="testmethods"/>
16.642 + <sequential>
16.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
16.644 + <customize>
16.645 + <jvmarg line="${run.jvmargs}"/>
16.646 + <jvmarg line="${run.jvmargs.ide}"/>
16.647 + </customize>
16.648 + </j2seproject3:test-impl>
16.649 + </sequential>
16.650 + </macrodef>
16.651 + </target>
16.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
16.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
16.654 + <attribute default="${includes}" name="includes"/>
16.655 + <attribute default="${excludes}" name="excludes"/>
16.656 + <attribute default="**" name="testincludes"/>
16.657 + <attribute default="" name="testmethods"/>
16.658 + <element name="customizeDebuggee" optional="true"/>
16.659 + <sequential>
16.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
16.661 + <customize>
16.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
16.663 + <customizeDebuggee/>
16.664 + </customize>
16.665 + </j2seproject3:junit>
16.666 + </sequential>
16.667 + </macrodef>
16.668 + </target>
16.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
16.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
16.671 + <attribute default="${main.class}" name="testClass"/>
16.672 + <attribute default="" name="testMethod"/>
16.673 + <element name="customize2" optional="true"/>
16.674 + <sequential>
16.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
16.676 + <isset property="test.method"/>
16.677 + </condition>
16.678 + <condition else="-suitename deadlock -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
16.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
16.680 + </condition>
16.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
16.682 + <mkdir dir="${build.test.results.dir}"/>
16.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
16.684 + <customizeDebuggee>
16.685 + <customize2/>
16.686 + <jvmarg value="-ea"/>
16.687 + <arg line="${testng.debug.mode}"/>
16.688 + <arg line="-d ${build.test.results.dir}"/>
16.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
16.690 + <arg line="${testng.cmd.args}"/>
16.691 + </customizeDebuggee>
16.692 + </j2seproject3:debug>
16.693 + </sequential>
16.694 + </macrodef>
16.695 + </target>
16.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
16.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
16.698 + <attribute default="${main.class}" name="testClass"/>
16.699 + <attribute default="" name="testMethod"/>
16.700 + <element implicit="true" name="customize2" optional="true"/>
16.701 + <sequential>
16.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
16.703 + <customize2/>
16.704 + </j2seproject3:testng-debug>
16.705 + </sequential>
16.706 + </macrodef>
16.707 + </target>
16.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
16.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
16.710 + <attribute default="${includes}" name="includes"/>
16.711 + <attribute default="${excludes}" name="excludes"/>
16.712 + <attribute default="**" name="testincludes"/>
16.713 + <attribute default="" name="testmethods"/>
16.714 + <attribute default="${main.class}" name="testClass"/>
16.715 + <attribute default="" name="testMethod"/>
16.716 + <sequential>
16.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
16.718 + <customizeDebuggee>
16.719 + <jvmarg line="${run.jvmargs}"/>
16.720 + <jvmarg line="${run.jvmargs.ide}"/>
16.721 + </customizeDebuggee>
16.722 + </j2seproject3:test-debug-impl>
16.723 + </sequential>
16.724 + </macrodef>
16.725 + </target>
16.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
16.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
16.728 + <attribute default="${includes}" name="includes"/>
16.729 + <attribute default="${excludes}" name="excludes"/>
16.730 + <attribute default="**" name="testincludes"/>
16.731 + <attribute default="" name="testmethods"/>
16.732 + <attribute default="${main.class}" name="testClass"/>
16.733 + <attribute default="" name="testMethod"/>
16.734 + <sequential>
16.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
16.736 + <customize2>
16.737 + <syspropertyset>
16.738 + <propertyref prefix="test-sys-prop."/>
16.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
16.740 + </syspropertyset>
16.741 + </customize2>
16.742 + </j2seproject3:testng-debug-impl>
16.743 + </sequential>
16.744 + </macrodef>
16.745 + </target>
16.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
16.747 + <!--
16.748 + pre NB7.2 profiling section; consider it deprecated
16.749 + -->
16.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
16.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
16.752 + <!-- Empty placeholder for easier customization. -->
16.753 + <!-- You can override this target in the ../build.xml file. -->
16.754 + </target>
16.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
16.756 + <!-- Empty placeholder for easier customization. -->
16.757 + <!-- You can override this target in the ../build.xml file. -->
16.758 + </target>
16.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
16.760 + <macrodef name="resolve">
16.761 + <attribute name="name"/>
16.762 + <attribute name="value"/>
16.763 + <sequential>
16.764 + <property name="@{name}" value="${env.@{value}}"/>
16.765 + </sequential>
16.766 + </macrodef>
16.767 + <macrodef name="profile">
16.768 + <attribute default="${main.class}" name="classname"/>
16.769 + <element name="customize" optional="true"/>
16.770 + <sequential>
16.771 + <property environment="env"/>
16.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
16.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
16.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
16.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
16.776 + <jvmarg line="${profiler.info.jvmargs}"/>
16.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
16.778 + <arg line="${application.args}"/>
16.779 + <classpath>
16.780 + <path path="${run.classpath}"/>
16.781 + </classpath>
16.782 + <syspropertyset>
16.783 + <propertyref prefix="run-sys-prop."/>
16.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
16.785 + </syspropertyset>
16.786 + <customize/>
16.787 + </java>
16.788 + </sequential>
16.789 + </macrodef>
16.790 + </target>
16.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
16.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
16.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
16.794 + </target>
16.795 + <!--
16.796 + end of pre NB7.2 profiling section
16.797 + -->
16.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
16.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
16.800 <attribute default="${main.class}" name="name"/>
16.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
16.802 <attribute default="${debug.classpath}" name="classpath"/>
16.803 <attribute default="" name="stopclassname"/>
16.804 <sequential>
16.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
16.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
16.807 + <modulepath>
16.808 + <path path="@{modulepath}"/>
16.809 + </modulepath>
16.810 <classpath>
16.811 <path path="@{classpath}"/>
16.812 </classpath>
16.813 @@ -243,29 +865,112 @@
16.814 </macrodef>
16.815 </target>
16.816 <target name="-init-debug-args">
16.817 - <property name="version-output" value="java version "${ant.java.version}"/>
16.818 - <condition property="have-jdk-older-than-1.4">
16.819 - <or>
16.820 - <contains string="${version-output}" substring="java version "1.0"/>
16.821 - <contains string="${version-output}" substring="java version "1.1"/>
16.822 - <contains string="${version-output}" substring="java version "1.2"/>
16.823 - <contains string="${version-output}" substring="java version "1.3"/>
16.824 - </or>
16.825 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
16.826 + <os family="windows"/>
16.827 </condition>
16.828 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
16.829 - <istrue value="${have-jdk-older-than-1.4}"/>
16.830 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
16.831 + <isset property="debug.transport"/>
16.832 </condition>
16.833 </target>
16.834 <target depends="-init-debug-args" name="-init-macrodef-debug">
16.835 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
16.836 + <attribute default="${module.name}" name="modulename"/>
16.837 <attribute default="${main.class}" name="classname"/>
16.838 + <attribute default="${debug.modulepath}" name="modulepath"/>
16.839 <attribute default="${debug.classpath}" name="classpath"/>
16.840 + <element name="customizeDebuggee" optional="true"/>
16.841 + <sequential>
16.842 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
16.843 + <customize>
16.844 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
16.845 + <customizeDebuggee/>
16.846 + </customize>
16.847 + </j2seproject1:java>
16.848 + </sequential>
16.849 + </macrodef>
16.850 + </target>
16.851 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
16.852 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
16.853 + <attribute default="${module.name}" name="modulename"/>
16.854 + <attribute default="${main.class}" name="classname"/>
16.855 + <attribute default="${run.modulepath}" name="modulepath"/>
16.856 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
16.857 + <attribute default="${run.classpath}" name="classpath"/>
16.858 + <attribute default="jvm" name="jvm"/>
16.859 <element name="customize" optional="true"/>
16.860 <sequential>
16.861 - <java classname="@{classname}" dir="${work.dir}" fork="true">
16.862 - <jvmarg line="${debug-args-line}"/>
16.863 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
16.864 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
16.865 + <classpath>
16.866 + <path path="@{classpath}"/>
16.867 + </classpath>
16.868 + <modulepath>
16.869 + <pathelement path="@{modulepath}"/>
16.870 + <pathelement location="${module.build.classes.dir}"/>
16.871 + </modulepath>
16.872 + <upgrademodulepath>
16.873 + <path path="@{upgrademodulepath}"/>
16.874 + </upgrademodulepath>
16.875 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
16.876 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
16.877 <jvmarg line="${run.jvmargs}"/>
16.878 + <jvmarg line="${run.jvmargs.ide}"/>
16.879 + <syspropertyset>
16.880 + <propertyref prefix="run-sys-prop."/>
16.881 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
16.882 + </syspropertyset>
16.883 + <customize/>
16.884 + </java>
16.885 + </sequential>
16.886 + </macrodef>
16.887 + </target>
16.888 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
16.889 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
16.890 + <attribute default="" name="modulename"/>
16.891 + <attribute default="${main.class}" name="classname"/>
16.892 + <attribute default="${run.modulepath}" name="modulepath"/>
16.893 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
16.894 + <attribute default="${run.classpath}" name="classpath"/>
16.895 + <attribute default="jvm" name="jvm"/>
16.896 + <element name="customize" optional="true"/>
16.897 + <sequential>
16.898 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
16.899 + <classpath>
16.900 + <path path="@{classpath}"/>
16.901 + </classpath>
16.902 + <modulepath>
16.903 + <path path="@{modulepath}"/>
16.904 + </modulepath>
16.905 + <upgrademodulepath>
16.906 + <path path="@{upgrademodulepath}"/>
16.907 + </upgrademodulepath>
16.908 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
16.909 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
16.910 + <jvmarg line="${run.jvmargs}"/>
16.911 + <jvmarg line="${run.jvmargs.ide}"/>
16.912 + <syspropertyset>
16.913 + <propertyref prefix="run-sys-prop."/>
16.914 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
16.915 + </syspropertyset>
16.916 + <customize/>
16.917 + </java>
16.918 + </sequential>
16.919 + </macrodef>
16.920 + </target>
16.921 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
16.922 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
16.923 + <attribute default="" name="modulename"/>
16.924 + <attribute default="${main.class}" name="classname"/>
16.925 + <attribute default="" name="modulepath"/>
16.926 + <attribute default="${run.classpath}" name="classpath"/>
16.927 + <attribute default="jvm" name="jvm"/>
16.928 + <element name="customize" optional="true"/>
16.929 + <sequential>
16.930 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
16.931 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
16.932 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
16.933 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
16.934 + <jvmarg line="${run.jvmargs}"/>
16.935 + <jvmarg line="${run.jvmargs.ide}"/>
16.936 <classpath>
16.937 <path path="@{classpath}"/>
16.938 </classpath>
16.939 @@ -278,39 +983,100 @@
16.940 </sequential>
16.941 </macrodef>
16.942 </target>
16.943 - <target name="-init-macrodef-java">
16.944 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
16.945 - <attribute default="${main.class}" name="classname"/>
16.946 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
16.947 + <target name="-init-macrodef-copylibs">
16.948 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
16.949 + <attribute default="${manifest.file}" name="manifest"/>
16.950 <element name="customize" optional="true"/>
16.951 <sequential>
16.952 - <java classname="@{classname}" dir="${work.dir}" fork="true">
16.953 - <jvmarg line="${run.jvmargs}"/>
16.954 - <classpath>
16.955 - <path path="${run.classpath}"/>
16.956 - </classpath>
16.957 - <syspropertyset>
16.958 - <propertyref prefix="run-sys-prop."/>
16.959 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
16.960 - </syspropertyset>
16.961 - <customize/>
16.962 - </java>
16.963 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
16.964 + <pathconvert property="run.classpath.without.build.classes.dir">
16.965 + <path path="${run.classpath}"/>
16.966 + <map from="${build.classes.dir.resolved}" to=""/>
16.967 + </pathconvert>
16.968 + <pathconvert pathsep=" " property="jar.classpath">
16.969 + <path path="${run.classpath.without.build.classes.dir}"/>
16.970 + <chainedmapper>
16.971 + <flattenmapper/>
16.972 + <filtermapper>
16.973 + <replacestring from=" " to="%20"/>
16.974 + </filtermapper>
16.975 + <globmapper from="*" to="lib/*"/>
16.976 + </chainedmapper>
16.977 + </pathconvert>
16.978 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
16.979 + <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}">
16.980 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
16.981 + <manifest>
16.982 + <attribute name="Class-Path" value="${jar.classpath}"/>
16.983 + <customize/>
16.984 + </manifest>
16.985 + </copylibs>
16.986 </sequential>
16.987 </macrodef>
16.988 </target>
16.989 <target name="-init-presetdef-jar">
16.990 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
16.991 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
16.992 - <j2seproject1:fileset dir="${build.classes.dir}"/>
16.993 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
16.994 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
16.995 </jar>
16.996 </presetdef>
16.997 </target>
16.998 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
16.999 + <target name="-init-ap-cmdline-properties">
16.1000 + <property name="annotation.processing.enabled" value="true"/>
16.1001 + <property name="annotation.processing.processors.list" value=""/>
16.1002 + <property name="annotation.processing.processor.options" value=""/>
16.1003 + <property name="annotation.processing.run.all.processors" value="true"/>
16.1004 + <property name="javac.processorpath" value="${javac.classpath}"/>
16.1005 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
16.1006 + <condition property="ap.supported.internal" value="true">
16.1007 + <not>
16.1008 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
16.1009 + </not>
16.1010 + </condition>
16.1011 + </target>
16.1012 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
16.1013 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
16.1014 + <isfalse value="${annotation.processing.run.all.processors}"/>
16.1015 + </condition>
16.1016 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
16.1017 + <isfalse value="${annotation.processing.enabled}"/>
16.1018 + </condition>
16.1019 + </target>
16.1020 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
16.1021 + <property name="ap.cmd.line.internal" value=""/>
16.1022 + </target>
16.1023 + <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"/>
16.1024 <!--
16.1025 ===================
16.1026 COMPILATION SECTION
16.1027 ===================
16.1028 -->
16.1029 - <target depends="init" name="deps-jar" unless="no.deps"/>
16.1030 + <target name="-deps-jar-init" unless="built-jar.properties">
16.1031 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
16.1032 + <delete file="${built-jar.properties}" quiet="true"/>
16.1033 + </target>
16.1034 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
16.1035 + <echo level="warn" message="Cycle detected: deadlock was already built"/>
16.1036 + </target>
16.1037 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
16.1038 + <mkdir dir="${build.dir}"/>
16.1039 + <touch file="${built-jar.properties}" verbose="false"/>
16.1040 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
16.1041 + <antcall target="-warn-already-built-jar"/>
16.1042 + <propertyfile file="${built-jar.properties}">
16.1043 + <entry key="${basedir}" value=""/>
16.1044 + </propertyfile>
16.1045 + </target>
16.1046 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
16.1047 + <target depends="init" name="-check-automatic-build">
16.1048 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
16.1049 + </target>
16.1050 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
16.1051 + <antcall target="clean">
16.1052 + <param name="no.dependencies" value="true"/>
16.1053 + </antcall>
16.1054 + </target>
16.1055 <target depends="init,deps-jar" name="-pre-pre-compile">
16.1056 <mkdir dir="${build.classes.dir}"/>
16.1057 </target>
16.1058 @@ -319,19 +1085,30 @@
16.1059 <!-- You can override this target in the ../build.xml file. -->
16.1060 </target>
16.1061 <target if="do.depend.true" name="-compile-depend">
16.1062 - <j2seproject3:depend/>
16.1063 + <pathconvert property="build.generated.subdirs">
16.1064 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
16.1065 + <include name="*"/>
16.1066 + </dirset>
16.1067 + </pathconvert>
16.1068 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
16.1069 </target>
16.1070 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
16.1071 - <j2seproject3:javac/>
16.1072 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
16.1073 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
16.1074 <copy todir="${build.classes.dir}">
16.1075 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
16.1076 </copy>
16.1077 </target>
16.1078 + <target if="has.persistence.xml" name="-copy-persistence-xml">
16.1079 + <mkdir dir="${build.classes.dir}/META-INF"/>
16.1080 + <copy todir="${build.classes.dir}/META-INF">
16.1081 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
16.1082 + </copy>
16.1083 + </target>
16.1084 <target name="-post-compile">
16.1085 <!-- Empty placeholder for easier customization. -->
16.1086 <!-- You can override this target in the ../build.xml file. -->
16.1087 </target>
16.1088 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
16.1089 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
16.1090 <target name="-pre-compile-single">
16.1091 <!-- Empty placeholder for easier customization. -->
16.1092 <!-- You can override this target in the ../build.xml file. -->
16.1093 @@ -339,13 +1116,13 @@
16.1094 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
16.1095 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
16.1096 <j2seproject3:force-recompile/>
16.1097 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
16.1098 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
16.1099 </target>
16.1100 <target name="-post-compile-single">
16.1101 <!-- Empty placeholder for easier customization. -->
16.1102 <!-- You can override this target in the ../build.xml file. -->
16.1103 </target>
16.1104 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
16.1105 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
16.1106 <!--
16.1107 ====================
16.1108 JAR BUILDING SECTION
16.1109 @@ -359,57 +1136,191 @@
16.1110 <!-- Empty placeholder for easier customization. -->
16.1111 <!-- You can override this target in the ../build.xml file. -->
16.1112 </target>
16.1113 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
16.1114 - <j2seproject1:jar/>
16.1115 + <target depends="init,compile" name="-check-module-main-class">
16.1116 + <pathconvert property="main.class.file">
16.1117 + <string value="${main.class}"/>
16.1118 + <unpackagemapper from="*" to="*.class"/>
16.1119 + </pathconvert>
16.1120 + <condition property="do.module.main.class">
16.1121 + <and>
16.1122 + <isset property="main.class.available"/>
16.1123 + <available file="${build.classes.dir}/module-info.class"/>
16.1124 + <available file="${build.classes.dir}/${main.class.file}"/>
16.1125 + <isset property="libs.CopyLibs.classpath"/>
16.1126 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
16.1127 + </and>
16.1128 + </condition>
16.1129 </target>
16.1130 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
16.1131 - <j2seproject1:jar manifest="${manifest.file}"/>
16.1132 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
16.1133 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
16.1134 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
16.1135 </target>
16.1136 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
16.1137 - <j2seproject1:jar manifest="${manifest.file}">
16.1138 - <j2seproject1:manifest>
16.1139 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
16.1140 - </j2seproject1:manifest>
16.1141 - </j2seproject1:jar>
16.1142 - <echo>To run this application from the command line without Ant, try:</echo>
16.1143 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
16.1144 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
16.1145 + <touch file="${tmp.manifest.file}" verbose="false"/>
16.1146 + </target>
16.1147 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
16.1148 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
16.1149 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
16.1150 + </target>
16.1151 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
16.1152 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
16.1153 + <attribute name="Main-Class" value="${main.class}"/>
16.1154 + </manifest>
16.1155 + </target>
16.1156 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
16.1157 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
16.1158 + <attribute name="Profile" value="${javac.profile}"/>
16.1159 + </manifest>
16.1160 + </target>
16.1161 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
16.1162 + <basename file="${application.splash}" property="splashscreen.basename"/>
16.1163 + <mkdir dir="${build.classes.dir}/META-INF"/>
16.1164 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
16.1165 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
16.1166 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
16.1167 + </manifest>
16.1168 + </target>
16.1169 + <target depends="init,compile" name="-check-do-mkdist">
16.1170 + <condition property="do.mkdist">
16.1171 + <and>
16.1172 + <isset property="do.archive"/>
16.1173 + <isset property="libs.CopyLibs.classpath"/>
16.1174 + <not>
16.1175 + <istrue value="${mkdist.disabled}"/>
16.1176 + </not>
16.1177 + <not>
16.1178 + <available file="${build.classes.dir}/module-info.class"/>
16.1179 + </not>
16.1180 + </and>
16.1181 + </condition>
16.1182 + </target>
16.1183 + <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">
16.1184 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
16.1185 + <echo level="info">To run this application from the command line without Ant, try:</echo>
16.1186 + <property location="${dist.jar}" name="dist.jar.resolved"/>
16.1187 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
16.1188 + </target>
16.1189 + <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">
16.1190 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
16.1191 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
16.1192 <property location="${dist.jar}" name="dist.jar.resolved"/>
16.1193 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
16.1194 + <isset property="named.module.internal"/>
16.1195 + </condition>
16.1196 <pathconvert property="run.classpath.with.dist.jar">
16.1197 <path path="${run.classpath}"/>
16.1198 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
16.1199 + </pathconvert>
16.1200 + <pathconvert property="run.modulepath.with.dist.jar">
16.1201 + <path location="${dist.jar.resolved}"/>
16.1202 + <path path="${run.modulepath}"/>
16.1203 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
16.1204 </pathconvert>
16.1205 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
16.1206 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
16.1207 + <isset property="named.module.internal"/>
16.1208 + </condition>
16.1209 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
16.1210 + <and>
16.1211 + <isset property="modules.supported.internal"/>
16.1212 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
16.1213 + </and>
16.1214 + </condition>
16.1215 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
16.1216 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
16.1217 + </condition>
16.1218 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
16.1219 + <isset property="do.module.main.class"/>
16.1220 + </condition>
16.1221 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
16.1222 + <isset property="named.module.internal"/>
16.1223 + </condition>
16.1224 + <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}">
16.1225 + <isset property="main.class.available"/>
16.1226 + </condition>
16.1227 + <condition else="debug" property="jar.usage.level" value="info">
16.1228 + <isset property="main.class.available"/>
16.1229 + </condition>
16.1230 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
16.1231 </target>
16.1232 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
16.1233 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
16.1234 - <pathconvert property="run.classpath.without.build.classes.dir">
16.1235 - <path path="${run.classpath}"/>
16.1236 - <map from="${build.classes.dir.resolved}" to=""/>
16.1237 - </pathconvert>
16.1238 - <pathconvert pathsep=" " property="jar.classpath">
16.1239 - <path path="${run.classpath.without.build.classes.dir}"/>
16.1240 - <chainedmapper>
16.1241 - <flattenmapper/>
16.1242 - <globmapper from="*" to="lib/*"/>
16.1243 - </chainedmapper>
16.1244 - </pathconvert>
16.1245 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
16.1246 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
16.1247 - <fileset dir="${build.classes.dir}"/>
16.1248 - <manifest>
16.1249 - <attribute name="Main-Class" value="${main.class}"/>
16.1250 - <attribute name="Class-Path" value="${jar.classpath}"/>
16.1251 - </manifest>
16.1252 - </copylibs>
16.1253 - <echo>To run this application from the command line without Ant, try:</echo>
16.1254 - <property location="${dist.jar}" name="dist.jar.resolved"/>
16.1255 - <echo>java -jar "${dist.jar.resolved}"</echo>
16.1256 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
16.1257 + <delete>
16.1258 + <fileset file="${tmp.manifest.file}"/>
16.1259 + </delete>
16.1260 </target>
16.1261 + <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"/>
16.1262 + <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"/>
16.1263 <target name="-post-jar">
16.1264 <!-- Empty placeholder for easier customization. -->
16.1265 <!-- You can override this target in the ../build.xml file. -->
16.1266 </target>
16.1267 - <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"/>
16.1268 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
16.1269 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
16.1270 + <!--
16.1271 + =================
16.1272 + DEPLOY SECTION
16.1273 + =================
16.1274 + -->
16.1275 + <target name="-pre-deploy">
16.1276 + <!-- Empty placeholder for easier customization. -->
16.1277 + <!-- You can override this target in the ../build.xml file. -->
16.1278 + </target>
16.1279 + <target depends="init" name="-check-jlink">
16.1280 + <condition property="do.jlink.internal">
16.1281 + <and>
16.1282 + <istrue value="${do.jlink}"/>
16.1283 + <isset property="do.archive"/>
16.1284 + <isset property="named.module.internal"/>
16.1285 + </and>
16.1286 + </condition>
16.1287 + </target>
16.1288 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
16.1289 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
16.1290 + <property name="jlink.launcher.name" value="${application.title}"/>
16.1291 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
16.1292 + <and>
16.1293 + <isset property="jlink.additionalmodules"/>
16.1294 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
16.1295 + </and>
16.1296 + </condition>
16.1297 + <condition property="jlink.do.strip.internal">
16.1298 + <and>
16.1299 + <isset property="jlink.strip"/>
16.1300 + <istrue value="${jlink.strip}"/>
16.1301 + </and>
16.1302 + </condition>
16.1303 + <condition property="jlink.do.additionalparam.internal">
16.1304 + <and>
16.1305 + <isset property="jlink.additionalparam"/>
16.1306 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
16.1307 + </and>
16.1308 + </condition>
16.1309 + <condition property="jlink.do.launcher.internal">
16.1310 + <and>
16.1311 + <istrue value="${jlink.launcher}"/>
16.1312 + <isset property="main.class.available"/>
16.1313 + </and>
16.1314 + </condition>
16.1315 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
16.1316 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
16.1317 + <exec executable="${platform.jlink}">
16.1318 + <arg value="--module-path"/>
16.1319 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
16.1320 + <arg value="--add-modules"/>
16.1321 + <arg value="${jlink.add.modules}"/>
16.1322 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
16.1323 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
16.1324 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
16.1325 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
16.1326 + <arg value="--output"/>
16.1327 + <arg value="${dist.jlink.output}"/>
16.1328 + </exec>
16.1329 + </target>
16.1330 + <target name="-post-deploy">
16.1331 + <!-- Empty placeholder for easier customization. -->
16.1332 + <!-- You can override this target in the ../build.xml file. -->
16.1333 + </target>
16.1334 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
16.1335 <!--
16.1336 =================
16.1337 EXECUTION SECTION
16.1338 @@ -425,10 +1336,14 @@
16.1339 <target name="-do-not-recompile">
16.1340 <property name="javac.includes.binary" value=""/>
16.1341 </target>
16.1342 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
16.1343 + <target depends="init,compile-single" name="run-single">
16.1344 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
16.1345 <j2seproject1:java classname="${run.class}"/>
16.1346 </target>
16.1347 + <target depends="init,compile-test-single" name="run-test-with-main">
16.1348 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
16.1349 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
16.1350 + </target>
16.1351 <!--
16.1352 =================
16.1353 DEBUGGING SECTION
16.1354 @@ -437,11 +1352,14 @@
16.1355 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
16.1356 <j2seproject1:nbjpdastart name="${debug.class}"/>
16.1357 </target>
16.1358 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
16.1359 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
16.1360 + </target>
16.1361 <target depends="init,compile" name="-debug-start-debuggee">
16.1362 <j2seproject3:debug>
16.1363 - <customize>
16.1364 + <customizeDebuggee>
16.1365 <arg line="${application.args}"/>
16.1366 - </customize>
16.1367 + </customizeDebuggee>
16.1368 </j2seproject3:debug>
16.1369 </target>
16.1370 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
16.1371 @@ -453,7 +1371,12 @@
16.1372 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
16.1373 <j2seproject3:debug classname="${debug.class}"/>
16.1374 </target>
16.1375 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
16.1376 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
16.1377 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
16.1378 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
16.1379 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
16.1380 + </target>
16.1381 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
16.1382 <target depends="init" name="-pre-debug-fix">
16.1383 <fail unless="fix.includes">Must set fix.includes</fail>
16.1384 <property name="javac.includes" value="${fix.includes}.java"/>
16.1385 @@ -463,20 +1386,146 @@
16.1386 </target>
16.1387 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
16.1388 <!--
16.1389 + =================
16.1390 + PROFILING SECTION
16.1391 + =================
16.1392 + -->
16.1393 + <!--
16.1394 + pre NB7.2 profiler integration
16.1395 + -->
16.1396 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
16.1397 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
16.1398 + <nbprofiledirect>
16.1399 + <classpath>
16.1400 + <path path="${run.classpath}"/>
16.1401 + </classpath>
16.1402 + </nbprofiledirect>
16.1403 + <profile/>
16.1404 + </target>
16.1405 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
16.1406 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
16.1407 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
16.1408 + <nbprofiledirect>
16.1409 + <classpath>
16.1410 + <path path="${run.classpath}"/>
16.1411 + </classpath>
16.1412 + </nbprofiledirect>
16.1413 + <profile classname="${profile.class}"/>
16.1414 + </target>
16.1415 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
16.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
16.1417 + <nbprofiledirect>
16.1418 + <classpath>
16.1419 + <path path="${run.classpath}"/>
16.1420 + </classpath>
16.1421 + </nbprofiledirect>
16.1422 + <profile classname="sun.applet.AppletViewer">
16.1423 + <customize>
16.1424 + <arg value="${applet.url}"/>
16.1425 + </customize>
16.1426 + </profile>
16.1427 + </target>
16.1428 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
16.1429 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
16.1430 + <nbprofiledirect>
16.1431 + <classpath>
16.1432 + <path path="${run.test.classpath}"/>
16.1433 + </classpath>
16.1434 + </nbprofiledirect>
16.1435 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
16.1436 + <customize>
16.1437 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
16.1438 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
16.1439 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
16.1440 + <jvmarg line="${profiler.info.jvmargs}"/>
16.1441 + <classpath>
16.1442 + <path path="${run.test.classpath}"/>
16.1443 + </classpath>
16.1444 + </customize>
16.1445 + </j2seproject3:junit>
16.1446 + </target>
16.1447 + <!--
16.1448 + end of pre NB72 profiling section
16.1449 + -->
16.1450 + <target if="netbeans.home" name="-profile-check">
16.1451 + <condition property="profiler.configured">
16.1452 + <or>
16.1453 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
16.1454 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
16.1455 + </or>
16.1456 + </condition>
16.1457 + </target>
16.1458 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
16.1459 + <startprofiler/>
16.1460 + <antcall target="run"/>
16.1461 + </target>
16.1462 + <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">
16.1463 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
16.1464 + <startprofiler/>
16.1465 + <antcall target="run-single"/>
16.1466 + </target>
16.1467 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
16.1468 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
16.1469 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
16.1470 + <startprofiler/>
16.1471 + <antcall target="test-single"/>
16.1472 + </target>
16.1473 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
16.1474 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
16.1475 + <startprofiler/>
16.1476 + <antcall target="run-test-with-main"/>
16.1477 + </target>
16.1478 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
16.1479 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
16.1480 + <startprofiler/>
16.1481 + <antcall target="run-applet"/>
16.1482 + </target>
16.1483 + <!--
16.1484 ===============
16.1485 JAVADOC SECTION
16.1486 ===============
16.1487 -->
16.1488 - <target depends="init" name="-javadoc-build">
16.1489 + <target depends="init" if="have.sources" name="-javadoc-build">
16.1490 <mkdir dir="${dist.javadoc.dir}"/>
16.1491 - <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}">
16.1492 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
16.1493 + <and>
16.1494 + <isset property="endorsed.classpath.cmd.line.arg"/>
16.1495 + <not>
16.1496 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
16.1497 + </not>
16.1498 + </and>
16.1499 + </condition>
16.1500 + <condition else="" property="bug5101868workaround" value="*.java">
16.1501 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
16.1502 + </condition>
16.1503 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
16.1504 + <and>
16.1505 + <isset property="javadoc.html5"/>
16.1506 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
16.1507 + </and>
16.1508 + </condition>
16.1509 + <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}">
16.1510 <classpath>
16.1511 <path path="${javac.classpath}"/>
16.1512 </classpath>
16.1513 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
16.1514 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
16.1515 <filename name="**/*.java"/>
16.1516 </fileset>
16.1517 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
16.1518 + <include name="**/*.java"/>
16.1519 + <exclude name="*.java"/>
16.1520 + </fileset>
16.1521 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
16.1522 + <arg line="${javadoc.html5.cmd.line.arg}"/>
16.1523 </javadoc>
16.1524 + <copy todir="${dist.javadoc.dir}">
16.1525 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
16.1526 + <filename name="**/doc-files/**"/>
16.1527 + </fileset>
16.1528 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
16.1529 + <include name="**/doc-files/**"/>
16.1530 + </fileset>
16.1531 + </copy>
16.1532 </target>
16.1533 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
16.1534 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
16.1535 @@ -484,7 +1533,7 @@
16.1536 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
16.1537 <!--
16.1538 =========================
16.1539 - JUNIT COMPILATION SECTION
16.1540 + TEST COMPILATION SECTION
16.1541 =========================
16.1542 -->
16.1543 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
16.1544 @@ -494,11 +1543,63 @@
16.1545 <!-- Empty placeholder for easier customization. -->
16.1546 <!-- You can override this target in the ../build.xml file. -->
16.1547 </target>
16.1548 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
16.1549 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
16.1550 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
16.1551 + <and>
16.1552 + <isset property="test.module.name"/>
16.1553 + <length length="0" string="${test.module.name}" when="greater"/>
16.1554 + </and>
16.1555 + </condition>
16.1556 + <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">
16.1557 + <and>
16.1558 + <isset property="test.module.name"/>
16.1559 + <length length="0" string="${test.module.name}" when="greater"/>
16.1560 + </and>
16.1561 + </condition>
16.1562 + </target>
16.1563 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
16.1564 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
16.1565 + <and>
16.1566 + <isset property="test.module.name"/>
16.1567 + <length length="0" string="${test.module.name}" when="greater"/>
16.1568 + </and>
16.1569 + </condition>
16.1570 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
16.1571 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
16.1572 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
16.1573 + <chainedmapper>
16.1574 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
16.1575 + <filtermapper>
16.1576 + <uniqfilter/>
16.1577 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
16.1578 + </filtermapper>
16.1579 + <cutdirsmapper dirs="1"/>
16.1580 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
16.1581 + </chainedmapper>
16.1582 + </pathconvert>
16.1583 + <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}">
16.1584 + <and>
16.1585 + <isset property="test.module.name"/>
16.1586 + <length length="0" string="${test.module.name}" when="greater"/>
16.1587 + </and>
16.1588 + </condition>
16.1589 + </target>
16.1590 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
16.1591 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
16.1592 + <property name="javac.test.compilerargs" value=""/>
16.1593 + <property name="run.test.jvmargs" value=""/>
16.1594 + </target>
16.1595 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
16.1596 <target if="do.depend.true" name="-compile-test-depend">
16.1597 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
16.1598 </target>
16.1599 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
16.1600 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
16.1601 + <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">
16.1602 + <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}">
16.1603 + <customize>
16.1604 + <compilerarg line="${javac.test.compilerargs}"/>
16.1605 + </customize>
16.1606 + </j2seproject3:javac>
16.1607 <copy todir="${build.test.classes.dir}">
16.1608 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
16.1609 </copy>
16.1610 @@ -512,10 +1613,14 @@
16.1611 <!-- Empty placeholder for easier customization. -->
16.1612 <!-- You can override this target in the ../build.xml file. -->
16.1613 </target>
16.1614 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
16.1615 + <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">
16.1616 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
16.1617 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
16.1618 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
16.1619 + <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}">
16.1620 + <customize>
16.1621 + <compilerarg line="${javac.test.compilerargs}"/>
16.1622 + </customize>
16.1623 + </j2seproject3:javac>
16.1624 <copy todir="${build.test.classes.dir}">
16.1625 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
16.1626 </copy>
16.1627 @@ -527,17 +1632,17 @@
16.1628 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
16.1629 <!--
16.1630 =======================
16.1631 - JUNIT EXECUTION SECTION
16.1632 + TEST EXECUTION SECTION
16.1633 =======================
16.1634 -->
16.1635 <target depends="init" if="have.tests" name="-pre-test-run">
16.1636 <mkdir dir="${build.test.results.dir}"/>
16.1637 </target>
16.1638 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
16.1639 - <j2seproject3:junit testincludes="**/*Test.java"/>
16.1640 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
16.1641 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
16.1642 </target>
16.1643 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
16.1644 - <fail if="tests.failed">Some tests failed; see details above.</fail>
16.1645 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
16.1646 </target>
16.1647 <target depends="init" if="have.tests" name="test-report"/>
16.1648 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
16.1649 @@ -545,41 +1650,42 @@
16.1650 <target depends="init" if="have.tests" name="-pre-test-run-single">
16.1651 <mkdir dir="${build.test.results.dir}"/>
16.1652 </target>
16.1653 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
16.1654 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
16.1655 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
16.1656 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
16.1657 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
16.1658 </target>
16.1659 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
16.1660 - <fail if="tests.failed">Some tests failed; see details above.</fail>
16.1661 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
16.1662 </target>
16.1663 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
16.1664 + <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"/>
16.1665 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
16.1666 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
16.1667 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
16.1668 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
16.1669 + </target>
16.1670 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
16.1671 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
16.1672 + </target>
16.1673 + <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"/>
16.1674 <!--
16.1675 =======================
16.1676 - JUNIT DEBUGGING SECTION
16.1677 + TEST DEBUGGING SECTION
16.1678 =======================
16.1679 -->
16.1680 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
16.1681 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
16.1682 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
16.1683 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
16.1684 - <delete file="${test.report.file}"/>
16.1685 - <mkdir dir="${build.test.results.dir}"/>
16.1686 - <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}">
16.1687 - <customize>
16.1688 - <syspropertyset>
16.1689 - <propertyref prefix="test-sys-prop."/>
16.1690 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
16.1691 - </syspropertyset>
16.1692 - <arg value="${test.class}"/>
16.1693 - <arg value="showoutput=true"/>
16.1694 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
16.1695 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
16.1696 - </customize>
16.1697 - </j2seproject3:debug>
16.1698 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
16.1699 + </target>
16.1700 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
16.1701 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
16.1702 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
16.1703 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
16.1704 </target>
16.1705 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
16.1706 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
16.1707 </target>
16.1708 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
16.1709 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
16.1710 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
16.1711 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
16.1712 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
16.1713 </target>
16.1714 @@ -605,9 +1711,9 @@
16.1715 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
16.1716 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
16.1717 <j2seproject3:debug classname="sun.applet.AppletViewer">
16.1718 - <customize>
16.1719 + <customizeDebuggee>
16.1720 <arg value="${applet.url}"/>
16.1721 - </customize>
16.1722 + </customizeDebuggee>
16.1723 </j2seproject3:debug>
16.1724 </target>
16.1725 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
16.1726 @@ -616,14 +1722,49 @@
16.1727 CLEANUP SECTION
16.1728 ===============
16.1729 -->
16.1730 - <target depends="init" name="deps-clean" unless="no.deps"/>
16.1731 + <target name="-deps-clean-init" unless="built-clean.properties">
16.1732 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
16.1733 + <delete file="${built-clean.properties}" quiet="true"/>
16.1734 + </target>
16.1735 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
16.1736 + <echo level="warn" message="Cycle detected: deadlock was already built"/>
16.1737 + </target>
16.1738 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
16.1739 + <mkdir dir="${build.dir}"/>
16.1740 + <touch file="${built-clean.properties}" verbose="false"/>
16.1741 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
16.1742 + <antcall target="-warn-already-built-clean"/>
16.1743 + <propertyfile file="${built-clean.properties}">
16.1744 + <entry key="${basedir}" value=""/>
16.1745 + </propertyfile>
16.1746 + </target>
16.1747 <target depends="init" name="-do-clean">
16.1748 <delete dir="${build.dir}"/>
16.1749 - <delete dir="${dist.dir}"/>
16.1750 + <delete dir="${dist.jlink.output}"/>
16.1751 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
16.1752 </target>
16.1753 <target name="-post-clean">
16.1754 <!-- Empty placeholder for easier customization. -->
16.1755 <!-- You can override this target in the ../build.xml file. -->
16.1756 </target>
16.1757 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
16.1758 + <target name="-check-call-dep">
16.1759 + <property file="${call.built.properties}" prefix="already.built."/>
16.1760 + <condition property="should.call.dep">
16.1761 + <and>
16.1762 + <not>
16.1763 + <isset property="already.built.${call.subproject}"/>
16.1764 + </not>
16.1765 + <available file="${call.script}"/>
16.1766 + </and>
16.1767 + </condition>
16.1768 + </target>
16.1769 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
16.1770 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
16.1771 + <propertyset>
16.1772 + <propertyref prefix="transfer."/>
16.1773 + <mapper from="transfer.*" to="*" type="glob"/>
16.1774 + </propertyset>
16.1775 + </ant>
16.1776 + </target>
16.1777 </project>
17.1 --- a/samples/deadlock/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
17.2 +++ b/samples/deadlock/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
17.3 @@ -1,8 +1,8 @@
17.4 build.xml.data.CRC32=f2e9f310
17.5 -build.xml.script.CRC32=b3c8dc02
17.6 -build.xml.stylesheet.CRC32=be360661
17.7 +build.xml.script.CRC32=89a54077
17.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
17.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
17.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
17.11 nbproject/build-impl.xml.data.CRC32=f2e9f310
17.12 -nbproject/build-impl.xml.script.CRC32=8c45314f
17.13 -nbproject/build-impl.xml.stylesheet.CRC32=487672f9
17.14 +nbproject/build-impl.xml.script.CRC32=37e6359c
17.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
18.1 --- a/samples/deadlock/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
18.2 +++ b/samples/deadlock/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
18.3 @@ -5,14 +5,19 @@
18.4 # This directory is removed when the project is cleaned:
18.5 build.dir=build
18.6 build.generated.dir=${build.dir}/generated
18.7 +build.generated.sources.dir=${build.dir}/generated-sources
18.8 # Only compile against the classpath explicitly listed here:
18.9 build.sysclasspath=ignore
18.10 build.test.classes.dir=${build.dir}/test/classes
18.11 build.test.results.dir=${build.dir}/test/results
18.12 debug.classpath=\
18.13 ${run.classpath}
18.14 +debug.modulepath=\
18.15 + ${run.modulepath}
18.16 debug.test.classpath=\
18.17 ${run.test.classpath}
18.18 +debug.test.modulepath=\
18.19 + ${run.test.modulepath}
18.20 # This directory is removed when the project is cleaned:
18.21 dist.dir=dist
18.22 dist.jar=${dist.dir}/deadlock.jar
18.23 @@ -27,14 +32,18 @@
18.24 # Space-separated list of extra javac options
18.25 javac.compilerargs=
18.26 javac.deprecation=false
18.27 -javac.source=1.5
18.28 -javac.target=1.5
18.29 +javac.modulepath=
18.30 +javac.processormodulepath=
18.31 +javac.source=1.6
18.32 +javac.target=1.6
18.33 javac.test.classpath=\
18.34 ${javac.classpath}:\
18.35 ${build.classes.dir}:\
18.36 ${file.reference.junit-4.4.jar}:\
18.37 ${file.reference.org-netbeans-modules-nbjunit.jar}:\
18.38 ${file.reference.org-netbeans-insane.jar}
18.39 +javac.test.modulepath=\
18.40 + ${javac.modulepath}
18.41 javadoc.additionalparam=
18.42 javadoc.author=false
18.43 javadoc.encoding=${source.encoding}
18.44 @@ -55,9 +64,13 @@
18.45 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
18.46 # or test-sys-prop.name=value to set system properties for unit tests):
18.47 run.jvmargs=-ea
18.48 +run.modulepath=\
18.49 + ${javac.modulepath}
18.50 run.test.classpath=\
18.51 ${javac.test.classpath}:\
18.52 ${build.test.classes.dir}
18.53 +run.test.modulepath=\
18.54 + ${javac.test.modulepath}
18.55 source.encoding=UTF-8
18.56 src.dir=src
18.57 test.src.dir=test
19.1 --- a/samples/delegatingwriter/build.xml Mon Nov 11 05:47:32 2019 +0100
19.2 +++ b/samples/delegatingwriter/build.xml Mon Nov 11 13:17:34 2019 +0100
19.3 @@ -2,6 +2,11 @@
19.4 <!-- You may freely edit this file. See commented blocks below for -->
19.5 <!-- some examples of how to customize the build. -->
19.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
19.7 +<!-- By default, only the Clean and Build commands use this build script. -->
19.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
19.9 +<!-- the Compile on Save feature is turned off for the project. -->
19.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
19.11 +<!-- in the project's Project Properties dialog box.-->
19.12 <project name="delegatingwriter" default="default" basedir=".">
19.13 <description>Builds, tests, and runs the project delegatingwriter.</description>
19.14 <import file="nbproject/build-impl.xml"/>
19.15 @@ -46,8 +51,7 @@
19.16 -init-macrodef-junit: defines macro for junit execution
19.17 -init-macrodef-debug: defines macro for class debugging
19.18 -init-macrodef-java: defines macro for class execution
19.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
19.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
19.21 + -do-jar: JAR building
19.22 run: execution of project
19.23 -javadoc-build: Javadoc generation
19.24 test-report: JUnit report generation
20.1 --- a/samples/delegatingwriter/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
20.2 +++ b/samples/delegatingwriter/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
20.3 @@ -12,14 +12,21 @@
20.4 - execution
20.5 - debugging
20.6 - javadoc
20.7 - - junit compilation
20.8 - - junit execution
20.9 - - junit debugging
20.10 + - test compilation
20.11 + - test execution
20.12 + - test debugging
20.13 - applet
20.14 - cleanup
20.15
20.16 -->
20.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="delegatingwriter-impl">
20.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="delegatingwriter-impl">
20.19 + <fail message="Please build using Ant 1.8.0 or higher.">
20.20 + <condition>
20.21 + <not>
20.22 + <antversion atleast="1.8.0"/>
20.23 + </not>
20.24 + </condition>
20.25 + </fail>
20.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
20.27 <!--
20.28 ======================
20.29 @@ -39,28 +46,136 @@
20.30 <property file="${user.properties.file}"/>
20.31 <!-- The two properties below are usually overridden -->
20.32 <!-- by the active platform. Just a fallback. -->
20.33 - <property name="default.javac.source" value="1.4"/>
20.34 - <property name="default.javac.target" value="1.4"/>
20.35 + <property name="default.javac.source" value="1.6"/>
20.36 + <property name="default.javac.target" value="1.6"/>
20.37 </target>
20.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
20.39 <property file="nbproject/configs/${config}.properties"/>
20.40 <property file="nbproject/project.properties"/>
20.41 </target>
20.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
20.43 + <target name="-init-modules-supported">
20.44 + <condition property="modules.supported.internal" value="true">
20.45 + <not>
20.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
20.47 + </not>
20.48 + </condition>
20.49 + </target>
20.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
20.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
20.52 + <attribute name="property"/>
20.53 + <attribute name="sourcepath"/>
20.54 + <sequential>
20.55 + <loadresource property="@{property}" quiet="true">
20.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
20.57 + <filterchain>
20.58 + <stripjavacomments/>
20.59 + <linecontainsregexp>
20.60 + <regexp pattern="module .* \{"/>
20.61 + </linecontainsregexp>
20.62 + <tokenfilter>
20.63 + <linetokenizer/>
20.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
20.65 + </tokenfilter>
20.66 + <striplinebreaks/>
20.67 + </filterchain>
20.68 + </loadresource>
20.69 + </sequential>
20.70 + </macrodef>
20.71 + </target>
20.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
20.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
20.74 + <condition>
20.75 + <not>
20.76 + <antversion atleast="1.10.0"/>
20.77 + </not>
20.78 + </condition>
20.79 + </fail>
20.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
20.81 + <condition property="named.module.internal">
20.82 + <and>
20.83 + <isset property="module.name"/>
20.84 + <length length="0" string="${module.name}" when="greater"/>
20.85 + </and>
20.86 + </condition>
20.87 + <condition property="unnamed.module.internal">
20.88 + <not>
20.89 + <isset property="named.module.internal"/>
20.90 + </not>
20.91 + </condition>
20.92 + <property name="javac.modulepath" value=""/>
20.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
20.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
20.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
20.96 + <property name="javac.upgrademodulepath" value=""/>
20.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
20.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
20.99 + <and>
20.100 + <isset property="javac.systemmodulepath"/>
20.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
20.102 + </and>
20.103 + </condition>
20.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
20.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
20.106 + <property name="module.name" value=""/>
20.107 + </target>
20.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
20.109 + <property name="platform.java" value="${java.home}/bin/java"/>
20.110 <available file="${manifest.file}" property="manifest.available"/>
20.111 - <condition property="manifest.available+main.class">
20.112 + <condition property="splashscreen.available">
20.113 <and>
20.114 - <isset property="manifest.available"/>
20.115 + <not>
20.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
20.117 + </not>
20.118 + <available file="${application.splash}"/>
20.119 + </and>
20.120 + </condition>
20.121 + <condition property="main.class.available">
20.122 + <and>
20.123 <isset property="main.class"/>
20.124 <not>
20.125 <equals arg1="${main.class}" arg2="" trim="true"/>
20.126 </not>
20.127 </and>
20.128 </condition>
20.129 - <condition property="manifest.available+main.class+mkdist.available">
20.130 + <condition property="profile.available">
20.131 <and>
20.132 - <istrue value="${manifest.available+main.class}"/>
20.133 - <isset property="libs.CopyLibs.classpath"/>
20.134 + <isset property="javac.profile"/>
20.135 + <length length="0" string="${javac.profile}" when="greater"/>
20.136 + <not>
20.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
20.138 + </not>
20.139 + </and>
20.140 + </condition>
20.141 + <condition property="do.archive">
20.142 + <or>
20.143 + <not>
20.144 + <istrue value="${jar.archive.disabled}"/>
20.145 + </not>
20.146 + <istrue value="${not.archive.disabled}"/>
20.147 + </or>
20.148 + </condition>
20.149 + <condition property="do.archive+manifest.available">
20.150 + <and>
20.151 + <isset property="manifest.available"/>
20.152 + <istrue value="${do.archive}"/>
20.153 + </and>
20.154 + </condition>
20.155 + <condition property="do.archive+main.class.available">
20.156 + <and>
20.157 + <isset property="main.class.available"/>
20.158 + <istrue value="${do.archive}"/>
20.159 + </and>
20.160 + </condition>
20.161 + <condition property="do.archive+splashscreen.available">
20.162 + <and>
20.163 + <isset property="splashscreen.available"/>
20.164 + <istrue value="${do.archive}"/>
20.165 + </and>
20.166 + </condition>
20.167 + <condition property="do.archive+profile.available">
20.168 + <and>
20.169 + <isset property="profile.available"/>
20.170 + <istrue value="${do.archive}"/>
20.171 </and>
20.172 </condition>
20.173 <condition property="have.tests">
20.174 @@ -86,6 +201,7 @@
20.175 </and>
20.176 </condition>
20.177 <property name="run.jvmargs" value=""/>
20.178 + <property name="run.jvmargs.ide" value=""/>
20.179 <property name="javac.compilerargs" value=""/>
20.180 <property name="work.dir" value="${basedir}"/>
20.181 <condition property="no.deps">
20.182 @@ -97,6 +213,8 @@
20.183 <property name="javadoc.preview" value="true"/>
20.184 <property name="application.args" value=""/>
20.185 <property name="source.encoding" value="${file.encoding}"/>
20.186 + <property name="runtime.encoding" value="${source.encoding}"/>
20.187 + <property name="manifest.encoding" value="${source.encoding}"/>
20.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
20.189 <and>
20.190 <isset property="javadoc.encoding"/>
20.191 @@ -112,12 +230,58 @@
20.192 <condition property="do.depend.true">
20.193 <istrue value="${do.depend}"/>
20.194 </condition>
20.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
20.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
20.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
20.198 <and>
20.199 - <isset property="jaxws.endorsed.dir"/>
20.200 - <available file="nbproject/jaxws-build.xml"/>
20.201 + <isset property="endorsed.classpath"/>
20.202 + <not>
20.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
20.204 + </not>
20.205 </and>
20.206 </condition>
20.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
20.208 + <isset property="profile.available"/>
20.209 + </condition>
20.210 + <condition else="false" property="jdkBug6558476">
20.211 + <and>
20.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
20.213 + <not>
20.214 + <os family="unix"/>
20.215 + </not>
20.216 + </and>
20.217 + </condition>
20.218 + <condition else="false" property="javac.fork">
20.219 + <or>
20.220 + <istrue value="${jdkBug6558476}"/>
20.221 + <istrue value="${javac.external.vm}"/>
20.222 + </or>
20.223 + </condition>
20.224 + <property name="jar.index" value="false"/>
20.225 + <property name="jar.index.metainf" value="${jar.index}"/>
20.226 + <property name="copylibs.rebase" value="true"/>
20.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
20.228 + <condition property="junit.available">
20.229 + <or>
20.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
20.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
20.232 + </or>
20.233 + </condition>
20.234 + <condition property="testng.available">
20.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
20.236 + </condition>
20.237 + <condition property="junit+testng.available">
20.238 + <and>
20.239 + <istrue value="${junit.available}"/>
20.240 + <istrue value="${testng.available}"/>
20.241 + </and>
20.242 + </condition>
20.243 + <condition else="testng" property="testng.mode" value="mixed">
20.244 + <istrue value="${junit+testng.available}"/>
20.245 + </condition>
20.246 + <condition else="" property="testng.debug.mode" value="-mixed">
20.247 + <istrue value="${junit+testng.available}"/>
20.248 + </condition>
20.249 + <property name="java.failonerror" value="true"/>
20.250 </target>
20.251 <target name="-post-init">
20.252 <!-- Empty placeholder for easier customization. -->
20.253 @@ -144,26 +308,152 @@
20.254 </sequential>
20.255 </macrodef>
20.256 </target>
20.257 - <target name="-init-macrodef-javac">
20.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
20.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
20.260 <attribute default="${src.dir}" name="srcdir"/>
20.261 <attribute default="${build.classes.dir}" name="destdir"/>
20.262 <attribute default="${javac.classpath}" name="classpath"/>
20.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
20.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
20.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
20.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
20.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
20.268 <attribute default="${includes}" name="includes"/>
20.269 <attribute default="${excludes}" name="excludes"/>
20.270 <attribute default="${javac.debug}" name="debug"/>
20.271 - <attribute default="" name="sourcepath"/>
20.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
20.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
20.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
20.275 <element name="customize" optional="true"/>
20.276 <sequential>
20.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
20.278 + <condition property="warn.excludes.internal">
20.279 + <and>
20.280 + <isset property="named.module.internal"/>
20.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
20.282 + </and>
20.283 + </condition>
20.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
20.285 + <property location="${build.dir}/empty" name="empty.dir"/>
20.286 + <mkdir dir="${empty.dir}"/>
20.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
20.288 + <condition property="processormodulepath.set">
20.289 + <resourcecount count="0" when="greater">
20.290 + <path>
20.291 + <pathelement path="@{processormodulepath}"/>
20.292 + </path>
20.293 + </resourcecount>
20.294 + </condition>
20.295 + <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}">
20.296 + <src>
20.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
20.298 + <include name="*"/>
20.299 + </dirset>
20.300 + </src>
20.301 <classpath>
20.302 <path path="@{classpath}"/>
20.303 </classpath>
20.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
20.305 + <modulepath>
20.306 + <path path="@{modulepath}"/>
20.307 + </modulepath>
20.308 + <upgrademodulepath>
20.309 + <path path="@{upgrademodulepath}"/>
20.310 + </upgrademodulepath>
20.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
20.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
20.313 + <compilerarg line="${javac.compilerargs}"/>
20.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
20.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
20.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
20.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
20.318 + <compilerarg line="${ap.processors.internal}"/>
20.319 + <compilerarg line="${annotation.processing.processor.options}"/>
20.320 + <compilerarg value="-s"/>
20.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
20.322 + <compilerarg line="${ap.proc.none.internal}"/>
20.323 <customize/>
20.324 </javac>
20.325 </sequential>
20.326 </macrodef>
20.327 + </target>
20.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
20.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
20.330 + <attribute default="${src.dir}" name="srcdir"/>
20.331 + <attribute default="${build.classes.dir}" name="destdir"/>
20.332 + <attribute default="${javac.classpath}" name="classpath"/>
20.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
20.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
20.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
20.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
20.337 + <attribute default="${includes}" name="includes"/>
20.338 + <attribute default="${excludes}" name="excludes"/>
20.339 + <attribute default="${javac.debug}" name="debug"/>
20.340 + <attribute default="${empty.dir}" name="sourcepath"/>
20.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
20.342 + <element name="customize" optional="true"/>
20.343 + <sequential>
20.344 + <property location="${build.dir}/empty" name="empty.dir"/>
20.345 + <mkdir dir="${empty.dir}"/>
20.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
20.347 + <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}">
20.348 + <src>
20.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
20.350 + <include name="*"/>
20.351 + </dirset>
20.352 + </src>
20.353 + <classpath>
20.354 + <path path="@{classpath}"/>
20.355 + </classpath>
20.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
20.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
20.358 + <compilerarg line="${javac.compilerargs}"/>
20.359 + <compilerarg value="-processorpath"/>
20.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
20.361 + <compilerarg line="${ap.processors.internal}"/>
20.362 + <compilerarg line="${annotation.processing.processor.options}"/>
20.363 + <compilerarg value="-s"/>
20.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
20.365 + <compilerarg line="${ap.proc.none.internal}"/>
20.366 + <customize/>
20.367 + </javac>
20.368 + </sequential>
20.369 + </macrodef>
20.370 + </target>
20.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
20.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
20.373 + <attribute default="${src.dir}" name="srcdir"/>
20.374 + <attribute default="${build.classes.dir}" name="destdir"/>
20.375 + <attribute default="${javac.classpath}" name="classpath"/>
20.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
20.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
20.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
20.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
20.380 + <attribute default="${includes}" name="includes"/>
20.381 + <attribute default="${excludes}" name="excludes"/>
20.382 + <attribute default="${javac.debug}" name="debug"/>
20.383 + <attribute default="${empty.dir}" name="sourcepath"/>
20.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
20.385 + <element name="customize" optional="true"/>
20.386 + <sequential>
20.387 + <property location="${build.dir}/empty" name="empty.dir"/>
20.388 + <mkdir dir="${empty.dir}"/>
20.389 + <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}">
20.390 + <src>
20.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
20.392 + <include name="*"/>
20.393 + </dirset>
20.394 + </src>
20.395 + <classpath>
20.396 + <path path="@{classpath}"/>
20.397 + </classpath>
20.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
20.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
20.400 + <compilerarg line="${javac.compilerargs}"/>
20.401 + <customize/>
20.402 + </javac>
20.403 + </sequential>
20.404 + </macrodef>
20.405 + </target>
20.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
20.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
20.408 <attribute default="${src.dir}" name="srcdir"/>
20.409 <attribute default="${build.classes.dir}" name="destdir"/>
20.410 @@ -180,51 +470,383 @@
20.411 <attribute default="${build.classes.dir}" name="destdir"/>
20.412 <sequential>
20.413 <fail unless="javac.includes">Must set javac.includes</fail>
20.414 - <pathconvert pathsep="," property="javac.includes.binary">
20.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
20.416 <path>
20.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
20.418 </path>
20.419 <globmapper from="*.java" to="*.class"/>
20.420 </pathconvert>
20.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
20.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
20.423 <delete>
20.424 - <files includes="${javac.includes.binary}"/>
20.425 + <files includesfile="${javac.includesfile.binary}"/>
20.426 + </delete>
20.427 + <delete>
20.428 + <fileset file="${javac.includesfile.binary}"/>
20.429 </delete>
20.430 </sequential>
20.431 </macrodef>
20.432 </target>
20.433 - <target name="-init-macrodef-junit">
20.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
20.435 + <condition else="false" property="nb.junit.batch" value="true">
20.436 + <and>
20.437 + <istrue value="${junit.available}"/>
20.438 + <not>
20.439 + <isset property="test.method"/>
20.440 + </not>
20.441 + </and>
20.442 + </condition>
20.443 + <condition else="false" property="nb.junit.single" value="true">
20.444 + <and>
20.445 + <istrue value="${junit.available}"/>
20.446 + <isset property="test.method"/>
20.447 + </and>
20.448 + </condition>
20.449 + </target>
20.450 + <target name="-init-test-properties">
20.451 + <property name="test.binaryincludes" value="<nothing>"/>
20.452 + <property name="test.binarytestincludes" value=""/>
20.453 + <property name="test.binaryexcludes" value=""/>
20.454 + </target>
20.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
20.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
20.457 + <attribute default="${includes}" name="includes"/>
20.458 + <attribute default="${excludes}" name="excludes"/>
20.459 + <element name="customizePrototype" optional="true"/>
20.460 + <sequential>
20.461 + <property name="junit.forkmode" value="perTest"/>
20.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
20.463 + <syspropertyset>
20.464 + <propertyref prefix="test-sys-prop."/>
20.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
20.466 + </syspropertyset>
20.467 + <classpath>
20.468 + <path path="${run.test.classpath}"/>
20.469 + </classpath>
20.470 + <modulepath>
20.471 + <path path="${run.test.modulepath}"/>
20.472 + </modulepath>
20.473 + <formatter type="brief" usefile="false"/>
20.474 + <formatter type="xml"/>
20.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
20.476 + <jvmarg value="-ea"/>
20.477 + <jvmarg line="${run.test.jvmargs}"/>
20.478 + <customizePrototype/>
20.479 + </junit>
20.480 + </sequential>
20.481 + </macrodef>
20.482 + </target>
20.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
20.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
20.485 + <attribute default="${includes}" name="includes"/>
20.486 + <attribute default="${excludes}" name="excludes"/>
20.487 + <element name="customizePrototype" optional="true"/>
20.488 + <sequential>
20.489 + <property name="junit.forkmode" value="perTest"/>
20.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
20.491 + <syspropertyset>
20.492 + <propertyref prefix="test-sys-prop."/>
20.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
20.494 + </syspropertyset>
20.495 + <classpath>
20.496 + <path path="${run.test.classpath}"/>
20.497 + </classpath>
20.498 + <formatter type="brief" usefile="false"/>
20.499 + <formatter type="xml"/>
20.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
20.501 + <jvmarg value="-ea"/>
20.502 + <customizePrototype/>
20.503 + </junit>
20.504 + </sequential>
20.505 + </macrodef>
20.506 + </target>
20.507 + <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}">
20.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
20.509 <attribute default="${includes}" name="includes"/>
20.510 <attribute default="${excludes}" name="excludes"/>
20.511 <attribute default="**" name="testincludes"/>
20.512 + <attribute default="" name="testmethods"/>
20.513 + <element name="customize" optional="true"/>
20.514 <sequential>
20.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
20.516 - <batchtest todir="${build.test.results.dir}">
20.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
20.518 - <filename name="@{testincludes}"/>
20.519 - </fileset>
20.520 - </batchtest>
20.521 + <j2seproject3:junit-prototype>
20.522 + <customizePrototype>
20.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
20.524 + <customize/>
20.525 + </customizePrototype>
20.526 + </j2seproject3:junit-prototype>
20.527 + </sequential>
20.528 + </macrodef>
20.529 + </target>
20.530 + <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}">
20.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
20.532 + <attribute default="${includes}" name="includes"/>
20.533 + <attribute default="${excludes}" name="excludes"/>
20.534 + <attribute default="**" name="testincludes"/>
20.535 + <attribute default="" name="testmethods"/>
20.536 + <element name="customize" optional="true"/>
20.537 + <sequential>
20.538 + <j2seproject3:junit-prototype>
20.539 + <customizePrototype>
20.540 + <batchtest todir="${build.test.results.dir}">
20.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
20.542 + <filename name="@{testincludes}"/>
20.543 + </fileset>
20.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
20.545 + <filename name="${test.binarytestincludes}"/>
20.546 + </fileset>
20.547 + </batchtest>
20.548 + <customize/>
20.549 + </customizePrototype>
20.550 + </j2seproject3:junit-prototype>
20.551 + </sequential>
20.552 + </macrodef>
20.553 + </target>
20.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
20.555 + <target if="${testng.available}" name="-init-macrodef-testng">
20.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
20.557 + <attribute default="${includes}" name="includes"/>
20.558 + <attribute default="${excludes}" name="excludes"/>
20.559 + <attribute default="**" name="testincludes"/>
20.560 + <attribute default="" name="testmethods"/>
20.561 + <element name="customize" optional="true"/>
20.562 + <sequential>
20.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
20.564 + <isset property="test.method"/>
20.565 + </condition>
20.566 + <union id="test.set">
20.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
20.568 + <filename name="@{testincludes}"/>
20.569 + </fileset>
20.570 + </union>
20.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
20.572 + <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="delegatingwriter" testname="TestNG tests" workingDir="${work.dir}">
20.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
20.574 + <propertyset>
20.575 + <propertyref prefix="test-sys-prop."/>
20.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
20.577 + </propertyset>
20.578 <classpath>
20.579 <path path="${run.test.classpath}"/>
20.580 </classpath>
20.581 - <syspropertyset>
20.582 - <propertyref prefix="test-sys-prop."/>
20.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
20.584 - </syspropertyset>
20.585 - <formatter type="brief" usefile="false"/>
20.586 - <formatter type="xml"/>
20.587 - <jvmarg line="${run.jvmargs}"/>
20.588 - </junit>
20.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
20.590 + <customize/>
20.591 + </testng>
20.592 </sequential>
20.593 </macrodef>
20.594 </target>
20.595 - <target name="-init-macrodef-nbjpda">
20.596 + <target name="-init-macrodef-test-impl">
20.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
20.598 + <attribute default="${includes}" name="includes"/>
20.599 + <attribute default="${excludes}" name="excludes"/>
20.600 + <attribute default="**" name="testincludes"/>
20.601 + <attribute default="" name="testmethods"/>
20.602 + <element implicit="true" name="customize" optional="true"/>
20.603 + <sequential>
20.604 + <echo>No tests executed.</echo>
20.605 + </sequential>
20.606 + </macrodef>
20.607 + </target>
20.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
20.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
20.610 + <attribute default="${includes}" name="includes"/>
20.611 + <attribute default="${excludes}" name="excludes"/>
20.612 + <attribute default="**" name="testincludes"/>
20.613 + <attribute default="" name="testmethods"/>
20.614 + <element implicit="true" name="customize" optional="true"/>
20.615 + <sequential>
20.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
20.617 + <customize/>
20.618 + </j2seproject3:junit>
20.619 + </sequential>
20.620 + </macrodef>
20.621 + </target>
20.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
20.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
20.624 + <attribute default="${includes}" name="includes"/>
20.625 + <attribute default="${excludes}" name="excludes"/>
20.626 + <attribute default="**" name="testincludes"/>
20.627 + <attribute default="" name="testmethods"/>
20.628 + <element implicit="true" name="customize" optional="true"/>
20.629 + <sequential>
20.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
20.631 + <customize/>
20.632 + </j2seproject3:testng>
20.633 + </sequential>
20.634 + </macrodef>
20.635 + </target>
20.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
20.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
20.638 + <attribute default="${includes}" name="includes"/>
20.639 + <attribute default="${excludes}" name="excludes"/>
20.640 + <attribute default="**" name="testincludes"/>
20.641 + <attribute default="" name="testmethods"/>
20.642 + <sequential>
20.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
20.644 + <customize>
20.645 + <jvmarg line="${run.jvmargs}"/>
20.646 + <jvmarg line="${run.jvmargs.ide}"/>
20.647 + </customize>
20.648 + </j2seproject3:test-impl>
20.649 + </sequential>
20.650 + </macrodef>
20.651 + </target>
20.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
20.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
20.654 + <attribute default="${includes}" name="includes"/>
20.655 + <attribute default="${excludes}" name="excludes"/>
20.656 + <attribute default="**" name="testincludes"/>
20.657 + <attribute default="" name="testmethods"/>
20.658 + <element name="customizeDebuggee" optional="true"/>
20.659 + <sequential>
20.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
20.661 + <customize>
20.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
20.663 + <customizeDebuggee/>
20.664 + </customize>
20.665 + </j2seproject3:junit>
20.666 + </sequential>
20.667 + </macrodef>
20.668 + </target>
20.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
20.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
20.671 + <attribute default="${main.class}" name="testClass"/>
20.672 + <attribute default="" name="testMethod"/>
20.673 + <element name="customize2" optional="true"/>
20.674 + <sequential>
20.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
20.676 + <isset property="test.method"/>
20.677 + </condition>
20.678 + <condition else="-suitename delegatingwriter -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
20.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
20.680 + </condition>
20.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
20.682 + <mkdir dir="${build.test.results.dir}"/>
20.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
20.684 + <customizeDebuggee>
20.685 + <customize2/>
20.686 + <jvmarg value="-ea"/>
20.687 + <arg line="${testng.debug.mode}"/>
20.688 + <arg line="-d ${build.test.results.dir}"/>
20.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
20.690 + <arg line="${testng.cmd.args}"/>
20.691 + </customizeDebuggee>
20.692 + </j2seproject3:debug>
20.693 + </sequential>
20.694 + </macrodef>
20.695 + </target>
20.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
20.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
20.698 + <attribute default="${main.class}" name="testClass"/>
20.699 + <attribute default="" name="testMethod"/>
20.700 + <element implicit="true" name="customize2" optional="true"/>
20.701 + <sequential>
20.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
20.703 + <customize2/>
20.704 + </j2seproject3:testng-debug>
20.705 + </sequential>
20.706 + </macrodef>
20.707 + </target>
20.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
20.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
20.710 + <attribute default="${includes}" name="includes"/>
20.711 + <attribute default="${excludes}" name="excludes"/>
20.712 + <attribute default="**" name="testincludes"/>
20.713 + <attribute default="" name="testmethods"/>
20.714 + <attribute default="${main.class}" name="testClass"/>
20.715 + <attribute default="" name="testMethod"/>
20.716 + <sequential>
20.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
20.718 + <customizeDebuggee>
20.719 + <jvmarg line="${run.jvmargs}"/>
20.720 + <jvmarg line="${run.jvmargs.ide}"/>
20.721 + </customizeDebuggee>
20.722 + </j2seproject3:test-debug-impl>
20.723 + </sequential>
20.724 + </macrodef>
20.725 + </target>
20.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
20.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
20.728 + <attribute default="${includes}" name="includes"/>
20.729 + <attribute default="${excludes}" name="excludes"/>
20.730 + <attribute default="**" name="testincludes"/>
20.731 + <attribute default="" name="testmethods"/>
20.732 + <attribute default="${main.class}" name="testClass"/>
20.733 + <attribute default="" name="testMethod"/>
20.734 + <sequential>
20.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
20.736 + <customize2>
20.737 + <syspropertyset>
20.738 + <propertyref prefix="test-sys-prop."/>
20.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
20.740 + </syspropertyset>
20.741 + </customize2>
20.742 + </j2seproject3:testng-debug-impl>
20.743 + </sequential>
20.744 + </macrodef>
20.745 + </target>
20.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
20.747 + <!--
20.748 + pre NB7.2 profiling section; consider it deprecated
20.749 + -->
20.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
20.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
20.752 + <!-- Empty placeholder for easier customization. -->
20.753 + <!-- You can override this target in the ../build.xml file. -->
20.754 + </target>
20.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
20.756 + <!-- Empty placeholder for easier customization. -->
20.757 + <!-- You can override this target in the ../build.xml file. -->
20.758 + </target>
20.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
20.760 + <macrodef name="resolve">
20.761 + <attribute name="name"/>
20.762 + <attribute name="value"/>
20.763 + <sequential>
20.764 + <property name="@{name}" value="${env.@{value}}"/>
20.765 + </sequential>
20.766 + </macrodef>
20.767 + <macrodef name="profile">
20.768 + <attribute default="${main.class}" name="classname"/>
20.769 + <element name="customize" optional="true"/>
20.770 + <sequential>
20.771 + <property environment="env"/>
20.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
20.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
20.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
20.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
20.776 + <jvmarg line="${profiler.info.jvmargs}"/>
20.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
20.778 + <arg line="${application.args}"/>
20.779 + <classpath>
20.780 + <path path="${run.classpath}"/>
20.781 + </classpath>
20.782 + <syspropertyset>
20.783 + <propertyref prefix="run-sys-prop."/>
20.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
20.785 + </syspropertyset>
20.786 + <customize/>
20.787 + </java>
20.788 + </sequential>
20.789 + </macrodef>
20.790 + </target>
20.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
20.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
20.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
20.794 + </target>
20.795 + <!--
20.796 + end of pre NB7.2 profiling section
20.797 + -->
20.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
20.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
20.800 <attribute default="${main.class}" name="name"/>
20.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
20.802 <attribute default="${debug.classpath}" name="classpath"/>
20.803 <attribute default="" name="stopclassname"/>
20.804 <sequential>
20.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
20.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
20.807 + <modulepath>
20.808 + <path path="@{modulepath}"/>
20.809 + </modulepath>
20.810 <classpath>
20.811 <path path="@{classpath}"/>
20.812 </classpath>
20.813 @@ -235,35 +857,120 @@
20.814 <attribute default="${build.classes.dir}" name="dir"/>
20.815 <sequential>
20.816 <nbjpdareload>
20.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
20.818 + <fileset dir="@{dir}" includes="${fix.classes}">
20.819 + <include name="${fix.includes}*.class"/>
20.820 + </fileset>
20.821 </nbjpdareload>
20.822 </sequential>
20.823 </macrodef>
20.824 </target>
20.825 <target name="-init-debug-args">
20.826 - <property name="version-output" value="java version "${ant.java.version}"/>
20.827 - <condition property="have-jdk-older-than-1.4">
20.828 - <or>
20.829 - <contains string="${version-output}" substring="java version "1.0"/>
20.830 - <contains string="${version-output}" substring="java version "1.1"/>
20.831 - <contains string="${version-output}" substring="java version "1.2"/>
20.832 - <contains string="${version-output}" substring="java version "1.3"/>
20.833 - </or>
20.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
20.835 + <os family="windows"/>
20.836 </condition>
20.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
20.838 - <istrue value="${have-jdk-older-than-1.4}"/>
20.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
20.840 + <isset property="debug.transport"/>
20.841 </condition>
20.842 </target>
20.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
20.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
20.845 + <attribute default="${module.name}" name="modulename"/>
20.846 <attribute default="${main.class}" name="classname"/>
20.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
20.848 <attribute default="${debug.classpath}" name="classpath"/>
20.849 + <element name="customizeDebuggee" optional="true"/>
20.850 + <sequential>
20.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
20.852 + <customize>
20.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
20.854 + <customizeDebuggee/>
20.855 + </customize>
20.856 + </j2seproject1:java>
20.857 + </sequential>
20.858 + </macrodef>
20.859 + </target>
20.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
20.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
20.862 + <attribute default="${module.name}" name="modulename"/>
20.863 + <attribute default="${main.class}" name="classname"/>
20.864 + <attribute default="${run.modulepath}" name="modulepath"/>
20.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
20.866 + <attribute default="${run.classpath}" name="classpath"/>
20.867 + <attribute default="jvm" name="jvm"/>
20.868 <element name="customize" optional="true"/>
20.869 <sequential>
20.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
20.871 - <jvmarg line="${debug-args-line}"/>
20.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
20.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
20.874 + <classpath>
20.875 + <path path="@{classpath}"/>
20.876 + </classpath>
20.877 + <modulepath>
20.878 + <pathelement path="@{modulepath}"/>
20.879 + <pathelement location="${module.build.classes.dir}"/>
20.880 + </modulepath>
20.881 + <upgrademodulepath>
20.882 + <path path="@{upgrademodulepath}"/>
20.883 + </upgrademodulepath>
20.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
20.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
20.886 <jvmarg line="${run.jvmargs}"/>
20.887 + <jvmarg line="${run.jvmargs.ide}"/>
20.888 + <syspropertyset>
20.889 + <propertyref prefix="run-sys-prop."/>
20.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
20.891 + </syspropertyset>
20.892 + <customize/>
20.893 + </java>
20.894 + </sequential>
20.895 + </macrodef>
20.896 + </target>
20.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
20.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
20.899 + <attribute default="" name="modulename"/>
20.900 + <attribute default="${main.class}" name="classname"/>
20.901 + <attribute default="${run.modulepath}" name="modulepath"/>
20.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
20.903 + <attribute default="${run.classpath}" name="classpath"/>
20.904 + <attribute default="jvm" name="jvm"/>
20.905 + <element name="customize" optional="true"/>
20.906 + <sequential>
20.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
20.908 + <classpath>
20.909 + <path path="@{classpath}"/>
20.910 + </classpath>
20.911 + <modulepath>
20.912 + <path path="@{modulepath}"/>
20.913 + </modulepath>
20.914 + <upgrademodulepath>
20.915 + <path path="@{upgrademodulepath}"/>
20.916 + </upgrademodulepath>
20.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
20.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
20.919 + <jvmarg line="${run.jvmargs}"/>
20.920 + <jvmarg line="${run.jvmargs.ide}"/>
20.921 + <syspropertyset>
20.922 + <propertyref prefix="run-sys-prop."/>
20.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
20.924 + </syspropertyset>
20.925 + <customize/>
20.926 + </java>
20.927 + </sequential>
20.928 + </macrodef>
20.929 + </target>
20.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
20.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
20.932 + <attribute default="" name="modulename"/>
20.933 + <attribute default="${main.class}" name="classname"/>
20.934 + <attribute default="" name="modulepath"/>
20.935 + <attribute default="${run.classpath}" name="classpath"/>
20.936 + <attribute default="jvm" name="jvm"/>
20.937 + <element name="customize" optional="true"/>
20.938 + <sequential>
20.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
20.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
20.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
20.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
20.943 + <jvmarg line="${run.jvmargs}"/>
20.944 + <jvmarg line="${run.jvmargs.ide}"/>
20.945 <classpath>
20.946 <path path="@{classpath}"/>
20.947 </classpath>
20.948 @@ -276,39 +983,100 @@
20.949 </sequential>
20.950 </macrodef>
20.951 </target>
20.952 - <target name="-init-macrodef-java">
20.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
20.954 - <attribute default="${main.class}" name="classname"/>
20.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
20.956 + <target name="-init-macrodef-copylibs">
20.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
20.958 + <attribute default="${manifest.file}" name="manifest"/>
20.959 <element name="customize" optional="true"/>
20.960 <sequential>
20.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
20.962 - <jvmarg line="${run.jvmargs}"/>
20.963 - <classpath>
20.964 - <path path="${run.classpath}"/>
20.965 - </classpath>
20.966 - <syspropertyset>
20.967 - <propertyref prefix="run-sys-prop."/>
20.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
20.969 - </syspropertyset>
20.970 - <customize/>
20.971 - </java>
20.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
20.973 + <pathconvert property="run.classpath.without.build.classes.dir">
20.974 + <path path="${run.classpath}"/>
20.975 + <map from="${build.classes.dir.resolved}" to=""/>
20.976 + </pathconvert>
20.977 + <pathconvert pathsep=" " property="jar.classpath">
20.978 + <path path="${run.classpath.without.build.classes.dir}"/>
20.979 + <chainedmapper>
20.980 + <flattenmapper/>
20.981 + <filtermapper>
20.982 + <replacestring from=" " to="%20"/>
20.983 + </filtermapper>
20.984 + <globmapper from="*" to="lib/*"/>
20.985 + </chainedmapper>
20.986 + </pathconvert>
20.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
20.988 + <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}">
20.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
20.990 + <manifest>
20.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
20.992 + <customize/>
20.993 + </manifest>
20.994 + </copylibs>
20.995 </sequential>
20.996 </macrodef>
20.997 </target>
20.998 <target name="-init-presetdef-jar">
20.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
20.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
20.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
20.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
20.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
20.1004 </jar>
20.1005 </presetdef>
20.1006 </target>
20.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
20.1008 + <target name="-init-ap-cmdline-properties">
20.1009 + <property name="annotation.processing.enabled" value="true"/>
20.1010 + <property name="annotation.processing.processors.list" value=""/>
20.1011 + <property name="annotation.processing.processor.options" value=""/>
20.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
20.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
20.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
20.1015 + <condition property="ap.supported.internal" value="true">
20.1016 + <not>
20.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
20.1018 + </not>
20.1019 + </condition>
20.1020 + </target>
20.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
20.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
20.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
20.1024 + </condition>
20.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
20.1026 + <isfalse value="${annotation.processing.enabled}"/>
20.1027 + </condition>
20.1028 + </target>
20.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
20.1030 + <property name="ap.cmd.line.internal" value=""/>
20.1031 + </target>
20.1032 + <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"/>
20.1033 <!--
20.1034 ===================
20.1035 COMPILATION SECTION
20.1036 ===================
20.1037 -->
20.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
20.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
20.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
20.1041 + <delete file="${built-jar.properties}" quiet="true"/>
20.1042 + </target>
20.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
20.1044 + <echo level="warn" message="Cycle detected: delegatingwriter was already built"/>
20.1045 + </target>
20.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
20.1047 + <mkdir dir="${build.dir}"/>
20.1048 + <touch file="${built-jar.properties}" verbose="false"/>
20.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
20.1050 + <antcall target="-warn-already-built-jar"/>
20.1051 + <propertyfile file="${built-jar.properties}">
20.1052 + <entry key="${basedir}" value=""/>
20.1053 + </propertyfile>
20.1054 + </target>
20.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
20.1056 + <target depends="init" name="-check-automatic-build">
20.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
20.1058 + </target>
20.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
20.1060 + <antcall target="clean">
20.1061 + <param name="no.dependencies" value="true"/>
20.1062 + </antcall>
20.1063 + </target>
20.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
20.1065 <mkdir dir="${build.classes.dir}"/>
20.1066 </target>
20.1067 @@ -317,19 +1085,30 @@
20.1068 <!-- You can override this target in the ../build.xml file. -->
20.1069 </target>
20.1070 <target if="do.depend.true" name="-compile-depend">
20.1071 - <j2seproject3:depend/>
20.1072 + <pathconvert property="build.generated.subdirs">
20.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
20.1074 + <include name="*"/>
20.1075 + </dirset>
20.1076 + </pathconvert>
20.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
20.1078 </target>
20.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
20.1080 - <j2seproject3:javac/>
20.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
20.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
20.1083 <copy todir="${build.classes.dir}">
20.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
20.1085 </copy>
20.1086 </target>
20.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
20.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
20.1089 + <copy todir="${build.classes.dir}/META-INF">
20.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
20.1091 + </copy>
20.1092 + </target>
20.1093 <target name="-post-compile">
20.1094 <!-- Empty placeholder for easier customization. -->
20.1095 <!-- You can override this target in the ../build.xml file. -->
20.1096 </target>
20.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
20.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
20.1099 <target name="-pre-compile-single">
20.1100 <!-- Empty placeholder for easier customization. -->
20.1101 <!-- You can override this target in the ../build.xml file. -->
20.1102 @@ -337,13 +1116,13 @@
20.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
20.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
20.1105 <j2seproject3:force-recompile/>
20.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
20.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
20.1108 </target>
20.1109 <target name="-post-compile-single">
20.1110 <!-- Empty placeholder for easier customization. -->
20.1111 <!-- You can override this target in the ../build.xml file. -->
20.1112 </target>
20.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
20.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
20.1115 <!--
20.1116 ====================
20.1117 JAR BUILDING SECTION
20.1118 @@ -357,57 +1136,191 @@
20.1119 <!-- Empty placeholder for easier customization. -->
20.1120 <!-- You can override this target in the ../build.xml file. -->
20.1121 </target>
20.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
20.1123 - <j2seproject1:jar/>
20.1124 + <target depends="init,compile" name="-check-module-main-class">
20.1125 + <pathconvert property="main.class.file">
20.1126 + <string value="${main.class}"/>
20.1127 + <unpackagemapper from="*" to="*.class"/>
20.1128 + </pathconvert>
20.1129 + <condition property="do.module.main.class">
20.1130 + <and>
20.1131 + <isset property="main.class.available"/>
20.1132 + <available file="${build.classes.dir}/module-info.class"/>
20.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
20.1134 + <isset property="libs.CopyLibs.classpath"/>
20.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
20.1136 + </and>
20.1137 + </condition>
20.1138 </target>
20.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
20.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
20.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
20.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
20.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
20.1144 </target>
20.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
20.1146 - <j2seproject1:jar manifest="${manifest.file}">
20.1147 - <j2seproject1:manifest>
20.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
20.1149 - </j2seproject1:manifest>
20.1150 - </j2seproject1:jar>
20.1151 - <echo>To run this application from the command line without Ant, try:</echo>
20.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
20.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
20.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
20.1155 + </target>
20.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
20.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
20.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
20.1159 + </target>
20.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
20.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
20.1162 + <attribute name="Main-Class" value="${main.class}"/>
20.1163 + </manifest>
20.1164 + </target>
20.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
20.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
20.1167 + <attribute name="Profile" value="${javac.profile}"/>
20.1168 + </manifest>
20.1169 + </target>
20.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
20.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
20.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
20.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
20.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
20.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
20.1176 + </manifest>
20.1177 + </target>
20.1178 + <target depends="init,compile" name="-check-do-mkdist">
20.1179 + <condition property="do.mkdist">
20.1180 + <and>
20.1181 + <isset property="do.archive"/>
20.1182 + <isset property="libs.CopyLibs.classpath"/>
20.1183 + <not>
20.1184 + <istrue value="${mkdist.disabled}"/>
20.1185 + </not>
20.1186 + <not>
20.1187 + <available file="${build.classes.dir}/module-info.class"/>
20.1188 + </not>
20.1189 + </and>
20.1190 + </condition>
20.1191 + </target>
20.1192 + <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">
20.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
20.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
20.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
20.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
20.1197 + </target>
20.1198 + <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">
20.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
20.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
20.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
20.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
20.1203 + <isset property="named.module.internal"/>
20.1204 + </condition>
20.1205 <pathconvert property="run.classpath.with.dist.jar">
20.1206 <path path="${run.classpath}"/>
20.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
20.1208 + </pathconvert>
20.1209 + <pathconvert property="run.modulepath.with.dist.jar">
20.1210 + <path location="${dist.jar.resolved}"/>
20.1211 + <path path="${run.modulepath}"/>
20.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
20.1213 </pathconvert>
20.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
20.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
20.1216 + <isset property="named.module.internal"/>
20.1217 + </condition>
20.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
20.1219 + <and>
20.1220 + <isset property="modules.supported.internal"/>
20.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
20.1222 + </and>
20.1223 + </condition>
20.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
20.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
20.1226 + </condition>
20.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
20.1228 + <isset property="do.module.main.class"/>
20.1229 + </condition>
20.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
20.1231 + <isset property="named.module.internal"/>
20.1232 + </condition>
20.1233 + <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}">
20.1234 + <isset property="main.class.available"/>
20.1235 + </condition>
20.1236 + <condition else="debug" property="jar.usage.level" value="info">
20.1237 + <isset property="main.class.available"/>
20.1238 + </condition>
20.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
20.1240 </target>
20.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
20.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
20.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
20.1244 - <path path="${run.classpath}"/>
20.1245 - <map from="${build.classes.dir.resolved}" to=""/>
20.1246 - </pathconvert>
20.1247 - <pathconvert pathsep=" " property="jar.classpath">
20.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
20.1249 - <chainedmapper>
20.1250 - <flattenmapper/>
20.1251 - <globmapper from="*" to="lib/*"/>
20.1252 - </chainedmapper>
20.1253 - </pathconvert>
20.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
20.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
20.1256 - <fileset dir="${build.classes.dir}"/>
20.1257 - <manifest>
20.1258 - <attribute name="Main-Class" value="${main.class}"/>
20.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
20.1260 - </manifest>
20.1261 - </copylibs>
20.1262 - <echo>To run this application from the command line without Ant, try:</echo>
20.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
20.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
20.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
20.1266 + <delete>
20.1267 + <fileset file="${tmp.manifest.file}"/>
20.1268 + </delete>
20.1269 </target>
20.1270 + <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"/>
20.1271 + <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"/>
20.1272 <target name="-post-jar">
20.1273 <!-- Empty placeholder for easier customization. -->
20.1274 <!-- You can override this target in the ../build.xml file. -->
20.1275 </target>
20.1276 - <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"/>
20.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
20.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
20.1279 + <!--
20.1280 + =================
20.1281 + DEPLOY SECTION
20.1282 + =================
20.1283 + -->
20.1284 + <target name="-pre-deploy">
20.1285 + <!-- Empty placeholder for easier customization. -->
20.1286 + <!-- You can override this target in the ../build.xml file. -->
20.1287 + </target>
20.1288 + <target depends="init" name="-check-jlink">
20.1289 + <condition property="do.jlink.internal">
20.1290 + <and>
20.1291 + <istrue value="${do.jlink}"/>
20.1292 + <isset property="do.archive"/>
20.1293 + <isset property="named.module.internal"/>
20.1294 + </and>
20.1295 + </condition>
20.1296 + </target>
20.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
20.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
20.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
20.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
20.1301 + <and>
20.1302 + <isset property="jlink.additionalmodules"/>
20.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
20.1304 + </and>
20.1305 + </condition>
20.1306 + <condition property="jlink.do.strip.internal">
20.1307 + <and>
20.1308 + <isset property="jlink.strip"/>
20.1309 + <istrue value="${jlink.strip}"/>
20.1310 + </and>
20.1311 + </condition>
20.1312 + <condition property="jlink.do.additionalparam.internal">
20.1313 + <and>
20.1314 + <isset property="jlink.additionalparam"/>
20.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
20.1316 + </and>
20.1317 + </condition>
20.1318 + <condition property="jlink.do.launcher.internal">
20.1319 + <and>
20.1320 + <istrue value="${jlink.launcher}"/>
20.1321 + <isset property="main.class.available"/>
20.1322 + </and>
20.1323 + </condition>
20.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
20.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
20.1326 + <exec executable="${platform.jlink}">
20.1327 + <arg value="--module-path"/>
20.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
20.1329 + <arg value="--add-modules"/>
20.1330 + <arg value="${jlink.add.modules}"/>
20.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
20.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
20.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
20.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
20.1335 + <arg value="--output"/>
20.1336 + <arg value="${dist.jlink.output}"/>
20.1337 + </exec>
20.1338 + </target>
20.1339 + <target name="-post-deploy">
20.1340 + <!-- Empty placeholder for easier customization. -->
20.1341 + <!-- You can override this target in the ../build.xml file. -->
20.1342 + </target>
20.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
20.1344 <!--
20.1345 =================
20.1346 EXECUTION SECTION
20.1347 @@ -423,10 +1336,14 @@
20.1348 <target name="-do-not-recompile">
20.1349 <property name="javac.includes.binary" value=""/>
20.1350 </target>
20.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
20.1352 + <target depends="init,compile-single" name="run-single">
20.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
20.1354 <j2seproject1:java classname="${run.class}"/>
20.1355 </target>
20.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
20.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
20.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
20.1359 + </target>
20.1360 <!--
20.1361 =================
20.1362 DEBUGGING SECTION
20.1363 @@ -435,11 +1352,14 @@
20.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
20.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
20.1366 </target>
20.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
20.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
20.1369 + </target>
20.1370 <target depends="init,compile" name="-debug-start-debuggee">
20.1371 <j2seproject3:debug>
20.1372 - <customize>
20.1373 + <customizeDebuggee>
20.1374 <arg line="${application.args}"/>
20.1375 - </customize>
20.1376 + </customizeDebuggee>
20.1377 </j2seproject3:debug>
20.1378 </target>
20.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
20.1380 @@ -451,7 +1371,12 @@
20.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
20.1382 <j2seproject3:debug classname="${debug.class}"/>
20.1383 </target>
20.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
20.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
20.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
20.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
20.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
20.1389 + </target>
20.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
20.1391 <target depends="init" name="-pre-debug-fix">
20.1392 <fail unless="fix.includes">Must set fix.includes</fail>
20.1393 <property name="javac.includes" value="${fix.includes}.java"/>
20.1394 @@ -461,20 +1386,146 @@
20.1395 </target>
20.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
20.1397 <!--
20.1398 + =================
20.1399 + PROFILING SECTION
20.1400 + =================
20.1401 + -->
20.1402 + <!--
20.1403 + pre NB7.2 profiler integration
20.1404 + -->
20.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
20.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
20.1407 + <nbprofiledirect>
20.1408 + <classpath>
20.1409 + <path path="${run.classpath}"/>
20.1410 + </classpath>
20.1411 + </nbprofiledirect>
20.1412 + <profile/>
20.1413 + </target>
20.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
20.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
20.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
20.1417 + <nbprofiledirect>
20.1418 + <classpath>
20.1419 + <path path="${run.classpath}"/>
20.1420 + </classpath>
20.1421 + </nbprofiledirect>
20.1422 + <profile classname="${profile.class}"/>
20.1423 + </target>
20.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
20.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
20.1426 + <nbprofiledirect>
20.1427 + <classpath>
20.1428 + <path path="${run.classpath}"/>
20.1429 + </classpath>
20.1430 + </nbprofiledirect>
20.1431 + <profile classname="sun.applet.AppletViewer">
20.1432 + <customize>
20.1433 + <arg value="${applet.url}"/>
20.1434 + </customize>
20.1435 + </profile>
20.1436 + </target>
20.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
20.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
20.1439 + <nbprofiledirect>
20.1440 + <classpath>
20.1441 + <path path="${run.test.classpath}"/>
20.1442 + </classpath>
20.1443 + </nbprofiledirect>
20.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
20.1445 + <customize>
20.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
20.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
20.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
20.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
20.1450 + <classpath>
20.1451 + <path path="${run.test.classpath}"/>
20.1452 + </classpath>
20.1453 + </customize>
20.1454 + </j2seproject3:junit>
20.1455 + </target>
20.1456 + <!--
20.1457 + end of pre NB72 profiling section
20.1458 + -->
20.1459 + <target if="netbeans.home" name="-profile-check">
20.1460 + <condition property="profiler.configured">
20.1461 + <or>
20.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
20.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
20.1464 + </or>
20.1465 + </condition>
20.1466 + </target>
20.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
20.1468 + <startprofiler/>
20.1469 + <antcall target="run"/>
20.1470 + </target>
20.1471 + <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">
20.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
20.1473 + <startprofiler/>
20.1474 + <antcall target="run-single"/>
20.1475 + </target>
20.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
20.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
20.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
20.1479 + <startprofiler/>
20.1480 + <antcall target="test-single"/>
20.1481 + </target>
20.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
20.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
20.1484 + <startprofiler/>
20.1485 + <antcall target="run-test-with-main"/>
20.1486 + </target>
20.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
20.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
20.1489 + <startprofiler/>
20.1490 + <antcall target="run-applet"/>
20.1491 + </target>
20.1492 + <!--
20.1493 ===============
20.1494 JAVADOC SECTION
20.1495 ===============
20.1496 -->
20.1497 - <target depends="init" name="-javadoc-build">
20.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
20.1499 <mkdir dir="${dist.javadoc.dir}"/>
20.1500 - <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}">
20.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
20.1502 + <and>
20.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
20.1504 + <not>
20.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
20.1506 + </not>
20.1507 + </and>
20.1508 + </condition>
20.1509 + <condition else="" property="bug5101868workaround" value="*.java">
20.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
20.1511 + </condition>
20.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
20.1513 + <and>
20.1514 + <isset property="javadoc.html5"/>
20.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
20.1516 + </and>
20.1517 + </condition>
20.1518 + <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}">
20.1519 <classpath>
20.1520 <path path="${javac.classpath}"/>
20.1521 </classpath>
20.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
20.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
20.1524 <filename name="**/*.java"/>
20.1525 </fileset>
20.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
20.1527 + <include name="**/*.java"/>
20.1528 + <exclude name="*.java"/>
20.1529 + </fileset>
20.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
20.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
20.1532 </javadoc>
20.1533 + <copy todir="${dist.javadoc.dir}">
20.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
20.1535 + <filename name="**/doc-files/**"/>
20.1536 + </fileset>
20.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
20.1538 + <include name="**/doc-files/**"/>
20.1539 + </fileset>
20.1540 + </copy>
20.1541 </target>
20.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
20.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
20.1544 @@ -482,7 +1533,7 @@
20.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
20.1546 <!--
20.1547 =========================
20.1548 - JUNIT COMPILATION SECTION
20.1549 + TEST COMPILATION SECTION
20.1550 =========================
20.1551 -->
20.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
20.1553 @@ -492,11 +1543,63 @@
20.1554 <!-- Empty placeholder for easier customization. -->
20.1555 <!-- You can override this target in the ../build.xml file. -->
20.1556 </target>
20.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
20.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
20.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
20.1560 + <and>
20.1561 + <isset property="test.module.name"/>
20.1562 + <length length="0" string="${test.module.name}" when="greater"/>
20.1563 + </and>
20.1564 + </condition>
20.1565 + <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">
20.1566 + <and>
20.1567 + <isset property="test.module.name"/>
20.1568 + <length length="0" string="${test.module.name}" when="greater"/>
20.1569 + </and>
20.1570 + </condition>
20.1571 + </target>
20.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
20.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
20.1574 + <and>
20.1575 + <isset property="test.module.name"/>
20.1576 + <length length="0" string="${test.module.name}" when="greater"/>
20.1577 + </and>
20.1578 + </condition>
20.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
20.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
20.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
20.1582 + <chainedmapper>
20.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
20.1584 + <filtermapper>
20.1585 + <uniqfilter/>
20.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
20.1587 + </filtermapper>
20.1588 + <cutdirsmapper dirs="1"/>
20.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
20.1590 + </chainedmapper>
20.1591 + </pathconvert>
20.1592 + <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}">
20.1593 + <and>
20.1594 + <isset property="test.module.name"/>
20.1595 + <length length="0" string="${test.module.name}" when="greater"/>
20.1596 + </and>
20.1597 + </condition>
20.1598 + </target>
20.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
20.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
20.1601 + <property name="javac.test.compilerargs" value=""/>
20.1602 + <property name="run.test.jvmargs" value=""/>
20.1603 + </target>
20.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
20.1605 <target if="do.depend.true" name="-compile-test-depend">
20.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
20.1607 </target>
20.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
20.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
20.1610 + <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">
20.1611 + <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}">
20.1612 + <customize>
20.1613 + <compilerarg line="${javac.test.compilerargs}"/>
20.1614 + </customize>
20.1615 + </j2seproject3:javac>
20.1616 <copy todir="${build.test.classes.dir}">
20.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
20.1618 </copy>
20.1619 @@ -510,10 +1613,14 @@
20.1620 <!-- Empty placeholder for easier customization. -->
20.1621 <!-- You can override this target in the ../build.xml file. -->
20.1622 </target>
20.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
20.1624 + <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">
20.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
20.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
20.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
20.1628 + <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}">
20.1629 + <customize>
20.1630 + <compilerarg line="${javac.test.compilerargs}"/>
20.1631 + </customize>
20.1632 + </j2seproject3:javac>
20.1633 <copy todir="${build.test.classes.dir}">
20.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
20.1635 </copy>
20.1636 @@ -525,17 +1632,17 @@
20.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
20.1638 <!--
20.1639 =======================
20.1640 - JUNIT EXECUTION SECTION
20.1641 + TEST EXECUTION SECTION
20.1642 =======================
20.1643 -->
20.1644 <target depends="init" if="have.tests" name="-pre-test-run">
20.1645 <mkdir dir="${build.test.results.dir}"/>
20.1646 </target>
20.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
20.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
20.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
20.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
20.1651 </target>
20.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
20.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
20.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
20.1655 </target>
20.1656 <target depends="init" if="have.tests" name="test-report"/>
20.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
20.1658 @@ -543,41 +1650,42 @@
20.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
20.1660 <mkdir dir="${build.test.results.dir}"/>
20.1661 </target>
20.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
20.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
20.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
20.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
20.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
20.1667 </target>
20.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
20.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
20.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
20.1671 </target>
20.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
20.1673 + <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"/>
20.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
20.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
20.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
20.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
20.1678 + </target>
20.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
20.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
20.1681 + </target>
20.1682 + <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"/>
20.1683 <!--
20.1684 =======================
20.1685 - JUNIT DEBUGGING SECTION
20.1686 + TEST DEBUGGING SECTION
20.1687 =======================
20.1688 -->
20.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
20.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
20.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
20.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
20.1693 - <delete file="${test.report.file}"/>
20.1694 - <mkdir dir="${build.test.results.dir}"/>
20.1695 - <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}">
20.1696 - <customize>
20.1697 - <syspropertyset>
20.1698 - <propertyref prefix="test-sys-prop."/>
20.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
20.1700 - </syspropertyset>
20.1701 - <arg value="${test.class}"/>
20.1702 - <arg value="showoutput=true"/>
20.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
20.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
20.1705 - </customize>
20.1706 - </j2seproject3:debug>
20.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
20.1708 + </target>
20.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
20.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
20.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
20.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
20.1713 </target>
20.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
20.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
20.1716 </target>
20.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
20.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
20.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
20.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
20.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
20.1722 </target>
20.1723 @@ -603,9 +1711,9 @@
20.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
20.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
20.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
20.1727 - <customize>
20.1728 + <customizeDebuggee>
20.1729 <arg value="${applet.url}"/>
20.1730 - </customize>
20.1731 + </customizeDebuggee>
20.1732 </j2seproject3:debug>
20.1733 </target>
20.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
20.1735 @@ -614,14 +1722,49 @@
20.1736 CLEANUP SECTION
20.1737 ===============
20.1738 -->
20.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
20.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
20.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
20.1742 + <delete file="${built-clean.properties}" quiet="true"/>
20.1743 + </target>
20.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
20.1745 + <echo level="warn" message="Cycle detected: delegatingwriter was already built"/>
20.1746 + </target>
20.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
20.1748 + <mkdir dir="${build.dir}"/>
20.1749 + <touch file="${built-clean.properties}" verbose="false"/>
20.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
20.1751 + <antcall target="-warn-already-built-clean"/>
20.1752 + <propertyfile file="${built-clean.properties}">
20.1753 + <entry key="${basedir}" value=""/>
20.1754 + </propertyfile>
20.1755 + </target>
20.1756 <target depends="init" name="-do-clean">
20.1757 <delete dir="${build.dir}"/>
20.1758 - <delete dir="${dist.dir}"/>
20.1759 + <delete dir="${dist.jlink.output}"/>
20.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
20.1761 </target>
20.1762 <target name="-post-clean">
20.1763 <!-- Empty placeholder for easier customization. -->
20.1764 <!-- You can override this target in the ../build.xml file. -->
20.1765 </target>
20.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
20.1767 + <target name="-check-call-dep">
20.1768 + <property file="${call.built.properties}" prefix="already.built."/>
20.1769 + <condition property="should.call.dep">
20.1770 + <and>
20.1771 + <not>
20.1772 + <isset property="already.built.${call.subproject}"/>
20.1773 + </not>
20.1774 + <available file="${call.script}"/>
20.1775 + </and>
20.1776 + </condition>
20.1777 + </target>
20.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
20.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
20.1780 + <propertyset>
20.1781 + <propertyref prefix="transfer."/>
20.1782 + <mapper from="transfer.*" to="*" type="glob"/>
20.1783 + </propertyset>
20.1784 + </ant>
20.1785 + </target>
20.1786 </project>
21.1 --- a/samples/delegatingwriter/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
21.2 +++ b/samples/delegatingwriter/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
21.3 @@ -1,8 +1,8 @@
21.4 build.xml.data.CRC32=1fa45f30
21.5 -build.xml.script.CRC32=d80e7700
21.6 -build.xml.stylesheet.CRC32=be360661
21.7 +build.xml.script.CRC32=d6b8b2e9
21.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
21.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
21.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
21.11 nbproject/build-impl.xml.data.CRC32=1fa45f30
21.12 -nbproject/build-impl.xml.script.CRC32=1dc6566a
21.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
21.14 +nbproject/build-impl.xml.script.CRC32=c7bdc0e8
21.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
22.1 --- a/samples/delegatingwriter/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
22.2 +++ b/samples/delegatingwriter/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
22.3 @@ -5,14 +5,19 @@
22.4 # This directory is removed when the project is cleaned:
22.5 build.dir=build
22.6 build.generated.dir=${build.dir}/generated
22.7 +build.generated.sources.dir=${build.dir}/generated-sources
22.8 # Only compile against the classpath explicitly listed here:
22.9 build.sysclasspath=ignore
22.10 build.test.classes.dir=${build.dir}/test/classes
22.11 build.test.results.dir=${build.dir}/test/results
22.12 debug.classpath=\
22.13 ${run.classpath}
22.14 +debug.modulepath=\
22.15 + ${run.modulepath}
22.16 debug.test.classpath=\
22.17 ${run.test.classpath}
22.18 +debug.test.modulepath=\
22.19 + ${run.test.modulepath}
22.20 # This directory is removed when the project is cleaned:
22.21 dist.dir=dist
22.22 dist.jar=${dist.dir}/delegatingwriter.jar
22.23 @@ -25,12 +30,16 @@
22.24 # Space-separated list of extra javac options
22.25 javac.compilerargs=
22.26 javac.deprecation=false
22.27 -javac.source=1.5
22.28 -javac.target=1.5
22.29 +javac.modulepath=
22.30 +javac.processormodulepath=
22.31 +javac.source=1.6
22.32 +javac.target=1.6
22.33 javac.test.classpath=\
22.34 ${javac.classpath}:\
22.35 ${build.classes.dir}:\
22.36 ${file.reference.junit-4.4.jar}
22.37 +javac.test.modulepath=\
22.38 + ${javac.modulepath}
22.39 javadoc.additionalparam=
22.40 javadoc.author=false
22.41 javadoc.encoding=${source.encoding}
22.42 @@ -51,9 +60,13 @@
22.43 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
22.44 # or test-sys-prop.name=value to set system properties for unit tests):
22.45 run.jvmargs=
22.46 +run.modulepath=\
22.47 + ${javac.modulepath}
22.48 run.test.classpath=\
22.49 ${javac.test.classpath}:\
22.50 ${build.test.classes.dir}
22.51 +run.test.modulepath=\
22.52 + ${javac.test.modulepath}
22.53 source.encoding=UTF-8
22.54 src.dir=src
22.55 test.src.dir=test
23.1 --- a/samples/extensibleicon/build.xml Mon Nov 11 05:47:32 2019 +0100
23.2 +++ b/samples/extensibleicon/build.xml Mon Nov 11 13:17:34 2019 +0100
23.3 @@ -51,8 +51,7 @@
23.4 -init-macrodef-junit: defines macro for junit execution
23.5 -init-macrodef-debug: defines macro for class debugging
23.6 -init-macrodef-java: defines macro for class execution
23.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
23.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
23.9 + -do-jar: JAR building
23.10 run: execution of project
23.11 -javadoc-build: Javadoc generation
23.12 test-report: JUnit report generation
24.1 --- a/samples/extensibleicon/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
24.2 +++ b/samples/extensibleicon/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
24.3 @@ -12,18 +12,18 @@
24.4 - execution
24.5 - debugging
24.6 - javadoc
24.7 - - junit compilation
24.8 - - junit execution
24.9 - - junit debugging
24.10 + - test compilation
24.11 + - test execution
24.12 + - test debugging
24.13 - applet
24.14 - cleanup
24.15
24.16 -->
24.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="extensibleicon-impl">
24.18 - <fail message="Please build using Ant 1.7.1 or higher.">
24.19 +<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="extensibleicon-impl">
24.20 + <fail message="Please build using Ant 1.8.0 or higher.">
24.21 <condition>
24.22 <not>
24.23 - <antversion atleast="1.7.1"/>
24.24 + <antversion atleast="1.8.0"/>
24.25 </not>
24.26 </condition>
24.27 </fail>
24.28 @@ -46,15 +46,89 @@
24.29 <property file="${user.properties.file}"/>
24.30 <!-- The two properties below are usually overridden -->
24.31 <!-- by the active platform. Just a fallback. -->
24.32 - <property name="default.javac.source" value="1.4"/>
24.33 - <property name="default.javac.target" value="1.4"/>
24.34 + <property name="default.javac.source" value="1.6"/>
24.35 + <property name="default.javac.target" value="1.6"/>
24.36 </target>
24.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
24.38 <property file="nbproject/configs/${config}.properties"/>
24.39 <property file="nbproject/project.properties"/>
24.40 </target>
24.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
24.42 + <target name="-init-modules-supported">
24.43 + <condition property="modules.supported.internal" value="true">
24.44 + <not>
24.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
24.46 + </not>
24.47 + </condition>
24.48 + </target>
24.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
24.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
24.51 + <attribute name="property"/>
24.52 + <attribute name="sourcepath"/>
24.53 + <sequential>
24.54 + <loadresource property="@{property}" quiet="true">
24.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
24.56 + <filterchain>
24.57 + <stripjavacomments/>
24.58 + <linecontainsregexp>
24.59 + <regexp pattern="module .* \{"/>
24.60 + </linecontainsregexp>
24.61 + <tokenfilter>
24.62 + <linetokenizer/>
24.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
24.64 + </tokenfilter>
24.65 + <striplinebreaks/>
24.66 + </filterchain>
24.67 + </loadresource>
24.68 + </sequential>
24.69 + </macrodef>
24.70 + </target>
24.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
24.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
24.73 + <condition>
24.74 + <not>
24.75 + <antversion atleast="1.10.0"/>
24.76 + </not>
24.77 + </condition>
24.78 + </fail>
24.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
24.80 + <condition property="named.module.internal">
24.81 + <and>
24.82 + <isset property="module.name"/>
24.83 + <length length="0" string="${module.name}" when="greater"/>
24.84 + </and>
24.85 + </condition>
24.86 + <condition property="unnamed.module.internal">
24.87 + <not>
24.88 + <isset property="named.module.internal"/>
24.89 + </not>
24.90 + </condition>
24.91 + <property name="javac.modulepath" value=""/>
24.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
24.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
24.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
24.95 + <property name="javac.upgrademodulepath" value=""/>
24.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
24.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
24.98 + <and>
24.99 + <isset property="javac.systemmodulepath"/>
24.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
24.101 + </and>
24.102 + </condition>
24.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
24.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
24.105 + <property name="module.name" value=""/>
24.106 + </target>
24.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
24.108 + <property name="platform.java" value="${java.home}/bin/java"/>
24.109 <available file="${manifest.file}" property="manifest.available"/>
24.110 + <condition property="splashscreen.available">
24.111 + <and>
24.112 + <not>
24.113 + <equals arg1="${application.splash}" arg2="" trim="true"/>
24.114 + </not>
24.115 + <available file="${application.splash}"/>
24.116 + </and>
24.117 + </condition>
24.118 <condition property="main.class.available">
24.119 <and>
24.120 <isset property="main.class"/>
24.121 @@ -63,43 +137,46 @@
24.122 </not>
24.123 </and>
24.124 </condition>
24.125 - <condition property="manifest.available+main.class">
24.126 + <condition property="profile.available">
24.127 <and>
24.128 - <isset property="manifest.available"/>
24.129 - <isset property="main.class.available"/>
24.130 - </and>
24.131 - </condition>
24.132 - <condition property="do.mkdist">
24.133 - <and>
24.134 - <isset property="libs.CopyLibs.classpath"/>
24.135 + <isset property="javac.profile"/>
24.136 + <length length="0" string="${javac.profile}" when="greater"/>
24.137 <not>
24.138 - <istrue value="${mkdist.disabled}"/>
24.139 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
24.140 </not>
24.141 </and>
24.142 </condition>
24.143 - <condition property="manifest.available+main.class+mkdist.available">
24.144 + <condition property="do.archive">
24.145 + <or>
24.146 + <not>
24.147 + <istrue value="${jar.archive.disabled}"/>
24.148 + </not>
24.149 + <istrue value="${not.archive.disabled}"/>
24.150 + </or>
24.151 + </condition>
24.152 + <condition property="do.archive+manifest.available">
24.153 <and>
24.154 - <istrue value="${manifest.available+main.class}"/>
24.155 - <isset property="do.mkdist"/>
24.156 + <isset property="manifest.available"/>
24.157 + <istrue value="${do.archive}"/>
24.158 </and>
24.159 </condition>
24.160 - <condition property="manifest.available+mkdist.available">
24.161 + <condition property="do.archive+main.class.available">
24.162 <and>
24.163 - <istrue value="${manifest.available}"/>
24.164 - <isset property="do.mkdist"/>
24.165 + <isset property="main.class.available"/>
24.166 + <istrue value="${do.archive}"/>
24.167 </and>
24.168 </condition>
24.169 - <condition property="manifest.available-mkdist.available">
24.170 - <or>
24.171 - <istrue value="${manifest.available}"/>
24.172 - <isset property="do.mkdist"/>
24.173 - </or>
24.174 + <condition property="do.archive+splashscreen.available">
24.175 + <and>
24.176 + <isset property="splashscreen.available"/>
24.177 + <istrue value="${do.archive}"/>
24.178 + </and>
24.179 </condition>
24.180 - <condition property="manifest.available+main.class-mkdist.available">
24.181 - <or>
24.182 - <istrue value="${manifest.available+main.class}"/>
24.183 - <isset property="do.mkdist"/>
24.184 - </or>
24.185 + <condition property="do.archive+profile.available">
24.186 + <and>
24.187 + <isset property="profile.available"/>
24.188 + <istrue value="${do.archive}"/>
24.189 + </and>
24.190 </condition>
24.191 <condition property="have.tests">
24.192 <or>
24.193 @@ -124,6 +201,7 @@
24.194 </and>
24.195 </condition>
24.196 <property name="run.jvmargs" value=""/>
24.197 + <property name="run.jvmargs.ide" value=""/>
24.198 <property name="javac.compilerargs" value=""/>
24.199 <property name="work.dir" value="${basedir}"/>
24.200 <condition property="no.deps">
24.201 @@ -136,6 +214,7 @@
24.202 <property name="application.args" value=""/>
24.203 <property name="source.encoding" value="${file.encoding}"/>
24.204 <property name="runtime.encoding" value="${source.encoding}"/>
24.205 + <property name="manifest.encoding" value="${source.encoding}"/>
24.206 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
24.207 <and>
24.208 <isset property="javadoc.encoding"/>
24.209 @@ -153,9 +232,56 @@
24.210 </condition>
24.211 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
24.212 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
24.213 - <length length="0" string="${endorsed.classpath}" when="greater"/>
24.214 + <and>
24.215 + <isset property="endorsed.classpath"/>
24.216 + <not>
24.217 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
24.218 + </not>
24.219 + </and>
24.220 </condition>
24.221 - <property name="javac.fork" value="false"/>
24.222 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
24.223 + <isset property="profile.available"/>
24.224 + </condition>
24.225 + <condition else="false" property="jdkBug6558476">
24.226 + <and>
24.227 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
24.228 + <not>
24.229 + <os family="unix"/>
24.230 + </not>
24.231 + </and>
24.232 + </condition>
24.233 + <condition else="false" property="javac.fork">
24.234 + <or>
24.235 + <istrue value="${jdkBug6558476}"/>
24.236 + <istrue value="${javac.external.vm}"/>
24.237 + </or>
24.238 + </condition>
24.239 + <property name="jar.index" value="false"/>
24.240 + <property name="jar.index.metainf" value="${jar.index}"/>
24.241 + <property name="copylibs.rebase" value="true"/>
24.242 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
24.243 + <condition property="junit.available">
24.244 + <or>
24.245 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
24.246 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
24.247 + </or>
24.248 + </condition>
24.249 + <condition property="testng.available">
24.250 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
24.251 + </condition>
24.252 + <condition property="junit+testng.available">
24.253 + <and>
24.254 + <istrue value="${junit.available}"/>
24.255 + <istrue value="${testng.available}"/>
24.256 + </and>
24.257 + </condition>
24.258 + <condition else="testng" property="testng.mode" value="mixed">
24.259 + <istrue value="${junit+testng.available}"/>
24.260 + </condition>
24.261 + <condition else="" property="testng.debug.mode" value="-mixed">
24.262 + <istrue value="${junit+testng.available}"/>
24.263 + </condition>
24.264 + <property name="java.failonerror" value="true"/>
24.265 </target>
24.266 <target name="-post-init">
24.267 <!-- Empty placeholder for easier customization. -->
24.268 @@ -182,11 +308,125 @@
24.269 </sequential>
24.270 </macrodef>
24.271 </target>
24.272 - <target name="-init-macrodef-javac">
24.273 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
24.274 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
24.275 <attribute default="${src.dir}" name="srcdir"/>
24.276 <attribute default="${build.classes.dir}" name="destdir"/>
24.277 <attribute default="${javac.classpath}" name="classpath"/>
24.278 + <attribute default="${javac.modulepath}" name="modulepath"/>
24.279 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
24.280 + <attribute default="${javac.processorpath}" name="processorpath"/>
24.281 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
24.282 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
24.283 + <attribute default="${includes}" name="includes"/>
24.284 + <attribute default="${excludes}" name="excludes"/>
24.285 + <attribute default="${javac.debug}" name="debug"/>
24.286 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
24.287 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
24.288 + <attribute default="${empty.dir}" name="gensrcdir"/>
24.289 + <element name="customize" optional="true"/>
24.290 + <sequential>
24.291 + <condition property="warn.excludes.internal">
24.292 + <and>
24.293 + <isset property="named.module.internal"/>
24.294 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
24.295 + </and>
24.296 + </condition>
24.297 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
24.298 + <property location="${build.dir}/empty" name="empty.dir"/>
24.299 + <mkdir dir="${empty.dir}"/>
24.300 + <mkdir dir="@{apgeneratedsrcdir}"/>
24.301 + <condition property="processormodulepath.set">
24.302 + <resourcecount count="0" when="greater">
24.303 + <path>
24.304 + <pathelement path="@{processormodulepath}"/>
24.305 + </path>
24.306 + </resourcecount>
24.307 + </condition>
24.308 + <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}">
24.309 + <src>
24.310 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
24.311 + <include name="*"/>
24.312 + </dirset>
24.313 + </src>
24.314 + <classpath>
24.315 + <path path="@{classpath}"/>
24.316 + </classpath>
24.317 + <modulepath>
24.318 + <path path="@{modulepath}"/>
24.319 + </modulepath>
24.320 + <upgrademodulepath>
24.321 + <path path="@{upgrademodulepath}"/>
24.322 + </upgrademodulepath>
24.323 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
24.324 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
24.325 + <compilerarg line="${javac.compilerargs}"/>
24.326 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
24.327 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
24.328 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
24.329 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
24.330 + <compilerarg line="${ap.processors.internal}"/>
24.331 + <compilerarg line="${annotation.processing.processor.options}"/>
24.332 + <compilerarg value="-s"/>
24.333 + <compilerarg path="@{apgeneratedsrcdir}"/>
24.334 + <compilerarg line="${ap.proc.none.internal}"/>
24.335 + <customize/>
24.336 + </javac>
24.337 + </sequential>
24.338 + </macrodef>
24.339 + </target>
24.340 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
24.341 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
24.342 + <attribute default="${src.dir}" name="srcdir"/>
24.343 + <attribute default="${build.classes.dir}" name="destdir"/>
24.344 + <attribute default="${javac.classpath}" name="classpath"/>
24.345 + <attribute default="${javac.modulepath}" name="modulepath"/>
24.346 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
24.347 + <attribute default="${javac.processorpath}" name="processorpath"/>
24.348 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
24.349 + <attribute default="${includes}" name="includes"/>
24.350 + <attribute default="${excludes}" name="excludes"/>
24.351 + <attribute default="${javac.debug}" name="debug"/>
24.352 + <attribute default="${empty.dir}" name="sourcepath"/>
24.353 + <attribute default="${empty.dir}" name="gensrcdir"/>
24.354 + <element name="customize" optional="true"/>
24.355 + <sequential>
24.356 + <property location="${build.dir}/empty" name="empty.dir"/>
24.357 + <mkdir dir="${empty.dir}"/>
24.358 + <mkdir dir="@{apgeneratedsrcdir}"/>
24.359 + <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}">
24.360 + <src>
24.361 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
24.362 + <include name="*"/>
24.363 + </dirset>
24.364 + </src>
24.365 + <classpath>
24.366 + <path path="@{classpath}"/>
24.367 + </classpath>
24.368 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
24.369 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
24.370 + <compilerarg line="${javac.compilerargs}"/>
24.371 + <compilerarg value="-processorpath"/>
24.372 + <compilerarg path="@{processorpath}:${empty.dir}"/>
24.373 + <compilerarg line="${ap.processors.internal}"/>
24.374 + <compilerarg line="${annotation.processing.processor.options}"/>
24.375 + <compilerarg value="-s"/>
24.376 + <compilerarg path="@{apgeneratedsrcdir}"/>
24.377 + <compilerarg line="${ap.proc.none.internal}"/>
24.378 + <customize/>
24.379 + </javac>
24.380 + </sequential>
24.381 + </macrodef>
24.382 + </target>
24.383 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
24.384 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
24.385 + <attribute default="${src.dir}" name="srcdir"/>
24.386 + <attribute default="${build.classes.dir}" name="destdir"/>
24.387 + <attribute default="${javac.classpath}" name="classpath"/>
24.388 + <attribute default="${javac.modulepath}" name="modulepath"/>
24.389 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
24.390 + <attribute default="${javac.processorpath}" name="processorpath"/>
24.391 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
24.392 <attribute default="${includes}" name="includes"/>
24.393 <attribute default="${excludes}" name="excludes"/>
24.394 <attribute default="${javac.debug}" name="debug"/>
24.395 @@ -206,11 +446,14 @@
24.396 <path path="@{classpath}"/>
24.397 </classpath>
24.398 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
24.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
24.400 <compilerarg line="${javac.compilerargs}"/>
24.401 <customize/>
24.402 </javac>
24.403 </sequential>
24.404 </macrodef>
24.405 + </target>
24.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
24.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
24.408 <attribute default="${src.dir}" name="srcdir"/>
24.409 <attribute default="${build.classes.dir}" name="destdir"/>
24.410 @@ -227,52 +470,383 @@
24.411 <attribute default="${build.classes.dir}" name="destdir"/>
24.412 <sequential>
24.413 <fail unless="javac.includes">Must set javac.includes</fail>
24.414 - <pathconvert pathsep="," property="javac.includes.binary">
24.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
24.416 <path>
24.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
24.418 </path>
24.419 <globmapper from="*.java" to="*.class"/>
24.420 </pathconvert>
24.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
24.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
24.423 <delete>
24.424 - <files includes="${javac.includes.binary}"/>
24.425 + <files includesfile="${javac.includesfile.binary}"/>
24.426 + </delete>
24.427 + <delete>
24.428 + <fileset file="${javac.includesfile.binary}"/>
24.429 </delete>
24.430 </sequential>
24.431 </macrodef>
24.432 </target>
24.433 - <target name="-init-macrodef-junit">
24.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
24.435 + <condition else="false" property="nb.junit.batch" value="true">
24.436 + <and>
24.437 + <istrue value="${junit.available}"/>
24.438 + <not>
24.439 + <isset property="test.method"/>
24.440 + </not>
24.441 + </and>
24.442 + </condition>
24.443 + <condition else="false" property="nb.junit.single" value="true">
24.444 + <and>
24.445 + <istrue value="${junit.available}"/>
24.446 + <isset property="test.method"/>
24.447 + </and>
24.448 + </condition>
24.449 + </target>
24.450 + <target name="-init-test-properties">
24.451 + <property name="test.binaryincludes" value="<nothing>"/>
24.452 + <property name="test.binarytestincludes" value=""/>
24.453 + <property name="test.binaryexcludes" value=""/>
24.454 + </target>
24.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
24.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
24.457 + <attribute default="${includes}" name="includes"/>
24.458 + <attribute default="${excludes}" name="excludes"/>
24.459 + <element name="customizePrototype" optional="true"/>
24.460 + <sequential>
24.461 + <property name="junit.forkmode" value="perTest"/>
24.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
24.463 + <syspropertyset>
24.464 + <propertyref prefix="test-sys-prop."/>
24.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
24.466 + </syspropertyset>
24.467 + <classpath>
24.468 + <path path="${run.test.classpath}"/>
24.469 + </classpath>
24.470 + <modulepath>
24.471 + <path path="${run.test.modulepath}"/>
24.472 + </modulepath>
24.473 + <formatter type="brief" usefile="false"/>
24.474 + <formatter type="xml"/>
24.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.476 + <jvmarg value="-ea"/>
24.477 + <jvmarg line="${run.test.jvmargs}"/>
24.478 + <customizePrototype/>
24.479 + </junit>
24.480 + </sequential>
24.481 + </macrodef>
24.482 + </target>
24.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
24.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
24.485 + <attribute default="${includes}" name="includes"/>
24.486 + <attribute default="${excludes}" name="excludes"/>
24.487 + <element name="customizePrototype" optional="true"/>
24.488 + <sequential>
24.489 + <property name="junit.forkmode" value="perTest"/>
24.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
24.491 + <syspropertyset>
24.492 + <propertyref prefix="test-sys-prop."/>
24.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
24.494 + </syspropertyset>
24.495 + <classpath>
24.496 + <path path="${run.test.classpath}"/>
24.497 + </classpath>
24.498 + <formatter type="brief" usefile="false"/>
24.499 + <formatter type="xml"/>
24.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.501 + <jvmarg value="-ea"/>
24.502 + <customizePrototype/>
24.503 + </junit>
24.504 + </sequential>
24.505 + </macrodef>
24.506 + </target>
24.507 + <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}">
24.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
24.509 <attribute default="${includes}" name="includes"/>
24.510 <attribute default="${excludes}" name="excludes"/>
24.511 <attribute default="**" name="testincludes"/>
24.512 + <attribute default="" name="testmethods"/>
24.513 + <element name="customize" optional="true"/>
24.514 <sequential>
24.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
24.516 - <batchtest todir="${build.test.results.dir}">
24.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
24.518 - <filename name="@{testincludes}"/>
24.519 - </fileset>
24.520 - </batchtest>
24.521 + <j2seproject3:junit-prototype>
24.522 + <customizePrototype>
24.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
24.524 + <customize/>
24.525 + </customizePrototype>
24.526 + </j2seproject3:junit-prototype>
24.527 + </sequential>
24.528 + </macrodef>
24.529 + </target>
24.530 + <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}">
24.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
24.532 + <attribute default="${includes}" name="includes"/>
24.533 + <attribute default="${excludes}" name="excludes"/>
24.534 + <attribute default="**" name="testincludes"/>
24.535 + <attribute default="" name="testmethods"/>
24.536 + <element name="customize" optional="true"/>
24.537 + <sequential>
24.538 + <j2seproject3:junit-prototype>
24.539 + <customizePrototype>
24.540 + <batchtest todir="${build.test.results.dir}">
24.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
24.542 + <filename name="@{testincludes}"/>
24.543 + </fileset>
24.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
24.545 + <filename name="${test.binarytestincludes}"/>
24.546 + </fileset>
24.547 + </batchtest>
24.548 + <customize/>
24.549 + </customizePrototype>
24.550 + </j2seproject3:junit-prototype>
24.551 + </sequential>
24.552 + </macrodef>
24.553 + </target>
24.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
24.555 + <target if="${testng.available}" name="-init-macrodef-testng">
24.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
24.557 + <attribute default="${includes}" name="includes"/>
24.558 + <attribute default="${excludes}" name="excludes"/>
24.559 + <attribute default="**" name="testincludes"/>
24.560 + <attribute default="" name="testmethods"/>
24.561 + <element name="customize" optional="true"/>
24.562 + <sequential>
24.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
24.564 + <isset property="test.method"/>
24.565 + </condition>
24.566 + <union id="test.set">
24.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
24.568 + <filename name="@{testincludes}"/>
24.569 + </fileset>
24.570 + </union>
24.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
24.572 + <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="extensibleicon" testname="TestNG tests" workingDir="${work.dir}">
24.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
24.574 + <propertyset>
24.575 + <propertyref prefix="test-sys-prop."/>
24.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
24.577 + </propertyset>
24.578 <classpath>
24.579 <path path="${run.test.classpath}"/>
24.580 </classpath>
24.581 - <syspropertyset>
24.582 - <propertyref prefix="test-sys-prop."/>
24.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
24.584 - </syspropertyset>
24.585 - <formatter type="brief" usefile="false"/>
24.586 - <formatter type="xml"/>
24.587 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.588 - <jvmarg line="${run.jvmargs}"/>
24.589 - </junit>
24.590 + <customize/>
24.591 + </testng>
24.592 </sequential>
24.593 </macrodef>
24.594 </target>
24.595 + <target name="-init-macrodef-test-impl">
24.596 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
24.597 + <attribute default="${includes}" name="includes"/>
24.598 + <attribute default="${excludes}" name="excludes"/>
24.599 + <attribute default="**" name="testincludes"/>
24.600 + <attribute default="" name="testmethods"/>
24.601 + <element implicit="true" name="customize" optional="true"/>
24.602 + <sequential>
24.603 + <echo>No tests executed.</echo>
24.604 + </sequential>
24.605 + </macrodef>
24.606 + </target>
24.607 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
24.608 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
24.609 + <attribute default="${includes}" name="includes"/>
24.610 + <attribute default="${excludes}" name="excludes"/>
24.611 + <attribute default="**" name="testincludes"/>
24.612 + <attribute default="" name="testmethods"/>
24.613 + <element implicit="true" name="customize" optional="true"/>
24.614 + <sequential>
24.615 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
24.616 + <customize/>
24.617 + </j2seproject3:junit>
24.618 + </sequential>
24.619 + </macrodef>
24.620 + </target>
24.621 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
24.622 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
24.623 + <attribute default="${includes}" name="includes"/>
24.624 + <attribute default="${excludes}" name="excludes"/>
24.625 + <attribute default="**" name="testincludes"/>
24.626 + <attribute default="" name="testmethods"/>
24.627 + <element implicit="true" name="customize" optional="true"/>
24.628 + <sequential>
24.629 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
24.630 + <customize/>
24.631 + </j2seproject3:testng>
24.632 + </sequential>
24.633 + </macrodef>
24.634 + </target>
24.635 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
24.636 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
24.637 + <attribute default="${includes}" name="includes"/>
24.638 + <attribute default="${excludes}" name="excludes"/>
24.639 + <attribute default="**" name="testincludes"/>
24.640 + <attribute default="" name="testmethods"/>
24.641 + <sequential>
24.642 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
24.643 + <customize>
24.644 + <jvmarg line="${run.jvmargs}"/>
24.645 + <jvmarg line="${run.jvmargs.ide}"/>
24.646 + </customize>
24.647 + </j2seproject3:test-impl>
24.648 + </sequential>
24.649 + </macrodef>
24.650 + </target>
24.651 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
24.652 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
24.653 + <attribute default="${includes}" name="includes"/>
24.654 + <attribute default="${excludes}" name="excludes"/>
24.655 + <attribute default="**" name="testincludes"/>
24.656 + <attribute default="" name="testmethods"/>
24.657 + <element name="customizeDebuggee" optional="true"/>
24.658 + <sequential>
24.659 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
24.660 + <customize>
24.661 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
24.662 + <customizeDebuggee/>
24.663 + </customize>
24.664 + </j2seproject3:junit>
24.665 + </sequential>
24.666 + </macrodef>
24.667 + </target>
24.668 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
24.669 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
24.670 + <attribute default="${main.class}" name="testClass"/>
24.671 + <attribute default="" name="testMethod"/>
24.672 + <element name="customize2" optional="true"/>
24.673 + <sequential>
24.674 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
24.675 + <isset property="test.method"/>
24.676 + </condition>
24.677 + <condition else="-suitename extensibleicon -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
24.678 + <matches pattern=".*\.xml" string="@{testClass}"/>
24.679 + </condition>
24.680 + <delete dir="${build.test.results.dir}" quiet="true"/>
24.681 + <mkdir dir="${build.test.results.dir}"/>
24.682 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
24.683 + <customizeDebuggee>
24.684 + <customize2/>
24.685 + <jvmarg value="-ea"/>
24.686 + <arg line="${testng.debug.mode}"/>
24.687 + <arg line="-d ${build.test.results.dir}"/>
24.688 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
24.689 + <arg line="${testng.cmd.args}"/>
24.690 + </customizeDebuggee>
24.691 + </j2seproject3:debug>
24.692 + </sequential>
24.693 + </macrodef>
24.694 + </target>
24.695 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
24.696 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
24.697 + <attribute default="${main.class}" name="testClass"/>
24.698 + <attribute default="" name="testMethod"/>
24.699 + <element implicit="true" name="customize2" optional="true"/>
24.700 + <sequential>
24.701 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
24.702 + <customize2/>
24.703 + </j2seproject3:testng-debug>
24.704 + </sequential>
24.705 + </macrodef>
24.706 + </target>
24.707 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
24.708 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
24.709 + <attribute default="${includes}" name="includes"/>
24.710 + <attribute default="${excludes}" name="excludes"/>
24.711 + <attribute default="**" name="testincludes"/>
24.712 + <attribute default="" name="testmethods"/>
24.713 + <attribute default="${main.class}" name="testClass"/>
24.714 + <attribute default="" name="testMethod"/>
24.715 + <sequential>
24.716 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
24.717 + <customizeDebuggee>
24.718 + <jvmarg line="${run.jvmargs}"/>
24.719 + <jvmarg line="${run.jvmargs.ide}"/>
24.720 + </customizeDebuggee>
24.721 + </j2seproject3:test-debug-impl>
24.722 + </sequential>
24.723 + </macrodef>
24.724 + </target>
24.725 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
24.726 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
24.727 + <attribute default="${includes}" name="includes"/>
24.728 + <attribute default="${excludes}" name="excludes"/>
24.729 + <attribute default="**" name="testincludes"/>
24.730 + <attribute default="" name="testmethods"/>
24.731 + <attribute default="${main.class}" name="testClass"/>
24.732 + <attribute default="" name="testMethod"/>
24.733 + <sequential>
24.734 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
24.735 + <customize2>
24.736 + <syspropertyset>
24.737 + <propertyref prefix="test-sys-prop."/>
24.738 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
24.739 + </syspropertyset>
24.740 + </customize2>
24.741 + </j2seproject3:testng-debug-impl>
24.742 + </sequential>
24.743 + </macrodef>
24.744 + </target>
24.745 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
24.746 + <!--
24.747 + pre NB7.2 profiling section; consider it deprecated
24.748 + -->
24.749 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
24.750 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
24.751 + <!-- Empty placeholder for easier customization. -->
24.752 + <!-- You can override this target in the ../build.xml file. -->
24.753 + </target>
24.754 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
24.755 + <!-- Empty placeholder for easier customization. -->
24.756 + <!-- You can override this target in the ../build.xml file. -->
24.757 + </target>
24.758 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
24.759 + <macrodef name="resolve">
24.760 + <attribute name="name"/>
24.761 + <attribute name="value"/>
24.762 + <sequential>
24.763 + <property name="@{name}" value="${env.@{value}}"/>
24.764 + </sequential>
24.765 + </macrodef>
24.766 + <macrodef name="profile">
24.767 + <attribute default="${main.class}" name="classname"/>
24.768 + <element name="customize" optional="true"/>
24.769 + <sequential>
24.770 + <property environment="env"/>
24.771 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
24.772 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
24.773 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.774 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
24.775 + <jvmarg line="${profiler.info.jvmargs}"/>
24.776 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
24.777 + <arg line="${application.args}"/>
24.778 + <classpath>
24.779 + <path path="${run.classpath}"/>
24.780 + </classpath>
24.781 + <syspropertyset>
24.782 + <propertyref prefix="run-sys-prop."/>
24.783 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
24.784 + </syspropertyset>
24.785 + <customize/>
24.786 + </java>
24.787 + </sequential>
24.788 + </macrodef>
24.789 + </target>
24.790 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
24.791 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
24.792 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
24.793 + </target>
24.794 + <!--
24.795 + end of pre NB7.2 profiling section
24.796 + -->
24.797 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
24.798 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
24.799 <attribute default="${main.class}" name="name"/>
24.800 + <attribute default="${debug.modulepath}" name="modulepath"/>
24.801 <attribute default="${debug.classpath}" name="classpath"/>
24.802 <attribute default="" name="stopclassname"/>
24.803 <sequential>
24.804 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
24.805 + <modulepath>
24.806 + <path path="@{modulepath}"/>
24.807 + </modulepath>
24.808 <classpath>
24.809 <path path="@{classpath}"/>
24.810 </classpath>
24.811 @@ -291,18 +865,6 @@
24.812 </macrodef>
24.813 </target>
24.814 <target name="-init-debug-args">
24.815 - <property name="version-output" value="java version "${ant.java.version}"/>
24.816 - <condition property="have-jdk-older-than-1.4">
24.817 - <or>
24.818 - <contains string="${version-output}" substring="java version "1.0"/>
24.819 - <contains string="${version-output}" substring="java version "1.1"/>
24.820 - <contains string="${version-output}" substring="java version "1.2"/>
24.821 - <contains string="${version-output}" substring="java version "1.3"/>
24.822 - </or>
24.823 - </condition>
24.824 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
24.825 - <istrue value="${have-jdk-older-than-1.4}"/>
24.826 - </condition>
24.827 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
24.828 <os family="windows"/>
24.829 </condition>
24.830 @@ -312,17 +874,103 @@
24.831 </target>
24.832 <target depends="-init-debug-args" name="-init-macrodef-debug">
24.833 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
24.834 + <attribute default="${module.name}" name="modulename"/>
24.835 <attribute default="${main.class}" name="classname"/>
24.836 + <attribute default="${debug.modulepath}" name="modulepath"/>
24.837 <attribute default="${debug.classpath}" name="classpath"/>
24.838 + <element name="customizeDebuggee" optional="true"/>
24.839 + <sequential>
24.840 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
24.841 + <customize>
24.842 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
24.843 + <customizeDebuggee/>
24.844 + </customize>
24.845 + </j2seproject1:java>
24.846 + </sequential>
24.847 + </macrodef>
24.848 + </target>
24.849 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
24.850 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
24.851 + <attribute default="${module.name}" name="modulename"/>
24.852 + <attribute default="${main.class}" name="classname"/>
24.853 + <attribute default="${run.modulepath}" name="modulepath"/>
24.854 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
24.855 + <attribute default="${run.classpath}" name="classpath"/>
24.856 + <attribute default="jvm" name="jvm"/>
24.857 <element name="customize" optional="true"/>
24.858 <sequential>
24.859 - <java classname="@{classname}" dir="${work.dir}" fork="true">
24.860 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.861 - <jvmarg line="${debug-args-line}"/>
24.862 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
24.863 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
24.864 + <classpath>
24.865 + <path path="@{classpath}"/>
24.866 + </classpath>
24.867 + <modulepath>
24.868 + <pathelement path="@{modulepath}"/>
24.869 + <pathelement location="${module.build.classes.dir}"/>
24.870 + </modulepath>
24.871 + <upgrademodulepath>
24.872 + <path path="@{upgrademodulepath}"/>
24.873 + </upgrademodulepath>
24.874 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
24.875 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
24.876 <jvmarg line="${run.jvmargs}"/>
24.877 + <jvmarg line="${run.jvmargs.ide}"/>
24.878 + <syspropertyset>
24.879 + <propertyref prefix="run-sys-prop."/>
24.880 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
24.881 + </syspropertyset>
24.882 + <customize/>
24.883 + </java>
24.884 + </sequential>
24.885 + </macrodef>
24.886 + </target>
24.887 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
24.888 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
24.889 + <attribute default="" name="modulename"/>
24.890 + <attribute default="${main.class}" name="classname"/>
24.891 + <attribute default="${run.modulepath}" name="modulepath"/>
24.892 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
24.893 + <attribute default="${run.classpath}" name="classpath"/>
24.894 + <attribute default="jvm" name="jvm"/>
24.895 + <element name="customize" optional="true"/>
24.896 + <sequential>
24.897 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
24.898 + <classpath>
24.899 + <path path="@{classpath}"/>
24.900 + </classpath>
24.901 + <modulepath>
24.902 + <path path="@{modulepath}"/>
24.903 + </modulepath>
24.904 + <upgrademodulepath>
24.905 + <path path="@{upgrademodulepath}"/>
24.906 + </upgrademodulepath>
24.907 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
24.908 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
24.909 + <jvmarg line="${run.jvmargs}"/>
24.910 + <jvmarg line="${run.jvmargs.ide}"/>
24.911 + <syspropertyset>
24.912 + <propertyref prefix="run-sys-prop."/>
24.913 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
24.914 + </syspropertyset>
24.915 + <customize/>
24.916 + </java>
24.917 + </sequential>
24.918 + </macrodef>
24.919 + </target>
24.920 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
24.921 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
24.922 + <attribute default="" name="modulename"/>
24.923 + <attribute default="${main.class}" name="classname"/>
24.924 + <attribute default="" name="modulepath"/>
24.925 + <attribute default="${run.classpath}" name="classpath"/>
24.926 + <attribute default="jvm" name="jvm"/>
24.927 + <element name="customize" optional="true"/>
24.928 + <sequential>
24.929 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
24.930 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.931 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
24.932 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
24.933 + <jvmarg line="${run.jvmargs}"/>
24.934 + <jvmarg line="${run.jvmargs.ide}"/>
24.935 <classpath>
24.936 <path path="@{classpath}"/>
24.937 </classpath>
24.938 @@ -335,37 +983,70 @@
24.939 </sequential>
24.940 </macrodef>
24.941 </target>
24.942 - <target name="-init-macrodef-java">
24.943 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
24.944 - <attribute default="${main.class}" name="classname"/>
24.945 - <attribute default="${run.classpath}" name="classpath"/>
24.946 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
24.947 + <target name="-init-macrodef-copylibs">
24.948 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
24.949 + <attribute default="${manifest.file}" name="manifest"/>
24.950 <element name="customize" optional="true"/>
24.951 <sequential>
24.952 - <java classname="@{classname}" dir="${work.dir}" fork="true">
24.953 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
24.954 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
24.955 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
24.956 - <jvmarg line="${run.jvmargs}"/>
24.957 - <classpath>
24.958 - <path path="@{classpath}"/>
24.959 - </classpath>
24.960 - <syspropertyset>
24.961 - <propertyref prefix="run-sys-prop."/>
24.962 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
24.963 - </syspropertyset>
24.964 - <customize/>
24.965 - </java>
24.966 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
24.967 + <pathconvert property="run.classpath.without.build.classes.dir">
24.968 + <path path="${run.classpath}"/>
24.969 + <map from="${build.classes.dir.resolved}" to=""/>
24.970 + </pathconvert>
24.971 + <pathconvert pathsep=" " property="jar.classpath">
24.972 + <path path="${run.classpath.without.build.classes.dir}"/>
24.973 + <chainedmapper>
24.974 + <flattenmapper/>
24.975 + <filtermapper>
24.976 + <replacestring from=" " to="%20"/>
24.977 + </filtermapper>
24.978 + <globmapper from="*" to="lib/*"/>
24.979 + </chainedmapper>
24.980 + </pathconvert>
24.981 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
24.982 + <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}">
24.983 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
24.984 + <manifest>
24.985 + <attribute name="Class-Path" value="${jar.classpath}"/>
24.986 + <customize/>
24.987 + </manifest>
24.988 + </copylibs>
24.989 </sequential>
24.990 </macrodef>
24.991 </target>
24.992 <target name="-init-presetdef-jar">
24.993 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
24.994 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
24.995 - <j2seproject1:fileset dir="${build.classes.dir}"/>
24.996 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
24.997 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
24.998 </jar>
24.999 </presetdef>
24.1000 </target>
24.1001 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
24.1002 + <target name="-init-ap-cmdline-properties">
24.1003 + <property name="annotation.processing.enabled" value="true"/>
24.1004 + <property name="annotation.processing.processors.list" value=""/>
24.1005 + <property name="annotation.processing.processor.options" value=""/>
24.1006 + <property name="annotation.processing.run.all.processors" value="true"/>
24.1007 + <property name="javac.processorpath" value="${javac.classpath}"/>
24.1008 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
24.1009 + <condition property="ap.supported.internal" value="true">
24.1010 + <not>
24.1011 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
24.1012 + </not>
24.1013 + </condition>
24.1014 + </target>
24.1015 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
24.1016 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
24.1017 + <isfalse value="${annotation.processing.run.all.processors}"/>
24.1018 + </condition>
24.1019 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
24.1020 + <isfalse value="${annotation.processing.enabled}"/>
24.1021 + </condition>
24.1022 + </target>
24.1023 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
24.1024 + <property name="ap.cmd.line.internal" value=""/>
24.1025 + </target>
24.1026 + <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"/>
24.1027 <!--
24.1028 ===================
24.1029 COMPILATION SECTION
24.1030 @@ -392,7 +1073,9 @@
24.1031 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
24.1032 </target>
24.1033 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
24.1034 - <antcall target="clean"/>
24.1035 + <antcall target="clean">
24.1036 + <param name="no.dependencies" value="true"/>
24.1037 + </antcall>
24.1038 </target>
24.1039 <target depends="init,deps-jar" name="-pre-pre-compile">
24.1040 <mkdir dir="${build.classes.dir}"/>
24.1041 @@ -409,12 +1092,18 @@
24.1042 </pathconvert>
24.1043 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
24.1044 </target>
24.1045 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
24.1046 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
24.1047 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
24.1048 <copy todir="${build.classes.dir}">
24.1049 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
24.1050 </copy>
24.1051 </target>
24.1052 + <target if="has.persistence.xml" name="-copy-persistence-xml">
24.1053 + <mkdir dir="${build.classes.dir}/META-INF"/>
24.1054 + <copy todir="${build.classes.dir}/META-INF">
24.1055 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
24.1056 + </copy>
24.1057 + </target>
24.1058 <target name="-post-compile">
24.1059 <!-- Empty placeholder for easier customization. -->
24.1060 <!-- You can override this target in the ../build.xml file. -->
24.1061 @@ -427,7 +1116,7 @@
24.1062 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
24.1063 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
24.1064 <j2seproject3:force-recompile/>
24.1065 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
24.1066 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
24.1067 </target>
24.1068 <target name="-post-compile-single">
24.1069 <!-- Empty placeholder for easier customization. -->
24.1070 @@ -447,99 +1136,191 @@
24.1071 <!-- Empty placeholder for easier customization. -->
24.1072 <!-- You can override this target in the ../build.xml file. -->
24.1073 </target>
24.1074 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
24.1075 - <j2seproject1:jar/>
24.1076 + <target depends="init,compile" name="-check-module-main-class">
24.1077 + <pathconvert property="main.class.file">
24.1078 + <string value="${main.class}"/>
24.1079 + <unpackagemapper from="*" to="*.class"/>
24.1080 + </pathconvert>
24.1081 + <condition property="do.module.main.class">
24.1082 + <and>
24.1083 + <isset property="main.class.available"/>
24.1084 + <available file="${build.classes.dir}/module-info.class"/>
24.1085 + <available file="${build.classes.dir}/${main.class.file}"/>
24.1086 + <isset property="libs.CopyLibs.classpath"/>
24.1087 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
24.1088 + </and>
24.1089 + </condition>
24.1090 </target>
24.1091 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
24.1092 - <j2seproject1:jar manifest="${manifest.file}"/>
24.1093 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
24.1094 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
24.1095 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
24.1096 </target>
24.1097 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
24.1098 - <j2seproject1:jar manifest="${manifest.file}">
24.1099 - <j2seproject1:manifest>
24.1100 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
24.1101 - </j2seproject1:manifest>
24.1102 - </j2seproject1:jar>
24.1103 - <echo>To run this application from the command line without Ant, try:</echo>
24.1104 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
24.1105 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
24.1106 + <touch file="${tmp.manifest.file}" verbose="false"/>
24.1107 + </target>
24.1108 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
24.1109 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
24.1110 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
24.1111 + </target>
24.1112 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
24.1113 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
24.1114 + <attribute name="Main-Class" value="${main.class}"/>
24.1115 + </manifest>
24.1116 + </target>
24.1117 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
24.1118 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
24.1119 + <attribute name="Profile" value="${javac.profile}"/>
24.1120 + </manifest>
24.1121 + </target>
24.1122 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
24.1123 + <basename file="${application.splash}" property="splashscreen.basename"/>
24.1124 + <mkdir dir="${build.classes.dir}/META-INF"/>
24.1125 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
24.1126 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
24.1127 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
24.1128 + </manifest>
24.1129 + </target>
24.1130 + <target depends="init,compile" name="-check-do-mkdist">
24.1131 + <condition property="do.mkdist">
24.1132 + <and>
24.1133 + <isset property="do.archive"/>
24.1134 + <isset property="libs.CopyLibs.classpath"/>
24.1135 + <not>
24.1136 + <istrue value="${mkdist.disabled}"/>
24.1137 + </not>
24.1138 + <not>
24.1139 + <available file="${build.classes.dir}/module-info.class"/>
24.1140 + </not>
24.1141 + </and>
24.1142 + </condition>
24.1143 + </target>
24.1144 + <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">
24.1145 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
24.1146 + <echo level="info">To run this application from the command line without Ant, try:</echo>
24.1147 + <property location="${dist.jar}" name="dist.jar.resolved"/>
24.1148 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
24.1149 + </target>
24.1150 + <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">
24.1151 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
24.1152 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
24.1153 <property location="${dist.jar}" name="dist.jar.resolved"/>
24.1154 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
24.1155 + <isset property="named.module.internal"/>
24.1156 + </condition>
24.1157 <pathconvert property="run.classpath.with.dist.jar">
24.1158 <path path="${run.classpath}"/>
24.1159 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
24.1160 + </pathconvert>
24.1161 + <pathconvert property="run.modulepath.with.dist.jar">
24.1162 + <path location="${dist.jar.resolved}"/>
24.1163 + <path path="${run.modulepath}"/>
24.1164 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
24.1165 </pathconvert>
24.1166 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
24.1167 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
24.1168 + <isset property="named.module.internal"/>
24.1169 + </condition>
24.1170 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
24.1171 + <and>
24.1172 + <isset property="modules.supported.internal"/>
24.1173 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
24.1174 + </and>
24.1175 + </condition>
24.1176 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
24.1177 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
24.1178 + </condition>
24.1179 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
24.1180 + <isset property="do.module.main.class"/>
24.1181 + </condition>
24.1182 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
24.1183 + <isset property="named.module.internal"/>
24.1184 + </condition>
24.1185 + <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}">
24.1186 + <isset property="main.class.available"/>
24.1187 + </condition>
24.1188 + <condition else="debug" property="jar.usage.level" value="info">
24.1189 + <isset property="main.class.available"/>
24.1190 + </condition>
24.1191 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
24.1192 </target>
24.1193 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
24.1194 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
24.1195 - <pathconvert property="run.classpath.without.build.classes.dir">
24.1196 - <path path="${run.classpath}"/>
24.1197 - <map from="${build.classes.dir.resolved}" to=""/>
24.1198 - </pathconvert>
24.1199 - <pathconvert pathsep=" " property="jar.classpath">
24.1200 - <path path="${run.classpath.without.build.classes.dir}"/>
24.1201 - <chainedmapper>
24.1202 - <flattenmapper/>
24.1203 - <globmapper from="*" to="lib/*"/>
24.1204 - </chainedmapper>
24.1205 - </pathconvert>
24.1206 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
24.1207 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
24.1208 - <fileset dir="${build.classes.dir}"/>
24.1209 - <manifest>
24.1210 - <attribute name="Main-Class" value="${main.class}"/>
24.1211 - <attribute name="Class-Path" value="${jar.classpath}"/>
24.1212 - </manifest>
24.1213 - </copylibs>
24.1214 - <echo>To run this application from the command line without Ant, try:</echo>
24.1215 - <property location="${dist.jar}" name="dist.jar.resolved"/>
24.1216 - <echo>java -jar "${dist.jar.resolved}"</echo>
24.1217 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
24.1218 + <delete>
24.1219 + <fileset file="${tmp.manifest.file}"/>
24.1220 + </delete>
24.1221 </target>
24.1222 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
24.1223 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
24.1224 - <pathconvert property="run.classpath.without.build.classes.dir">
24.1225 - <path path="${run.classpath}"/>
24.1226 - <map from="${build.classes.dir.resolved}" to=""/>
24.1227 - </pathconvert>
24.1228 - <pathconvert pathsep=" " property="jar.classpath">
24.1229 - <path path="${run.classpath.without.build.classes.dir}"/>
24.1230 - <chainedmapper>
24.1231 - <flattenmapper/>
24.1232 - <globmapper from="*" to="lib/*"/>
24.1233 - </chainedmapper>
24.1234 - </pathconvert>
24.1235 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
24.1236 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
24.1237 - <fileset dir="${build.classes.dir}"/>
24.1238 - <manifest>
24.1239 - <attribute name="Class-Path" value="${jar.classpath}"/>
24.1240 - </manifest>
24.1241 - </copylibs>
24.1242 - </target>
24.1243 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
24.1244 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
24.1245 - <pathconvert property="run.classpath.without.build.classes.dir">
24.1246 - <path path="${run.classpath}"/>
24.1247 - <map from="${build.classes.dir.resolved}" to=""/>
24.1248 - </pathconvert>
24.1249 - <pathconvert pathsep=" " property="jar.classpath">
24.1250 - <path path="${run.classpath.without.build.classes.dir}"/>
24.1251 - <chainedmapper>
24.1252 - <flattenmapper/>
24.1253 - <globmapper from="*" to="lib/*"/>
24.1254 - </chainedmapper>
24.1255 - </pathconvert>
24.1256 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
24.1257 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
24.1258 - <fileset dir="${build.classes.dir}"/>
24.1259 - <manifest>
24.1260 - <attribute name="Class-Path" value="${jar.classpath}"/>
24.1261 - </manifest>
24.1262 - </copylibs>
24.1263 - </target>
24.1264 + <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"/>
24.1265 + <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"/>
24.1266 <target name="-post-jar">
24.1267 <!-- Empty placeholder for easier customization. -->
24.1268 <!-- You can override this target in the ../build.xml file. -->
24.1269 </target>
24.1270 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
24.1271 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
24.1272 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
24.1273 + <!--
24.1274 + =================
24.1275 + DEPLOY SECTION
24.1276 + =================
24.1277 + -->
24.1278 + <target name="-pre-deploy">
24.1279 + <!-- Empty placeholder for easier customization. -->
24.1280 + <!-- You can override this target in the ../build.xml file. -->
24.1281 + </target>
24.1282 + <target depends="init" name="-check-jlink">
24.1283 + <condition property="do.jlink.internal">
24.1284 + <and>
24.1285 + <istrue value="${do.jlink}"/>
24.1286 + <isset property="do.archive"/>
24.1287 + <isset property="named.module.internal"/>
24.1288 + </and>
24.1289 + </condition>
24.1290 + </target>
24.1291 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
24.1292 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
24.1293 + <property name="jlink.launcher.name" value="${application.title}"/>
24.1294 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
24.1295 + <and>
24.1296 + <isset property="jlink.additionalmodules"/>
24.1297 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
24.1298 + </and>
24.1299 + </condition>
24.1300 + <condition property="jlink.do.strip.internal">
24.1301 + <and>
24.1302 + <isset property="jlink.strip"/>
24.1303 + <istrue value="${jlink.strip}"/>
24.1304 + </and>
24.1305 + </condition>
24.1306 + <condition property="jlink.do.additionalparam.internal">
24.1307 + <and>
24.1308 + <isset property="jlink.additionalparam"/>
24.1309 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
24.1310 + </and>
24.1311 + </condition>
24.1312 + <condition property="jlink.do.launcher.internal">
24.1313 + <and>
24.1314 + <istrue value="${jlink.launcher}"/>
24.1315 + <isset property="main.class.available"/>
24.1316 + </and>
24.1317 + </condition>
24.1318 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
24.1319 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
24.1320 + <exec executable="${platform.jlink}">
24.1321 + <arg value="--module-path"/>
24.1322 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
24.1323 + <arg value="--add-modules"/>
24.1324 + <arg value="${jlink.add.modules}"/>
24.1325 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
24.1326 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
24.1327 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
24.1328 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
24.1329 + <arg value="--output"/>
24.1330 + <arg value="${dist.jlink.output}"/>
24.1331 + </exec>
24.1332 + </target>
24.1333 + <target name="-post-deploy">
24.1334 + <!-- Empty placeholder for easier customization. -->
24.1335 + <!-- You can override this target in the ../build.xml file. -->
24.1336 + </target>
24.1337 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
24.1338 <!--
24.1339 =================
24.1340 EXECUTION SECTION
24.1341 @@ -576,9 +1357,9 @@
24.1342 </target>
24.1343 <target depends="init,compile" name="-debug-start-debuggee">
24.1344 <j2seproject3:debug>
24.1345 - <customize>
24.1346 + <customizeDebuggee>
24.1347 <arg line="${application.args}"/>
24.1348 - </customize>
24.1349 + </customizeDebuggee>
24.1350 </j2seproject3:debug>
24.1351 </target>
24.1352 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
24.1353 @@ -605,23 +1386,146 @@
24.1354 </target>
24.1355 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
24.1356 <!--
24.1357 + =================
24.1358 + PROFILING SECTION
24.1359 + =================
24.1360 + -->
24.1361 + <!--
24.1362 + pre NB7.2 profiler integration
24.1363 + -->
24.1364 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
24.1365 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
24.1366 + <nbprofiledirect>
24.1367 + <classpath>
24.1368 + <path path="${run.classpath}"/>
24.1369 + </classpath>
24.1370 + </nbprofiledirect>
24.1371 + <profile/>
24.1372 + </target>
24.1373 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
24.1374 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
24.1375 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
24.1376 + <nbprofiledirect>
24.1377 + <classpath>
24.1378 + <path path="${run.classpath}"/>
24.1379 + </classpath>
24.1380 + </nbprofiledirect>
24.1381 + <profile classname="${profile.class}"/>
24.1382 + </target>
24.1383 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
24.1384 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
24.1385 + <nbprofiledirect>
24.1386 + <classpath>
24.1387 + <path path="${run.classpath}"/>
24.1388 + </classpath>
24.1389 + </nbprofiledirect>
24.1390 + <profile classname="sun.applet.AppletViewer">
24.1391 + <customize>
24.1392 + <arg value="${applet.url}"/>
24.1393 + </customize>
24.1394 + </profile>
24.1395 + </target>
24.1396 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
24.1397 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
24.1398 + <nbprofiledirect>
24.1399 + <classpath>
24.1400 + <path path="${run.test.classpath}"/>
24.1401 + </classpath>
24.1402 + </nbprofiledirect>
24.1403 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
24.1404 + <customize>
24.1405 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
24.1406 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
24.1407 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
24.1408 + <jvmarg line="${profiler.info.jvmargs}"/>
24.1409 + <classpath>
24.1410 + <path path="${run.test.classpath}"/>
24.1411 + </classpath>
24.1412 + </customize>
24.1413 + </j2seproject3:junit>
24.1414 + </target>
24.1415 + <!--
24.1416 + end of pre NB72 profiling section
24.1417 + -->
24.1418 + <target if="netbeans.home" name="-profile-check">
24.1419 + <condition property="profiler.configured">
24.1420 + <or>
24.1421 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
24.1422 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
24.1423 + </or>
24.1424 + </condition>
24.1425 + </target>
24.1426 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
24.1427 + <startprofiler/>
24.1428 + <antcall target="run"/>
24.1429 + </target>
24.1430 + <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">
24.1431 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
24.1432 + <startprofiler/>
24.1433 + <antcall target="run-single"/>
24.1434 + </target>
24.1435 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
24.1436 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
24.1437 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
24.1438 + <startprofiler/>
24.1439 + <antcall target="test-single"/>
24.1440 + </target>
24.1441 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
24.1442 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
24.1443 + <startprofiler/>
24.1444 + <antcall target="run-test-with-main"/>
24.1445 + </target>
24.1446 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
24.1447 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
24.1448 + <startprofiler/>
24.1449 + <antcall target="run-applet"/>
24.1450 + </target>
24.1451 + <!--
24.1452 ===============
24.1453 JAVADOC SECTION
24.1454 ===============
24.1455 -->
24.1456 - <target depends="init" name="-javadoc-build">
24.1457 + <target depends="init" if="have.sources" name="-javadoc-build">
24.1458 <mkdir dir="${dist.javadoc.dir}"/>
24.1459 - <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}">
24.1460 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
24.1461 + <and>
24.1462 + <isset property="endorsed.classpath.cmd.line.arg"/>
24.1463 + <not>
24.1464 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
24.1465 + </not>
24.1466 + </and>
24.1467 + </condition>
24.1468 + <condition else="" property="bug5101868workaround" value="*.java">
24.1469 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
24.1470 + </condition>
24.1471 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
24.1472 + <and>
24.1473 + <isset property="javadoc.html5"/>
24.1474 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
24.1475 + </and>
24.1476 + </condition>
24.1477 + <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}">
24.1478 <classpath>
24.1479 <path path="${javac.classpath}"/>
24.1480 </classpath>
24.1481 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
24.1482 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
24.1483 <filename name="**/*.java"/>
24.1484 </fileset>
24.1485 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
24.1486 <include name="**/*.java"/>
24.1487 + <exclude name="*.java"/>
24.1488 </fileset>
24.1489 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
24.1490 + <arg line="${javadoc.html5.cmd.line.arg}"/>
24.1491 </javadoc>
24.1492 + <copy todir="${dist.javadoc.dir}">
24.1493 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
24.1494 + <filename name="**/doc-files/**"/>
24.1495 + </fileset>
24.1496 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
24.1497 + <include name="**/doc-files/**"/>
24.1498 + </fileset>
24.1499 + </copy>
24.1500 </target>
24.1501 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
24.1502 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
24.1503 @@ -629,7 +1533,7 @@
24.1504 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
24.1505 <!--
24.1506 =========================
24.1507 - JUNIT COMPILATION SECTION
24.1508 + TEST COMPILATION SECTION
24.1509 =========================
24.1510 -->
24.1511 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
24.1512 @@ -639,11 +1543,63 @@
24.1513 <!-- Empty placeholder for easier customization. -->
24.1514 <!-- You can override this target in the ../build.xml file. -->
24.1515 </target>
24.1516 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
24.1517 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
24.1518 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
24.1519 + <and>
24.1520 + <isset property="test.module.name"/>
24.1521 + <length length="0" string="${test.module.name}" when="greater"/>
24.1522 + </and>
24.1523 + </condition>
24.1524 + <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">
24.1525 + <and>
24.1526 + <isset property="test.module.name"/>
24.1527 + <length length="0" string="${test.module.name}" when="greater"/>
24.1528 + </and>
24.1529 + </condition>
24.1530 + </target>
24.1531 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
24.1532 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
24.1533 + <and>
24.1534 + <isset property="test.module.name"/>
24.1535 + <length length="0" string="${test.module.name}" when="greater"/>
24.1536 + </and>
24.1537 + </condition>
24.1538 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
24.1539 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
24.1540 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
24.1541 + <chainedmapper>
24.1542 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
24.1543 + <filtermapper>
24.1544 + <uniqfilter/>
24.1545 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
24.1546 + </filtermapper>
24.1547 + <cutdirsmapper dirs="1"/>
24.1548 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
24.1549 + </chainedmapper>
24.1550 + </pathconvert>
24.1551 + <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}">
24.1552 + <and>
24.1553 + <isset property="test.module.name"/>
24.1554 + <length length="0" string="${test.module.name}" when="greater"/>
24.1555 + </and>
24.1556 + </condition>
24.1557 + </target>
24.1558 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
24.1559 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
24.1560 + <property name="javac.test.compilerargs" value=""/>
24.1561 + <property name="run.test.jvmargs" value=""/>
24.1562 + </target>
24.1563 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
24.1564 <target if="do.depend.true" name="-compile-test-depend">
24.1565 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
24.1566 </target>
24.1567 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
24.1568 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
24.1569 + <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">
24.1570 + <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}">
24.1571 + <customize>
24.1572 + <compilerarg line="${javac.test.compilerargs}"/>
24.1573 + </customize>
24.1574 + </j2seproject3:javac>
24.1575 <copy todir="${build.test.classes.dir}">
24.1576 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
24.1577 </copy>
24.1578 @@ -657,10 +1613,14 @@
24.1579 <!-- Empty placeholder for easier customization. -->
24.1580 <!-- You can override this target in the ../build.xml file. -->
24.1581 </target>
24.1582 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
24.1583 + <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">
24.1584 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
24.1585 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
24.1586 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
24.1587 + <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}">
24.1588 + <customize>
24.1589 + <compilerarg line="${javac.test.compilerargs}"/>
24.1590 + </customize>
24.1591 + </j2seproject3:javac>
24.1592 <copy todir="${build.test.classes.dir}">
24.1593 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
24.1594 </copy>
24.1595 @@ -672,14 +1632,14 @@
24.1596 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
24.1597 <!--
24.1598 =======================
24.1599 - JUNIT EXECUTION SECTION
24.1600 + TEST EXECUTION SECTION
24.1601 =======================
24.1602 -->
24.1603 <target depends="init" if="have.tests" name="-pre-test-run">
24.1604 <mkdir dir="${build.test.results.dir}"/>
24.1605 </target>
24.1606 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
24.1607 - <j2seproject3:junit testincludes="**/*Test.java"/>
24.1608 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
24.1609 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
24.1610 </target>
24.1611 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
24.1612 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
24.1613 @@ -690,41 +1650,42 @@
24.1614 <target depends="init" if="have.tests" name="-pre-test-run-single">
24.1615 <mkdir dir="${build.test.results.dir}"/>
24.1616 </target>
24.1617 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
24.1618 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
24.1619 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
24.1620 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
24.1621 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
24.1622 </target>
24.1623 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
24.1624 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
24.1625 </target>
24.1626 - <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"/>
24.1627 + <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"/>
24.1628 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
24.1629 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
24.1630 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
24.1631 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
24.1632 + </target>
24.1633 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
24.1634 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
24.1635 + </target>
24.1636 + <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"/>
24.1637 <!--
24.1638 =======================
24.1639 - JUNIT DEBUGGING SECTION
24.1640 + TEST DEBUGGING SECTION
24.1641 =======================
24.1642 -->
24.1643 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
24.1644 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
24.1645 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
24.1646 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
24.1647 - <delete file="${test.report.file}"/>
24.1648 - <mkdir dir="${build.test.results.dir}"/>
24.1649 - <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}">
24.1650 - <customize>
24.1651 - <syspropertyset>
24.1652 - <propertyref prefix="test-sys-prop."/>
24.1653 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
24.1654 - </syspropertyset>
24.1655 - <arg value="${test.class}"/>
24.1656 - <arg value="showoutput=true"/>
24.1657 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
24.1658 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
24.1659 - </customize>
24.1660 - </j2seproject3:debug>
24.1661 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
24.1662 + </target>
24.1663 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
24.1664 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
24.1665 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
24.1666 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
24.1667 </target>
24.1668 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
24.1669 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
24.1670 </target>
24.1671 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
24.1672 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
24.1673 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
24.1674 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
24.1675 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
24.1676 </target>
24.1677 @@ -750,9 +1711,9 @@
24.1678 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
24.1679 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
24.1680 <j2seproject3:debug classname="sun.applet.AppletViewer">
24.1681 - <customize>
24.1682 + <customizeDebuggee>
24.1683 <arg value="${applet.url}"/>
24.1684 - </customize>
24.1685 + </customizeDebuggee>
24.1686 </j2seproject3:debug>
24.1687 </target>
24.1688 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
24.1689 @@ -779,6 +1740,7 @@
24.1690 </target>
24.1691 <target depends="init" name="-do-clean">
24.1692 <delete dir="${build.dir}"/>
24.1693 + <delete dir="${dist.jlink.output}"/>
24.1694 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
24.1695 </target>
24.1696 <target name="-post-clean">
24.1697 @@ -789,9 +1751,12 @@
24.1698 <target name="-check-call-dep">
24.1699 <property file="${call.built.properties}" prefix="already.built."/>
24.1700 <condition property="should.call.dep">
24.1701 - <not>
24.1702 - <isset property="already.built.${call.subproject}"/>
24.1703 - </not>
24.1704 + <and>
24.1705 + <not>
24.1706 + <isset property="already.built.${call.subproject}"/>
24.1707 + </not>
24.1708 + <available file="${call.script}"/>
24.1709 + </and>
24.1710 </condition>
24.1711 </target>
24.1712 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
25.1 --- a/samples/extensibleicon/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
25.2 +++ b/samples/extensibleicon/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
25.3 @@ -1,8 +1,8 @@
25.4 build.xml.data.CRC32=cced9d14
25.5 -build.xml.script.CRC32=a709ccd8
25.6 -build.xml.stylesheet.CRC32=958a1d3e@1.34.0.45
25.7 +build.xml.script.CRC32=0b31e876
25.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
25.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
25.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
25.11 nbproject/build-impl.xml.data.CRC32=cced9d14
25.12 -nbproject/build-impl.xml.script.CRC32=36d0e349
25.13 -nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
25.14 +nbproject/build-impl.xml.script.CRC32=affb1c66
25.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
26.1 --- a/samples/extensibleicon/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
26.2 +++ b/samples/extensibleicon/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
26.3 @@ -10,8 +10,12 @@
26.4 build.test.results.dir=${build.dir}/test/results
26.5 debug.classpath=\
26.6 ${run.classpath}
26.7 +debug.modulepath=\
26.8 + ${run.modulepath}
26.9 debug.test.classpath=\
26.10 ${run.test.classpath}
26.11 +debug.test.modulepath=\
26.12 + ${run.test.modulepath}
26.13 # This directory is removed when the project is cleaned:
26.14 dist.dir=dist
26.15 dist.jar=${dist.dir}/extensibleicon.jar
26.16 @@ -28,14 +32,18 @@
26.17 # Space-separated list of extra javac options
26.18 javac.compilerargs=
26.19 javac.deprecation=false
26.20 -javac.source=1.5
26.21 -javac.target=1.5
26.22 +javac.modulepath=
26.23 +javac.processormodulepath=
26.24 +javac.source=1.6
26.25 +javac.target=1.6
26.26 javac.test.classpath=\
26.27 ${javac.classpath}:\
26.28 ${build.classes.dir}:\
26.29 ${file.reference.junit4.jar}:\
26.30 ${file.reference.org-netbeans-insane.jar}:\
26.31 ${file.reference.org-netbeans-modules-nbjunit.jar}
26.32 +javac.test.modulepath=\
26.33 + ${javac.modulepath}
26.34 javadoc.additionalparam=
26.35 javadoc.author=false
26.36 javadoc.encoding=${source.encoding}
26.37 @@ -57,9 +65,13 @@
26.38 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
26.39 # or test-sys-prop.name=value to set system properties for unit tests):
26.40 run.jvmargs=
26.41 +run.modulepath=\
26.42 + ${javac.modulepath}
26.43 run.test.classpath=\
26.44 ${javac.test.classpath}:\
26.45 ${build.test.classes.dir}
26.46 +run.test.modulepath=\
26.47 + ${javac.test.modulepath}
26.48 source.encoding=UTF-8
26.49 src.dir=src
26.50 test.src.dir=test
27.1 --- a/samples/friendpackage/build.xml Mon Nov 11 05:47:32 2019 +0100
27.2 +++ b/samples/friendpackage/build.xml Mon Nov 11 13:17:34 2019 +0100
27.3 @@ -2,6 +2,11 @@
27.4 <!-- You may freely edit this file. See commented blocks below for -->
27.5 <!-- some examples of how to customize the build. -->
27.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
27.7 +<!-- By default, only the Clean and Build commands use this build script. -->
27.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
27.9 +<!-- the Compile on Save feature is turned off for the project. -->
27.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
27.11 +<!-- in the project's Project Properties dialog box.-->
27.12 <project name="friendpackage" default="default" basedir=".">
27.13 <description>Builds, tests, and runs the project friendpackage.</description>
27.14 <import file="nbproject/build-impl.xml"/>
27.15 @@ -46,8 +51,7 @@
27.16 -init-macrodef-junit: defines macro for junit execution
27.17 -init-macrodef-debug: defines macro for class debugging
27.18 -init-macrodef-java: defines macro for class execution
27.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
27.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
27.21 + -do-jar: JAR building
27.22 run: execution of project
27.23 -javadoc-build: Javadoc generation
27.24 test-report: JUnit report generation
28.1 --- a/samples/friendpackage/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
28.2 +++ b/samples/friendpackage/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
28.3 @@ -12,14 +12,21 @@
28.4 - execution
28.5 - debugging
28.6 - javadoc
28.7 - - junit compilation
28.8 - - junit execution
28.9 - - junit debugging
28.10 + - test compilation
28.11 + - test execution
28.12 + - test debugging
28.13 - applet
28.14 - cleanup
28.15
28.16 -->
28.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="friendpackage-impl">
28.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="friendpackage-impl">
28.19 + <fail message="Please build using Ant 1.8.0 or higher.">
28.20 + <condition>
28.21 + <not>
28.22 + <antversion atleast="1.8.0"/>
28.23 + </not>
28.24 + </condition>
28.25 + </fail>
28.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
28.27 <!--
28.28 ======================
28.29 @@ -39,28 +46,136 @@
28.30 <property file="${user.properties.file}"/>
28.31 <!-- The two properties below are usually overridden -->
28.32 <!-- by the active platform. Just a fallback. -->
28.33 - <property name="default.javac.source" value="1.4"/>
28.34 - <property name="default.javac.target" value="1.4"/>
28.35 + <property name="default.javac.source" value="1.6"/>
28.36 + <property name="default.javac.target" value="1.6"/>
28.37 </target>
28.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
28.39 <property file="nbproject/configs/${config}.properties"/>
28.40 <property file="nbproject/project.properties"/>
28.41 </target>
28.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
28.43 + <target name="-init-modules-supported">
28.44 + <condition property="modules.supported.internal" value="true">
28.45 + <not>
28.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
28.47 + </not>
28.48 + </condition>
28.49 + </target>
28.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
28.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
28.52 + <attribute name="property"/>
28.53 + <attribute name="sourcepath"/>
28.54 + <sequential>
28.55 + <loadresource property="@{property}" quiet="true">
28.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
28.57 + <filterchain>
28.58 + <stripjavacomments/>
28.59 + <linecontainsregexp>
28.60 + <regexp pattern="module .* \{"/>
28.61 + </linecontainsregexp>
28.62 + <tokenfilter>
28.63 + <linetokenizer/>
28.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
28.65 + </tokenfilter>
28.66 + <striplinebreaks/>
28.67 + </filterchain>
28.68 + </loadresource>
28.69 + </sequential>
28.70 + </macrodef>
28.71 + </target>
28.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
28.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
28.74 + <condition>
28.75 + <not>
28.76 + <antversion atleast="1.10.0"/>
28.77 + </not>
28.78 + </condition>
28.79 + </fail>
28.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
28.81 + <condition property="named.module.internal">
28.82 + <and>
28.83 + <isset property="module.name"/>
28.84 + <length length="0" string="${module.name}" when="greater"/>
28.85 + </and>
28.86 + </condition>
28.87 + <condition property="unnamed.module.internal">
28.88 + <not>
28.89 + <isset property="named.module.internal"/>
28.90 + </not>
28.91 + </condition>
28.92 + <property name="javac.modulepath" value=""/>
28.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
28.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
28.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
28.96 + <property name="javac.upgrademodulepath" value=""/>
28.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
28.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
28.99 + <and>
28.100 + <isset property="javac.systemmodulepath"/>
28.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
28.102 + </and>
28.103 + </condition>
28.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
28.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
28.106 + <property name="module.name" value=""/>
28.107 + </target>
28.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
28.109 + <property name="platform.java" value="${java.home}/bin/java"/>
28.110 <available file="${manifest.file}" property="manifest.available"/>
28.111 - <condition property="manifest.available+main.class">
28.112 + <condition property="splashscreen.available">
28.113 <and>
28.114 - <isset property="manifest.available"/>
28.115 + <not>
28.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
28.117 + </not>
28.118 + <available file="${application.splash}"/>
28.119 + </and>
28.120 + </condition>
28.121 + <condition property="main.class.available">
28.122 + <and>
28.123 <isset property="main.class"/>
28.124 <not>
28.125 <equals arg1="${main.class}" arg2="" trim="true"/>
28.126 </not>
28.127 </and>
28.128 </condition>
28.129 - <condition property="manifest.available+main.class+mkdist.available">
28.130 + <condition property="profile.available">
28.131 <and>
28.132 - <istrue value="${manifest.available+main.class}"/>
28.133 - <isset property="libs.CopyLibs.classpath"/>
28.134 + <isset property="javac.profile"/>
28.135 + <length length="0" string="${javac.profile}" when="greater"/>
28.136 + <not>
28.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
28.138 + </not>
28.139 + </and>
28.140 + </condition>
28.141 + <condition property="do.archive">
28.142 + <or>
28.143 + <not>
28.144 + <istrue value="${jar.archive.disabled}"/>
28.145 + </not>
28.146 + <istrue value="${not.archive.disabled}"/>
28.147 + </or>
28.148 + </condition>
28.149 + <condition property="do.archive+manifest.available">
28.150 + <and>
28.151 + <isset property="manifest.available"/>
28.152 + <istrue value="${do.archive}"/>
28.153 + </and>
28.154 + </condition>
28.155 + <condition property="do.archive+main.class.available">
28.156 + <and>
28.157 + <isset property="main.class.available"/>
28.158 + <istrue value="${do.archive}"/>
28.159 + </and>
28.160 + </condition>
28.161 + <condition property="do.archive+splashscreen.available">
28.162 + <and>
28.163 + <isset property="splashscreen.available"/>
28.164 + <istrue value="${do.archive}"/>
28.165 + </and>
28.166 + </condition>
28.167 + <condition property="do.archive+profile.available">
28.168 + <and>
28.169 + <isset property="profile.available"/>
28.170 + <istrue value="${do.archive}"/>
28.171 </and>
28.172 </condition>
28.173 <condition property="have.tests">
28.174 @@ -86,6 +201,7 @@
28.175 </and>
28.176 </condition>
28.177 <property name="run.jvmargs" value=""/>
28.178 + <property name="run.jvmargs.ide" value=""/>
28.179 <property name="javac.compilerargs" value=""/>
28.180 <property name="work.dir" value="${basedir}"/>
28.181 <condition property="no.deps">
28.182 @@ -97,6 +213,8 @@
28.183 <property name="javadoc.preview" value="true"/>
28.184 <property name="application.args" value=""/>
28.185 <property name="source.encoding" value="${file.encoding}"/>
28.186 + <property name="runtime.encoding" value="${source.encoding}"/>
28.187 + <property name="manifest.encoding" value="${source.encoding}"/>
28.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
28.189 <and>
28.190 <isset property="javadoc.encoding"/>
28.191 @@ -112,12 +230,58 @@
28.192 <condition property="do.depend.true">
28.193 <istrue value="${do.depend}"/>
28.194 </condition>
28.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
28.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
28.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
28.198 <and>
28.199 - <isset property="jaxws.endorsed.dir"/>
28.200 - <available file="nbproject/jaxws-build.xml"/>
28.201 + <isset property="endorsed.classpath"/>
28.202 + <not>
28.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
28.204 + </not>
28.205 </and>
28.206 </condition>
28.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
28.208 + <isset property="profile.available"/>
28.209 + </condition>
28.210 + <condition else="false" property="jdkBug6558476">
28.211 + <and>
28.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
28.213 + <not>
28.214 + <os family="unix"/>
28.215 + </not>
28.216 + </and>
28.217 + </condition>
28.218 + <condition else="false" property="javac.fork">
28.219 + <or>
28.220 + <istrue value="${jdkBug6558476}"/>
28.221 + <istrue value="${javac.external.vm}"/>
28.222 + </or>
28.223 + </condition>
28.224 + <property name="jar.index" value="false"/>
28.225 + <property name="jar.index.metainf" value="${jar.index}"/>
28.226 + <property name="copylibs.rebase" value="true"/>
28.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
28.228 + <condition property="junit.available">
28.229 + <or>
28.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
28.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
28.232 + </or>
28.233 + </condition>
28.234 + <condition property="testng.available">
28.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
28.236 + </condition>
28.237 + <condition property="junit+testng.available">
28.238 + <and>
28.239 + <istrue value="${junit.available}"/>
28.240 + <istrue value="${testng.available}"/>
28.241 + </and>
28.242 + </condition>
28.243 + <condition else="testng" property="testng.mode" value="mixed">
28.244 + <istrue value="${junit+testng.available}"/>
28.245 + </condition>
28.246 + <condition else="" property="testng.debug.mode" value="-mixed">
28.247 + <istrue value="${junit+testng.available}"/>
28.248 + </condition>
28.249 + <property name="java.failonerror" value="true"/>
28.250 </target>
28.251 <target name="-post-init">
28.252 <!-- Empty placeholder for easier customization. -->
28.253 @@ -144,26 +308,152 @@
28.254 </sequential>
28.255 </macrodef>
28.256 </target>
28.257 - <target name="-init-macrodef-javac">
28.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
28.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
28.260 <attribute default="${src.dir}" name="srcdir"/>
28.261 <attribute default="${build.classes.dir}" name="destdir"/>
28.262 <attribute default="${javac.classpath}" name="classpath"/>
28.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
28.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
28.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
28.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
28.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
28.268 <attribute default="${includes}" name="includes"/>
28.269 <attribute default="${excludes}" name="excludes"/>
28.270 <attribute default="${javac.debug}" name="debug"/>
28.271 - <attribute default="" name="sourcepath"/>
28.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
28.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
28.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
28.275 <element name="customize" optional="true"/>
28.276 <sequential>
28.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
28.278 + <condition property="warn.excludes.internal">
28.279 + <and>
28.280 + <isset property="named.module.internal"/>
28.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
28.282 + </and>
28.283 + </condition>
28.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
28.285 + <property location="${build.dir}/empty" name="empty.dir"/>
28.286 + <mkdir dir="${empty.dir}"/>
28.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
28.288 + <condition property="processormodulepath.set">
28.289 + <resourcecount count="0" when="greater">
28.290 + <path>
28.291 + <pathelement path="@{processormodulepath}"/>
28.292 + </path>
28.293 + </resourcecount>
28.294 + </condition>
28.295 + <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}">
28.296 + <src>
28.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
28.298 + <include name="*"/>
28.299 + </dirset>
28.300 + </src>
28.301 <classpath>
28.302 <path path="@{classpath}"/>
28.303 </classpath>
28.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
28.305 + <modulepath>
28.306 + <path path="@{modulepath}"/>
28.307 + </modulepath>
28.308 + <upgrademodulepath>
28.309 + <path path="@{upgrademodulepath}"/>
28.310 + </upgrademodulepath>
28.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
28.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
28.313 + <compilerarg line="${javac.compilerargs}"/>
28.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
28.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
28.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
28.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
28.318 + <compilerarg line="${ap.processors.internal}"/>
28.319 + <compilerarg line="${annotation.processing.processor.options}"/>
28.320 + <compilerarg value="-s"/>
28.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
28.322 + <compilerarg line="${ap.proc.none.internal}"/>
28.323 <customize/>
28.324 </javac>
28.325 </sequential>
28.326 </macrodef>
28.327 + </target>
28.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
28.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
28.330 + <attribute default="${src.dir}" name="srcdir"/>
28.331 + <attribute default="${build.classes.dir}" name="destdir"/>
28.332 + <attribute default="${javac.classpath}" name="classpath"/>
28.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
28.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
28.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
28.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
28.337 + <attribute default="${includes}" name="includes"/>
28.338 + <attribute default="${excludes}" name="excludes"/>
28.339 + <attribute default="${javac.debug}" name="debug"/>
28.340 + <attribute default="${empty.dir}" name="sourcepath"/>
28.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
28.342 + <element name="customize" optional="true"/>
28.343 + <sequential>
28.344 + <property location="${build.dir}/empty" name="empty.dir"/>
28.345 + <mkdir dir="${empty.dir}"/>
28.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
28.347 + <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}">
28.348 + <src>
28.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
28.350 + <include name="*"/>
28.351 + </dirset>
28.352 + </src>
28.353 + <classpath>
28.354 + <path path="@{classpath}"/>
28.355 + </classpath>
28.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
28.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
28.358 + <compilerarg line="${javac.compilerargs}"/>
28.359 + <compilerarg value="-processorpath"/>
28.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
28.361 + <compilerarg line="${ap.processors.internal}"/>
28.362 + <compilerarg line="${annotation.processing.processor.options}"/>
28.363 + <compilerarg value="-s"/>
28.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
28.365 + <compilerarg line="${ap.proc.none.internal}"/>
28.366 + <customize/>
28.367 + </javac>
28.368 + </sequential>
28.369 + </macrodef>
28.370 + </target>
28.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
28.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
28.373 + <attribute default="${src.dir}" name="srcdir"/>
28.374 + <attribute default="${build.classes.dir}" name="destdir"/>
28.375 + <attribute default="${javac.classpath}" name="classpath"/>
28.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
28.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
28.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
28.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
28.380 + <attribute default="${includes}" name="includes"/>
28.381 + <attribute default="${excludes}" name="excludes"/>
28.382 + <attribute default="${javac.debug}" name="debug"/>
28.383 + <attribute default="${empty.dir}" name="sourcepath"/>
28.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
28.385 + <element name="customize" optional="true"/>
28.386 + <sequential>
28.387 + <property location="${build.dir}/empty" name="empty.dir"/>
28.388 + <mkdir dir="${empty.dir}"/>
28.389 + <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}">
28.390 + <src>
28.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
28.392 + <include name="*"/>
28.393 + </dirset>
28.394 + </src>
28.395 + <classpath>
28.396 + <path path="@{classpath}"/>
28.397 + </classpath>
28.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
28.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
28.400 + <compilerarg line="${javac.compilerargs}"/>
28.401 + <customize/>
28.402 + </javac>
28.403 + </sequential>
28.404 + </macrodef>
28.405 + </target>
28.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
28.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
28.408 <attribute default="${src.dir}" name="srcdir"/>
28.409 <attribute default="${build.classes.dir}" name="destdir"/>
28.410 @@ -180,51 +470,383 @@
28.411 <attribute default="${build.classes.dir}" name="destdir"/>
28.412 <sequential>
28.413 <fail unless="javac.includes">Must set javac.includes</fail>
28.414 - <pathconvert pathsep="," property="javac.includes.binary">
28.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
28.416 <path>
28.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
28.418 </path>
28.419 <globmapper from="*.java" to="*.class"/>
28.420 </pathconvert>
28.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
28.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
28.423 <delete>
28.424 - <files includes="${javac.includes.binary}"/>
28.425 + <files includesfile="${javac.includesfile.binary}"/>
28.426 + </delete>
28.427 + <delete>
28.428 + <fileset file="${javac.includesfile.binary}"/>
28.429 </delete>
28.430 </sequential>
28.431 </macrodef>
28.432 </target>
28.433 - <target name="-init-macrodef-junit">
28.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
28.435 + <condition else="false" property="nb.junit.batch" value="true">
28.436 + <and>
28.437 + <istrue value="${junit.available}"/>
28.438 + <not>
28.439 + <isset property="test.method"/>
28.440 + </not>
28.441 + </and>
28.442 + </condition>
28.443 + <condition else="false" property="nb.junit.single" value="true">
28.444 + <and>
28.445 + <istrue value="${junit.available}"/>
28.446 + <isset property="test.method"/>
28.447 + </and>
28.448 + </condition>
28.449 + </target>
28.450 + <target name="-init-test-properties">
28.451 + <property name="test.binaryincludes" value="<nothing>"/>
28.452 + <property name="test.binarytestincludes" value=""/>
28.453 + <property name="test.binaryexcludes" value=""/>
28.454 + </target>
28.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
28.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
28.457 + <attribute default="${includes}" name="includes"/>
28.458 + <attribute default="${excludes}" name="excludes"/>
28.459 + <element name="customizePrototype" optional="true"/>
28.460 + <sequential>
28.461 + <property name="junit.forkmode" value="perTest"/>
28.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
28.463 + <syspropertyset>
28.464 + <propertyref prefix="test-sys-prop."/>
28.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
28.466 + </syspropertyset>
28.467 + <classpath>
28.468 + <path path="${run.test.classpath}"/>
28.469 + </classpath>
28.470 + <modulepath>
28.471 + <path path="${run.test.modulepath}"/>
28.472 + </modulepath>
28.473 + <formatter type="brief" usefile="false"/>
28.474 + <formatter type="xml"/>
28.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
28.476 + <jvmarg value="-ea"/>
28.477 + <jvmarg line="${run.test.jvmargs}"/>
28.478 + <customizePrototype/>
28.479 + </junit>
28.480 + </sequential>
28.481 + </macrodef>
28.482 + </target>
28.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
28.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
28.485 + <attribute default="${includes}" name="includes"/>
28.486 + <attribute default="${excludes}" name="excludes"/>
28.487 + <element name="customizePrototype" optional="true"/>
28.488 + <sequential>
28.489 + <property name="junit.forkmode" value="perTest"/>
28.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
28.491 + <syspropertyset>
28.492 + <propertyref prefix="test-sys-prop."/>
28.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
28.494 + </syspropertyset>
28.495 + <classpath>
28.496 + <path path="${run.test.classpath}"/>
28.497 + </classpath>
28.498 + <formatter type="brief" usefile="false"/>
28.499 + <formatter type="xml"/>
28.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
28.501 + <jvmarg value="-ea"/>
28.502 + <customizePrototype/>
28.503 + </junit>
28.504 + </sequential>
28.505 + </macrodef>
28.506 + </target>
28.507 + <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}">
28.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
28.509 <attribute default="${includes}" name="includes"/>
28.510 <attribute default="${excludes}" name="excludes"/>
28.511 <attribute default="**" name="testincludes"/>
28.512 + <attribute default="" name="testmethods"/>
28.513 + <element name="customize" optional="true"/>
28.514 <sequential>
28.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
28.516 - <batchtest todir="${build.test.results.dir}">
28.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
28.518 - <filename name="@{testincludes}"/>
28.519 - </fileset>
28.520 - </batchtest>
28.521 + <j2seproject3:junit-prototype>
28.522 + <customizePrototype>
28.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
28.524 + <customize/>
28.525 + </customizePrototype>
28.526 + </j2seproject3:junit-prototype>
28.527 + </sequential>
28.528 + </macrodef>
28.529 + </target>
28.530 + <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}">
28.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
28.532 + <attribute default="${includes}" name="includes"/>
28.533 + <attribute default="${excludes}" name="excludes"/>
28.534 + <attribute default="**" name="testincludes"/>
28.535 + <attribute default="" name="testmethods"/>
28.536 + <element name="customize" optional="true"/>
28.537 + <sequential>
28.538 + <j2seproject3:junit-prototype>
28.539 + <customizePrototype>
28.540 + <batchtest todir="${build.test.results.dir}">
28.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
28.542 + <filename name="@{testincludes}"/>
28.543 + </fileset>
28.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
28.545 + <filename name="${test.binarytestincludes}"/>
28.546 + </fileset>
28.547 + </batchtest>
28.548 + <customize/>
28.549 + </customizePrototype>
28.550 + </j2seproject3:junit-prototype>
28.551 + </sequential>
28.552 + </macrodef>
28.553 + </target>
28.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
28.555 + <target if="${testng.available}" name="-init-macrodef-testng">
28.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
28.557 + <attribute default="${includes}" name="includes"/>
28.558 + <attribute default="${excludes}" name="excludes"/>
28.559 + <attribute default="**" name="testincludes"/>
28.560 + <attribute default="" name="testmethods"/>
28.561 + <element name="customize" optional="true"/>
28.562 + <sequential>
28.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
28.564 + <isset property="test.method"/>
28.565 + </condition>
28.566 + <union id="test.set">
28.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
28.568 + <filename name="@{testincludes}"/>
28.569 + </fileset>
28.570 + </union>
28.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
28.572 + <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="friendpackage" testname="TestNG tests" workingDir="${work.dir}">
28.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
28.574 + <propertyset>
28.575 + <propertyref prefix="test-sys-prop."/>
28.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
28.577 + </propertyset>
28.578 <classpath>
28.579 <path path="${run.test.classpath}"/>
28.580 </classpath>
28.581 - <syspropertyset>
28.582 - <propertyref prefix="test-sys-prop."/>
28.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
28.584 - </syspropertyset>
28.585 - <formatter type="brief" usefile="false"/>
28.586 - <formatter type="xml"/>
28.587 - <jvmarg line="${run.jvmargs}"/>
28.588 - </junit>
28.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
28.590 + <customize/>
28.591 + </testng>
28.592 </sequential>
28.593 </macrodef>
28.594 </target>
28.595 - <target name="-init-macrodef-nbjpda">
28.596 + <target name="-init-macrodef-test-impl">
28.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
28.598 + <attribute default="${includes}" name="includes"/>
28.599 + <attribute default="${excludes}" name="excludes"/>
28.600 + <attribute default="**" name="testincludes"/>
28.601 + <attribute default="" name="testmethods"/>
28.602 + <element implicit="true" name="customize" optional="true"/>
28.603 + <sequential>
28.604 + <echo>No tests executed.</echo>
28.605 + </sequential>
28.606 + </macrodef>
28.607 + </target>
28.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
28.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
28.610 + <attribute default="${includes}" name="includes"/>
28.611 + <attribute default="${excludes}" name="excludes"/>
28.612 + <attribute default="**" name="testincludes"/>
28.613 + <attribute default="" name="testmethods"/>
28.614 + <element implicit="true" name="customize" optional="true"/>
28.615 + <sequential>
28.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
28.617 + <customize/>
28.618 + </j2seproject3:junit>
28.619 + </sequential>
28.620 + </macrodef>
28.621 + </target>
28.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
28.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
28.624 + <attribute default="${includes}" name="includes"/>
28.625 + <attribute default="${excludes}" name="excludes"/>
28.626 + <attribute default="**" name="testincludes"/>
28.627 + <attribute default="" name="testmethods"/>
28.628 + <element implicit="true" name="customize" optional="true"/>
28.629 + <sequential>
28.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
28.631 + <customize/>
28.632 + </j2seproject3:testng>
28.633 + </sequential>
28.634 + </macrodef>
28.635 + </target>
28.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
28.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
28.638 + <attribute default="${includes}" name="includes"/>
28.639 + <attribute default="${excludes}" name="excludes"/>
28.640 + <attribute default="**" name="testincludes"/>
28.641 + <attribute default="" name="testmethods"/>
28.642 + <sequential>
28.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
28.644 + <customize>
28.645 + <jvmarg line="${run.jvmargs}"/>
28.646 + <jvmarg line="${run.jvmargs.ide}"/>
28.647 + </customize>
28.648 + </j2seproject3:test-impl>
28.649 + </sequential>
28.650 + </macrodef>
28.651 + </target>
28.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
28.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
28.654 + <attribute default="${includes}" name="includes"/>
28.655 + <attribute default="${excludes}" name="excludes"/>
28.656 + <attribute default="**" name="testincludes"/>
28.657 + <attribute default="" name="testmethods"/>
28.658 + <element name="customizeDebuggee" optional="true"/>
28.659 + <sequential>
28.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
28.661 + <customize>
28.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
28.663 + <customizeDebuggee/>
28.664 + </customize>
28.665 + </j2seproject3:junit>
28.666 + </sequential>
28.667 + </macrodef>
28.668 + </target>
28.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
28.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
28.671 + <attribute default="${main.class}" name="testClass"/>
28.672 + <attribute default="" name="testMethod"/>
28.673 + <element name="customize2" optional="true"/>
28.674 + <sequential>
28.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
28.676 + <isset property="test.method"/>
28.677 + </condition>
28.678 + <condition else="-suitename friendpackage -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
28.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
28.680 + </condition>
28.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
28.682 + <mkdir dir="${build.test.results.dir}"/>
28.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
28.684 + <customizeDebuggee>
28.685 + <customize2/>
28.686 + <jvmarg value="-ea"/>
28.687 + <arg line="${testng.debug.mode}"/>
28.688 + <arg line="-d ${build.test.results.dir}"/>
28.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
28.690 + <arg line="${testng.cmd.args}"/>
28.691 + </customizeDebuggee>
28.692 + </j2seproject3:debug>
28.693 + </sequential>
28.694 + </macrodef>
28.695 + </target>
28.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
28.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
28.698 + <attribute default="${main.class}" name="testClass"/>
28.699 + <attribute default="" name="testMethod"/>
28.700 + <element implicit="true" name="customize2" optional="true"/>
28.701 + <sequential>
28.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
28.703 + <customize2/>
28.704 + </j2seproject3:testng-debug>
28.705 + </sequential>
28.706 + </macrodef>
28.707 + </target>
28.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
28.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
28.710 + <attribute default="${includes}" name="includes"/>
28.711 + <attribute default="${excludes}" name="excludes"/>
28.712 + <attribute default="**" name="testincludes"/>
28.713 + <attribute default="" name="testmethods"/>
28.714 + <attribute default="${main.class}" name="testClass"/>
28.715 + <attribute default="" name="testMethod"/>
28.716 + <sequential>
28.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
28.718 + <customizeDebuggee>
28.719 + <jvmarg line="${run.jvmargs}"/>
28.720 + <jvmarg line="${run.jvmargs.ide}"/>
28.721 + </customizeDebuggee>
28.722 + </j2seproject3:test-debug-impl>
28.723 + </sequential>
28.724 + </macrodef>
28.725 + </target>
28.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
28.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
28.728 + <attribute default="${includes}" name="includes"/>
28.729 + <attribute default="${excludes}" name="excludes"/>
28.730 + <attribute default="**" name="testincludes"/>
28.731 + <attribute default="" name="testmethods"/>
28.732 + <attribute default="${main.class}" name="testClass"/>
28.733 + <attribute default="" name="testMethod"/>
28.734 + <sequential>
28.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
28.736 + <customize2>
28.737 + <syspropertyset>
28.738 + <propertyref prefix="test-sys-prop."/>
28.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
28.740 + </syspropertyset>
28.741 + </customize2>
28.742 + </j2seproject3:testng-debug-impl>
28.743 + </sequential>
28.744 + </macrodef>
28.745 + </target>
28.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
28.747 + <!--
28.748 + pre NB7.2 profiling section; consider it deprecated
28.749 + -->
28.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
28.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
28.752 + <!-- Empty placeholder for easier customization. -->
28.753 + <!-- You can override this target in the ../build.xml file. -->
28.754 + </target>
28.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
28.756 + <!-- Empty placeholder for easier customization. -->
28.757 + <!-- You can override this target in the ../build.xml file. -->
28.758 + </target>
28.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
28.760 + <macrodef name="resolve">
28.761 + <attribute name="name"/>
28.762 + <attribute name="value"/>
28.763 + <sequential>
28.764 + <property name="@{name}" value="${env.@{value}}"/>
28.765 + </sequential>
28.766 + </macrodef>
28.767 + <macrodef name="profile">
28.768 + <attribute default="${main.class}" name="classname"/>
28.769 + <element name="customize" optional="true"/>
28.770 + <sequential>
28.771 + <property environment="env"/>
28.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
28.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
28.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
28.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
28.776 + <jvmarg line="${profiler.info.jvmargs}"/>
28.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
28.778 + <arg line="${application.args}"/>
28.779 + <classpath>
28.780 + <path path="${run.classpath}"/>
28.781 + </classpath>
28.782 + <syspropertyset>
28.783 + <propertyref prefix="run-sys-prop."/>
28.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
28.785 + </syspropertyset>
28.786 + <customize/>
28.787 + </java>
28.788 + </sequential>
28.789 + </macrodef>
28.790 + </target>
28.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
28.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
28.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
28.794 + </target>
28.795 + <!--
28.796 + end of pre NB7.2 profiling section
28.797 + -->
28.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
28.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
28.800 <attribute default="${main.class}" name="name"/>
28.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
28.802 <attribute default="${debug.classpath}" name="classpath"/>
28.803 <attribute default="" name="stopclassname"/>
28.804 <sequential>
28.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
28.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
28.807 + <modulepath>
28.808 + <path path="@{modulepath}"/>
28.809 + </modulepath>
28.810 <classpath>
28.811 <path path="@{classpath}"/>
28.812 </classpath>
28.813 @@ -235,35 +857,120 @@
28.814 <attribute default="${build.classes.dir}" name="dir"/>
28.815 <sequential>
28.816 <nbjpdareload>
28.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
28.818 + <fileset dir="@{dir}" includes="${fix.classes}">
28.819 + <include name="${fix.includes}*.class"/>
28.820 + </fileset>
28.821 </nbjpdareload>
28.822 </sequential>
28.823 </macrodef>
28.824 </target>
28.825 <target name="-init-debug-args">
28.826 - <property name="version-output" value="java version "${ant.java.version}"/>
28.827 - <condition property="have-jdk-older-than-1.4">
28.828 - <or>
28.829 - <contains string="${version-output}" substring="java version "1.0"/>
28.830 - <contains string="${version-output}" substring="java version "1.1"/>
28.831 - <contains string="${version-output}" substring="java version "1.2"/>
28.832 - <contains string="${version-output}" substring="java version "1.3"/>
28.833 - </or>
28.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
28.835 + <os family="windows"/>
28.836 </condition>
28.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
28.838 - <istrue value="${have-jdk-older-than-1.4}"/>
28.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
28.840 + <isset property="debug.transport"/>
28.841 </condition>
28.842 </target>
28.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
28.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
28.845 + <attribute default="${module.name}" name="modulename"/>
28.846 <attribute default="${main.class}" name="classname"/>
28.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
28.848 <attribute default="${debug.classpath}" name="classpath"/>
28.849 + <element name="customizeDebuggee" optional="true"/>
28.850 + <sequential>
28.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
28.852 + <customize>
28.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
28.854 + <customizeDebuggee/>
28.855 + </customize>
28.856 + </j2seproject1:java>
28.857 + </sequential>
28.858 + </macrodef>
28.859 + </target>
28.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
28.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
28.862 + <attribute default="${module.name}" name="modulename"/>
28.863 + <attribute default="${main.class}" name="classname"/>
28.864 + <attribute default="${run.modulepath}" name="modulepath"/>
28.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
28.866 + <attribute default="${run.classpath}" name="classpath"/>
28.867 + <attribute default="jvm" name="jvm"/>
28.868 <element name="customize" optional="true"/>
28.869 <sequential>
28.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
28.871 - <jvmarg line="${debug-args-line}"/>
28.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
28.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
28.874 + <classpath>
28.875 + <path path="@{classpath}"/>
28.876 + </classpath>
28.877 + <modulepath>
28.878 + <pathelement path="@{modulepath}"/>
28.879 + <pathelement location="${module.build.classes.dir}"/>
28.880 + </modulepath>
28.881 + <upgrademodulepath>
28.882 + <path path="@{upgrademodulepath}"/>
28.883 + </upgrademodulepath>
28.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
28.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
28.886 <jvmarg line="${run.jvmargs}"/>
28.887 + <jvmarg line="${run.jvmargs.ide}"/>
28.888 + <syspropertyset>
28.889 + <propertyref prefix="run-sys-prop."/>
28.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
28.891 + </syspropertyset>
28.892 + <customize/>
28.893 + </java>
28.894 + </sequential>
28.895 + </macrodef>
28.896 + </target>
28.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
28.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
28.899 + <attribute default="" name="modulename"/>
28.900 + <attribute default="${main.class}" name="classname"/>
28.901 + <attribute default="${run.modulepath}" name="modulepath"/>
28.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
28.903 + <attribute default="${run.classpath}" name="classpath"/>
28.904 + <attribute default="jvm" name="jvm"/>
28.905 + <element name="customize" optional="true"/>
28.906 + <sequential>
28.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
28.908 + <classpath>
28.909 + <path path="@{classpath}"/>
28.910 + </classpath>
28.911 + <modulepath>
28.912 + <path path="@{modulepath}"/>
28.913 + </modulepath>
28.914 + <upgrademodulepath>
28.915 + <path path="@{upgrademodulepath}"/>
28.916 + </upgrademodulepath>
28.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
28.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
28.919 + <jvmarg line="${run.jvmargs}"/>
28.920 + <jvmarg line="${run.jvmargs.ide}"/>
28.921 + <syspropertyset>
28.922 + <propertyref prefix="run-sys-prop."/>
28.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
28.924 + </syspropertyset>
28.925 + <customize/>
28.926 + </java>
28.927 + </sequential>
28.928 + </macrodef>
28.929 + </target>
28.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
28.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
28.932 + <attribute default="" name="modulename"/>
28.933 + <attribute default="${main.class}" name="classname"/>
28.934 + <attribute default="" name="modulepath"/>
28.935 + <attribute default="${run.classpath}" name="classpath"/>
28.936 + <attribute default="jvm" name="jvm"/>
28.937 + <element name="customize" optional="true"/>
28.938 + <sequential>
28.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
28.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
28.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
28.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
28.943 + <jvmarg line="${run.jvmargs}"/>
28.944 + <jvmarg line="${run.jvmargs.ide}"/>
28.945 <classpath>
28.946 <path path="@{classpath}"/>
28.947 </classpath>
28.948 @@ -276,39 +983,100 @@
28.949 </sequential>
28.950 </macrodef>
28.951 </target>
28.952 - <target name="-init-macrodef-java">
28.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
28.954 - <attribute default="${main.class}" name="classname"/>
28.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
28.956 + <target name="-init-macrodef-copylibs">
28.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
28.958 + <attribute default="${manifest.file}" name="manifest"/>
28.959 <element name="customize" optional="true"/>
28.960 <sequential>
28.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
28.962 - <jvmarg line="${run.jvmargs}"/>
28.963 - <classpath>
28.964 - <path path="${run.classpath}"/>
28.965 - </classpath>
28.966 - <syspropertyset>
28.967 - <propertyref prefix="run-sys-prop."/>
28.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
28.969 - </syspropertyset>
28.970 - <customize/>
28.971 - </java>
28.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
28.973 + <pathconvert property="run.classpath.without.build.classes.dir">
28.974 + <path path="${run.classpath}"/>
28.975 + <map from="${build.classes.dir.resolved}" to=""/>
28.976 + </pathconvert>
28.977 + <pathconvert pathsep=" " property="jar.classpath">
28.978 + <path path="${run.classpath.without.build.classes.dir}"/>
28.979 + <chainedmapper>
28.980 + <flattenmapper/>
28.981 + <filtermapper>
28.982 + <replacestring from=" " to="%20"/>
28.983 + </filtermapper>
28.984 + <globmapper from="*" to="lib/*"/>
28.985 + </chainedmapper>
28.986 + </pathconvert>
28.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
28.988 + <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}">
28.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
28.990 + <manifest>
28.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
28.992 + <customize/>
28.993 + </manifest>
28.994 + </copylibs>
28.995 </sequential>
28.996 </macrodef>
28.997 </target>
28.998 <target name="-init-presetdef-jar">
28.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
28.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
28.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
28.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
28.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
28.1004 </jar>
28.1005 </presetdef>
28.1006 </target>
28.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
28.1008 + <target name="-init-ap-cmdline-properties">
28.1009 + <property name="annotation.processing.enabled" value="true"/>
28.1010 + <property name="annotation.processing.processors.list" value=""/>
28.1011 + <property name="annotation.processing.processor.options" value=""/>
28.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
28.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
28.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
28.1015 + <condition property="ap.supported.internal" value="true">
28.1016 + <not>
28.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
28.1018 + </not>
28.1019 + </condition>
28.1020 + </target>
28.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
28.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
28.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
28.1024 + </condition>
28.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
28.1026 + <isfalse value="${annotation.processing.enabled}"/>
28.1027 + </condition>
28.1028 + </target>
28.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
28.1030 + <property name="ap.cmd.line.internal" value=""/>
28.1031 + </target>
28.1032 + <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"/>
28.1033 <!--
28.1034 ===================
28.1035 COMPILATION SECTION
28.1036 ===================
28.1037 -->
28.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
28.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
28.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
28.1041 + <delete file="${built-jar.properties}" quiet="true"/>
28.1042 + </target>
28.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
28.1044 + <echo level="warn" message="Cycle detected: friendpackage was already built"/>
28.1045 + </target>
28.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
28.1047 + <mkdir dir="${build.dir}"/>
28.1048 + <touch file="${built-jar.properties}" verbose="false"/>
28.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
28.1050 + <antcall target="-warn-already-built-jar"/>
28.1051 + <propertyfile file="${built-jar.properties}">
28.1052 + <entry key="${basedir}" value=""/>
28.1053 + </propertyfile>
28.1054 + </target>
28.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
28.1056 + <target depends="init" name="-check-automatic-build">
28.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
28.1058 + </target>
28.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
28.1060 + <antcall target="clean">
28.1061 + <param name="no.dependencies" value="true"/>
28.1062 + </antcall>
28.1063 + </target>
28.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
28.1065 <mkdir dir="${build.classes.dir}"/>
28.1066 </target>
28.1067 @@ -317,19 +1085,30 @@
28.1068 <!-- You can override this target in the ../build.xml file. -->
28.1069 </target>
28.1070 <target if="do.depend.true" name="-compile-depend">
28.1071 - <j2seproject3:depend/>
28.1072 + <pathconvert property="build.generated.subdirs">
28.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
28.1074 + <include name="*"/>
28.1075 + </dirset>
28.1076 + </pathconvert>
28.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
28.1078 </target>
28.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
28.1080 - <j2seproject3:javac/>
28.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
28.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
28.1083 <copy todir="${build.classes.dir}">
28.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
28.1085 </copy>
28.1086 </target>
28.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
28.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
28.1089 + <copy todir="${build.classes.dir}/META-INF">
28.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
28.1091 + </copy>
28.1092 + </target>
28.1093 <target name="-post-compile">
28.1094 <!-- Empty placeholder for easier customization. -->
28.1095 <!-- You can override this target in the ../build.xml file. -->
28.1096 </target>
28.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
28.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
28.1099 <target name="-pre-compile-single">
28.1100 <!-- Empty placeholder for easier customization. -->
28.1101 <!-- You can override this target in the ../build.xml file. -->
28.1102 @@ -337,13 +1116,13 @@
28.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
28.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
28.1105 <j2seproject3:force-recompile/>
28.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
28.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
28.1108 </target>
28.1109 <target name="-post-compile-single">
28.1110 <!-- Empty placeholder for easier customization. -->
28.1111 <!-- You can override this target in the ../build.xml file. -->
28.1112 </target>
28.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
28.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
28.1115 <!--
28.1116 ====================
28.1117 JAR BUILDING SECTION
28.1118 @@ -357,57 +1136,191 @@
28.1119 <!-- Empty placeholder for easier customization. -->
28.1120 <!-- You can override this target in the ../build.xml file. -->
28.1121 </target>
28.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
28.1123 - <j2seproject1:jar/>
28.1124 + <target depends="init,compile" name="-check-module-main-class">
28.1125 + <pathconvert property="main.class.file">
28.1126 + <string value="${main.class}"/>
28.1127 + <unpackagemapper from="*" to="*.class"/>
28.1128 + </pathconvert>
28.1129 + <condition property="do.module.main.class">
28.1130 + <and>
28.1131 + <isset property="main.class.available"/>
28.1132 + <available file="${build.classes.dir}/module-info.class"/>
28.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
28.1134 + <isset property="libs.CopyLibs.classpath"/>
28.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
28.1136 + </and>
28.1137 + </condition>
28.1138 </target>
28.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
28.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
28.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
28.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
28.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
28.1144 </target>
28.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
28.1146 - <j2seproject1:jar manifest="${manifest.file}">
28.1147 - <j2seproject1:manifest>
28.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
28.1149 - </j2seproject1:manifest>
28.1150 - </j2seproject1:jar>
28.1151 - <echo>To run this application from the command line without Ant, try:</echo>
28.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
28.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
28.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
28.1155 + </target>
28.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
28.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
28.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
28.1159 + </target>
28.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
28.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
28.1162 + <attribute name="Main-Class" value="${main.class}"/>
28.1163 + </manifest>
28.1164 + </target>
28.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
28.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
28.1167 + <attribute name="Profile" value="${javac.profile}"/>
28.1168 + </manifest>
28.1169 + </target>
28.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
28.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
28.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
28.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
28.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
28.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
28.1176 + </manifest>
28.1177 + </target>
28.1178 + <target depends="init,compile" name="-check-do-mkdist">
28.1179 + <condition property="do.mkdist">
28.1180 + <and>
28.1181 + <isset property="do.archive"/>
28.1182 + <isset property="libs.CopyLibs.classpath"/>
28.1183 + <not>
28.1184 + <istrue value="${mkdist.disabled}"/>
28.1185 + </not>
28.1186 + <not>
28.1187 + <available file="${build.classes.dir}/module-info.class"/>
28.1188 + </not>
28.1189 + </and>
28.1190 + </condition>
28.1191 + </target>
28.1192 + <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">
28.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
28.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
28.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
28.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
28.1197 + </target>
28.1198 + <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">
28.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
28.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
28.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
28.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
28.1203 + <isset property="named.module.internal"/>
28.1204 + </condition>
28.1205 <pathconvert property="run.classpath.with.dist.jar">
28.1206 <path path="${run.classpath}"/>
28.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
28.1208 + </pathconvert>
28.1209 + <pathconvert property="run.modulepath.with.dist.jar">
28.1210 + <path location="${dist.jar.resolved}"/>
28.1211 + <path path="${run.modulepath}"/>
28.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
28.1213 </pathconvert>
28.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
28.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
28.1216 + <isset property="named.module.internal"/>
28.1217 + </condition>
28.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
28.1219 + <and>
28.1220 + <isset property="modules.supported.internal"/>
28.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
28.1222 + </and>
28.1223 + </condition>
28.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
28.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
28.1226 + </condition>
28.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
28.1228 + <isset property="do.module.main.class"/>
28.1229 + </condition>
28.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
28.1231 + <isset property="named.module.internal"/>
28.1232 + </condition>
28.1233 + <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}">
28.1234 + <isset property="main.class.available"/>
28.1235 + </condition>
28.1236 + <condition else="debug" property="jar.usage.level" value="info">
28.1237 + <isset property="main.class.available"/>
28.1238 + </condition>
28.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
28.1240 </target>
28.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
28.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
28.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
28.1244 - <path path="${run.classpath}"/>
28.1245 - <map from="${build.classes.dir.resolved}" to=""/>
28.1246 - </pathconvert>
28.1247 - <pathconvert pathsep=" " property="jar.classpath">
28.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
28.1249 - <chainedmapper>
28.1250 - <flattenmapper/>
28.1251 - <globmapper from="*" to="lib/*"/>
28.1252 - </chainedmapper>
28.1253 - </pathconvert>
28.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
28.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
28.1256 - <fileset dir="${build.classes.dir}"/>
28.1257 - <manifest>
28.1258 - <attribute name="Main-Class" value="${main.class}"/>
28.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
28.1260 - </manifest>
28.1261 - </copylibs>
28.1262 - <echo>To run this application from the command line without Ant, try:</echo>
28.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
28.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
28.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
28.1266 + <delete>
28.1267 + <fileset file="${tmp.manifest.file}"/>
28.1268 + </delete>
28.1269 </target>
28.1270 + <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"/>
28.1271 + <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"/>
28.1272 <target name="-post-jar">
28.1273 <!-- Empty placeholder for easier customization. -->
28.1274 <!-- You can override this target in the ../build.xml file. -->
28.1275 </target>
28.1276 - <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"/>
28.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
28.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
28.1279 + <!--
28.1280 + =================
28.1281 + DEPLOY SECTION
28.1282 + =================
28.1283 + -->
28.1284 + <target name="-pre-deploy">
28.1285 + <!-- Empty placeholder for easier customization. -->
28.1286 + <!-- You can override this target in the ../build.xml file. -->
28.1287 + </target>
28.1288 + <target depends="init" name="-check-jlink">
28.1289 + <condition property="do.jlink.internal">
28.1290 + <and>
28.1291 + <istrue value="${do.jlink}"/>
28.1292 + <isset property="do.archive"/>
28.1293 + <isset property="named.module.internal"/>
28.1294 + </and>
28.1295 + </condition>
28.1296 + </target>
28.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
28.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
28.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
28.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
28.1301 + <and>
28.1302 + <isset property="jlink.additionalmodules"/>
28.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
28.1304 + </and>
28.1305 + </condition>
28.1306 + <condition property="jlink.do.strip.internal">
28.1307 + <and>
28.1308 + <isset property="jlink.strip"/>
28.1309 + <istrue value="${jlink.strip}"/>
28.1310 + </and>
28.1311 + </condition>
28.1312 + <condition property="jlink.do.additionalparam.internal">
28.1313 + <and>
28.1314 + <isset property="jlink.additionalparam"/>
28.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
28.1316 + </and>
28.1317 + </condition>
28.1318 + <condition property="jlink.do.launcher.internal">
28.1319 + <and>
28.1320 + <istrue value="${jlink.launcher}"/>
28.1321 + <isset property="main.class.available"/>
28.1322 + </and>
28.1323 + </condition>
28.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
28.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
28.1326 + <exec executable="${platform.jlink}">
28.1327 + <arg value="--module-path"/>
28.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
28.1329 + <arg value="--add-modules"/>
28.1330 + <arg value="${jlink.add.modules}"/>
28.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
28.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
28.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
28.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
28.1335 + <arg value="--output"/>
28.1336 + <arg value="${dist.jlink.output}"/>
28.1337 + </exec>
28.1338 + </target>
28.1339 + <target name="-post-deploy">
28.1340 + <!-- Empty placeholder for easier customization. -->
28.1341 + <!-- You can override this target in the ../build.xml file. -->
28.1342 + </target>
28.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
28.1344 <!--
28.1345 =================
28.1346 EXECUTION SECTION
28.1347 @@ -423,10 +1336,14 @@
28.1348 <target name="-do-not-recompile">
28.1349 <property name="javac.includes.binary" value=""/>
28.1350 </target>
28.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
28.1352 + <target depends="init,compile-single" name="run-single">
28.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
28.1354 <j2seproject1:java classname="${run.class}"/>
28.1355 </target>
28.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
28.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
28.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
28.1359 + </target>
28.1360 <!--
28.1361 =================
28.1362 DEBUGGING SECTION
28.1363 @@ -435,11 +1352,14 @@
28.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
28.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
28.1366 </target>
28.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
28.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
28.1369 + </target>
28.1370 <target depends="init,compile" name="-debug-start-debuggee">
28.1371 <j2seproject3:debug>
28.1372 - <customize>
28.1373 + <customizeDebuggee>
28.1374 <arg line="${application.args}"/>
28.1375 - </customize>
28.1376 + </customizeDebuggee>
28.1377 </j2seproject3:debug>
28.1378 </target>
28.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
28.1380 @@ -451,7 +1371,12 @@
28.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
28.1382 <j2seproject3:debug classname="${debug.class}"/>
28.1383 </target>
28.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
28.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
28.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
28.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
28.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
28.1389 + </target>
28.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
28.1391 <target depends="init" name="-pre-debug-fix">
28.1392 <fail unless="fix.includes">Must set fix.includes</fail>
28.1393 <property name="javac.includes" value="${fix.includes}.java"/>
28.1394 @@ -461,20 +1386,146 @@
28.1395 </target>
28.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
28.1397 <!--
28.1398 + =================
28.1399 + PROFILING SECTION
28.1400 + =================
28.1401 + -->
28.1402 + <!--
28.1403 + pre NB7.2 profiler integration
28.1404 + -->
28.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
28.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
28.1407 + <nbprofiledirect>
28.1408 + <classpath>
28.1409 + <path path="${run.classpath}"/>
28.1410 + </classpath>
28.1411 + </nbprofiledirect>
28.1412 + <profile/>
28.1413 + </target>
28.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
28.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
28.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
28.1417 + <nbprofiledirect>
28.1418 + <classpath>
28.1419 + <path path="${run.classpath}"/>
28.1420 + </classpath>
28.1421 + </nbprofiledirect>
28.1422 + <profile classname="${profile.class}"/>
28.1423 + </target>
28.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
28.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
28.1426 + <nbprofiledirect>
28.1427 + <classpath>
28.1428 + <path path="${run.classpath}"/>
28.1429 + </classpath>
28.1430 + </nbprofiledirect>
28.1431 + <profile classname="sun.applet.AppletViewer">
28.1432 + <customize>
28.1433 + <arg value="${applet.url}"/>
28.1434 + </customize>
28.1435 + </profile>
28.1436 + </target>
28.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
28.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
28.1439 + <nbprofiledirect>
28.1440 + <classpath>
28.1441 + <path path="${run.test.classpath}"/>
28.1442 + </classpath>
28.1443 + </nbprofiledirect>
28.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
28.1445 + <customize>
28.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
28.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
28.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
28.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
28.1450 + <classpath>
28.1451 + <path path="${run.test.classpath}"/>
28.1452 + </classpath>
28.1453 + </customize>
28.1454 + </j2seproject3:junit>
28.1455 + </target>
28.1456 + <!--
28.1457 + end of pre NB72 profiling section
28.1458 + -->
28.1459 + <target if="netbeans.home" name="-profile-check">
28.1460 + <condition property="profiler.configured">
28.1461 + <or>
28.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
28.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
28.1464 + </or>
28.1465 + </condition>
28.1466 + </target>
28.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
28.1468 + <startprofiler/>
28.1469 + <antcall target="run"/>
28.1470 + </target>
28.1471 + <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">
28.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
28.1473 + <startprofiler/>
28.1474 + <antcall target="run-single"/>
28.1475 + </target>
28.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
28.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
28.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
28.1479 + <startprofiler/>
28.1480 + <antcall target="test-single"/>
28.1481 + </target>
28.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
28.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
28.1484 + <startprofiler/>
28.1485 + <antcall target="run-test-with-main"/>
28.1486 + </target>
28.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
28.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
28.1489 + <startprofiler/>
28.1490 + <antcall target="run-applet"/>
28.1491 + </target>
28.1492 + <!--
28.1493 ===============
28.1494 JAVADOC SECTION
28.1495 ===============
28.1496 -->
28.1497 - <target depends="init" name="-javadoc-build">
28.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
28.1499 <mkdir dir="${dist.javadoc.dir}"/>
28.1500 - <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}">
28.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
28.1502 + <and>
28.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
28.1504 + <not>
28.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
28.1506 + </not>
28.1507 + </and>
28.1508 + </condition>
28.1509 + <condition else="" property="bug5101868workaround" value="*.java">
28.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
28.1511 + </condition>
28.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
28.1513 + <and>
28.1514 + <isset property="javadoc.html5"/>
28.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
28.1516 + </and>
28.1517 + </condition>
28.1518 + <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}">
28.1519 <classpath>
28.1520 <path path="${javac.classpath}"/>
28.1521 </classpath>
28.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
28.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
28.1524 <filename name="**/*.java"/>
28.1525 </fileset>
28.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
28.1527 + <include name="**/*.java"/>
28.1528 + <exclude name="*.java"/>
28.1529 + </fileset>
28.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
28.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
28.1532 </javadoc>
28.1533 + <copy todir="${dist.javadoc.dir}">
28.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
28.1535 + <filename name="**/doc-files/**"/>
28.1536 + </fileset>
28.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
28.1538 + <include name="**/doc-files/**"/>
28.1539 + </fileset>
28.1540 + </copy>
28.1541 </target>
28.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
28.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
28.1544 @@ -482,7 +1533,7 @@
28.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
28.1546 <!--
28.1547 =========================
28.1548 - JUNIT COMPILATION SECTION
28.1549 + TEST COMPILATION SECTION
28.1550 =========================
28.1551 -->
28.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
28.1553 @@ -492,11 +1543,63 @@
28.1554 <!-- Empty placeholder for easier customization. -->
28.1555 <!-- You can override this target in the ../build.xml file. -->
28.1556 </target>
28.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
28.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
28.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
28.1560 + <and>
28.1561 + <isset property="test.module.name"/>
28.1562 + <length length="0" string="${test.module.name}" when="greater"/>
28.1563 + </and>
28.1564 + </condition>
28.1565 + <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">
28.1566 + <and>
28.1567 + <isset property="test.module.name"/>
28.1568 + <length length="0" string="${test.module.name}" when="greater"/>
28.1569 + </and>
28.1570 + </condition>
28.1571 + </target>
28.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
28.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
28.1574 + <and>
28.1575 + <isset property="test.module.name"/>
28.1576 + <length length="0" string="${test.module.name}" when="greater"/>
28.1577 + </and>
28.1578 + </condition>
28.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
28.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
28.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
28.1582 + <chainedmapper>
28.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
28.1584 + <filtermapper>
28.1585 + <uniqfilter/>
28.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
28.1587 + </filtermapper>
28.1588 + <cutdirsmapper dirs="1"/>
28.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
28.1590 + </chainedmapper>
28.1591 + </pathconvert>
28.1592 + <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}">
28.1593 + <and>
28.1594 + <isset property="test.module.name"/>
28.1595 + <length length="0" string="${test.module.name}" when="greater"/>
28.1596 + </and>
28.1597 + </condition>
28.1598 + </target>
28.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
28.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
28.1601 + <property name="javac.test.compilerargs" value=""/>
28.1602 + <property name="run.test.jvmargs" value=""/>
28.1603 + </target>
28.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
28.1605 <target if="do.depend.true" name="-compile-test-depend">
28.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
28.1607 </target>
28.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
28.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
28.1610 + <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">
28.1611 + <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}">
28.1612 + <customize>
28.1613 + <compilerarg line="${javac.test.compilerargs}"/>
28.1614 + </customize>
28.1615 + </j2seproject3:javac>
28.1616 <copy todir="${build.test.classes.dir}">
28.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
28.1618 </copy>
28.1619 @@ -510,10 +1613,14 @@
28.1620 <!-- Empty placeholder for easier customization. -->
28.1621 <!-- You can override this target in the ../build.xml file. -->
28.1622 </target>
28.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
28.1624 + <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">
28.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
28.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
28.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
28.1628 + <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}">
28.1629 + <customize>
28.1630 + <compilerarg line="${javac.test.compilerargs}"/>
28.1631 + </customize>
28.1632 + </j2seproject3:javac>
28.1633 <copy todir="${build.test.classes.dir}">
28.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
28.1635 </copy>
28.1636 @@ -525,17 +1632,17 @@
28.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
28.1638 <!--
28.1639 =======================
28.1640 - JUNIT EXECUTION SECTION
28.1641 + TEST EXECUTION SECTION
28.1642 =======================
28.1643 -->
28.1644 <target depends="init" if="have.tests" name="-pre-test-run">
28.1645 <mkdir dir="${build.test.results.dir}"/>
28.1646 </target>
28.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
28.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
28.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
28.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
28.1651 </target>
28.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
28.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
28.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
28.1655 </target>
28.1656 <target depends="init" if="have.tests" name="test-report"/>
28.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
28.1658 @@ -543,41 +1650,42 @@
28.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
28.1660 <mkdir dir="${build.test.results.dir}"/>
28.1661 </target>
28.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
28.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
28.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
28.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
28.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
28.1667 </target>
28.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
28.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
28.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
28.1671 </target>
28.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
28.1673 + <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"/>
28.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
28.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
28.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
28.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
28.1678 + </target>
28.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
28.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
28.1681 + </target>
28.1682 + <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"/>
28.1683 <!--
28.1684 =======================
28.1685 - JUNIT DEBUGGING SECTION
28.1686 + TEST DEBUGGING SECTION
28.1687 =======================
28.1688 -->
28.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
28.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
28.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
28.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
28.1693 - <delete file="${test.report.file}"/>
28.1694 - <mkdir dir="${build.test.results.dir}"/>
28.1695 - <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}">
28.1696 - <customize>
28.1697 - <syspropertyset>
28.1698 - <propertyref prefix="test-sys-prop."/>
28.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
28.1700 - </syspropertyset>
28.1701 - <arg value="${test.class}"/>
28.1702 - <arg value="showoutput=true"/>
28.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
28.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
28.1705 - </customize>
28.1706 - </j2seproject3:debug>
28.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
28.1708 + </target>
28.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
28.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
28.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
28.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
28.1713 </target>
28.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
28.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
28.1716 </target>
28.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
28.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
28.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
28.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
28.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
28.1722 </target>
28.1723 @@ -603,9 +1711,9 @@
28.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
28.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
28.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
28.1727 - <customize>
28.1728 + <customizeDebuggee>
28.1729 <arg value="${applet.url}"/>
28.1730 - </customize>
28.1731 + </customizeDebuggee>
28.1732 </j2seproject3:debug>
28.1733 </target>
28.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
28.1735 @@ -614,14 +1722,49 @@
28.1736 CLEANUP SECTION
28.1737 ===============
28.1738 -->
28.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
28.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
28.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
28.1742 + <delete file="${built-clean.properties}" quiet="true"/>
28.1743 + </target>
28.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
28.1745 + <echo level="warn" message="Cycle detected: friendpackage was already built"/>
28.1746 + </target>
28.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
28.1748 + <mkdir dir="${build.dir}"/>
28.1749 + <touch file="${built-clean.properties}" verbose="false"/>
28.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
28.1751 + <antcall target="-warn-already-built-clean"/>
28.1752 + <propertyfile file="${built-clean.properties}">
28.1753 + <entry key="${basedir}" value=""/>
28.1754 + </propertyfile>
28.1755 + </target>
28.1756 <target depends="init" name="-do-clean">
28.1757 <delete dir="${build.dir}"/>
28.1758 - <delete dir="${dist.dir}"/>
28.1759 + <delete dir="${dist.jlink.output}"/>
28.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
28.1761 </target>
28.1762 <target name="-post-clean">
28.1763 <!-- Empty placeholder for easier customization. -->
28.1764 <!-- You can override this target in the ../build.xml file. -->
28.1765 </target>
28.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
28.1767 + <target name="-check-call-dep">
28.1768 + <property file="${call.built.properties}" prefix="already.built."/>
28.1769 + <condition property="should.call.dep">
28.1770 + <and>
28.1771 + <not>
28.1772 + <isset property="already.built.${call.subproject}"/>
28.1773 + </not>
28.1774 + <available file="${call.script}"/>
28.1775 + </and>
28.1776 + </condition>
28.1777 + </target>
28.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
28.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
28.1780 + <propertyset>
28.1781 + <propertyref prefix="transfer."/>
28.1782 + <mapper from="transfer.*" to="*" type="glob"/>
28.1783 + </propertyset>
28.1784 + </ant>
28.1785 + </target>
28.1786 </project>
29.1 --- a/samples/friendpackage/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
29.2 +++ b/samples/friendpackage/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
29.3 @@ -1,8 +1,8 @@
29.4 build.xml.data.CRC32=b1c774b2
29.5 -build.xml.script.CRC32=fa64c0b4
29.6 -build.xml.stylesheet.CRC32=be360661
29.7 +build.xml.script.CRC32=f3114cdb
29.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
29.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
29.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
29.11 nbproject/build-impl.xml.data.CRC32=b1c774b2
29.12 -nbproject/build-impl.xml.script.CRC32=2fcc3cdb
29.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
29.14 +nbproject/build-impl.xml.script.CRC32=ddd56abc
29.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
30.1 --- a/samples/friendpackage/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
30.2 +++ b/samples/friendpackage/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
30.3 @@ -5,14 +5,19 @@
30.4 # This directory is removed when the project is cleaned:
30.5 build.dir=build
30.6 build.generated.dir=${build.dir}/generated
30.7 +build.generated.sources.dir=${build.dir}/generated-sources
30.8 # Only compile against the classpath explicitly listed here:
30.9 build.sysclasspath=ignore
30.10 build.test.classes.dir=${build.dir}/test/classes
30.11 build.test.results.dir=${build.dir}/test/results
30.12 debug.classpath=\
30.13 ${run.classpath}
30.14 +debug.modulepath=\
30.15 + ${run.modulepath}
30.16 debug.test.classpath=\
30.17 ${run.test.classpath}
30.18 +debug.test.modulepath=\
30.19 + ${run.test.modulepath}
30.20 # This directory is removed when the project is cleaned:
30.21 dist.dir=dist
30.22 dist.jar=${dist.dir}/friendpackage.jar
30.23 @@ -25,12 +30,16 @@
30.24 # Space-separated list of extra javac options
30.25 javac.compilerargs=
30.26 javac.deprecation=false
30.27 -javac.source=1.5
30.28 -javac.target=1.5
30.29 +javac.modulepath=
30.30 +javac.processormodulepath=
30.31 +javac.source=1.6
30.32 +javac.target=1.6
30.33 javac.test.classpath=\
30.34 ${javac.classpath}:\
30.35 ${build.classes.dir}:\
30.36 ${file.reference.junit-4.4.jar}
30.37 +javac.test.modulepath=\
30.38 + ${javac.modulepath}
30.39 javadoc.additionalparam=
30.40 javadoc.author=false
30.41 javadoc.encoding=
30.42 @@ -51,8 +60,12 @@
30.43 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
30.44 # or test-sys-prop.name=value to set system properties for unit tests):
30.45 run.jvmargs=
30.46 +run.modulepath=\
30.47 + ${javac.modulepath}
30.48 run.test.classpath=\
30.49 ${javac.test.classpath}:\
30.50 ${build.test.classes.dir}
30.51 +run.test.modulepath=\
30.52 + ${javac.test.modulepath}
30.53 src.dir=src
30.54 test.src.dir=test
31.1 --- a/samples/gc/build.xml Mon Nov 11 05:47:32 2019 +0100
31.2 +++ b/samples/gc/build.xml Mon Nov 11 13:17:34 2019 +0100
31.3 @@ -51,8 +51,7 @@
31.4 -init-macrodef-junit: defines macro for junit execution
31.5 -init-macrodef-debug: defines macro for class debugging
31.6 -init-macrodef-java: defines macro for class execution
31.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
31.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
31.9 + -do-jar: JAR building
31.10 run: execution of project
31.11 -javadoc-build: Javadoc generation
31.12 test-report: JUnit report generation
32.1 --- a/samples/gc/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
32.2 +++ b/samples/gc/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
32.3 @@ -12,18 +12,18 @@
32.4 - execution
32.5 - debugging
32.6 - javadoc
32.7 - - junit compilation
32.8 - - junit execution
32.9 - - junit debugging
32.10 + - test compilation
32.11 + - test execution
32.12 + - test debugging
32.13 - applet
32.14 - cleanup
32.15
32.16 -->
32.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="gc-impl">
32.18 - <fail message="Please build using Ant 1.7.1 or higher.">
32.19 +<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="gc-impl">
32.20 + <fail message="Please build using Ant 1.8.0 or higher.">
32.21 <condition>
32.22 <not>
32.23 - <antversion atleast="1.7.1"/>
32.24 + <antversion atleast="1.8.0"/>
32.25 </not>
32.26 </condition>
32.27 </fail>
32.28 @@ -46,15 +46,89 @@
32.29 <property file="${user.properties.file}"/>
32.30 <!-- The two properties below are usually overridden -->
32.31 <!-- by the active platform. Just a fallback. -->
32.32 - <property name="default.javac.source" value="1.4"/>
32.33 - <property name="default.javac.target" value="1.4"/>
32.34 + <property name="default.javac.source" value="1.6"/>
32.35 + <property name="default.javac.target" value="1.6"/>
32.36 </target>
32.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
32.38 <property file="nbproject/configs/${config}.properties"/>
32.39 <property file="nbproject/project.properties"/>
32.40 </target>
32.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
32.42 + <target name="-init-modules-supported">
32.43 + <condition property="modules.supported.internal" value="true">
32.44 + <not>
32.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
32.46 + </not>
32.47 + </condition>
32.48 + </target>
32.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
32.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
32.51 + <attribute name="property"/>
32.52 + <attribute name="sourcepath"/>
32.53 + <sequential>
32.54 + <loadresource property="@{property}" quiet="true">
32.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
32.56 + <filterchain>
32.57 + <stripjavacomments/>
32.58 + <linecontainsregexp>
32.59 + <regexp pattern="module .* \{"/>
32.60 + </linecontainsregexp>
32.61 + <tokenfilter>
32.62 + <linetokenizer/>
32.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
32.64 + </tokenfilter>
32.65 + <striplinebreaks/>
32.66 + </filterchain>
32.67 + </loadresource>
32.68 + </sequential>
32.69 + </macrodef>
32.70 + </target>
32.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
32.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
32.73 + <condition>
32.74 + <not>
32.75 + <antversion atleast="1.10.0"/>
32.76 + </not>
32.77 + </condition>
32.78 + </fail>
32.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
32.80 + <condition property="named.module.internal">
32.81 + <and>
32.82 + <isset property="module.name"/>
32.83 + <length length="0" string="${module.name}" when="greater"/>
32.84 + </and>
32.85 + </condition>
32.86 + <condition property="unnamed.module.internal">
32.87 + <not>
32.88 + <isset property="named.module.internal"/>
32.89 + </not>
32.90 + </condition>
32.91 + <property name="javac.modulepath" value=""/>
32.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
32.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
32.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
32.95 + <property name="javac.upgrademodulepath" value=""/>
32.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
32.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
32.98 + <and>
32.99 + <isset property="javac.systemmodulepath"/>
32.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
32.101 + </and>
32.102 + </condition>
32.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
32.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
32.105 + <property name="module.name" value=""/>
32.106 + </target>
32.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
32.108 + <property name="platform.java" value="${java.home}/bin/java"/>
32.109 <available file="${manifest.file}" property="manifest.available"/>
32.110 + <condition property="splashscreen.available">
32.111 + <and>
32.112 + <not>
32.113 + <equals arg1="${application.splash}" arg2="" trim="true"/>
32.114 + </not>
32.115 + <available file="${application.splash}"/>
32.116 + </and>
32.117 + </condition>
32.118 <condition property="main.class.available">
32.119 <and>
32.120 <isset property="main.class"/>
32.121 @@ -63,43 +137,46 @@
32.122 </not>
32.123 </and>
32.124 </condition>
32.125 - <condition property="manifest.available+main.class">
32.126 + <condition property="profile.available">
32.127 <and>
32.128 - <isset property="manifest.available"/>
32.129 - <isset property="main.class.available"/>
32.130 - </and>
32.131 - </condition>
32.132 - <condition property="do.mkdist">
32.133 - <and>
32.134 - <isset property="libs.CopyLibs.classpath"/>
32.135 + <isset property="javac.profile"/>
32.136 + <length length="0" string="${javac.profile}" when="greater"/>
32.137 <not>
32.138 - <istrue value="${mkdist.disabled}"/>
32.139 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
32.140 </not>
32.141 </and>
32.142 </condition>
32.143 - <condition property="manifest.available+main.class+mkdist.available">
32.144 + <condition property="do.archive">
32.145 + <or>
32.146 + <not>
32.147 + <istrue value="${jar.archive.disabled}"/>
32.148 + </not>
32.149 + <istrue value="${not.archive.disabled}"/>
32.150 + </or>
32.151 + </condition>
32.152 + <condition property="do.archive+manifest.available">
32.153 <and>
32.154 - <istrue value="${manifest.available+main.class}"/>
32.155 - <isset property="do.mkdist"/>
32.156 + <isset property="manifest.available"/>
32.157 + <istrue value="${do.archive}"/>
32.158 </and>
32.159 </condition>
32.160 - <condition property="manifest.available+mkdist.available">
32.161 + <condition property="do.archive+main.class.available">
32.162 <and>
32.163 - <istrue value="${manifest.available}"/>
32.164 - <isset property="do.mkdist"/>
32.165 + <isset property="main.class.available"/>
32.166 + <istrue value="${do.archive}"/>
32.167 </and>
32.168 </condition>
32.169 - <condition property="manifest.available-mkdist.available">
32.170 - <or>
32.171 - <istrue value="${manifest.available}"/>
32.172 - <isset property="do.mkdist"/>
32.173 - </or>
32.174 + <condition property="do.archive+splashscreen.available">
32.175 + <and>
32.176 + <isset property="splashscreen.available"/>
32.177 + <istrue value="${do.archive}"/>
32.178 + </and>
32.179 </condition>
32.180 - <condition property="manifest.available+main.class-mkdist.available">
32.181 - <or>
32.182 - <istrue value="${manifest.available+main.class}"/>
32.183 - <isset property="do.mkdist"/>
32.184 - </or>
32.185 + <condition property="do.archive+profile.available">
32.186 + <and>
32.187 + <isset property="profile.available"/>
32.188 + <istrue value="${do.archive}"/>
32.189 + </and>
32.190 </condition>
32.191 <condition property="have.tests">
32.192 <or>
32.193 @@ -124,6 +201,7 @@
32.194 </and>
32.195 </condition>
32.196 <property name="run.jvmargs" value=""/>
32.197 + <property name="run.jvmargs.ide" value=""/>
32.198 <property name="javac.compilerargs" value=""/>
32.199 <property name="work.dir" value="${basedir}"/>
32.200 <condition property="no.deps">
32.201 @@ -136,6 +214,7 @@
32.202 <property name="application.args" value=""/>
32.203 <property name="source.encoding" value="${file.encoding}"/>
32.204 <property name="runtime.encoding" value="${source.encoding}"/>
32.205 + <property name="manifest.encoding" value="${source.encoding}"/>
32.206 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
32.207 <and>
32.208 <isset property="javadoc.encoding"/>
32.209 @@ -153,9 +232,56 @@
32.210 </condition>
32.211 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
32.212 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
32.213 - <length length="0" string="${endorsed.classpath}" when="greater"/>
32.214 + <and>
32.215 + <isset property="endorsed.classpath"/>
32.216 + <not>
32.217 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
32.218 + </not>
32.219 + </and>
32.220 </condition>
32.221 - <property name="javac.fork" value="false"/>
32.222 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
32.223 + <isset property="profile.available"/>
32.224 + </condition>
32.225 + <condition else="false" property="jdkBug6558476">
32.226 + <and>
32.227 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
32.228 + <not>
32.229 + <os family="unix"/>
32.230 + </not>
32.231 + </and>
32.232 + </condition>
32.233 + <condition else="false" property="javac.fork">
32.234 + <or>
32.235 + <istrue value="${jdkBug6558476}"/>
32.236 + <istrue value="${javac.external.vm}"/>
32.237 + </or>
32.238 + </condition>
32.239 + <property name="jar.index" value="false"/>
32.240 + <property name="jar.index.metainf" value="${jar.index}"/>
32.241 + <property name="copylibs.rebase" value="true"/>
32.242 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
32.243 + <condition property="junit.available">
32.244 + <or>
32.245 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
32.246 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
32.247 + </or>
32.248 + </condition>
32.249 + <condition property="testng.available">
32.250 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
32.251 + </condition>
32.252 + <condition property="junit+testng.available">
32.253 + <and>
32.254 + <istrue value="${junit.available}"/>
32.255 + <istrue value="${testng.available}"/>
32.256 + </and>
32.257 + </condition>
32.258 + <condition else="testng" property="testng.mode" value="mixed">
32.259 + <istrue value="${junit+testng.available}"/>
32.260 + </condition>
32.261 + <condition else="" property="testng.debug.mode" value="-mixed">
32.262 + <istrue value="${junit+testng.available}"/>
32.263 + </condition>
32.264 + <property name="java.failonerror" value="true"/>
32.265 </target>
32.266 <target name="-post-init">
32.267 <!-- Empty placeholder for easier customization. -->
32.268 @@ -182,11 +308,125 @@
32.269 </sequential>
32.270 </macrodef>
32.271 </target>
32.272 - <target name="-init-macrodef-javac">
32.273 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
32.274 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
32.275 <attribute default="${src.dir}" name="srcdir"/>
32.276 <attribute default="${build.classes.dir}" name="destdir"/>
32.277 <attribute default="${javac.classpath}" name="classpath"/>
32.278 + <attribute default="${javac.modulepath}" name="modulepath"/>
32.279 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
32.280 + <attribute default="${javac.processorpath}" name="processorpath"/>
32.281 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
32.282 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
32.283 + <attribute default="${includes}" name="includes"/>
32.284 + <attribute default="${excludes}" name="excludes"/>
32.285 + <attribute default="${javac.debug}" name="debug"/>
32.286 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
32.287 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
32.288 + <attribute default="${empty.dir}" name="gensrcdir"/>
32.289 + <element name="customize" optional="true"/>
32.290 + <sequential>
32.291 + <condition property="warn.excludes.internal">
32.292 + <and>
32.293 + <isset property="named.module.internal"/>
32.294 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
32.295 + </and>
32.296 + </condition>
32.297 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
32.298 + <property location="${build.dir}/empty" name="empty.dir"/>
32.299 + <mkdir dir="${empty.dir}"/>
32.300 + <mkdir dir="@{apgeneratedsrcdir}"/>
32.301 + <condition property="processormodulepath.set">
32.302 + <resourcecount count="0" when="greater">
32.303 + <path>
32.304 + <pathelement path="@{processormodulepath}"/>
32.305 + </path>
32.306 + </resourcecount>
32.307 + </condition>
32.308 + <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}">
32.309 + <src>
32.310 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
32.311 + <include name="*"/>
32.312 + </dirset>
32.313 + </src>
32.314 + <classpath>
32.315 + <path path="@{classpath}"/>
32.316 + </classpath>
32.317 + <modulepath>
32.318 + <path path="@{modulepath}"/>
32.319 + </modulepath>
32.320 + <upgrademodulepath>
32.321 + <path path="@{upgrademodulepath}"/>
32.322 + </upgrademodulepath>
32.323 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
32.324 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
32.325 + <compilerarg line="${javac.compilerargs}"/>
32.326 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
32.327 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
32.328 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
32.329 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
32.330 + <compilerarg line="${ap.processors.internal}"/>
32.331 + <compilerarg line="${annotation.processing.processor.options}"/>
32.332 + <compilerarg value="-s"/>
32.333 + <compilerarg path="@{apgeneratedsrcdir}"/>
32.334 + <compilerarg line="${ap.proc.none.internal}"/>
32.335 + <customize/>
32.336 + </javac>
32.337 + </sequential>
32.338 + </macrodef>
32.339 + </target>
32.340 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
32.341 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
32.342 + <attribute default="${src.dir}" name="srcdir"/>
32.343 + <attribute default="${build.classes.dir}" name="destdir"/>
32.344 + <attribute default="${javac.classpath}" name="classpath"/>
32.345 + <attribute default="${javac.modulepath}" name="modulepath"/>
32.346 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
32.347 + <attribute default="${javac.processorpath}" name="processorpath"/>
32.348 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
32.349 + <attribute default="${includes}" name="includes"/>
32.350 + <attribute default="${excludes}" name="excludes"/>
32.351 + <attribute default="${javac.debug}" name="debug"/>
32.352 + <attribute default="${empty.dir}" name="sourcepath"/>
32.353 + <attribute default="${empty.dir}" name="gensrcdir"/>
32.354 + <element name="customize" optional="true"/>
32.355 + <sequential>
32.356 + <property location="${build.dir}/empty" name="empty.dir"/>
32.357 + <mkdir dir="${empty.dir}"/>
32.358 + <mkdir dir="@{apgeneratedsrcdir}"/>
32.359 + <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}">
32.360 + <src>
32.361 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
32.362 + <include name="*"/>
32.363 + </dirset>
32.364 + </src>
32.365 + <classpath>
32.366 + <path path="@{classpath}"/>
32.367 + </classpath>
32.368 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
32.369 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
32.370 + <compilerarg line="${javac.compilerargs}"/>
32.371 + <compilerarg value="-processorpath"/>
32.372 + <compilerarg path="@{processorpath}:${empty.dir}"/>
32.373 + <compilerarg line="${ap.processors.internal}"/>
32.374 + <compilerarg line="${annotation.processing.processor.options}"/>
32.375 + <compilerarg value="-s"/>
32.376 + <compilerarg path="@{apgeneratedsrcdir}"/>
32.377 + <compilerarg line="${ap.proc.none.internal}"/>
32.378 + <customize/>
32.379 + </javac>
32.380 + </sequential>
32.381 + </macrodef>
32.382 + </target>
32.383 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
32.384 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
32.385 + <attribute default="${src.dir}" name="srcdir"/>
32.386 + <attribute default="${build.classes.dir}" name="destdir"/>
32.387 + <attribute default="${javac.classpath}" name="classpath"/>
32.388 + <attribute default="${javac.modulepath}" name="modulepath"/>
32.389 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
32.390 + <attribute default="${javac.processorpath}" name="processorpath"/>
32.391 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
32.392 <attribute default="${includes}" name="includes"/>
32.393 <attribute default="${excludes}" name="excludes"/>
32.394 <attribute default="${javac.debug}" name="debug"/>
32.395 @@ -206,11 +446,14 @@
32.396 <path path="@{classpath}"/>
32.397 </classpath>
32.398 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
32.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
32.400 <compilerarg line="${javac.compilerargs}"/>
32.401 <customize/>
32.402 </javac>
32.403 </sequential>
32.404 </macrodef>
32.405 + </target>
32.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
32.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
32.408 <attribute default="${src.dir}" name="srcdir"/>
32.409 <attribute default="${build.classes.dir}" name="destdir"/>
32.410 @@ -227,52 +470,383 @@
32.411 <attribute default="${build.classes.dir}" name="destdir"/>
32.412 <sequential>
32.413 <fail unless="javac.includes">Must set javac.includes</fail>
32.414 - <pathconvert pathsep="," property="javac.includes.binary">
32.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
32.416 <path>
32.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
32.418 </path>
32.419 <globmapper from="*.java" to="*.class"/>
32.420 </pathconvert>
32.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
32.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
32.423 <delete>
32.424 - <files includes="${javac.includes.binary}"/>
32.425 + <files includesfile="${javac.includesfile.binary}"/>
32.426 + </delete>
32.427 + <delete>
32.428 + <fileset file="${javac.includesfile.binary}"/>
32.429 </delete>
32.430 </sequential>
32.431 </macrodef>
32.432 </target>
32.433 - <target name="-init-macrodef-junit">
32.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
32.435 + <condition else="false" property="nb.junit.batch" value="true">
32.436 + <and>
32.437 + <istrue value="${junit.available}"/>
32.438 + <not>
32.439 + <isset property="test.method"/>
32.440 + </not>
32.441 + </and>
32.442 + </condition>
32.443 + <condition else="false" property="nb.junit.single" value="true">
32.444 + <and>
32.445 + <istrue value="${junit.available}"/>
32.446 + <isset property="test.method"/>
32.447 + </and>
32.448 + </condition>
32.449 + </target>
32.450 + <target name="-init-test-properties">
32.451 + <property name="test.binaryincludes" value="<nothing>"/>
32.452 + <property name="test.binarytestincludes" value=""/>
32.453 + <property name="test.binaryexcludes" value=""/>
32.454 + </target>
32.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
32.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
32.457 + <attribute default="${includes}" name="includes"/>
32.458 + <attribute default="${excludes}" name="excludes"/>
32.459 + <element name="customizePrototype" optional="true"/>
32.460 + <sequential>
32.461 + <property name="junit.forkmode" value="perTest"/>
32.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
32.463 + <syspropertyset>
32.464 + <propertyref prefix="test-sys-prop."/>
32.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
32.466 + </syspropertyset>
32.467 + <classpath>
32.468 + <path path="${run.test.classpath}"/>
32.469 + </classpath>
32.470 + <modulepath>
32.471 + <path path="${run.test.modulepath}"/>
32.472 + </modulepath>
32.473 + <formatter type="brief" usefile="false"/>
32.474 + <formatter type="xml"/>
32.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.476 + <jvmarg value="-ea"/>
32.477 + <jvmarg line="${run.test.jvmargs}"/>
32.478 + <customizePrototype/>
32.479 + </junit>
32.480 + </sequential>
32.481 + </macrodef>
32.482 + </target>
32.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
32.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
32.485 + <attribute default="${includes}" name="includes"/>
32.486 + <attribute default="${excludes}" name="excludes"/>
32.487 + <element name="customizePrototype" optional="true"/>
32.488 + <sequential>
32.489 + <property name="junit.forkmode" value="perTest"/>
32.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
32.491 + <syspropertyset>
32.492 + <propertyref prefix="test-sys-prop."/>
32.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
32.494 + </syspropertyset>
32.495 + <classpath>
32.496 + <path path="${run.test.classpath}"/>
32.497 + </classpath>
32.498 + <formatter type="brief" usefile="false"/>
32.499 + <formatter type="xml"/>
32.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.501 + <jvmarg value="-ea"/>
32.502 + <customizePrototype/>
32.503 + </junit>
32.504 + </sequential>
32.505 + </macrodef>
32.506 + </target>
32.507 + <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}">
32.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
32.509 <attribute default="${includes}" name="includes"/>
32.510 <attribute default="${excludes}" name="excludes"/>
32.511 <attribute default="**" name="testincludes"/>
32.512 + <attribute default="" name="testmethods"/>
32.513 + <element name="customize" optional="true"/>
32.514 <sequential>
32.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
32.516 - <batchtest todir="${build.test.results.dir}">
32.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
32.518 - <filename name="@{testincludes}"/>
32.519 - </fileset>
32.520 - </batchtest>
32.521 + <j2seproject3:junit-prototype>
32.522 + <customizePrototype>
32.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
32.524 + <customize/>
32.525 + </customizePrototype>
32.526 + </j2seproject3:junit-prototype>
32.527 + </sequential>
32.528 + </macrodef>
32.529 + </target>
32.530 + <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}">
32.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
32.532 + <attribute default="${includes}" name="includes"/>
32.533 + <attribute default="${excludes}" name="excludes"/>
32.534 + <attribute default="**" name="testincludes"/>
32.535 + <attribute default="" name="testmethods"/>
32.536 + <element name="customize" optional="true"/>
32.537 + <sequential>
32.538 + <j2seproject3:junit-prototype>
32.539 + <customizePrototype>
32.540 + <batchtest todir="${build.test.results.dir}">
32.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
32.542 + <filename name="@{testincludes}"/>
32.543 + </fileset>
32.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
32.545 + <filename name="${test.binarytestincludes}"/>
32.546 + </fileset>
32.547 + </batchtest>
32.548 + <customize/>
32.549 + </customizePrototype>
32.550 + </j2seproject3:junit-prototype>
32.551 + </sequential>
32.552 + </macrodef>
32.553 + </target>
32.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
32.555 + <target if="${testng.available}" name="-init-macrodef-testng">
32.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
32.557 + <attribute default="${includes}" name="includes"/>
32.558 + <attribute default="${excludes}" name="excludes"/>
32.559 + <attribute default="**" name="testincludes"/>
32.560 + <attribute default="" name="testmethods"/>
32.561 + <element name="customize" optional="true"/>
32.562 + <sequential>
32.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
32.564 + <isset property="test.method"/>
32.565 + </condition>
32.566 + <union id="test.set">
32.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
32.568 + <filename name="@{testincludes}"/>
32.569 + </fileset>
32.570 + </union>
32.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
32.572 + <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="gc" testname="TestNG tests" workingDir="${work.dir}">
32.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
32.574 + <propertyset>
32.575 + <propertyref prefix="test-sys-prop."/>
32.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
32.577 + </propertyset>
32.578 <classpath>
32.579 <path path="${run.test.classpath}"/>
32.580 </classpath>
32.581 - <syspropertyset>
32.582 - <propertyref prefix="test-sys-prop."/>
32.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
32.584 - </syspropertyset>
32.585 - <formatter type="brief" usefile="false"/>
32.586 - <formatter type="xml"/>
32.587 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.588 - <jvmarg line="${run.jvmargs}"/>
32.589 - </junit>
32.590 + <customize/>
32.591 + </testng>
32.592 </sequential>
32.593 </macrodef>
32.594 </target>
32.595 + <target name="-init-macrodef-test-impl">
32.596 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
32.597 + <attribute default="${includes}" name="includes"/>
32.598 + <attribute default="${excludes}" name="excludes"/>
32.599 + <attribute default="**" name="testincludes"/>
32.600 + <attribute default="" name="testmethods"/>
32.601 + <element implicit="true" name="customize" optional="true"/>
32.602 + <sequential>
32.603 + <echo>No tests executed.</echo>
32.604 + </sequential>
32.605 + </macrodef>
32.606 + </target>
32.607 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
32.608 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
32.609 + <attribute default="${includes}" name="includes"/>
32.610 + <attribute default="${excludes}" name="excludes"/>
32.611 + <attribute default="**" name="testincludes"/>
32.612 + <attribute default="" name="testmethods"/>
32.613 + <element implicit="true" name="customize" optional="true"/>
32.614 + <sequential>
32.615 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
32.616 + <customize/>
32.617 + </j2seproject3:junit>
32.618 + </sequential>
32.619 + </macrodef>
32.620 + </target>
32.621 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
32.622 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
32.623 + <attribute default="${includes}" name="includes"/>
32.624 + <attribute default="${excludes}" name="excludes"/>
32.625 + <attribute default="**" name="testincludes"/>
32.626 + <attribute default="" name="testmethods"/>
32.627 + <element implicit="true" name="customize" optional="true"/>
32.628 + <sequential>
32.629 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
32.630 + <customize/>
32.631 + </j2seproject3:testng>
32.632 + </sequential>
32.633 + </macrodef>
32.634 + </target>
32.635 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
32.636 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
32.637 + <attribute default="${includes}" name="includes"/>
32.638 + <attribute default="${excludes}" name="excludes"/>
32.639 + <attribute default="**" name="testincludes"/>
32.640 + <attribute default="" name="testmethods"/>
32.641 + <sequential>
32.642 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
32.643 + <customize>
32.644 + <jvmarg line="${run.jvmargs}"/>
32.645 + <jvmarg line="${run.jvmargs.ide}"/>
32.646 + </customize>
32.647 + </j2seproject3:test-impl>
32.648 + </sequential>
32.649 + </macrodef>
32.650 + </target>
32.651 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
32.652 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
32.653 + <attribute default="${includes}" name="includes"/>
32.654 + <attribute default="${excludes}" name="excludes"/>
32.655 + <attribute default="**" name="testincludes"/>
32.656 + <attribute default="" name="testmethods"/>
32.657 + <element name="customizeDebuggee" optional="true"/>
32.658 + <sequential>
32.659 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
32.660 + <customize>
32.661 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
32.662 + <customizeDebuggee/>
32.663 + </customize>
32.664 + </j2seproject3:junit>
32.665 + </sequential>
32.666 + </macrodef>
32.667 + </target>
32.668 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
32.669 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
32.670 + <attribute default="${main.class}" name="testClass"/>
32.671 + <attribute default="" name="testMethod"/>
32.672 + <element name="customize2" optional="true"/>
32.673 + <sequential>
32.674 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
32.675 + <isset property="test.method"/>
32.676 + </condition>
32.677 + <condition else="-suitename gc -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
32.678 + <matches pattern=".*\.xml" string="@{testClass}"/>
32.679 + </condition>
32.680 + <delete dir="${build.test.results.dir}" quiet="true"/>
32.681 + <mkdir dir="${build.test.results.dir}"/>
32.682 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
32.683 + <customizeDebuggee>
32.684 + <customize2/>
32.685 + <jvmarg value="-ea"/>
32.686 + <arg line="${testng.debug.mode}"/>
32.687 + <arg line="-d ${build.test.results.dir}"/>
32.688 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
32.689 + <arg line="${testng.cmd.args}"/>
32.690 + </customizeDebuggee>
32.691 + </j2seproject3:debug>
32.692 + </sequential>
32.693 + </macrodef>
32.694 + </target>
32.695 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
32.696 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
32.697 + <attribute default="${main.class}" name="testClass"/>
32.698 + <attribute default="" name="testMethod"/>
32.699 + <element implicit="true" name="customize2" optional="true"/>
32.700 + <sequential>
32.701 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
32.702 + <customize2/>
32.703 + </j2seproject3:testng-debug>
32.704 + </sequential>
32.705 + </macrodef>
32.706 + </target>
32.707 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
32.708 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
32.709 + <attribute default="${includes}" name="includes"/>
32.710 + <attribute default="${excludes}" name="excludes"/>
32.711 + <attribute default="**" name="testincludes"/>
32.712 + <attribute default="" name="testmethods"/>
32.713 + <attribute default="${main.class}" name="testClass"/>
32.714 + <attribute default="" name="testMethod"/>
32.715 + <sequential>
32.716 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
32.717 + <customizeDebuggee>
32.718 + <jvmarg line="${run.jvmargs}"/>
32.719 + <jvmarg line="${run.jvmargs.ide}"/>
32.720 + </customizeDebuggee>
32.721 + </j2seproject3:test-debug-impl>
32.722 + </sequential>
32.723 + </macrodef>
32.724 + </target>
32.725 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
32.726 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
32.727 + <attribute default="${includes}" name="includes"/>
32.728 + <attribute default="${excludes}" name="excludes"/>
32.729 + <attribute default="**" name="testincludes"/>
32.730 + <attribute default="" name="testmethods"/>
32.731 + <attribute default="${main.class}" name="testClass"/>
32.732 + <attribute default="" name="testMethod"/>
32.733 + <sequential>
32.734 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
32.735 + <customize2>
32.736 + <syspropertyset>
32.737 + <propertyref prefix="test-sys-prop."/>
32.738 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
32.739 + </syspropertyset>
32.740 + </customize2>
32.741 + </j2seproject3:testng-debug-impl>
32.742 + </sequential>
32.743 + </macrodef>
32.744 + </target>
32.745 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
32.746 + <!--
32.747 + pre NB7.2 profiling section; consider it deprecated
32.748 + -->
32.749 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
32.750 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
32.751 + <!-- Empty placeholder for easier customization. -->
32.752 + <!-- You can override this target in the ../build.xml file. -->
32.753 + </target>
32.754 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
32.755 + <!-- Empty placeholder for easier customization. -->
32.756 + <!-- You can override this target in the ../build.xml file. -->
32.757 + </target>
32.758 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
32.759 + <macrodef name="resolve">
32.760 + <attribute name="name"/>
32.761 + <attribute name="value"/>
32.762 + <sequential>
32.763 + <property name="@{name}" value="${env.@{value}}"/>
32.764 + </sequential>
32.765 + </macrodef>
32.766 + <macrodef name="profile">
32.767 + <attribute default="${main.class}" name="classname"/>
32.768 + <element name="customize" optional="true"/>
32.769 + <sequential>
32.770 + <property environment="env"/>
32.771 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
32.772 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
32.773 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.774 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
32.775 + <jvmarg line="${profiler.info.jvmargs}"/>
32.776 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
32.777 + <arg line="${application.args}"/>
32.778 + <classpath>
32.779 + <path path="${run.classpath}"/>
32.780 + </classpath>
32.781 + <syspropertyset>
32.782 + <propertyref prefix="run-sys-prop."/>
32.783 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
32.784 + </syspropertyset>
32.785 + <customize/>
32.786 + </java>
32.787 + </sequential>
32.788 + </macrodef>
32.789 + </target>
32.790 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
32.791 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
32.792 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
32.793 + </target>
32.794 + <!--
32.795 + end of pre NB7.2 profiling section
32.796 + -->
32.797 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
32.798 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
32.799 <attribute default="${main.class}" name="name"/>
32.800 + <attribute default="${debug.modulepath}" name="modulepath"/>
32.801 <attribute default="${debug.classpath}" name="classpath"/>
32.802 <attribute default="" name="stopclassname"/>
32.803 <sequential>
32.804 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
32.805 + <modulepath>
32.806 + <path path="@{modulepath}"/>
32.807 + </modulepath>
32.808 <classpath>
32.809 <path path="@{classpath}"/>
32.810 </classpath>
32.811 @@ -291,18 +865,6 @@
32.812 </macrodef>
32.813 </target>
32.814 <target name="-init-debug-args">
32.815 - <property name="version-output" value="java version "${ant.java.version}"/>
32.816 - <condition property="have-jdk-older-than-1.4">
32.817 - <or>
32.818 - <contains string="${version-output}" substring="java version "1.0"/>
32.819 - <contains string="${version-output}" substring="java version "1.1"/>
32.820 - <contains string="${version-output}" substring="java version "1.2"/>
32.821 - <contains string="${version-output}" substring="java version "1.3"/>
32.822 - </or>
32.823 - </condition>
32.824 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
32.825 - <istrue value="${have-jdk-older-than-1.4}"/>
32.826 - </condition>
32.827 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
32.828 <os family="windows"/>
32.829 </condition>
32.830 @@ -312,17 +874,103 @@
32.831 </target>
32.832 <target depends="-init-debug-args" name="-init-macrodef-debug">
32.833 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
32.834 + <attribute default="${module.name}" name="modulename"/>
32.835 <attribute default="${main.class}" name="classname"/>
32.836 + <attribute default="${debug.modulepath}" name="modulepath"/>
32.837 <attribute default="${debug.classpath}" name="classpath"/>
32.838 + <element name="customizeDebuggee" optional="true"/>
32.839 + <sequential>
32.840 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
32.841 + <customize>
32.842 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
32.843 + <customizeDebuggee/>
32.844 + </customize>
32.845 + </j2seproject1:java>
32.846 + </sequential>
32.847 + </macrodef>
32.848 + </target>
32.849 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
32.850 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
32.851 + <attribute default="${module.name}" name="modulename"/>
32.852 + <attribute default="${main.class}" name="classname"/>
32.853 + <attribute default="${run.modulepath}" name="modulepath"/>
32.854 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
32.855 + <attribute default="${run.classpath}" name="classpath"/>
32.856 + <attribute default="jvm" name="jvm"/>
32.857 <element name="customize" optional="true"/>
32.858 <sequential>
32.859 - <java classname="@{classname}" dir="${work.dir}" fork="true">
32.860 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.861 - <jvmarg line="${debug-args-line}"/>
32.862 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
32.863 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
32.864 + <classpath>
32.865 + <path path="@{classpath}"/>
32.866 + </classpath>
32.867 + <modulepath>
32.868 + <pathelement path="@{modulepath}"/>
32.869 + <pathelement location="${module.build.classes.dir}"/>
32.870 + </modulepath>
32.871 + <upgrademodulepath>
32.872 + <path path="@{upgrademodulepath}"/>
32.873 + </upgrademodulepath>
32.874 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
32.875 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
32.876 <jvmarg line="${run.jvmargs}"/>
32.877 + <jvmarg line="${run.jvmargs.ide}"/>
32.878 + <syspropertyset>
32.879 + <propertyref prefix="run-sys-prop."/>
32.880 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
32.881 + </syspropertyset>
32.882 + <customize/>
32.883 + </java>
32.884 + </sequential>
32.885 + </macrodef>
32.886 + </target>
32.887 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
32.888 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
32.889 + <attribute default="" name="modulename"/>
32.890 + <attribute default="${main.class}" name="classname"/>
32.891 + <attribute default="${run.modulepath}" name="modulepath"/>
32.892 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
32.893 + <attribute default="${run.classpath}" name="classpath"/>
32.894 + <attribute default="jvm" name="jvm"/>
32.895 + <element name="customize" optional="true"/>
32.896 + <sequential>
32.897 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
32.898 + <classpath>
32.899 + <path path="@{classpath}"/>
32.900 + </classpath>
32.901 + <modulepath>
32.902 + <path path="@{modulepath}"/>
32.903 + </modulepath>
32.904 + <upgrademodulepath>
32.905 + <path path="@{upgrademodulepath}"/>
32.906 + </upgrademodulepath>
32.907 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
32.908 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
32.909 + <jvmarg line="${run.jvmargs}"/>
32.910 + <jvmarg line="${run.jvmargs.ide}"/>
32.911 + <syspropertyset>
32.912 + <propertyref prefix="run-sys-prop."/>
32.913 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
32.914 + </syspropertyset>
32.915 + <customize/>
32.916 + </java>
32.917 + </sequential>
32.918 + </macrodef>
32.919 + </target>
32.920 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
32.921 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
32.922 + <attribute default="" name="modulename"/>
32.923 + <attribute default="${main.class}" name="classname"/>
32.924 + <attribute default="" name="modulepath"/>
32.925 + <attribute default="${run.classpath}" name="classpath"/>
32.926 + <attribute default="jvm" name="jvm"/>
32.927 + <element name="customize" optional="true"/>
32.928 + <sequential>
32.929 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
32.930 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.931 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
32.932 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
32.933 + <jvmarg line="${run.jvmargs}"/>
32.934 + <jvmarg line="${run.jvmargs.ide}"/>
32.935 <classpath>
32.936 <path path="@{classpath}"/>
32.937 </classpath>
32.938 @@ -335,37 +983,70 @@
32.939 </sequential>
32.940 </macrodef>
32.941 </target>
32.942 - <target name="-init-macrodef-java">
32.943 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
32.944 - <attribute default="${main.class}" name="classname"/>
32.945 - <attribute default="${run.classpath}" name="classpath"/>
32.946 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
32.947 + <target name="-init-macrodef-copylibs">
32.948 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
32.949 + <attribute default="${manifest.file}" name="manifest"/>
32.950 <element name="customize" optional="true"/>
32.951 <sequential>
32.952 - <java classname="@{classname}" dir="${work.dir}" fork="true">
32.953 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
32.954 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
32.955 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
32.956 - <jvmarg line="${run.jvmargs}"/>
32.957 - <classpath>
32.958 - <path path="@{classpath}"/>
32.959 - </classpath>
32.960 - <syspropertyset>
32.961 - <propertyref prefix="run-sys-prop."/>
32.962 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
32.963 - </syspropertyset>
32.964 - <customize/>
32.965 - </java>
32.966 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
32.967 + <pathconvert property="run.classpath.without.build.classes.dir">
32.968 + <path path="${run.classpath}"/>
32.969 + <map from="${build.classes.dir.resolved}" to=""/>
32.970 + </pathconvert>
32.971 + <pathconvert pathsep=" " property="jar.classpath">
32.972 + <path path="${run.classpath.without.build.classes.dir}"/>
32.973 + <chainedmapper>
32.974 + <flattenmapper/>
32.975 + <filtermapper>
32.976 + <replacestring from=" " to="%20"/>
32.977 + </filtermapper>
32.978 + <globmapper from="*" to="lib/*"/>
32.979 + </chainedmapper>
32.980 + </pathconvert>
32.981 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
32.982 + <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}">
32.983 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
32.984 + <manifest>
32.985 + <attribute name="Class-Path" value="${jar.classpath}"/>
32.986 + <customize/>
32.987 + </manifest>
32.988 + </copylibs>
32.989 </sequential>
32.990 </macrodef>
32.991 </target>
32.992 <target name="-init-presetdef-jar">
32.993 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
32.994 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
32.995 - <j2seproject1:fileset dir="${build.classes.dir}"/>
32.996 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
32.997 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
32.998 </jar>
32.999 </presetdef>
32.1000 </target>
32.1001 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
32.1002 + <target name="-init-ap-cmdline-properties">
32.1003 + <property name="annotation.processing.enabled" value="true"/>
32.1004 + <property name="annotation.processing.processors.list" value=""/>
32.1005 + <property name="annotation.processing.processor.options" value=""/>
32.1006 + <property name="annotation.processing.run.all.processors" value="true"/>
32.1007 + <property name="javac.processorpath" value="${javac.classpath}"/>
32.1008 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
32.1009 + <condition property="ap.supported.internal" value="true">
32.1010 + <not>
32.1011 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
32.1012 + </not>
32.1013 + </condition>
32.1014 + </target>
32.1015 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
32.1016 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
32.1017 + <isfalse value="${annotation.processing.run.all.processors}"/>
32.1018 + </condition>
32.1019 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
32.1020 + <isfalse value="${annotation.processing.enabled}"/>
32.1021 + </condition>
32.1022 + </target>
32.1023 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
32.1024 + <property name="ap.cmd.line.internal" value=""/>
32.1025 + </target>
32.1026 + <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"/>
32.1027 <!--
32.1028 ===================
32.1029 COMPILATION SECTION
32.1030 @@ -392,7 +1073,9 @@
32.1031 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
32.1032 </target>
32.1033 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
32.1034 - <antcall target="clean"/>
32.1035 + <antcall target="clean">
32.1036 + <param name="no.dependencies" value="true"/>
32.1037 + </antcall>
32.1038 </target>
32.1039 <target depends="init,deps-jar" name="-pre-pre-compile">
32.1040 <mkdir dir="${build.classes.dir}"/>
32.1041 @@ -409,12 +1092,18 @@
32.1042 </pathconvert>
32.1043 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
32.1044 </target>
32.1045 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
32.1046 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
32.1047 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
32.1048 <copy todir="${build.classes.dir}">
32.1049 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
32.1050 </copy>
32.1051 </target>
32.1052 + <target if="has.persistence.xml" name="-copy-persistence-xml">
32.1053 + <mkdir dir="${build.classes.dir}/META-INF"/>
32.1054 + <copy todir="${build.classes.dir}/META-INF">
32.1055 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
32.1056 + </copy>
32.1057 + </target>
32.1058 <target name="-post-compile">
32.1059 <!-- Empty placeholder for easier customization. -->
32.1060 <!-- You can override this target in the ../build.xml file. -->
32.1061 @@ -427,7 +1116,7 @@
32.1062 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
32.1063 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
32.1064 <j2seproject3:force-recompile/>
32.1065 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
32.1066 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
32.1067 </target>
32.1068 <target name="-post-compile-single">
32.1069 <!-- Empty placeholder for easier customization. -->
32.1070 @@ -447,99 +1136,191 @@
32.1071 <!-- Empty placeholder for easier customization. -->
32.1072 <!-- You can override this target in the ../build.xml file. -->
32.1073 </target>
32.1074 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
32.1075 - <j2seproject1:jar/>
32.1076 + <target depends="init,compile" name="-check-module-main-class">
32.1077 + <pathconvert property="main.class.file">
32.1078 + <string value="${main.class}"/>
32.1079 + <unpackagemapper from="*" to="*.class"/>
32.1080 + </pathconvert>
32.1081 + <condition property="do.module.main.class">
32.1082 + <and>
32.1083 + <isset property="main.class.available"/>
32.1084 + <available file="${build.classes.dir}/module-info.class"/>
32.1085 + <available file="${build.classes.dir}/${main.class.file}"/>
32.1086 + <isset property="libs.CopyLibs.classpath"/>
32.1087 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
32.1088 + </and>
32.1089 + </condition>
32.1090 </target>
32.1091 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
32.1092 - <j2seproject1:jar manifest="${manifest.file}"/>
32.1093 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
32.1094 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
32.1095 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
32.1096 </target>
32.1097 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
32.1098 - <j2seproject1:jar manifest="${manifest.file}">
32.1099 - <j2seproject1:manifest>
32.1100 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
32.1101 - </j2seproject1:manifest>
32.1102 - </j2seproject1:jar>
32.1103 - <echo>To run this application from the command line without Ant, try:</echo>
32.1104 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
32.1105 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
32.1106 + <touch file="${tmp.manifest.file}" verbose="false"/>
32.1107 + </target>
32.1108 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
32.1109 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
32.1110 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
32.1111 + </target>
32.1112 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
32.1113 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
32.1114 + <attribute name="Main-Class" value="${main.class}"/>
32.1115 + </manifest>
32.1116 + </target>
32.1117 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
32.1118 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
32.1119 + <attribute name="Profile" value="${javac.profile}"/>
32.1120 + </manifest>
32.1121 + </target>
32.1122 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
32.1123 + <basename file="${application.splash}" property="splashscreen.basename"/>
32.1124 + <mkdir dir="${build.classes.dir}/META-INF"/>
32.1125 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
32.1126 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
32.1127 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
32.1128 + </manifest>
32.1129 + </target>
32.1130 + <target depends="init,compile" name="-check-do-mkdist">
32.1131 + <condition property="do.mkdist">
32.1132 + <and>
32.1133 + <isset property="do.archive"/>
32.1134 + <isset property="libs.CopyLibs.classpath"/>
32.1135 + <not>
32.1136 + <istrue value="${mkdist.disabled}"/>
32.1137 + </not>
32.1138 + <not>
32.1139 + <available file="${build.classes.dir}/module-info.class"/>
32.1140 + </not>
32.1141 + </and>
32.1142 + </condition>
32.1143 + </target>
32.1144 + <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">
32.1145 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
32.1146 + <echo level="info">To run this application from the command line without Ant, try:</echo>
32.1147 + <property location="${dist.jar}" name="dist.jar.resolved"/>
32.1148 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
32.1149 + </target>
32.1150 + <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">
32.1151 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
32.1152 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
32.1153 <property location="${dist.jar}" name="dist.jar.resolved"/>
32.1154 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
32.1155 + <isset property="named.module.internal"/>
32.1156 + </condition>
32.1157 <pathconvert property="run.classpath.with.dist.jar">
32.1158 <path path="${run.classpath}"/>
32.1159 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
32.1160 + </pathconvert>
32.1161 + <pathconvert property="run.modulepath.with.dist.jar">
32.1162 + <path location="${dist.jar.resolved}"/>
32.1163 + <path path="${run.modulepath}"/>
32.1164 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
32.1165 </pathconvert>
32.1166 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
32.1167 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
32.1168 + <isset property="named.module.internal"/>
32.1169 + </condition>
32.1170 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
32.1171 + <and>
32.1172 + <isset property="modules.supported.internal"/>
32.1173 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
32.1174 + </and>
32.1175 + </condition>
32.1176 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
32.1177 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
32.1178 + </condition>
32.1179 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
32.1180 + <isset property="do.module.main.class"/>
32.1181 + </condition>
32.1182 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
32.1183 + <isset property="named.module.internal"/>
32.1184 + </condition>
32.1185 + <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}">
32.1186 + <isset property="main.class.available"/>
32.1187 + </condition>
32.1188 + <condition else="debug" property="jar.usage.level" value="info">
32.1189 + <isset property="main.class.available"/>
32.1190 + </condition>
32.1191 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
32.1192 </target>
32.1193 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
32.1194 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
32.1195 - <pathconvert property="run.classpath.without.build.classes.dir">
32.1196 - <path path="${run.classpath}"/>
32.1197 - <map from="${build.classes.dir.resolved}" to=""/>
32.1198 - </pathconvert>
32.1199 - <pathconvert pathsep=" " property="jar.classpath">
32.1200 - <path path="${run.classpath.without.build.classes.dir}"/>
32.1201 - <chainedmapper>
32.1202 - <flattenmapper/>
32.1203 - <globmapper from="*" to="lib/*"/>
32.1204 - </chainedmapper>
32.1205 - </pathconvert>
32.1206 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
32.1207 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
32.1208 - <fileset dir="${build.classes.dir}"/>
32.1209 - <manifest>
32.1210 - <attribute name="Main-Class" value="${main.class}"/>
32.1211 - <attribute name="Class-Path" value="${jar.classpath}"/>
32.1212 - </manifest>
32.1213 - </copylibs>
32.1214 - <echo>To run this application from the command line without Ant, try:</echo>
32.1215 - <property location="${dist.jar}" name="dist.jar.resolved"/>
32.1216 - <echo>java -jar "${dist.jar.resolved}"</echo>
32.1217 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
32.1218 + <delete>
32.1219 + <fileset file="${tmp.manifest.file}"/>
32.1220 + </delete>
32.1221 </target>
32.1222 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
32.1223 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
32.1224 - <pathconvert property="run.classpath.without.build.classes.dir">
32.1225 - <path path="${run.classpath}"/>
32.1226 - <map from="${build.classes.dir.resolved}" to=""/>
32.1227 - </pathconvert>
32.1228 - <pathconvert pathsep=" " property="jar.classpath">
32.1229 - <path path="${run.classpath.without.build.classes.dir}"/>
32.1230 - <chainedmapper>
32.1231 - <flattenmapper/>
32.1232 - <globmapper from="*" to="lib/*"/>
32.1233 - </chainedmapper>
32.1234 - </pathconvert>
32.1235 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
32.1236 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
32.1237 - <fileset dir="${build.classes.dir}"/>
32.1238 - <manifest>
32.1239 - <attribute name="Class-Path" value="${jar.classpath}"/>
32.1240 - </manifest>
32.1241 - </copylibs>
32.1242 - </target>
32.1243 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
32.1244 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
32.1245 - <pathconvert property="run.classpath.without.build.classes.dir">
32.1246 - <path path="${run.classpath}"/>
32.1247 - <map from="${build.classes.dir.resolved}" to=""/>
32.1248 - </pathconvert>
32.1249 - <pathconvert pathsep=" " property="jar.classpath">
32.1250 - <path path="${run.classpath.without.build.classes.dir}"/>
32.1251 - <chainedmapper>
32.1252 - <flattenmapper/>
32.1253 - <globmapper from="*" to="lib/*"/>
32.1254 - </chainedmapper>
32.1255 - </pathconvert>
32.1256 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
32.1257 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
32.1258 - <fileset dir="${build.classes.dir}"/>
32.1259 - <manifest>
32.1260 - <attribute name="Class-Path" value="${jar.classpath}"/>
32.1261 - </manifest>
32.1262 - </copylibs>
32.1263 - </target>
32.1264 + <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"/>
32.1265 + <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"/>
32.1266 <target name="-post-jar">
32.1267 <!-- Empty placeholder for easier customization. -->
32.1268 <!-- You can override this target in the ../build.xml file. -->
32.1269 </target>
32.1270 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
32.1271 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
32.1272 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
32.1273 + <!--
32.1274 + =================
32.1275 + DEPLOY SECTION
32.1276 + =================
32.1277 + -->
32.1278 + <target name="-pre-deploy">
32.1279 + <!-- Empty placeholder for easier customization. -->
32.1280 + <!-- You can override this target in the ../build.xml file. -->
32.1281 + </target>
32.1282 + <target depends="init" name="-check-jlink">
32.1283 + <condition property="do.jlink.internal">
32.1284 + <and>
32.1285 + <istrue value="${do.jlink}"/>
32.1286 + <isset property="do.archive"/>
32.1287 + <isset property="named.module.internal"/>
32.1288 + </and>
32.1289 + </condition>
32.1290 + </target>
32.1291 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
32.1292 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
32.1293 + <property name="jlink.launcher.name" value="${application.title}"/>
32.1294 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
32.1295 + <and>
32.1296 + <isset property="jlink.additionalmodules"/>
32.1297 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
32.1298 + </and>
32.1299 + </condition>
32.1300 + <condition property="jlink.do.strip.internal">
32.1301 + <and>
32.1302 + <isset property="jlink.strip"/>
32.1303 + <istrue value="${jlink.strip}"/>
32.1304 + </and>
32.1305 + </condition>
32.1306 + <condition property="jlink.do.additionalparam.internal">
32.1307 + <and>
32.1308 + <isset property="jlink.additionalparam"/>
32.1309 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
32.1310 + </and>
32.1311 + </condition>
32.1312 + <condition property="jlink.do.launcher.internal">
32.1313 + <and>
32.1314 + <istrue value="${jlink.launcher}"/>
32.1315 + <isset property="main.class.available"/>
32.1316 + </and>
32.1317 + </condition>
32.1318 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
32.1319 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
32.1320 + <exec executable="${platform.jlink}">
32.1321 + <arg value="--module-path"/>
32.1322 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
32.1323 + <arg value="--add-modules"/>
32.1324 + <arg value="${jlink.add.modules}"/>
32.1325 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
32.1326 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
32.1327 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
32.1328 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
32.1329 + <arg value="--output"/>
32.1330 + <arg value="${dist.jlink.output}"/>
32.1331 + </exec>
32.1332 + </target>
32.1333 + <target name="-post-deploy">
32.1334 + <!-- Empty placeholder for easier customization. -->
32.1335 + <!-- You can override this target in the ../build.xml file. -->
32.1336 + </target>
32.1337 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
32.1338 <!--
32.1339 =================
32.1340 EXECUTION SECTION
32.1341 @@ -576,9 +1357,9 @@
32.1342 </target>
32.1343 <target depends="init,compile" name="-debug-start-debuggee">
32.1344 <j2seproject3:debug>
32.1345 - <customize>
32.1346 + <customizeDebuggee>
32.1347 <arg line="${application.args}"/>
32.1348 - </customize>
32.1349 + </customizeDebuggee>
32.1350 </j2seproject3:debug>
32.1351 </target>
32.1352 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
32.1353 @@ -605,23 +1386,146 @@
32.1354 </target>
32.1355 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
32.1356 <!--
32.1357 + =================
32.1358 + PROFILING SECTION
32.1359 + =================
32.1360 + -->
32.1361 + <!--
32.1362 + pre NB7.2 profiler integration
32.1363 + -->
32.1364 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
32.1365 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
32.1366 + <nbprofiledirect>
32.1367 + <classpath>
32.1368 + <path path="${run.classpath}"/>
32.1369 + </classpath>
32.1370 + </nbprofiledirect>
32.1371 + <profile/>
32.1372 + </target>
32.1373 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
32.1374 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
32.1375 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
32.1376 + <nbprofiledirect>
32.1377 + <classpath>
32.1378 + <path path="${run.classpath}"/>
32.1379 + </classpath>
32.1380 + </nbprofiledirect>
32.1381 + <profile classname="${profile.class}"/>
32.1382 + </target>
32.1383 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
32.1384 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
32.1385 + <nbprofiledirect>
32.1386 + <classpath>
32.1387 + <path path="${run.classpath}"/>
32.1388 + </classpath>
32.1389 + </nbprofiledirect>
32.1390 + <profile classname="sun.applet.AppletViewer">
32.1391 + <customize>
32.1392 + <arg value="${applet.url}"/>
32.1393 + </customize>
32.1394 + </profile>
32.1395 + </target>
32.1396 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
32.1397 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
32.1398 + <nbprofiledirect>
32.1399 + <classpath>
32.1400 + <path path="${run.test.classpath}"/>
32.1401 + </classpath>
32.1402 + </nbprofiledirect>
32.1403 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
32.1404 + <customize>
32.1405 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
32.1406 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
32.1407 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
32.1408 + <jvmarg line="${profiler.info.jvmargs}"/>
32.1409 + <classpath>
32.1410 + <path path="${run.test.classpath}"/>
32.1411 + </classpath>
32.1412 + </customize>
32.1413 + </j2seproject3:junit>
32.1414 + </target>
32.1415 + <!--
32.1416 + end of pre NB72 profiling section
32.1417 + -->
32.1418 + <target if="netbeans.home" name="-profile-check">
32.1419 + <condition property="profiler.configured">
32.1420 + <or>
32.1421 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
32.1422 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
32.1423 + </or>
32.1424 + </condition>
32.1425 + </target>
32.1426 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
32.1427 + <startprofiler/>
32.1428 + <antcall target="run"/>
32.1429 + </target>
32.1430 + <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">
32.1431 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
32.1432 + <startprofiler/>
32.1433 + <antcall target="run-single"/>
32.1434 + </target>
32.1435 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
32.1436 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
32.1437 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
32.1438 + <startprofiler/>
32.1439 + <antcall target="test-single"/>
32.1440 + </target>
32.1441 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
32.1442 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
32.1443 + <startprofiler/>
32.1444 + <antcall target="run-test-with-main"/>
32.1445 + </target>
32.1446 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
32.1447 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
32.1448 + <startprofiler/>
32.1449 + <antcall target="run-applet"/>
32.1450 + </target>
32.1451 + <!--
32.1452 ===============
32.1453 JAVADOC SECTION
32.1454 ===============
32.1455 -->
32.1456 - <target depends="init" name="-javadoc-build">
32.1457 + <target depends="init" if="have.sources" name="-javadoc-build">
32.1458 <mkdir dir="${dist.javadoc.dir}"/>
32.1459 - <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}">
32.1460 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
32.1461 + <and>
32.1462 + <isset property="endorsed.classpath.cmd.line.arg"/>
32.1463 + <not>
32.1464 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
32.1465 + </not>
32.1466 + </and>
32.1467 + </condition>
32.1468 + <condition else="" property="bug5101868workaround" value="*.java">
32.1469 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
32.1470 + </condition>
32.1471 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
32.1472 + <and>
32.1473 + <isset property="javadoc.html5"/>
32.1474 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
32.1475 + </and>
32.1476 + </condition>
32.1477 + <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}">
32.1478 <classpath>
32.1479 <path path="${javac.classpath}"/>
32.1480 </classpath>
32.1481 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
32.1482 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
32.1483 <filename name="**/*.java"/>
32.1484 </fileset>
32.1485 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
32.1486 <include name="**/*.java"/>
32.1487 + <exclude name="*.java"/>
32.1488 </fileset>
32.1489 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
32.1490 + <arg line="${javadoc.html5.cmd.line.arg}"/>
32.1491 </javadoc>
32.1492 + <copy todir="${dist.javadoc.dir}">
32.1493 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
32.1494 + <filename name="**/doc-files/**"/>
32.1495 + </fileset>
32.1496 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
32.1497 + <include name="**/doc-files/**"/>
32.1498 + </fileset>
32.1499 + </copy>
32.1500 </target>
32.1501 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
32.1502 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
32.1503 @@ -629,7 +1533,7 @@
32.1504 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
32.1505 <!--
32.1506 =========================
32.1507 - JUNIT COMPILATION SECTION
32.1508 + TEST COMPILATION SECTION
32.1509 =========================
32.1510 -->
32.1511 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
32.1512 @@ -639,11 +1543,63 @@
32.1513 <!-- Empty placeholder for easier customization. -->
32.1514 <!-- You can override this target in the ../build.xml file. -->
32.1515 </target>
32.1516 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
32.1517 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
32.1518 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
32.1519 + <and>
32.1520 + <isset property="test.module.name"/>
32.1521 + <length length="0" string="${test.module.name}" when="greater"/>
32.1522 + </and>
32.1523 + </condition>
32.1524 + <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">
32.1525 + <and>
32.1526 + <isset property="test.module.name"/>
32.1527 + <length length="0" string="${test.module.name}" when="greater"/>
32.1528 + </and>
32.1529 + </condition>
32.1530 + </target>
32.1531 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
32.1532 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
32.1533 + <and>
32.1534 + <isset property="test.module.name"/>
32.1535 + <length length="0" string="${test.module.name}" when="greater"/>
32.1536 + </and>
32.1537 + </condition>
32.1538 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
32.1539 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
32.1540 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
32.1541 + <chainedmapper>
32.1542 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
32.1543 + <filtermapper>
32.1544 + <uniqfilter/>
32.1545 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
32.1546 + </filtermapper>
32.1547 + <cutdirsmapper dirs="1"/>
32.1548 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
32.1549 + </chainedmapper>
32.1550 + </pathconvert>
32.1551 + <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}">
32.1552 + <and>
32.1553 + <isset property="test.module.name"/>
32.1554 + <length length="0" string="${test.module.name}" when="greater"/>
32.1555 + </and>
32.1556 + </condition>
32.1557 + </target>
32.1558 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
32.1559 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
32.1560 + <property name="javac.test.compilerargs" value=""/>
32.1561 + <property name="run.test.jvmargs" value=""/>
32.1562 + </target>
32.1563 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
32.1564 <target if="do.depend.true" name="-compile-test-depend">
32.1565 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
32.1566 </target>
32.1567 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
32.1568 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
32.1569 + <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">
32.1570 + <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}">
32.1571 + <customize>
32.1572 + <compilerarg line="${javac.test.compilerargs}"/>
32.1573 + </customize>
32.1574 + </j2seproject3:javac>
32.1575 <copy todir="${build.test.classes.dir}">
32.1576 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
32.1577 </copy>
32.1578 @@ -657,10 +1613,14 @@
32.1579 <!-- Empty placeholder for easier customization. -->
32.1580 <!-- You can override this target in the ../build.xml file. -->
32.1581 </target>
32.1582 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
32.1583 + <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">
32.1584 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
32.1585 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
32.1586 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
32.1587 + <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}">
32.1588 + <customize>
32.1589 + <compilerarg line="${javac.test.compilerargs}"/>
32.1590 + </customize>
32.1591 + </j2seproject3:javac>
32.1592 <copy todir="${build.test.classes.dir}">
32.1593 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
32.1594 </copy>
32.1595 @@ -672,14 +1632,14 @@
32.1596 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
32.1597 <!--
32.1598 =======================
32.1599 - JUNIT EXECUTION SECTION
32.1600 + TEST EXECUTION SECTION
32.1601 =======================
32.1602 -->
32.1603 <target depends="init" if="have.tests" name="-pre-test-run">
32.1604 <mkdir dir="${build.test.results.dir}"/>
32.1605 </target>
32.1606 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
32.1607 - <j2seproject3:junit testincludes="**/*Test.java"/>
32.1608 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
32.1609 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
32.1610 </target>
32.1611 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
32.1612 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
32.1613 @@ -690,41 +1650,42 @@
32.1614 <target depends="init" if="have.tests" name="-pre-test-run-single">
32.1615 <mkdir dir="${build.test.results.dir}"/>
32.1616 </target>
32.1617 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
32.1618 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
32.1619 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
32.1620 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
32.1621 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
32.1622 </target>
32.1623 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
32.1624 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
32.1625 </target>
32.1626 - <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"/>
32.1627 + <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"/>
32.1628 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
32.1629 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
32.1630 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
32.1631 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
32.1632 + </target>
32.1633 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
32.1634 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
32.1635 + </target>
32.1636 + <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"/>
32.1637 <!--
32.1638 =======================
32.1639 - JUNIT DEBUGGING SECTION
32.1640 + TEST DEBUGGING SECTION
32.1641 =======================
32.1642 -->
32.1643 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
32.1644 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
32.1645 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
32.1646 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
32.1647 - <delete file="${test.report.file}"/>
32.1648 - <mkdir dir="${build.test.results.dir}"/>
32.1649 - <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}">
32.1650 - <customize>
32.1651 - <syspropertyset>
32.1652 - <propertyref prefix="test-sys-prop."/>
32.1653 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
32.1654 - </syspropertyset>
32.1655 - <arg value="${test.class}"/>
32.1656 - <arg value="showoutput=true"/>
32.1657 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
32.1658 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
32.1659 - </customize>
32.1660 - </j2seproject3:debug>
32.1661 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
32.1662 + </target>
32.1663 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
32.1664 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
32.1665 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
32.1666 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
32.1667 </target>
32.1668 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
32.1669 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
32.1670 </target>
32.1671 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
32.1672 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
32.1673 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
32.1674 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
32.1675 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
32.1676 </target>
32.1677 @@ -750,9 +1711,9 @@
32.1678 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
32.1679 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
32.1680 <j2seproject3:debug classname="sun.applet.AppletViewer">
32.1681 - <customize>
32.1682 + <customizeDebuggee>
32.1683 <arg value="${applet.url}"/>
32.1684 - </customize>
32.1685 + </customizeDebuggee>
32.1686 </j2seproject3:debug>
32.1687 </target>
32.1688 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
32.1689 @@ -779,6 +1740,7 @@
32.1690 </target>
32.1691 <target depends="init" name="-do-clean">
32.1692 <delete dir="${build.dir}"/>
32.1693 + <delete dir="${dist.jlink.output}"/>
32.1694 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
32.1695 </target>
32.1696 <target name="-post-clean">
32.1697 @@ -789,9 +1751,12 @@
32.1698 <target name="-check-call-dep">
32.1699 <property file="${call.built.properties}" prefix="already.built."/>
32.1700 <condition property="should.call.dep">
32.1701 - <not>
32.1702 - <isset property="already.built.${call.subproject}"/>
32.1703 - </not>
32.1704 + <and>
32.1705 + <not>
32.1706 + <isset property="already.built.${call.subproject}"/>
32.1707 + </not>
32.1708 + <available file="${call.script}"/>
32.1709 + </and>
32.1710 </condition>
32.1711 </target>
32.1712 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
33.1 --- a/samples/gc/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
33.2 +++ b/samples/gc/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
33.3 @@ -1,8 +1,8 @@
33.4 build.xml.data.CRC32=70895030
33.5 -build.xml.script.CRC32=f3a373d9
33.6 -build.xml.stylesheet.CRC32=958a1d3e
33.7 +build.xml.script.CRC32=3208039b
33.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
33.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
33.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
33.11 nbproject/build-impl.xml.data.CRC32=70895030
33.12 -nbproject/build-impl.xml.script.CRC32=c80dbef4
33.13 -nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
33.14 +nbproject/build-impl.xml.script.CRC32=b55f5097
33.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
34.1 --- a/samples/gc/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
34.2 +++ b/samples/gc/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
34.3 @@ -12,8 +12,12 @@
34.4 build.test.results.dir=${build.dir}/test/results
34.5 debug.classpath=\
34.6 ${run.classpath}
34.7 +debug.modulepath=\
34.8 + ${run.modulepath}
34.9 debug.test.classpath=\
34.10 ${run.test.classpath}
34.11 +debug.test.modulepath=\
34.12 + ${run.test.modulepath}
34.13 # This directory is removed when the project is cleaned:
34.14 dist.dir=dist
34.15 dist.jar=${dist.dir}/gc.jar
34.16 @@ -32,14 +36,18 @@
34.17 # Space-separated list of extra javac options
34.18 javac.compilerargs=
34.19 javac.deprecation=false
34.20 -javac.source=1.5
34.21 -javac.target=1.5
34.22 +javac.modulepath=
34.23 +javac.processormodulepath=
34.24 +javac.source=1.6
34.25 +javac.target=1.6
34.26 javac.test.classpath=\
34.27 ${javac.classpath}:\
34.28 ${build.classes.dir}:\
34.29 ${file.reference.org-netbeans-insane.jar}:\
34.30 ${file.reference.org-netbeans-modules-nbjunit.jar}:\
34.31 ${file.reference.junit-4.4.jar}
34.32 +javac.test.modulepath=\
34.33 + ${javac.modulepath}
34.34 javadoc.additionalparam=
34.35 javadoc.author=false
34.36 javadoc.encoding=${source.encoding}
34.37 @@ -61,9 +69,13 @@
34.38 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
34.39 # or test-sys-prop.name=value to set system properties for unit tests):
34.40 run.jvmargs=
34.41 +run.modulepath=\
34.42 + ${javac.modulepath}
34.43 run.test.classpath=\
34.44 ${javac.test.classpath}:\
34.45 ${build.test.classes.dir}
34.46 +run.test.modulepath=\
34.47 + ${javac.test.modulepath}
34.48 source.encoding=UTF-8
34.49 src.dir=src
34.50 test.src.dir=test
35.1 --- a/samples/hellowithsubclassing/build.xml Mon Nov 11 05:47:32 2019 +0100
35.2 +++ b/samples/hellowithsubclassing/build.xml Mon Nov 11 13:17:34 2019 +0100
35.3 @@ -2,6 +2,11 @@
35.4 <!-- You may freely edit this file. See commented blocks below for -->
35.5 <!-- some examples of how to customize the build. -->
35.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
35.7 +<!-- By default, only the Clean and Build commands use this build script. -->
35.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
35.9 +<!-- the Compile on Save feature is turned off for the project. -->
35.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
35.11 +<!-- in the project's Project Properties dialog box.-->
35.12 <project name="hellowithsubclassing" default="default" basedir=".">
35.13 <description>Builds, tests, and runs the project hellowithsubclassing.</description>
35.14 <import file="nbproject/build-impl.xml"/>
35.15 @@ -46,8 +51,7 @@
35.16 -init-macrodef-junit: defines macro for junit execution
35.17 -init-macrodef-debug: defines macro for class debugging
35.18 -init-macrodef-java: defines macro for class execution
35.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
35.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
35.21 + -do-jar: JAR building
35.22 run: execution of project
35.23 -javadoc-build: Javadoc generation
35.24 test-report: JUnit report generation
36.1 --- a/samples/hellowithsubclassing/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
36.2 +++ b/samples/hellowithsubclassing/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
36.3 @@ -12,14 +12,21 @@
36.4 - execution
36.5 - debugging
36.6 - javadoc
36.7 - - junit compilation
36.8 - - junit execution
36.9 - - junit debugging
36.10 + - test compilation
36.11 + - test execution
36.12 + - test debugging
36.13 - applet
36.14 - cleanup
36.15
36.16 -->
36.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="hellowithsubclassing-impl">
36.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="hellowithsubclassing-impl">
36.19 + <fail message="Please build using Ant 1.8.0 or higher.">
36.20 + <condition>
36.21 + <not>
36.22 + <antversion atleast="1.8.0"/>
36.23 + </not>
36.24 + </condition>
36.25 + </fail>
36.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
36.27 <!--
36.28 ======================
36.29 @@ -39,28 +46,136 @@
36.30 <property file="${user.properties.file}"/>
36.31 <!-- The two properties below are usually overridden -->
36.32 <!-- by the active platform. Just a fallback. -->
36.33 - <property name="default.javac.source" value="1.4"/>
36.34 - <property name="default.javac.target" value="1.4"/>
36.35 + <property name="default.javac.source" value="1.6"/>
36.36 + <property name="default.javac.target" value="1.6"/>
36.37 </target>
36.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
36.39 <property file="nbproject/configs/${config}.properties"/>
36.40 <property file="nbproject/project.properties"/>
36.41 </target>
36.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
36.43 + <target name="-init-modules-supported">
36.44 + <condition property="modules.supported.internal" value="true">
36.45 + <not>
36.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
36.47 + </not>
36.48 + </condition>
36.49 + </target>
36.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
36.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
36.52 + <attribute name="property"/>
36.53 + <attribute name="sourcepath"/>
36.54 + <sequential>
36.55 + <loadresource property="@{property}" quiet="true">
36.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
36.57 + <filterchain>
36.58 + <stripjavacomments/>
36.59 + <linecontainsregexp>
36.60 + <regexp pattern="module .* \{"/>
36.61 + </linecontainsregexp>
36.62 + <tokenfilter>
36.63 + <linetokenizer/>
36.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
36.65 + </tokenfilter>
36.66 + <striplinebreaks/>
36.67 + </filterchain>
36.68 + </loadresource>
36.69 + </sequential>
36.70 + </macrodef>
36.71 + </target>
36.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
36.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
36.74 + <condition>
36.75 + <not>
36.76 + <antversion atleast="1.10.0"/>
36.77 + </not>
36.78 + </condition>
36.79 + </fail>
36.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
36.81 + <condition property="named.module.internal">
36.82 + <and>
36.83 + <isset property="module.name"/>
36.84 + <length length="0" string="${module.name}" when="greater"/>
36.85 + </and>
36.86 + </condition>
36.87 + <condition property="unnamed.module.internal">
36.88 + <not>
36.89 + <isset property="named.module.internal"/>
36.90 + </not>
36.91 + </condition>
36.92 + <property name="javac.modulepath" value=""/>
36.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
36.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
36.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
36.96 + <property name="javac.upgrademodulepath" value=""/>
36.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
36.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
36.99 + <and>
36.100 + <isset property="javac.systemmodulepath"/>
36.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
36.102 + </and>
36.103 + </condition>
36.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
36.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
36.106 + <property name="module.name" value=""/>
36.107 + </target>
36.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
36.109 + <property name="platform.java" value="${java.home}/bin/java"/>
36.110 <available file="${manifest.file}" property="manifest.available"/>
36.111 - <condition property="manifest.available+main.class">
36.112 + <condition property="splashscreen.available">
36.113 <and>
36.114 - <isset property="manifest.available"/>
36.115 + <not>
36.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
36.117 + </not>
36.118 + <available file="${application.splash}"/>
36.119 + </and>
36.120 + </condition>
36.121 + <condition property="main.class.available">
36.122 + <and>
36.123 <isset property="main.class"/>
36.124 <not>
36.125 <equals arg1="${main.class}" arg2="" trim="true"/>
36.126 </not>
36.127 </and>
36.128 </condition>
36.129 - <condition property="manifest.available+main.class+mkdist.available">
36.130 + <condition property="profile.available">
36.131 <and>
36.132 - <istrue value="${manifest.available+main.class}"/>
36.133 - <isset property="libs.CopyLibs.classpath"/>
36.134 + <isset property="javac.profile"/>
36.135 + <length length="0" string="${javac.profile}" when="greater"/>
36.136 + <not>
36.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
36.138 + </not>
36.139 + </and>
36.140 + </condition>
36.141 + <condition property="do.archive">
36.142 + <or>
36.143 + <not>
36.144 + <istrue value="${jar.archive.disabled}"/>
36.145 + </not>
36.146 + <istrue value="${not.archive.disabled}"/>
36.147 + </or>
36.148 + </condition>
36.149 + <condition property="do.archive+manifest.available">
36.150 + <and>
36.151 + <isset property="manifest.available"/>
36.152 + <istrue value="${do.archive}"/>
36.153 + </and>
36.154 + </condition>
36.155 + <condition property="do.archive+main.class.available">
36.156 + <and>
36.157 + <isset property="main.class.available"/>
36.158 + <istrue value="${do.archive}"/>
36.159 + </and>
36.160 + </condition>
36.161 + <condition property="do.archive+splashscreen.available">
36.162 + <and>
36.163 + <isset property="splashscreen.available"/>
36.164 + <istrue value="${do.archive}"/>
36.165 + </and>
36.166 + </condition>
36.167 + <condition property="do.archive+profile.available">
36.168 + <and>
36.169 + <isset property="profile.available"/>
36.170 + <istrue value="${do.archive}"/>
36.171 </and>
36.172 </condition>
36.173 <condition property="have.tests">
36.174 @@ -86,6 +201,7 @@
36.175 </and>
36.176 </condition>
36.177 <property name="run.jvmargs" value=""/>
36.178 + <property name="run.jvmargs.ide" value=""/>
36.179 <property name="javac.compilerargs" value=""/>
36.180 <property name="work.dir" value="${basedir}"/>
36.181 <condition property="no.deps">
36.182 @@ -97,6 +213,8 @@
36.183 <property name="javadoc.preview" value="true"/>
36.184 <property name="application.args" value=""/>
36.185 <property name="source.encoding" value="${file.encoding}"/>
36.186 + <property name="runtime.encoding" value="${source.encoding}"/>
36.187 + <property name="manifest.encoding" value="${source.encoding}"/>
36.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
36.189 <and>
36.190 <isset property="javadoc.encoding"/>
36.191 @@ -112,12 +230,58 @@
36.192 <condition property="do.depend.true">
36.193 <istrue value="${do.depend}"/>
36.194 </condition>
36.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
36.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
36.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
36.198 <and>
36.199 - <isset property="jaxws.endorsed.dir"/>
36.200 - <available file="nbproject/jaxws-build.xml"/>
36.201 + <isset property="endorsed.classpath"/>
36.202 + <not>
36.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
36.204 + </not>
36.205 </and>
36.206 </condition>
36.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
36.208 + <isset property="profile.available"/>
36.209 + </condition>
36.210 + <condition else="false" property="jdkBug6558476">
36.211 + <and>
36.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
36.213 + <not>
36.214 + <os family="unix"/>
36.215 + </not>
36.216 + </and>
36.217 + </condition>
36.218 + <condition else="false" property="javac.fork">
36.219 + <or>
36.220 + <istrue value="${jdkBug6558476}"/>
36.221 + <istrue value="${javac.external.vm}"/>
36.222 + </or>
36.223 + </condition>
36.224 + <property name="jar.index" value="false"/>
36.225 + <property name="jar.index.metainf" value="${jar.index}"/>
36.226 + <property name="copylibs.rebase" value="true"/>
36.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
36.228 + <condition property="junit.available">
36.229 + <or>
36.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
36.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
36.232 + </or>
36.233 + </condition>
36.234 + <condition property="testng.available">
36.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
36.236 + </condition>
36.237 + <condition property="junit+testng.available">
36.238 + <and>
36.239 + <istrue value="${junit.available}"/>
36.240 + <istrue value="${testng.available}"/>
36.241 + </and>
36.242 + </condition>
36.243 + <condition else="testng" property="testng.mode" value="mixed">
36.244 + <istrue value="${junit+testng.available}"/>
36.245 + </condition>
36.246 + <condition else="" property="testng.debug.mode" value="-mixed">
36.247 + <istrue value="${junit+testng.available}"/>
36.248 + </condition>
36.249 + <property name="java.failonerror" value="true"/>
36.250 </target>
36.251 <target name="-post-init">
36.252 <!-- Empty placeholder for easier customization. -->
36.253 @@ -144,26 +308,152 @@
36.254 </sequential>
36.255 </macrodef>
36.256 </target>
36.257 - <target name="-init-macrodef-javac">
36.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
36.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
36.260 <attribute default="${src.dir}" name="srcdir"/>
36.261 <attribute default="${build.classes.dir}" name="destdir"/>
36.262 <attribute default="${javac.classpath}" name="classpath"/>
36.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
36.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
36.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
36.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
36.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
36.268 <attribute default="${includes}" name="includes"/>
36.269 <attribute default="${excludes}" name="excludes"/>
36.270 <attribute default="${javac.debug}" name="debug"/>
36.271 - <attribute default="" name="sourcepath"/>
36.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
36.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
36.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
36.275 <element name="customize" optional="true"/>
36.276 <sequential>
36.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
36.278 + <condition property="warn.excludes.internal">
36.279 + <and>
36.280 + <isset property="named.module.internal"/>
36.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
36.282 + </and>
36.283 + </condition>
36.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
36.285 + <property location="${build.dir}/empty" name="empty.dir"/>
36.286 + <mkdir dir="${empty.dir}"/>
36.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
36.288 + <condition property="processormodulepath.set">
36.289 + <resourcecount count="0" when="greater">
36.290 + <path>
36.291 + <pathelement path="@{processormodulepath}"/>
36.292 + </path>
36.293 + </resourcecount>
36.294 + </condition>
36.295 + <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}">
36.296 + <src>
36.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
36.298 + <include name="*"/>
36.299 + </dirset>
36.300 + </src>
36.301 <classpath>
36.302 <path path="@{classpath}"/>
36.303 </classpath>
36.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
36.305 + <modulepath>
36.306 + <path path="@{modulepath}"/>
36.307 + </modulepath>
36.308 + <upgrademodulepath>
36.309 + <path path="@{upgrademodulepath}"/>
36.310 + </upgrademodulepath>
36.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
36.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
36.313 + <compilerarg line="${javac.compilerargs}"/>
36.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
36.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
36.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
36.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
36.318 + <compilerarg line="${ap.processors.internal}"/>
36.319 + <compilerarg line="${annotation.processing.processor.options}"/>
36.320 + <compilerarg value="-s"/>
36.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
36.322 + <compilerarg line="${ap.proc.none.internal}"/>
36.323 <customize/>
36.324 </javac>
36.325 </sequential>
36.326 </macrodef>
36.327 + </target>
36.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
36.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
36.330 + <attribute default="${src.dir}" name="srcdir"/>
36.331 + <attribute default="${build.classes.dir}" name="destdir"/>
36.332 + <attribute default="${javac.classpath}" name="classpath"/>
36.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
36.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
36.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
36.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
36.337 + <attribute default="${includes}" name="includes"/>
36.338 + <attribute default="${excludes}" name="excludes"/>
36.339 + <attribute default="${javac.debug}" name="debug"/>
36.340 + <attribute default="${empty.dir}" name="sourcepath"/>
36.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
36.342 + <element name="customize" optional="true"/>
36.343 + <sequential>
36.344 + <property location="${build.dir}/empty" name="empty.dir"/>
36.345 + <mkdir dir="${empty.dir}"/>
36.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
36.347 + <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}">
36.348 + <src>
36.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
36.350 + <include name="*"/>
36.351 + </dirset>
36.352 + </src>
36.353 + <classpath>
36.354 + <path path="@{classpath}"/>
36.355 + </classpath>
36.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
36.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
36.358 + <compilerarg line="${javac.compilerargs}"/>
36.359 + <compilerarg value="-processorpath"/>
36.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
36.361 + <compilerarg line="${ap.processors.internal}"/>
36.362 + <compilerarg line="${annotation.processing.processor.options}"/>
36.363 + <compilerarg value="-s"/>
36.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
36.365 + <compilerarg line="${ap.proc.none.internal}"/>
36.366 + <customize/>
36.367 + </javac>
36.368 + </sequential>
36.369 + </macrodef>
36.370 + </target>
36.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
36.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
36.373 + <attribute default="${src.dir}" name="srcdir"/>
36.374 + <attribute default="${build.classes.dir}" name="destdir"/>
36.375 + <attribute default="${javac.classpath}" name="classpath"/>
36.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
36.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
36.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
36.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
36.380 + <attribute default="${includes}" name="includes"/>
36.381 + <attribute default="${excludes}" name="excludes"/>
36.382 + <attribute default="${javac.debug}" name="debug"/>
36.383 + <attribute default="${empty.dir}" name="sourcepath"/>
36.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
36.385 + <element name="customize" optional="true"/>
36.386 + <sequential>
36.387 + <property location="${build.dir}/empty" name="empty.dir"/>
36.388 + <mkdir dir="${empty.dir}"/>
36.389 + <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}">
36.390 + <src>
36.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
36.392 + <include name="*"/>
36.393 + </dirset>
36.394 + </src>
36.395 + <classpath>
36.396 + <path path="@{classpath}"/>
36.397 + </classpath>
36.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
36.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
36.400 + <compilerarg line="${javac.compilerargs}"/>
36.401 + <customize/>
36.402 + </javac>
36.403 + </sequential>
36.404 + </macrodef>
36.405 + </target>
36.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
36.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
36.408 <attribute default="${src.dir}" name="srcdir"/>
36.409 <attribute default="${build.classes.dir}" name="destdir"/>
36.410 @@ -180,51 +470,383 @@
36.411 <attribute default="${build.classes.dir}" name="destdir"/>
36.412 <sequential>
36.413 <fail unless="javac.includes">Must set javac.includes</fail>
36.414 - <pathconvert pathsep="," property="javac.includes.binary">
36.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
36.416 <path>
36.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
36.418 </path>
36.419 <globmapper from="*.java" to="*.class"/>
36.420 </pathconvert>
36.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
36.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
36.423 <delete>
36.424 - <files includes="${javac.includes.binary}"/>
36.425 + <files includesfile="${javac.includesfile.binary}"/>
36.426 + </delete>
36.427 + <delete>
36.428 + <fileset file="${javac.includesfile.binary}"/>
36.429 </delete>
36.430 </sequential>
36.431 </macrodef>
36.432 </target>
36.433 - <target name="-init-macrodef-junit">
36.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
36.435 + <condition else="false" property="nb.junit.batch" value="true">
36.436 + <and>
36.437 + <istrue value="${junit.available}"/>
36.438 + <not>
36.439 + <isset property="test.method"/>
36.440 + </not>
36.441 + </and>
36.442 + </condition>
36.443 + <condition else="false" property="nb.junit.single" value="true">
36.444 + <and>
36.445 + <istrue value="${junit.available}"/>
36.446 + <isset property="test.method"/>
36.447 + </and>
36.448 + </condition>
36.449 + </target>
36.450 + <target name="-init-test-properties">
36.451 + <property name="test.binaryincludes" value="<nothing>"/>
36.452 + <property name="test.binarytestincludes" value=""/>
36.453 + <property name="test.binaryexcludes" value=""/>
36.454 + </target>
36.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
36.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
36.457 + <attribute default="${includes}" name="includes"/>
36.458 + <attribute default="${excludes}" name="excludes"/>
36.459 + <element name="customizePrototype" optional="true"/>
36.460 + <sequential>
36.461 + <property name="junit.forkmode" value="perTest"/>
36.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
36.463 + <syspropertyset>
36.464 + <propertyref prefix="test-sys-prop."/>
36.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
36.466 + </syspropertyset>
36.467 + <classpath>
36.468 + <path path="${run.test.classpath}"/>
36.469 + </classpath>
36.470 + <modulepath>
36.471 + <path path="${run.test.modulepath}"/>
36.472 + </modulepath>
36.473 + <formatter type="brief" usefile="false"/>
36.474 + <formatter type="xml"/>
36.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
36.476 + <jvmarg value="-ea"/>
36.477 + <jvmarg line="${run.test.jvmargs}"/>
36.478 + <customizePrototype/>
36.479 + </junit>
36.480 + </sequential>
36.481 + </macrodef>
36.482 + </target>
36.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
36.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
36.485 + <attribute default="${includes}" name="includes"/>
36.486 + <attribute default="${excludes}" name="excludes"/>
36.487 + <element name="customizePrototype" optional="true"/>
36.488 + <sequential>
36.489 + <property name="junit.forkmode" value="perTest"/>
36.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
36.491 + <syspropertyset>
36.492 + <propertyref prefix="test-sys-prop."/>
36.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
36.494 + </syspropertyset>
36.495 + <classpath>
36.496 + <path path="${run.test.classpath}"/>
36.497 + </classpath>
36.498 + <formatter type="brief" usefile="false"/>
36.499 + <formatter type="xml"/>
36.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
36.501 + <jvmarg value="-ea"/>
36.502 + <customizePrototype/>
36.503 + </junit>
36.504 + </sequential>
36.505 + </macrodef>
36.506 + </target>
36.507 + <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}">
36.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
36.509 <attribute default="${includes}" name="includes"/>
36.510 <attribute default="${excludes}" name="excludes"/>
36.511 <attribute default="**" name="testincludes"/>
36.512 + <attribute default="" name="testmethods"/>
36.513 + <element name="customize" optional="true"/>
36.514 <sequential>
36.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
36.516 - <batchtest todir="${build.test.results.dir}">
36.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
36.518 - <filename name="@{testincludes}"/>
36.519 - </fileset>
36.520 - </batchtest>
36.521 + <j2seproject3:junit-prototype>
36.522 + <customizePrototype>
36.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
36.524 + <customize/>
36.525 + </customizePrototype>
36.526 + </j2seproject3:junit-prototype>
36.527 + </sequential>
36.528 + </macrodef>
36.529 + </target>
36.530 + <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}">
36.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
36.532 + <attribute default="${includes}" name="includes"/>
36.533 + <attribute default="${excludes}" name="excludes"/>
36.534 + <attribute default="**" name="testincludes"/>
36.535 + <attribute default="" name="testmethods"/>
36.536 + <element name="customize" optional="true"/>
36.537 + <sequential>
36.538 + <j2seproject3:junit-prototype>
36.539 + <customizePrototype>
36.540 + <batchtest todir="${build.test.results.dir}">
36.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
36.542 + <filename name="@{testincludes}"/>
36.543 + </fileset>
36.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
36.545 + <filename name="${test.binarytestincludes}"/>
36.546 + </fileset>
36.547 + </batchtest>
36.548 + <customize/>
36.549 + </customizePrototype>
36.550 + </j2seproject3:junit-prototype>
36.551 + </sequential>
36.552 + </macrodef>
36.553 + </target>
36.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
36.555 + <target if="${testng.available}" name="-init-macrodef-testng">
36.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
36.557 + <attribute default="${includes}" name="includes"/>
36.558 + <attribute default="${excludes}" name="excludes"/>
36.559 + <attribute default="**" name="testincludes"/>
36.560 + <attribute default="" name="testmethods"/>
36.561 + <element name="customize" optional="true"/>
36.562 + <sequential>
36.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
36.564 + <isset property="test.method"/>
36.565 + </condition>
36.566 + <union id="test.set">
36.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
36.568 + <filename name="@{testincludes}"/>
36.569 + </fileset>
36.570 + </union>
36.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
36.572 + <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="hellowithsubclassing" testname="TestNG tests" workingDir="${work.dir}">
36.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
36.574 + <propertyset>
36.575 + <propertyref prefix="test-sys-prop."/>
36.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
36.577 + </propertyset>
36.578 <classpath>
36.579 <path path="${run.test.classpath}"/>
36.580 </classpath>
36.581 - <syspropertyset>
36.582 - <propertyref prefix="test-sys-prop."/>
36.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
36.584 - </syspropertyset>
36.585 - <formatter type="brief" usefile="false"/>
36.586 - <formatter type="xml"/>
36.587 - <jvmarg line="${run.jvmargs}"/>
36.588 - </junit>
36.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
36.590 + <customize/>
36.591 + </testng>
36.592 </sequential>
36.593 </macrodef>
36.594 </target>
36.595 - <target name="-init-macrodef-nbjpda">
36.596 + <target name="-init-macrodef-test-impl">
36.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
36.598 + <attribute default="${includes}" name="includes"/>
36.599 + <attribute default="${excludes}" name="excludes"/>
36.600 + <attribute default="**" name="testincludes"/>
36.601 + <attribute default="" name="testmethods"/>
36.602 + <element implicit="true" name="customize" optional="true"/>
36.603 + <sequential>
36.604 + <echo>No tests executed.</echo>
36.605 + </sequential>
36.606 + </macrodef>
36.607 + </target>
36.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
36.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
36.610 + <attribute default="${includes}" name="includes"/>
36.611 + <attribute default="${excludes}" name="excludes"/>
36.612 + <attribute default="**" name="testincludes"/>
36.613 + <attribute default="" name="testmethods"/>
36.614 + <element implicit="true" name="customize" optional="true"/>
36.615 + <sequential>
36.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
36.617 + <customize/>
36.618 + </j2seproject3:junit>
36.619 + </sequential>
36.620 + </macrodef>
36.621 + </target>
36.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
36.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
36.624 + <attribute default="${includes}" name="includes"/>
36.625 + <attribute default="${excludes}" name="excludes"/>
36.626 + <attribute default="**" name="testincludes"/>
36.627 + <attribute default="" name="testmethods"/>
36.628 + <element implicit="true" name="customize" optional="true"/>
36.629 + <sequential>
36.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
36.631 + <customize/>
36.632 + </j2seproject3:testng>
36.633 + </sequential>
36.634 + </macrodef>
36.635 + </target>
36.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
36.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
36.638 + <attribute default="${includes}" name="includes"/>
36.639 + <attribute default="${excludes}" name="excludes"/>
36.640 + <attribute default="**" name="testincludes"/>
36.641 + <attribute default="" name="testmethods"/>
36.642 + <sequential>
36.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
36.644 + <customize>
36.645 + <jvmarg line="${run.jvmargs}"/>
36.646 + <jvmarg line="${run.jvmargs.ide}"/>
36.647 + </customize>
36.648 + </j2seproject3:test-impl>
36.649 + </sequential>
36.650 + </macrodef>
36.651 + </target>
36.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
36.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
36.654 + <attribute default="${includes}" name="includes"/>
36.655 + <attribute default="${excludes}" name="excludes"/>
36.656 + <attribute default="**" name="testincludes"/>
36.657 + <attribute default="" name="testmethods"/>
36.658 + <element name="customizeDebuggee" optional="true"/>
36.659 + <sequential>
36.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
36.661 + <customize>
36.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
36.663 + <customizeDebuggee/>
36.664 + </customize>
36.665 + </j2seproject3:junit>
36.666 + </sequential>
36.667 + </macrodef>
36.668 + </target>
36.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
36.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
36.671 + <attribute default="${main.class}" name="testClass"/>
36.672 + <attribute default="" name="testMethod"/>
36.673 + <element name="customize2" optional="true"/>
36.674 + <sequential>
36.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
36.676 + <isset property="test.method"/>
36.677 + </condition>
36.678 + <condition else="-suitename hellowithsubclassing -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
36.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
36.680 + </condition>
36.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
36.682 + <mkdir dir="${build.test.results.dir}"/>
36.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
36.684 + <customizeDebuggee>
36.685 + <customize2/>
36.686 + <jvmarg value="-ea"/>
36.687 + <arg line="${testng.debug.mode}"/>
36.688 + <arg line="-d ${build.test.results.dir}"/>
36.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
36.690 + <arg line="${testng.cmd.args}"/>
36.691 + </customizeDebuggee>
36.692 + </j2seproject3:debug>
36.693 + </sequential>
36.694 + </macrodef>
36.695 + </target>
36.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
36.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
36.698 + <attribute default="${main.class}" name="testClass"/>
36.699 + <attribute default="" name="testMethod"/>
36.700 + <element implicit="true" name="customize2" optional="true"/>
36.701 + <sequential>
36.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
36.703 + <customize2/>
36.704 + </j2seproject3:testng-debug>
36.705 + </sequential>
36.706 + </macrodef>
36.707 + </target>
36.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
36.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
36.710 + <attribute default="${includes}" name="includes"/>
36.711 + <attribute default="${excludes}" name="excludes"/>
36.712 + <attribute default="**" name="testincludes"/>
36.713 + <attribute default="" name="testmethods"/>
36.714 + <attribute default="${main.class}" name="testClass"/>
36.715 + <attribute default="" name="testMethod"/>
36.716 + <sequential>
36.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
36.718 + <customizeDebuggee>
36.719 + <jvmarg line="${run.jvmargs}"/>
36.720 + <jvmarg line="${run.jvmargs.ide}"/>
36.721 + </customizeDebuggee>
36.722 + </j2seproject3:test-debug-impl>
36.723 + </sequential>
36.724 + </macrodef>
36.725 + </target>
36.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
36.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
36.728 + <attribute default="${includes}" name="includes"/>
36.729 + <attribute default="${excludes}" name="excludes"/>
36.730 + <attribute default="**" name="testincludes"/>
36.731 + <attribute default="" name="testmethods"/>
36.732 + <attribute default="${main.class}" name="testClass"/>
36.733 + <attribute default="" name="testMethod"/>
36.734 + <sequential>
36.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
36.736 + <customize2>
36.737 + <syspropertyset>
36.738 + <propertyref prefix="test-sys-prop."/>
36.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
36.740 + </syspropertyset>
36.741 + </customize2>
36.742 + </j2seproject3:testng-debug-impl>
36.743 + </sequential>
36.744 + </macrodef>
36.745 + </target>
36.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
36.747 + <!--
36.748 + pre NB7.2 profiling section; consider it deprecated
36.749 + -->
36.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
36.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
36.752 + <!-- Empty placeholder for easier customization. -->
36.753 + <!-- You can override this target in the ../build.xml file. -->
36.754 + </target>
36.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
36.756 + <!-- Empty placeholder for easier customization. -->
36.757 + <!-- You can override this target in the ../build.xml file. -->
36.758 + </target>
36.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
36.760 + <macrodef name="resolve">
36.761 + <attribute name="name"/>
36.762 + <attribute name="value"/>
36.763 + <sequential>
36.764 + <property name="@{name}" value="${env.@{value}}"/>
36.765 + </sequential>
36.766 + </macrodef>
36.767 + <macrodef name="profile">
36.768 + <attribute default="${main.class}" name="classname"/>
36.769 + <element name="customize" optional="true"/>
36.770 + <sequential>
36.771 + <property environment="env"/>
36.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
36.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
36.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
36.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
36.776 + <jvmarg line="${profiler.info.jvmargs}"/>
36.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
36.778 + <arg line="${application.args}"/>
36.779 + <classpath>
36.780 + <path path="${run.classpath}"/>
36.781 + </classpath>
36.782 + <syspropertyset>
36.783 + <propertyref prefix="run-sys-prop."/>
36.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
36.785 + </syspropertyset>
36.786 + <customize/>
36.787 + </java>
36.788 + </sequential>
36.789 + </macrodef>
36.790 + </target>
36.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
36.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
36.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
36.794 + </target>
36.795 + <!--
36.796 + end of pre NB7.2 profiling section
36.797 + -->
36.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
36.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
36.800 <attribute default="${main.class}" name="name"/>
36.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
36.802 <attribute default="${debug.classpath}" name="classpath"/>
36.803 <attribute default="" name="stopclassname"/>
36.804 <sequential>
36.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
36.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
36.807 + <modulepath>
36.808 + <path path="@{modulepath}"/>
36.809 + </modulepath>
36.810 <classpath>
36.811 <path path="@{classpath}"/>
36.812 </classpath>
36.813 @@ -235,35 +857,120 @@
36.814 <attribute default="${build.classes.dir}" name="dir"/>
36.815 <sequential>
36.816 <nbjpdareload>
36.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
36.818 + <fileset dir="@{dir}" includes="${fix.classes}">
36.819 + <include name="${fix.includes}*.class"/>
36.820 + </fileset>
36.821 </nbjpdareload>
36.822 </sequential>
36.823 </macrodef>
36.824 </target>
36.825 <target name="-init-debug-args">
36.826 - <property name="version-output" value="java version "${ant.java.version}"/>
36.827 - <condition property="have-jdk-older-than-1.4">
36.828 - <or>
36.829 - <contains string="${version-output}" substring="java version "1.0"/>
36.830 - <contains string="${version-output}" substring="java version "1.1"/>
36.831 - <contains string="${version-output}" substring="java version "1.2"/>
36.832 - <contains string="${version-output}" substring="java version "1.3"/>
36.833 - </or>
36.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
36.835 + <os family="windows"/>
36.836 </condition>
36.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
36.838 - <istrue value="${have-jdk-older-than-1.4}"/>
36.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
36.840 + <isset property="debug.transport"/>
36.841 </condition>
36.842 </target>
36.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
36.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
36.845 + <attribute default="${module.name}" name="modulename"/>
36.846 <attribute default="${main.class}" name="classname"/>
36.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
36.848 <attribute default="${debug.classpath}" name="classpath"/>
36.849 + <element name="customizeDebuggee" optional="true"/>
36.850 + <sequential>
36.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
36.852 + <customize>
36.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
36.854 + <customizeDebuggee/>
36.855 + </customize>
36.856 + </j2seproject1:java>
36.857 + </sequential>
36.858 + </macrodef>
36.859 + </target>
36.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
36.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
36.862 + <attribute default="${module.name}" name="modulename"/>
36.863 + <attribute default="${main.class}" name="classname"/>
36.864 + <attribute default="${run.modulepath}" name="modulepath"/>
36.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
36.866 + <attribute default="${run.classpath}" name="classpath"/>
36.867 + <attribute default="jvm" name="jvm"/>
36.868 <element name="customize" optional="true"/>
36.869 <sequential>
36.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
36.871 - <jvmarg line="${debug-args-line}"/>
36.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
36.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
36.874 + <classpath>
36.875 + <path path="@{classpath}"/>
36.876 + </classpath>
36.877 + <modulepath>
36.878 + <pathelement path="@{modulepath}"/>
36.879 + <pathelement location="${module.build.classes.dir}"/>
36.880 + </modulepath>
36.881 + <upgrademodulepath>
36.882 + <path path="@{upgrademodulepath}"/>
36.883 + </upgrademodulepath>
36.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
36.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
36.886 <jvmarg line="${run.jvmargs}"/>
36.887 + <jvmarg line="${run.jvmargs.ide}"/>
36.888 + <syspropertyset>
36.889 + <propertyref prefix="run-sys-prop."/>
36.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
36.891 + </syspropertyset>
36.892 + <customize/>
36.893 + </java>
36.894 + </sequential>
36.895 + </macrodef>
36.896 + </target>
36.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
36.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
36.899 + <attribute default="" name="modulename"/>
36.900 + <attribute default="${main.class}" name="classname"/>
36.901 + <attribute default="${run.modulepath}" name="modulepath"/>
36.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
36.903 + <attribute default="${run.classpath}" name="classpath"/>
36.904 + <attribute default="jvm" name="jvm"/>
36.905 + <element name="customize" optional="true"/>
36.906 + <sequential>
36.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
36.908 + <classpath>
36.909 + <path path="@{classpath}"/>
36.910 + </classpath>
36.911 + <modulepath>
36.912 + <path path="@{modulepath}"/>
36.913 + </modulepath>
36.914 + <upgrademodulepath>
36.915 + <path path="@{upgrademodulepath}"/>
36.916 + </upgrademodulepath>
36.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
36.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
36.919 + <jvmarg line="${run.jvmargs}"/>
36.920 + <jvmarg line="${run.jvmargs.ide}"/>
36.921 + <syspropertyset>
36.922 + <propertyref prefix="run-sys-prop."/>
36.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
36.924 + </syspropertyset>
36.925 + <customize/>
36.926 + </java>
36.927 + </sequential>
36.928 + </macrodef>
36.929 + </target>
36.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
36.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
36.932 + <attribute default="" name="modulename"/>
36.933 + <attribute default="${main.class}" name="classname"/>
36.934 + <attribute default="" name="modulepath"/>
36.935 + <attribute default="${run.classpath}" name="classpath"/>
36.936 + <attribute default="jvm" name="jvm"/>
36.937 + <element name="customize" optional="true"/>
36.938 + <sequential>
36.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
36.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
36.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
36.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
36.943 + <jvmarg line="${run.jvmargs}"/>
36.944 + <jvmarg line="${run.jvmargs.ide}"/>
36.945 <classpath>
36.946 <path path="@{classpath}"/>
36.947 </classpath>
36.948 @@ -276,39 +983,100 @@
36.949 </sequential>
36.950 </macrodef>
36.951 </target>
36.952 - <target name="-init-macrodef-java">
36.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
36.954 - <attribute default="${main.class}" name="classname"/>
36.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
36.956 + <target name="-init-macrodef-copylibs">
36.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
36.958 + <attribute default="${manifest.file}" name="manifest"/>
36.959 <element name="customize" optional="true"/>
36.960 <sequential>
36.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
36.962 - <jvmarg line="${run.jvmargs}"/>
36.963 - <classpath>
36.964 - <path path="${run.classpath}"/>
36.965 - </classpath>
36.966 - <syspropertyset>
36.967 - <propertyref prefix="run-sys-prop."/>
36.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
36.969 - </syspropertyset>
36.970 - <customize/>
36.971 - </java>
36.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
36.973 + <pathconvert property="run.classpath.without.build.classes.dir">
36.974 + <path path="${run.classpath}"/>
36.975 + <map from="${build.classes.dir.resolved}" to=""/>
36.976 + </pathconvert>
36.977 + <pathconvert pathsep=" " property="jar.classpath">
36.978 + <path path="${run.classpath.without.build.classes.dir}"/>
36.979 + <chainedmapper>
36.980 + <flattenmapper/>
36.981 + <filtermapper>
36.982 + <replacestring from=" " to="%20"/>
36.983 + </filtermapper>
36.984 + <globmapper from="*" to="lib/*"/>
36.985 + </chainedmapper>
36.986 + </pathconvert>
36.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
36.988 + <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}">
36.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
36.990 + <manifest>
36.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
36.992 + <customize/>
36.993 + </manifest>
36.994 + </copylibs>
36.995 </sequential>
36.996 </macrodef>
36.997 </target>
36.998 <target name="-init-presetdef-jar">
36.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
36.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
36.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
36.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
36.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
36.1004 </jar>
36.1005 </presetdef>
36.1006 </target>
36.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
36.1008 + <target name="-init-ap-cmdline-properties">
36.1009 + <property name="annotation.processing.enabled" value="true"/>
36.1010 + <property name="annotation.processing.processors.list" value=""/>
36.1011 + <property name="annotation.processing.processor.options" value=""/>
36.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
36.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
36.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
36.1015 + <condition property="ap.supported.internal" value="true">
36.1016 + <not>
36.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
36.1018 + </not>
36.1019 + </condition>
36.1020 + </target>
36.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
36.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
36.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
36.1024 + </condition>
36.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
36.1026 + <isfalse value="${annotation.processing.enabled}"/>
36.1027 + </condition>
36.1028 + </target>
36.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
36.1030 + <property name="ap.cmd.line.internal" value=""/>
36.1031 + </target>
36.1032 + <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"/>
36.1033 <!--
36.1034 ===================
36.1035 COMPILATION SECTION
36.1036 ===================
36.1037 -->
36.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
36.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
36.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
36.1041 + <delete file="${built-jar.properties}" quiet="true"/>
36.1042 + </target>
36.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
36.1044 + <echo level="warn" message="Cycle detected: hellowithsubclassing was already built"/>
36.1045 + </target>
36.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
36.1047 + <mkdir dir="${build.dir}"/>
36.1048 + <touch file="${built-jar.properties}" verbose="false"/>
36.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
36.1050 + <antcall target="-warn-already-built-jar"/>
36.1051 + <propertyfile file="${built-jar.properties}">
36.1052 + <entry key="${basedir}" value=""/>
36.1053 + </propertyfile>
36.1054 + </target>
36.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
36.1056 + <target depends="init" name="-check-automatic-build">
36.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
36.1058 + </target>
36.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
36.1060 + <antcall target="clean">
36.1061 + <param name="no.dependencies" value="true"/>
36.1062 + </antcall>
36.1063 + </target>
36.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
36.1065 <mkdir dir="${build.classes.dir}"/>
36.1066 </target>
36.1067 @@ -317,19 +1085,30 @@
36.1068 <!-- You can override this target in the ../build.xml file. -->
36.1069 </target>
36.1070 <target if="do.depend.true" name="-compile-depend">
36.1071 - <j2seproject3:depend/>
36.1072 + <pathconvert property="build.generated.subdirs">
36.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
36.1074 + <include name="*"/>
36.1075 + </dirset>
36.1076 + </pathconvert>
36.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
36.1078 </target>
36.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
36.1080 - <j2seproject3:javac/>
36.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
36.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
36.1083 <copy todir="${build.classes.dir}">
36.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
36.1085 </copy>
36.1086 </target>
36.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
36.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
36.1089 + <copy todir="${build.classes.dir}/META-INF">
36.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
36.1091 + </copy>
36.1092 + </target>
36.1093 <target name="-post-compile">
36.1094 <!-- Empty placeholder for easier customization. -->
36.1095 <!-- You can override this target in the ../build.xml file. -->
36.1096 </target>
36.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
36.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
36.1099 <target name="-pre-compile-single">
36.1100 <!-- Empty placeholder for easier customization. -->
36.1101 <!-- You can override this target in the ../build.xml file. -->
36.1102 @@ -337,13 +1116,13 @@
36.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
36.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
36.1105 <j2seproject3:force-recompile/>
36.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
36.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
36.1108 </target>
36.1109 <target name="-post-compile-single">
36.1110 <!-- Empty placeholder for easier customization. -->
36.1111 <!-- You can override this target in the ../build.xml file. -->
36.1112 </target>
36.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
36.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
36.1115 <!--
36.1116 ====================
36.1117 JAR BUILDING SECTION
36.1118 @@ -357,57 +1136,191 @@
36.1119 <!-- Empty placeholder for easier customization. -->
36.1120 <!-- You can override this target in the ../build.xml file. -->
36.1121 </target>
36.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
36.1123 - <j2seproject1:jar/>
36.1124 + <target depends="init,compile" name="-check-module-main-class">
36.1125 + <pathconvert property="main.class.file">
36.1126 + <string value="${main.class}"/>
36.1127 + <unpackagemapper from="*" to="*.class"/>
36.1128 + </pathconvert>
36.1129 + <condition property="do.module.main.class">
36.1130 + <and>
36.1131 + <isset property="main.class.available"/>
36.1132 + <available file="${build.classes.dir}/module-info.class"/>
36.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
36.1134 + <isset property="libs.CopyLibs.classpath"/>
36.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
36.1136 + </and>
36.1137 + </condition>
36.1138 </target>
36.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
36.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
36.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
36.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
36.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
36.1144 </target>
36.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
36.1146 - <j2seproject1:jar manifest="${manifest.file}">
36.1147 - <j2seproject1:manifest>
36.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
36.1149 - </j2seproject1:manifest>
36.1150 - </j2seproject1:jar>
36.1151 - <echo>To run this application from the command line without Ant, try:</echo>
36.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
36.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
36.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
36.1155 + </target>
36.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
36.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
36.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
36.1159 + </target>
36.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
36.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
36.1162 + <attribute name="Main-Class" value="${main.class}"/>
36.1163 + </manifest>
36.1164 + </target>
36.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
36.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
36.1167 + <attribute name="Profile" value="${javac.profile}"/>
36.1168 + </manifest>
36.1169 + </target>
36.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
36.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
36.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
36.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
36.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
36.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
36.1176 + </manifest>
36.1177 + </target>
36.1178 + <target depends="init,compile" name="-check-do-mkdist">
36.1179 + <condition property="do.mkdist">
36.1180 + <and>
36.1181 + <isset property="do.archive"/>
36.1182 + <isset property="libs.CopyLibs.classpath"/>
36.1183 + <not>
36.1184 + <istrue value="${mkdist.disabled}"/>
36.1185 + </not>
36.1186 + <not>
36.1187 + <available file="${build.classes.dir}/module-info.class"/>
36.1188 + </not>
36.1189 + </and>
36.1190 + </condition>
36.1191 + </target>
36.1192 + <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">
36.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
36.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
36.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
36.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
36.1197 + </target>
36.1198 + <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">
36.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
36.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
36.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
36.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
36.1203 + <isset property="named.module.internal"/>
36.1204 + </condition>
36.1205 <pathconvert property="run.classpath.with.dist.jar">
36.1206 <path path="${run.classpath}"/>
36.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
36.1208 + </pathconvert>
36.1209 + <pathconvert property="run.modulepath.with.dist.jar">
36.1210 + <path location="${dist.jar.resolved}"/>
36.1211 + <path path="${run.modulepath}"/>
36.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
36.1213 </pathconvert>
36.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
36.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
36.1216 + <isset property="named.module.internal"/>
36.1217 + </condition>
36.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
36.1219 + <and>
36.1220 + <isset property="modules.supported.internal"/>
36.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
36.1222 + </and>
36.1223 + </condition>
36.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
36.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
36.1226 + </condition>
36.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
36.1228 + <isset property="do.module.main.class"/>
36.1229 + </condition>
36.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
36.1231 + <isset property="named.module.internal"/>
36.1232 + </condition>
36.1233 + <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}">
36.1234 + <isset property="main.class.available"/>
36.1235 + </condition>
36.1236 + <condition else="debug" property="jar.usage.level" value="info">
36.1237 + <isset property="main.class.available"/>
36.1238 + </condition>
36.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
36.1240 </target>
36.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
36.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
36.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
36.1244 - <path path="${run.classpath}"/>
36.1245 - <map from="${build.classes.dir.resolved}" to=""/>
36.1246 - </pathconvert>
36.1247 - <pathconvert pathsep=" " property="jar.classpath">
36.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
36.1249 - <chainedmapper>
36.1250 - <flattenmapper/>
36.1251 - <globmapper from="*" to="lib/*"/>
36.1252 - </chainedmapper>
36.1253 - </pathconvert>
36.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
36.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
36.1256 - <fileset dir="${build.classes.dir}"/>
36.1257 - <manifest>
36.1258 - <attribute name="Main-Class" value="${main.class}"/>
36.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
36.1260 - </manifest>
36.1261 - </copylibs>
36.1262 - <echo>To run this application from the command line without Ant, try:</echo>
36.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
36.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
36.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
36.1266 + <delete>
36.1267 + <fileset file="${tmp.manifest.file}"/>
36.1268 + </delete>
36.1269 </target>
36.1270 + <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"/>
36.1271 + <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"/>
36.1272 <target name="-post-jar">
36.1273 <!-- Empty placeholder for easier customization. -->
36.1274 <!-- You can override this target in the ../build.xml file. -->
36.1275 </target>
36.1276 - <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"/>
36.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
36.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
36.1279 + <!--
36.1280 + =================
36.1281 + DEPLOY SECTION
36.1282 + =================
36.1283 + -->
36.1284 + <target name="-pre-deploy">
36.1285 + <!-- Empty placeholder for easier customization. -->
36.1286 + <!-- You can override this target in the ../build.xml file. -->
36.1287 + </target>
36.1288 + <target depends="init" name="-check-jlink">
36.1289 + <condition property="do.jlink.internal">
36.1290 + <and>
36.1291 + <istrue value="${do.jlink}"/>
36.1292 + <isset property="do.archive"/>
36.1293 + <isset property="named.module.internal"/>
36.1294 + </and>
36.1295 + </condition>
36.1296 + </target>
36.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
36.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
36.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
36.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
36.1301 + <and>
36.1302 + <isset property="jlink.additionalmodules"/>
36.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
36.1304 + </and>
36.1305 + </condition>
36.1306 + <condition property="jlink.do.strip.internal">
36.1307 + <and>
36.1308 + <isset property="jlink.strip"/>
36.1309 + <istrue value="${jlink.strip}"/>
36.1310 + </and>
36.1311 + </condition>
36.1312 + <condition property="jlink.do.additionalparam.internal">
36.1313 + <and>
36.1314 + <isset property="jlink.additionalparam"/>
36.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
36.1316 + </and>
36.1317 + </condition>
36.1318 + <condition property="jlink.do.launcher.internal">
36.1319 + <and>
36.1320 + <istrue value="${jlink.launcher}"/>
36.1321 + <isset property="main.class.available"/>
36.1322 + </and>
36.1323 + </condition>
36.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
36.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
36.1326 + <exec executable="${platform.jlink}">
36.1327 + <arg value="--module-path"/>
36.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
36.1329 + <arg value="--add-modules"/>
36.1330 + <arg value="${jlink.add.modules}"/>
36.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
36.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
36.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
36.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
36.1335 + <arg value="--output"/>
36.1336 + <arg value="${dist.jlink.output}"/>
36.1337 + </exec>
36.1338 + </target>
36.1339 + <target name="-post-deploy">
36.1340 + <!-- Empty placeholder for easier customization. -->
36.1341 + <!-- You can override this target in the ../build.xml file. -->
36.1342 + </target>
36.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
36.1344 <!--
36.1345 =================
36.1346 EXECUTION SECTION
36.1347 @@ -423,10 +1336,14 @@
36.1348 <target name="-do-not-recompile">
36.1349 <property name="javac.includes.binary" value=""/>
36.1350 </target>
36.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
36.1352 + <target depends="init,compile-single" name="run-single">
36.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
36.1354 <j2seproject1:java classname="${run.class}"/>
36.1355 </target>
36.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
36.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
36.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
36.1359 + </target>
36.1360 <!--
36.1361 =================
36.1362 DEBUGGING SECTION
36.1363 @@ -435,11 +1352,14 @@
36.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
36.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
36.1366 </target>
36.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
36.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
36.1369 + </target>
36.1370 <target depends="init,compile" name="-debug-start-debuggee">
36.1371 <j2seproject3:debug>
36.1372 - <customize>
36.1373 + <customizeDebuggee>
36.1374 <arg line="${application.args}"/>
36.1375 - </customize>
36.1376 + </customizeDebuggee>
36.1377 </j2seproject3:debug>
36.1378 </target>
36.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
36.1380 @@ -451,7 +1371,12 @@
36.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
36.1382 <j2seproject3:debug classname="${debug.class}"/>
36.1383 </target>
36.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
36.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
36.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
36.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
36.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
36.1389 + </target>
36.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
36.1391 <target depends="init" name="-pre-debug-fix">
36.1392 <fail unless="fix.includes">Must set fix.includes</fail>
36.1393 <property name="javac.includes" value="${fix.includes}.java"/>
36.1394 @@ -461,20 +1386,146 @@
36.1395 </target>
36.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
36.1397 <!--
36.1398 + =================
36.1399 + PROFILING SECTION
36.1400 + =================
36.1401 + -->
36.1402 + <!--
36.1403 + pre NB7.2 profiler integration
36.1404 + -->
36.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
36.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
36.1407 + <nbprofiledirect>
36.1408 + <classpath>
36.1409 + <path path="${run.classpath}"/>
36.1410 + </classpath>
36.1411 + </nbprofiledirect>
36.1412 + <profile/>
36.1413 + </target>
36.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
36.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
36.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
36.1417 + <nbprofiledirect>
36.1418 + <classpath>
36.1419 + <path path="${run.classpath}"/>
36.1420 + </classpath>
36.1421 + </nbprofiledirect>
36.1422 + <profile classname="${profile.class}"/>
36.1423 + </target>
36.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
36.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
36.1426 + <nbprofiledirect>
36.1427 + <classpath>
36.1428 + <path path="${run.classpath}"/>
36.1429 + </classpath>
36.1430 + </nbprofiledirect>
36.1431 + <profile classname="sun.applet.AppletViewer">
36.1432 + <customize>
36.1433 + <arg value="${applet.url}"/>
36.1434 + </customize>
36.1435 + </profile>
36.1436 + </target>
36.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
36.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
36.1439 + <nbprofiledirect>
36.1440 + <classpath>
36.1441 + <path path="${run.test.classpath}"/>
36.1442 + </classpath>
36.1443 + </nbprofiledirect>
36.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
36.1445 + <customize>
36.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
36.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
36.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
36.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
36.1450 + <classpath>
36.1451 + <path path="${run.test.classpath}"/>
36.1452 + </classpath>
36.1453 + </customize>
36.1454 + </j2seproject3:junit>
36.1455 + </target>
36.1456 + <!--
36.1457 + end of pre NB72 profiling section
36.1458 + -->
36.1459 + <target if="netbeans.home" name="-profile-check">
36.1460 + <condition property="profiler.configured">
36.1461 + <or>
36.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
36.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
36.1464 + </or>
36.1465 + </condition>
36.1466 + </target>
36.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
36.1468 + <startprofiler/>
36.1469 + <antcall target="run"/>
36.1470 + </target>
36.1471 + <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">
36.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
36.1473 + <startprofiler/>
36.1474 + <antcall target="run-single"/>
36.1475 + </target>
36.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
36.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
36.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
36.1479 + <startprofiler/>
36.1480 + <antcall target="test-single"/>
36.1481 + </target>
36.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
36.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
36.1484 + <startprofiler/>
36.1485 + <antcall target="run-test-with-main"/>
36.1486 + </target>
36.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
36.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
36.1489 + <startprofiler/>
36.1490 + <antcall target="run-applet"/>
36.1491 + </target>
36.1492 + <!--
36.1493 ===============
36.1494 JAVADOC SECTION
36.1495 ===============
36.1496 -->
36.1497 - <target depends="init" name="-javadoc-build">
36.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
36.1499 <mkdir dir="${dist.javadoc.dir}"/>
36.1500 - <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}">
36.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
36.1502 + <and>
36.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
36.1504 + <not>
36.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
36.1506 + </not>
36.1507 + </and>
36.1508 + </condition>
36.1509 + <condition else="" property="bug5101868workaround" value="*.java">
36.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
36.1511 + </condition>
36.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
36.1513 + <and>
36.1514 + <isset property="javadoc.html5"/>
36.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
36.1516 + </and>
36.1517 + </condition>
36.1518 + <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}">
36.1519 <classpath>
36.1520 <path path="${javac.classpath}"/>
36.1521 </classpath>
36.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
36.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
36.1524 <filename name="**/*.java"/>
36.1525 </fileset>
36.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
36.1527 + <include name="**/*.java"/>
36.1528 + <exclude name="*.java"/>
36.1529 + </fileset>
36.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
36.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
36.1532 </javadoc>
36.1533 + <copy todir="${dist.javadoc.dir}">
36.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
36.1535 + <filename name="**/doc-files/**"/>
36.1536 + </fileset>
36.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
36.1538 + <include name="**/doc-files/**"/>
36.1539 + </fileset>
36.1540 + </copy>
36.1541 </target>
36.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
36.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
36.1544 @@ -482,7 +1533,7 @@
36.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
36.1546 <!--
36.1547 =========================
36.1548 - JUNIT COMPILATION SECTION
36.1549 + TEST COMPILATION SECTION
36.1550 =========================
36.1551 -->
36.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
36.1553 @@ -492,11 +1543,63 @@
36.1554 <!-- Empty placeholder for easier customization. -->
36.1555 <!-- You can override this target in the ../build.xml file. -->
36.1556 </target>
36.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
36.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
36.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
36.1560 + <and>
36.1561 + <isset property="test.module.name"/>
36.1562 + <length length="0" string="${test.module.name}" when="greater"/>
36.1563 + </and>
36.1564 + </condition>
36.1565 + <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">
36.1566 + <and>
36.1567 + <isset property="test.module.name"/>
36.1568 + <length length="0" string="${test.module.name}" when="greater"/>
36.1569 + </and>
36.1570 + </condition>
36.1571 + </target>
36.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
36.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
36.1574 + <and>
36.1575 + <isset property="test.module.name"/>
36.1576 + <length length="0" string="${test.module.name}" when="greater"/>
36.1577 + </and>
36.1578 + </condition>
36.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
36.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
36.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
36.1582 + <chainedmapper>
36.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
36.1584 + <filtermapper>
36.1585 + <uniqfilter/>
36.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
36.1587 + </filtermapper>
36.1588 + <cutdirsmapper dirs="1"/>
36.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
36.1590 + </chainedmapper>
36.1591 + </pathconvert>
36.1592 + <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}">
36.1593 + <and>
36.1594 + <isset property="test.module.name"/>
36.1595 + <length length="0" string="${test.module.name}" when="greater"/>
36.1596 + </and>
36.1597 + </condition>
36.1598 + </target>
36.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
36.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
36.1601 + <property name="javac.test.compilerargs" value=""/>
36.1602 + <property name="run.test.jvmargs" value=""/>
36.1603 + </target>
36.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
36.1605 <target if="do.depend.true" name="-compile-test-depend">
36.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
36.1607 </target>
36.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
36.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
36.1610 + <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">
36.1611 + <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}">
36.1612 + <customize>
36.1613 + <compilerarg line="${javac.test.compilerargs}"/>
36.1614 + </customize>
36.1615 + </j2seproject3:javac>
36.1616 <copy todir="${build.test.classes.dir}">
36.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
36.1618 </copy>
36.1619 @@ -510,10 +1613,14 @@
36.1620 <!-- Empty placeholder for easier customization. -->
36.1621 <!-- You can override this target in the ../build.xml file. -->
36.1622 </target>
36.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
36.1624 + <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">
36.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
36.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
36.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
36.1628 + <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}">
36.1629 + <customize>
36.1630 + <compilerarg line="${javac.test.compilerargs}"/>
36.1631 + </customize>
36.1632 + </j2seproject3:javac>
36.1633 <copy todir="${build.test.classes.dir}">
36.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
36.1635 </copy>
36.1636 @@ -525,17 +1632,17 @@
36.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
36.1638 <!--
36.1639 =======================
36.1640 - JUNIT EXECUTION SECTION
36.1641 + TEST EXECUTION SECTION
36.1642 =======================
36.1643 -->
36.1644 <target depends="init" if="have.tests" name="-pre-test-run">
36.1645 <mkdir dir="${build.test.results.dir}"/>
36.1646 </target>
36.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
36.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
36.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
36.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
36.1651 </target>
36.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
36.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
36.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
36.1655 </target>
36.1656 <target depends="init" if="have.tests" name="test-report"/>
36.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
36.1658 @@ -543,41 +1650,42 @@
36.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
36.1660 <mkdir dir="${build.test.results.dir}"/>
36.1661 </target>
36.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
36.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
36.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
36.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
36.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
36.1667 </target>
36.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
36.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
36.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
36.1671 </target>
36.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
36.1673 + <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"/>
36.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
36.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
36.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
36.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
36.1678 + </target>
36.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
36.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
36.1681 + </target>
36.1682 + <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"/>
36.1683 <!--
36.1684 =======================
36.1685 - JUNIT DEBUGGING SECTION
36.1686 + TEST DEBUGGING SECTION
36.1687 =======================
36.1688 -->
36.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
36.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
36.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
36.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
36.1693 - <delete file="${test.report.file}"/>
36.1694 - <mkdir dir="${build.test.results.dir}"/>
36.1695 - <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}">
36.1696 - <customize>
36.1697 - <syspropertyset>
36.1698 - <propertyref prefix="test-sys-prop."/>
36.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
36.1700 - </syspropertyset>
36.1701 - <arg value="${test.class}"/>
36.1702 - <arg value="showoutput=true"/>
36.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
36.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
36.1705 - </customize>
36.1706 - </j2seproject3:debug>
36.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
36.1708 + </target>
36.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
36.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
36.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
36.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
36.1713 </target>
36.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
36.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
36.1716 </target>
36.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
36.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
36.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
36.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
36.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
36.1722 </target>
36.1723 @@ -603,9 +1711,9 @@
36.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
36.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
36.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
36.1727 - <customize>
36.1728 + <customizeDebuggee>
36.1729 <arg value="${applet.url}"/>
36.1730 - </customize>
36.1731 + </customizeDebuggee>
36.1732 </j2seproject3:debug>
36.1733 </target>
36.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
36.1735 @@ -614,14 +1722,49 @@
36.1736 CLEANUP SECTION
36.1737 ===============
36.1738 -->
36.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
36.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
36.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
36.1742 + <delete file="${built-clean.properties}" quiet="true"/>
36.1743 + </target>
36.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
36.1745 + <echo level="warn" message="Cycle detected: hellowithsubclassing was already built"/>
36.1746 + </target>
36.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
36.1748 + <mkdir dir="${build.dir}"/>
36.1749 + <touch file="${built-clean.properties}" verbose="false"/>
36.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
36.1751 + <antcall target="-warn-already-built-clean"/>
36.1752 + <propertyfile file="${built-clean.properties}">
36.1753 + <entry key="${basedir}" value=""/>
36.1754 + </propertyfile>
36.1755 + </target>
36.1756 <target depends="init" name="-do-clean">
36.1757 <delete dir="${build.dir}"/>
36.1758 - <delete dir="${dist.dir}"/>
36.1759 + <delete dir="${dist.jlink.output}"/>
36.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
36.1761 </target>
36.1762 <target name="-post-clean">
36.1763 <!-- Empty placeholder for easier customization. -->
36.1764 <!-- You can override this target in the ../build.xml file. -->
36.1765 </target>
36.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
36.1767 + <target name="-check-call-dep">
36.1768 + <property file="${call.built.properties}" prefix="already.built."/>
36.1769 + <condition property="should.call.dep">
36.1770 + <and>
36.1771 + <not>
36.1772 + <isset property="already.built.${call.subproject}"/>
36.1773 + </not>
36.1774 + <available file="${call.script}"/>
36.1775 + </and>
36.1776 + </condition>
36.1777 + </target>
36.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
36.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
36.1780 + <propertyset>
36.1781 + <propertyref prefix="transfer."/>
36.1782 + <mapper from="transfer.*" to="*" type="glob"/>
36.1783 + </propertyset>
36.1784 + </ant>
36.1785 + </target>
36.1786 </project>
37.1 --- a/samples/hellowithsubclassing/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
37.2 +++ b/samples/hellowithsubclassing/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
37.3 @@ -1,8 +1,8 @@
37.4 build.xml.data.CRC32=89f8a3c0
37.5 -build.xml.script.CRC32=2602f10a
37.6 -build.xml.stylesheet.CRC32=be360661
37.7 +build.xml.script.CRC32=7f8a2455
37.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
37.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
37.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
37.11 nbproject/build-impl.xml.data.CRC32=89f8a3c0
37.12 -nbproject/build-impl.xml.script.CRC32=eefbfb68
37.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
37.14 +nbproject/build-impl.xml.script.CRC32=6823b59e
37.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
38.1 --- a/samples/hellowithsubclassing/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
38.2 +++ b/samples/hellowithsubclassing/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
38.3 @@ -3,14 +3,19 @@
38.4 # This directory is removed when the project is cleaned:
38.5 build.dir=build
38.6 build.generated.dir=${build.dir}/generated
38.7 +build.generated.sources.dir=${build.dir}/generated-sources
38.8 # Only compile against the classpath explicitly listed here:
38.9 build.sysclasspath=ignore
38.10 build.test.classes.dir=${build.dir}/test/classes
38.11 build.test.results.dir=${build.dir}/test/results
38.12 debug.classpath=\
38.13 ${run.classpath}
38.14 +debug.modulepath=\
38.15 + ${run.modulepath}
38.16 debug.test.classpath=\
38.17 ${run.test.classpath}
38.18 +debug.test.modulepath=\
38.19 + ${run.test.modulepath}
38.20 # This directory is removed when the project is cleaned:
38.21 dist.dir=dist
38.22 dist.jar=${dist.dir}/hellowithsubclassing.jar
38.23 @@ -22,13 +27,17 @@
38.24 # Space-separated list of extra javac options
38.25 javac.compilerargs=
38.26 javac.deprecation=false
38.27 -javac.source=1.5
38.28 -javac.target=1.5
38.29 +javac.modulepath=
38.30 +javac.processormodulepath=
38.31 +javac.source=1.6
38.32 +javac.target=1.6
38.33 javac.test.classpath=\
38.34 ${javac.classpath}:\
38.35 ${build.classes.dir}:\
38.36 ${libs.junit.classpath}:\
38.37 ${libs.junit_4.classpath}
38.38 +javac.test.modulepath=\
38.39 + ${javac.modulepath}
38.40 javadoc.additionalparam=
38.41 javadoc.author=false
38.42 javadoc.encoding=${source.encoding}
38.43 @@ -50,9 +59,13 @@
38.44 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
38.45 # or test-sys-prop.name=value to set system properties for unit tests):
38.46 run.jvmargs=
38.47 +run.modulepath=\
38.48 + ${javac.modulepath}
38.49 run.test.classpath=\
38.50 ${javac.test.classpath}:\
38.51 ${build.test.classes.dir}
38.52 +run.test.modulepath=\
38.53 + ${javac.test.modulepath}
38.54 source.encoding=UTF-8
38.55 src.dir=src
38.56 test.src.dir=test
39.1 --- a/samples/individualsamples/build.xml Mon Nov 11 05:47:32 2019 +0100
39.2 +++ b/samples/individualsamples/build.xml Mon Nov 11 13:17:34 2019 +0100
39.3 @@ -51,8 +51,7 @@
39.4 -init-macrodef-junit: defines macro for junit execution
39.5 -init-macrodef-debug: defines macro for class debugging
39.6 -init-macrodef-java: defines macro for class execution
39.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
39.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
39.9 + -do-jar: JAR building
39.10 run: execution of project
39.11 -javadoc-build: Javadoc generation
39.12 test-report: JUnit report generation
40.1 --- a/samples/individualsamples/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
40.2 +++ b/samples/individualsamples/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
40.3 @@ -19,7 +19,7 @@
40.4 - cleanup
40.5
40.6 -->
40.7 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="individualsamples-impl">
40.8 +<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="individualsamples-impl">
40.9 <fail message="Please build using Ant 1.8.0 or higher.">
40.10 <condition>
40.11 <not>
40.12 @@ -46,14 +46,80 @@
40.13 <property file="${user.properties.file}"/>
40.14 <!-- The two properties below are usually overridden -->
40.15 <!-- by the active platform. Just a fallback. -->
40.16 - <property name="default.javac.source" value="1.4"/>
40.17 - <property name="default.javac.target" value="1.4"/>
40.18 + <property name="default.javac.source" value="1.6"/>
40.19 + <property name="default.javac.target" value="1.6"/>
40.20 </target>
40.21 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
40.22 <property file="nbproject/configs/${config}.properties"/>
40.23 <property file="nbproject/project.properties"/>
40.24 </target>
40.25 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
40.26 + <target name="-init-modules-supported">
40.27 + <condition property="modules.supported.internal" value="true">
40.28 + <not>
40.29 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
40.30 + </not>
40.31 + </condition>
40.32 + </target>
40.33 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
40.34 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
40.35 + <attribute name="property"/>
40.36 + <attribute name="sourcepath"/>
40.37 + <sequential>
40.38 + <loadresource property="@{property}" quiet="true">
40.39 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
40.40 + <filterchain>
40.41 + <stripjavacomments/>
40.42 + <linecontainsregexp>
40.43 + <regexp pattern="module .* \{"/>
40.44 + </linecontainsregexp>
40.45 + <tokenfilter>
40.46 + <linetokenizer/>
40.47 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
40.48 + </tokenfilter>
40.49 + <striplinebreaks/>
40.50 + </filterchain>
40.51 + </loadresource>
40.52 + </sequential>
40.53 + </macrodef>
40.54 + </target>
40.55 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
40.56 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
40.57 + <condition>
40.58 + <not>
40.59 + <antversion atleast="1.10.0"/>
40.60 + </not>
40.61 + </condition>
40.62 + </fail>
40.63 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
40.64 + <condition property="named.module.internal">
40.65 + <and>
40.66 + <isset property="module.name"/>
40.67 + <length length="0" string="${module.name}" when="greater"/>
40.68 + </and>
40.69 + </condition>
40.70 + <condition property="unnamed.module.internal">
40.71 + <not>
40.72 + <isset property="named.module.internal"/>
40.73 + </not>
40.74 + </condition>
40.75 + <property name="javac.modulepath" value=""/>
40.76 + <property name="run.modulepath" value="${javac.modulepath}"/>
40.77 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
40.78 + <property name="debug.modulepath" value="${run.modulepath}"/>
40.79 + <property name="javac.upgrademodulepath" value=""/>
40.80 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
40.81 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
40.82 + <and>
40.83 + <isset property="javac.systemmodulepath"/>
40.84 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
40.85 + </and>
40.86 + </condition>
40.87 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
40.88 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
40.89 + <property name="module.name" value=""/>
40.90 + </target>
40.91 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
40.92 + <property name="platform.java" value="${java.home}/bin/java"/>
40.93 <available file="${manifest.file}" property="manifest.available"/>
40.94 <condition property="splashscreen.available">
40.95 <and>
40.96 @@ -71,31 +137,22 @@
40.97 </not>
40.98 </and>
40.99 </condition>
40.100 - <condition property="manifest.available+main.class">
40.101 + <condition property="profile.available">
40.102 <and>
40.103 - <isset property="manifest.available"/>
40.104 - <isset property="main.class.available"/>
40.105 + <isset property="javac.profile"/>
40.106 + <length length="0" string="${javac.profile}" when="greater"/>
40.107 + <not>
40.108 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
40.109 + </not>
40.110 </and>
40.111 </condition>
40.112 <condition property="do.archive">
40.113 - <not>
40.114 - <istrue value="${jar.archive.disabled}"/>
40.115 - </not>
40.116 - </condition>
40.117 - <condition property="do.mkdist">
40.118 - <and>
40.119 - <isset property="do.archive"/>
40.120 - <isset property="libs.CopyLibs.classpath"/>
40.121 + <or>
40.122 <not>
40.123 - <istrue value="${mkdist.disabled}"/>
40.124 + <istrue value="${jar.archive.disabled}"/>
40.125 </not>
40.126 - </and>
40.127 - </condition>
40.128 - <condition property="manifest.available+main.class+mkdist.available">
40.129 - <and>
40.130 - <istrue value="${manifest.available+main.class}"/>
40.131 - <isset property="do.mkdist"/>
40.132 - </and>
40.133 + <istrue value="${not.archive.disabled}"/>
40.134 + </or>
40.135 </condition>
40.136 <condition property="do.archive+manifest.available">
40.137 <and>
40.138 @@ -115,24 +172,12 @@
40.139 <istrue value="${do.archive}"/>
40.140 </and>
40.141 </condition>
40.142 - <condition property="do.archive+manifest.available+main.class">
40.143 + <condition property="do.archive+profile.available">
40.144 <and>
40.145 - <istrue value="${manifest.available+main.class}"/>
40.146 + <isset property="profile.available"/>
40.147 <istrue value="${do.archive}"/>
40.148 </and>
40.149 </condition>
40.150 - <condition property="manifest.available-mkdist.available">
40.151 - <or>
40.152 - <istrue value="${manifest.available}"/>
40.153 - <isset property="do.mkdist"/>
40.154 - </or>
40.155 - </condition>
40.156 - <condition property="manifest.available+main.class-mkdist.available">
40.157 - <or>
40.158 - <istrue value="${manifest.available+main.class}"/>
40.159 - <isset property="do.mkdist"/>
40.160 - </or>
40.161 - </condition>
40.162 <condition property="have.tests">
40.163 <or>
40.164 <available file="${test.src.dir}"/>
40.165 @@ -169,6 +214,7 @@
40.166 <property name="application.args" value=""/>
40.167 <property name="source.encoding" value="${file.encoding}"/>
40.168 <property name="runtime.encoding" value="${source.encoding}"/>
40.169 + <property name="manifest.encoding" value="${source.encoding}"/>
40.170 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
40.171 <and>
40.172 <isset property="javadoc.encoding"/>
40.173 @@ -186,7 +232,15 @@
40.174 </condition>
40.175 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
40.176 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
40.177 - <length length="0" string="${endorsed.classpath}" when="greater"/>
40.178 + <and>
40.179 + <isset property="endorsed.classpath"/>
40.180 + <not>
40.181 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
40.182 + </not>
40.183 + </and>
40.184 + </condition>
40.185 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
40.186 + <isset property="profile.available"/>
40.187 </condition>
40.188 <condition else="false" property="jdkBug6558476">
40.189 <and>
40.190 @@ -196,7 +250,12 @@
40.191 </not>
40.192 </and>
40.193 </condition>
40.194 - <property name="javac.fork" value="${jdkBug6558476}"/>
40.195 + <condition else="false" property="javac.fork">
40.196 + <or>
40.197 + <istrue value="${jdkBug6558476}"/>
40.198 + <istrue value="${javac.external.vm}"/>
40.199 + </or>
40.200 + </condition>
40.201 <property name="jar.index" value="false"/>
40.202 <property name="jar.index.metainf" value="${jar.index}"/>
40.203 <property name="copylibs.rebase" value="true"/>
40.204 @@ -222,6 +281,7 @@
40.205 <condition else="" property="testng.debug.mode" value="-mixed">
40.206 <istrue value="${junit+testng.available}"/>
40.207 </condition>
40.208 + <property name="java.failonerror" value="true"/>
40.209 </target>
40.210 <target name="-post-init">
40.211 <!-- Empty placeholder for easier customization. -->
40.212 @@ -248,11 +308,80 @@
40.213 </sequential>
40.214 </macrodef>
40.215 </target>
40.216 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
40.217 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
40.218 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
40.219 <attribute default="${src.dir}" name="srcdir"/>
40.220 <attribute default="${build.classes.dir}" name="destdir"/>
40.221 <attribute default="${javac.classpath}" name="classpath"/>
40.222 + <attribute default="${javac.modulepath}" name="modulepath"/>
40.223 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
40.224 + <attribute default="${javac.processorpath}" name="processorpath"/>
40.225 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
40.226 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
40.227 + <attribute default="${includes}" name="includes"/>
40.228 + <attribute default="${excludes}" name="excludes"/>
40.229 + <attribute default="${javac.debug}" name="debug"/>
40.230 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
40.231 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
40.232 + <attribute default="${empty.dir}" name="gensrcdir"/>
40.233 + <element name="customize" optional="true"/>
40.234 + <sequential>
40.235 + <condition property="warn.excludes.internal">
40.236 + <and>
40.237 + <isset property="named.module.internal"/>
40.238 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
40.239 + </and>
40.240 + </condition>
40.241 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
40.242 + <property location="${build.dir}/empty" name="empty.dir"/>
40.243 + <mkdir dir="${empty.dir}"/>
40.244 + <mkdir dir="@{apgeneratedsrcdir}"/>
40.245 + <condition property="processormodulepath.set">
40.246 + <resourcecount count="0" when="greater">
40.247 + <path>
40.248 + <pathelement path="@{processormodulepath}"/>
40.249 + </path>
40.250 + </resourcecount>
40.251 + </condition>
40.252 + <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}">
40.253 + <src>
40.254 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
40.255 + <include name="*"/>
40.256 + </dirset>
40.257 + </src>
40.258 + <classpath>
40.259 + <path path="@{classpath}"/>
40.260 + </classpath>
40.261 + <modulepath>
40.262 + <path path="@{modulepath}"/>
40.263 + </modulepath>
40.264 + <upgrademodulepath>
40.265 + <path path="@{upgrademodulepath}"/>
40.266 + </upgrademodulepath>
40.267 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
40.268 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
40.269 + <compilerarg line="${javac.compilerargs}"/>
40.270 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
40.271 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
40.272 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
40.273 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
40.274 + <compilerarg line="${ap.processors.internal}"/>
40.275 + <compilerarg line="${annotation.processing.processor.options}"/>
40.276 + <compilerarg value="-s"/>
40.277 + <compilerarg path="@{apgeneratedsrcdir}"/>
40.278 + <compilerarg line="${ap.proc.none.internal}"/>
40.279 + <customize/>
40.280 + </javac>
40.281 + </sequential>
40.282 + </macrodef>
40.283 + </target>
40.284 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
40.285 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
40.286 + <attribute default="${src.dir}" name="srcdir"/>
40.287 + <attribute default="${build.classes.dir}" name="destdir"/>
40.288 + <attribute default="${javac.classpath}" name="classpath"/>
40.289 + <attribute default="${javac.modulepath}" name="modulepath"/>
40.290 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
40.291 <attribute default="${javac.processorpath}" name="processorpath"/>
40.292 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
40.293 <attribute default="${includes}" name="includes"/>
40.294 @@ -275,6 +404,7 @@
40.295 <path path="@{classpath}"/>
40.296 </classpath>
40.297 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
40.298 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
40.299 <compilerarg line="${javac.compilerargs}"/>
40.300 <compilerarg value="-processorpath"/>
40.301 <compilerarg path="@{processorpath}:${empty.dir}"/>
40.302 @@ -288,11 +418,13 @@
40.303 </sequential>
40.304 </macrodef>
40.305 </target>
40.306 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
40.307 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
40.308 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
40.309 <attribute default="${src.dir}" name="srcdir"/>
40.310 <attribute default="${build.classes.dir}" name="destdir"/>
40.311 <attribute default="${javac.classpath}" name="classpath"/>
40.312 + <attribute default="${javac.modulepath}" name="modulepath"/>
40.313 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
40.314 <attribute default="${javac.processorpath}" name="processorpath"/>
40.315 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
40.316 <attribute default="${includes}" name="includes"/>
40.317 @@ -314,13 +446,14 @@
40.318 <path path="@{classpath}"/>
40.319 </classpath>
40.320 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
40.321 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
40.322 <compilerarg line="${javac.compilerargs}"/>
40.323 <customize/>
40.324 </javac>
40.325 </sequential>
40.326 </macrodef>
40.327 </target>
40.328 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
40.329 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
40.330 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
40.331 <attribute default="${src.dir}" name="srcdir"/>
40.332 <attribute default="${build.classes.dir}" name="destdir"/>
40.333 @@ -370,7 +503,64 @@
40.334 </and>
40.335 </condition>
40.336 </target>
40.337 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
40.338 + <target name="-init-test-properties">
40.339 + <property name="test.binaryincludes" value="<nothing>"/>
40.340 + <property name="test.binarytestincludes" value=""/>
40.341 + <property name="test.binaryexcludes" value=""/>
40.342 + </target>
40.343 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
40.344 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
40.345 + <attribute default="${includes}" name="includes"/>
40.346 + <attribute default="${excludes}" name="excludes"/>
40.347 + <element name="customizePrototype" optional="true"/>
40.348 + <sequential>
40.349 + <property name="junit.forkmode" value="perTest"/>
40.350 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
40.351 + <syspropertyset>
40.352 + <propertyref prefix="test-sys-prop."/>
40.353 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.354 + </syspropertyset>
40.355 + <classpath>
40.356 + <path path="${run.test.classpath}"/>
40.357 + </classpath>
40.358 + <modulepath>
40.359 + <path path="${run.test.modulepath}"/>
40.360 + </modulepath>
40.361 + <formatter type="brief" usefile="false"/>
40.362 + <formatter type="xml"/>
40.363 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.364 + <jvmarg value="-ea"/>
40.365 + <jvmarg line="${run.test.jvmargs}"/>
40.366 + <customizePrototype/>
40.367 + </junit>
40.368 + </sequential>
40.369 + </macrodef>
40.370 + </target>
40.371 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
40.372 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
40.373 + <attribute default="${includes}" name="includes"/>
40.374 + <attribute default="${excludes}" name="excludes"/>
40.375 + <element name="customizePrototype" optional="true"/>
40.376 + <sequential>
40.377 + <property name="junit.forkmode" value="perTest"/>
40.378 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
40.379 + <syspropertyset>
40.380 + <propertyref prefix="test-sys-prop."/>
40.381 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.382 + </syspropertyset>
40.383 + <classpath>
40.384 + <path path="${run.test.classpath}"/>
40.385 + </classpath>
40.386 + <formatter type="brief" usefile="false"/>
40.387 + <formatter type="xml"/>
40.388 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.389 + <jvmarg value="-ea"/>
40.390 + <customizePrototype/>
40.391 + </junit>
40.392 + </sequential>
40.393 + </macrodef>
40.394 + </target>
40.395 + <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}">
40.396 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
40.397 <attribute default="${includes}" name="includes"/>
40.398 <attribute default="${excludes}" name="excludes"/>
40.399 @@ -378,22 +568,16 @@
40.400 <attribute default="" name="testmethods"/>
40.401 <element name="customize" optional="true"/>
40.402 <sequential>
40.403 - <property name="junit.forkmode" value="perTest"/>
40.404 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
40.405 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
40.406 - <syspropertyset>
40.407 - <propertyref prefix="test-sys-prop."/>
40.408 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.409 - </syspropertyset>
40.410 - <formatter type="brief" usefile="false"/>
40.411 - <formatter type="xml"/>
40.412 - <jvmarg value="-ea"/>
40.413 - <customize/>
40.414 - </junit>
40.415 + <j2seproject3:junit-prototype>
40.416 + <customizePrototype>
40.417 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
40.418 + <customize/>
40.419 + </customizePrototype>
40.420 + </j2seproject3:junit-prototype>
40.421 </sequential>
40.422 </macrodef>
40.423 </target>
40.424 - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
40.425 + <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}">
40.426 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
40.427 <attribute default="${includes}" name="includes"/>
40.428 <attribute default="${excludes}" name="excludes"/>
40.429 @@ -401,22 +585,19 @@
40.430 <attribute default="" name="testmethods"/>
40.431 <element name="customize" optional="true"/>
40.432 <sequential>
40.433 - <property name="junit.forkmode" value="perTest"/>
40.434 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
40.435 - <batchtest todir="${build.test.results.dir}">
40.436 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
40.437 - <filename name="@{testincludes}"/>
40.438 - </fileset>
40.439 - </batchtest>
40.440 - <syspropertyset>
40.441 - <propertyref prefix="test-sys-prop."/>
40.442 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.443 - </syspropertyset>
40.444 - <formatter type="brief" usefile="false"/>
40.445 - <formatter type="xml"/>
40.446 - <jvmarg value="-ea"/>
40.447 - <customize/>
40.448 - </junit>
40.449 + <j2seproject3:junit-prototype>
40.450 + <customizePrototype>
40.451 + <batchtest todir="${build.test.results.dir}">
40.452 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
40.453 + <filename name="@{testincludes}"/>
40.454 + </fileset>
40.455 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
40.456 + <filename name="${test.binarytestincludes}"/>
40.457 + </fileset>
40.458 + </batchtest>
40.459 + <customize/>
40.460 + </customizePrototype>
40.461 + </j2seproject3:junit-prototype>
40.462 </sequential>
40.463 </macrodef>
40.464 </target>
40.465 @@ -438,12 +619,16 @@
40.466 </fileset>
40.467 </union>
40.468 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
40.469 - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="individualsamples" testname="TestNG tests" workingDir="${work.dir}">
40.470 + <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="individualsamples" testname="TestNG tests" workingDir="${work.dir}">
40.471 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
40.472 <propertyset>
40.473 <propertyref prefix="test-sys-prop."/>
40.474 <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.475 </propertyset>
40.476 + <classpath>
40.477 + <path path="${run.test.classpath}"/>
40.478 + </classpath>
40.479 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.480 <customize/>
40.481 </testng>
40.482 </sequential>
40.483 @@ -498,10 +683,6 @@
40.484 <sequential>
40.485 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
40.486 <customize>
40.487 - <classpath>
40.488 - <path path="${run.test.classpath}"/>
40.489 - </classpath>
40.490 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.491 <jvmarg line="${run.jvmargs}"/>
40.492 <jvmarg line="${run.jvmargs.ide}"/>
40.493 </customize>
40.494 @@ -509,71 +690,20 @@
40.495 </sequential>
40.496 </macrodef>
40.497 </target>
40.498 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
40.499 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
40.500 - <attribute default="${includes}" name="includes"/>
40.501 - <attribute default="${excludes}" name="excludes"/>
40.502 - <attribute default="**" name="testincludes"/>
40.503 - <attribute default="" name="testmethods"/>
40.504 - <element name="customize" optional="true"/>
40.505 - <sequential>
40.506 - <property name="junit.forkmode" value="perTest"/>
40.507 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
40.508 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
40.509 - <syspropertyset>
40.510 - <propertyref prefix="test-sys-prop."/>
40.511 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.512 - </syspropertyset>
40.513 - <formatter type="brief" usefile="false"/>
40.514 - <formatter type="xml"/>
40.515 - <jvmarg value="-ea"/>
40.516 - <jvmarg line="${debug-args-line}"/>
40.517 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
40.518 - <customize/>
40.519 - </junit>
40.520 - </sequential>
40.521 - </macrodef>
40.522 - </target>
40.523 - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
40.524 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
40.525 - <attribute default="${includes}" name="includes"/>
40.526 - <attribute default="${excludes}" name="excludes"/>
40.527 - <attribute default="**" name="testincludes"/>
40.528 - <attribute default="" name="testmethods"/>
40.529 - <element name="customize" optional="true"/>
40.530 - <sequential>
40.531 - <property name="junit.forkmode" value="perTest"/>
40.532 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
40.533 - <batchtest todir="${build.test.results.dir}">
40.534 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
40.535 - <filename name="@{testincludes}"/>
40.536 - </fileset>
40.537 - </batchtest>
40.538 - <syspropertyset>
40.539 - <propertyref prefix="test-sys-prop."/>
40.540 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.541 - </syspropertyset>
40.542 - <formatter type="brief" usefile="false"/>
40.543 - <formatter type="xml"/>
40.544 - <jvmarg value="-ea"/>
40.545 - <jvmarg line="${debug-args-line}"/>
40.546 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
40.547 - <customize/>
40.548 - </junit>
40.549 - </sequential>
40.550 - </macrodef>
40.551 - </target>
40.552 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
40.553 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
40.554 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
40.555 <attribute default="${includes}" name="includes"/>
40.556 <attribute default="${excludes}" name="excludes"/>
40.557 <attribute default="**" name="testincludes"/>
40.558 <attribute default="" name="testmethods"/>
40.559 - <element implicit="true" name="customize" optional="true"/>
40.560 + <element name="customizeDebuggee" optional="true"/>
40.561 <sequential>
40.562 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
40.563 - <customize/>
40.564 - </j2seproject3:junit-debug>
40.565 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
40.566 + <customize>
40.567 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
40.568 + <customizeDebuggee/>
40.569 + </customize>
40.570 + </j2seproject3:junit>
40.571 </sequential>
40.572 </macrodef>
40.573 </target>
40.574 @@ -592,14 +722,14 @@
40.575 <delete dir="${build.test.results.dir}" quiet="true"/>
40.576 <mkdir dir="${build.test.results.dir}"/>
40.577 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
40.578 - <customize>
40.579 + <customizeDebuggee>
40.580 <customize2/>
40.581 <jvmarg value="-ea"/>
40.582 <arg line="${testng.debug.mode}"/>
40.583 <arg line="-d ${build.test.results.dir}"/>
40.584 <arg line="-listener org.testng.reporters.VerboseReporter"/>
40.585 <arg line="${testng.cmd.args}"/>
40.586 - </customize>
40.587 + </customizeDebuggee>
40.588 </j2seproject3:debug>
40.589 </sequential>
40.590 </macrodef>
40.591 @@ -626,14 +756,10 @@
40.592 <attribute default="" name="testMethod"/>
40.593 <sequential>
40.594 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
40.595 - <customize>
40.596 - <classpath>
40.597 - <path path="${run.test.classpath}"/>
40.598 - </classpath>
40.599 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.600 + <customizeDebuggee>
40.601 <jvmarg line="${run.jvmargs}"/>
40.602 <jvmarg line="${run.jvmargs.ide}"/>
40.603 - </customize>
40.604 + </customizeDebuggee>
40.605 </j2seproject3:test-debug-impl>
40.606 </sequential>
40.607 </macrodef>
40.608 @@ -685,7 +811,7 @@
40.609 <sequential>
40.610 <property environment="env"/>
40.611 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
40.612 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
40.613 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
40.614 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.615 <jvmarg value="${profiler.info.jvmargs.agent}"/>
40.616 <jvmarg line="${profiler.info.jvmargs}"/>
40.617 @@ -713,10 +839,14 @@
40.618 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
40.619 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
40.620 <attribute default="${main.class}" name="name"/>
40.621 + <attribute default="${debug.modulepath}" name="modulepath"/>
40.622 <attribute default="${debug.classpath}" name="classpath"/>
40.623 <attribute default="" name="stopclassname"/>
40.624 <sequential>
40.625 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
40.626 + <modulepath>
40.627 + <path path="@{modulepath}"/>
40.628 + </modulepath>
40.629 <classpath>
40.630 <path path="@{classpath}"/>
40.631 </classpath>
40.632 @@ -735,18 +865,6 @@
40.633 </macrodef>
40.634 </target>
40.635 <target name="-init-debug-args">
40.636 - <property name="version-output" value="java version "${ant.java.version}"/>
40.637 - <condition property="have-jdk-older-than-1.4">
40.638 - <or>
40.639 - <contains string="${version-output}" substring="java version "1.0"/>
40.640 - <contains string="${version-output}" substring="java version "1.1"/>
40.641 - <contains string="${version-output}" substring="java version "1.2"/>
40.642 - <contains string="${version-output}" substring="java version "1.3"/>
40.643 - </or>
40.644 - </condition>
40.645 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
40.646 - <istrue value="${have-jdk-older-than-1.4}"/>
40.647 - </condition>
40.648 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
40.649 <os family="windows"/>
40.650 </condition>
40.651 @@ -756,21 +874,46 @@
40.652 </target>
40.653 <target depends="-init-debug-args" name="-init-macrodef-debug">
40.654 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
40.655 + <attribute default="${module.name}" name="modulename"/>
40.656 <attribute default="${main.class}" name="classname"/>
40.657 + <attribute default="${debug.modulepath}" name="modulepath"/>
40.658 <attribute default="${debug.classpath}" name="classpath"/>
40.659 + <element name="customizeDebuggee" optional="true"/>
40.660 + <sequential>
40.661 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
40.662 + <customize>
40.663 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
40.664 + <customizeDebuggee/>
40.665 + </customize>
40.666 + </j2seproject1:java>
40.667 + </sequential>
40.668 + </macrodef>
40.669 + </target>
40.670 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
40.671 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
40.672 + <attribute default="${module.name}" name="modulename"/>
40.673 + <attribute default="${main.class}" name="classname"/>
40.674 + <attribute default="${run.modulepath}" name="modulepath"/>
40.675 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
40.676 + <attribute default="${run.classpath}" name="classpath"/>
40.677 + <attribute default="jvm" name="jvm"/>
40.678 <element name="customize" optional="true"/>
40.679 <sequential>
40.680 - <java classname="@{classname}" dir="${work.dir}" fork="true">
40.681 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.682 - <jvmarg line="${debug-args-line}"/>
40.683 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
40.684 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
40.685 + <classpath>
40.686 + <path path="@{classpath}"/>
40.687 + </classpath>
40.688 + <modulepath>
40.689 + <pathelement path="@{modulepath}"/>
40.690 + <pathelement location="${module.build.classes.dir}"/>
40.691 + </modulepath>
40.692 + <upgrademodulepath>
40.693 + <path path="@{upgrademodulepath}"/>
40.694 + </upgrademodulepath>
40.695 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
40.696 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
40.697 <jvmarg line="${run.jvmargs}"/>
40.698 <jvmarg line="${run.jvmargs.ide}"/>
40.699 - <classpath>
40.700 - <path path="@{classpath}"/>
40.701 - </classpath>
40.702 <syspropertyset>
40.703 <propertyref prefix="run-sys-prop."/>
40.704 <mapper from="run-sys-prop.*" to="*" type="glob"/>
40.705 @@ -780,14 +923,49 @@
40.706 </sequential>
40.707 </macrodef>
40.708 </target>
40.709 - <target name="-init-macrodef-java">
40.710 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
40.711 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
40.712 + <attribute default="" name="modulename"/>
40.713 <attribute default="${main.class}" name="classname"/>
40.714 + <attribute default="${run.modulepath}" name="modulepath"/>
40.715 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
40.716 <attribute default="${run.classpath}" name="classpath"/>
40.717 <attribute default="jvm" name="jvm"/>
40.718 <element name="customize" optional="true"/>
40.719 <sequential>
40.720 - <java classname="@{classname}" dir="${work.dir}" fork="true">
40.721 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
40.722 + <classpath>
40.723 + <path path="@{classpath}"/>
40.724 + </classpath>
40.725 + <modulepath>
40.726 + <path path="@{modulepath}"/>
40.727 + </modulepath>
40.728 + <upgrademodulepath>
40.729 + <path path="@{upgrademodulepath}"/>
40.730 + </upgrademodulepath>
40.731 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
40.732 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
40.733 + <jvmarg line="${run.jvmargs}"/>
40.734 + <jvmarg line="${run.jvmargs.ide}"/>
40.735 + <syspropertyset>
40.736 + <propertyref prefix="run-sys-prop."/>
40.737 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
40.738 + </syspropertyset>
40.739 + <customize/>
40.740 + </java>
40.741 + </sequential>
40.742 + </macrodef>
40.743 + </target>
40.744 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
40.745 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
40.746 + <attribute default="" name="modulename"/>
40.747 + <attribute default="${main.class}" name="classname"/>
40.748 + <attribute default="" name="modulepath"/>
40.749 + <attribute default="${run.classpath}" name="classpath"/>
40.750 + <attribute default="jvm" name="jvm"/>
40.751 + <element name="customize" optional="true"/>
40.752 + <sequential>
40.753 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
40.754 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
40.755 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
40.756 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
40.757 @@ -805,6 +983,7 @@
40.758 </sequential>
40.759 </macrodef>
40.760 </target>
40.761 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
40.762 <target name="-init-macrodef-copylibs">
40.763 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
40.764 <attribute default="${manifest.file}" name="manifest"/>
40.765 @@ -826,8 +1005,8 @@
40.766 </chainedmapper>
40.767 </pathconvert>
40.768 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
40.769 - <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}">
40.770 - <fileset dir="${build.classes.dir}"/>
40.771 + <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}">
40.772 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
40.773 <manifest>
40.774 <attribute name="Class-Path" value="${jar.classpath}"/>
40.775 <customize/>
40.776 @@ -838,8 +1017,8 @@
40.777 </target>
40.778 <target name="-init-presetdef-jar">
40.779 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
40.780 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
40.781 - <j2seproject1:fileset dir="${build.classes.dir}"/>
40.782 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
40.783 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
40.784 </jar>
40.785 </presetdef>
40.786 </target>
40.787 @@ -894,7 +1073,9 @@
40.788 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
40.789 </target>
40.790 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
40.791 - <antcall target="clean"/>
40.792 + <antcall target="clean">
40.793 + <param name="no.dependencies" value="true"/>
40.794 + </antcall>
40.795 </target>
40.796 <target depends="init,deps-jar" name="-pre-pre-compile">
40.797 <mkdir dir="${build.classes.dir}"/>
40.798 @@ -920,7 +1101,7 @@
40.799 <target if="has.persistence.xml" name="-copy-persistence-xml">
40.800 <mkdir dir="${build.classes.dir}/META-INF"/>
40.801 <copy todir="${build.classes.dir}/META-INF">
40.802 - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
40.803 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
40.804 </copy>
40.805 </target>
40.806 <target name="-post-compile">
40.807 @@ -935,7 +1116,7 @@
40.808 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
40.809 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
40.810 <j2seproject3:force-recompile/>
40.811 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
40.812 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
40.813 </target>
40.814 <target name="-post-compile-single">
40.815 <!-- Empty placeholder for easier customization. -->
40.816 @@ -955,65 +1136,191 @@
40.817 <!-- Empty placeholder for easier customization. -->
40.818 <!-- You can override this target in the ../build.xml file. -->
40.819 </target>
40.820 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
40.821 - <j2seproject1:jar/>
40.822 + <target depends="init,compile" name="-check-module-main-class">
40.823 + <pathconvert property="main.class.file">
40.824 + <string value="${main.class}"/>
40.825 + <unpackagemapper from="*" to="*.class"/>
40.826 + </pathconvert>
40.827 + <condition property="do.module.main.class">
40.828 + <and>
40.829 + <isset property="main.class.available"/>
40.830 + <available file="${build.classes.dir}/module-info.class"/>
40.831 + <available file="${build.classes.dir}/${main.class.file}"/>
40.832 + <isset property="libs.CopyLibs.classpath"/>
40.833 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
40.834 + </and>
40.835 + </condition>
40.836 </target>
40.837 - <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">
40.838 - <j2seproject1:jar manifest="${manifest.file}"/>
40.839 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
40.840 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
40.841 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
40.842 </target>
40.843 - <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">
40.844 - <j2seproject1:jar manifest="${manifest.file}">
40.845 - <j2seproject1:manifest>
40.846 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
40.847 - </j2seproject1:manifest>
40.848 - </j2seproject1:jar>
40.849 - <echo level="info">To run this application from the command line without Ant, try:</echo>
40.850 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
40.851 - <property location="${dist.jar}" name="dist.jar.resolved"/>
40.852 - <pathconvert property="run.classpath.with.dist.jar">
40.853 - <path path="${run.classpath}"/>
40.854 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
40.855 - </pathconvert>
40.856 - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
40.857 - </target>
40.858 - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
40.859 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
40.860 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
40.861 <touch file="${tmp.manifest.file}" verbose="false"/>
40.862 </target>
40.863 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
40.864 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
40.865 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
40.866 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
40.867 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
40.868 </target>
40.869 - <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">
40.870 - <manifest file="${tmp.manifest.file}" mode="update">
40.871 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
40.872 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
40.873 <attribute name="Main-Class" value="${main.class}"/>
40.874 </manifest>
40.875 </target>
40.876 - <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">
40.877 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
40.878 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
40.879 + <attribute name="Profile" value="${javac.profile}"/>
40.880 + </manifest>
40.881 + </target>
40.882 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
40.883 <basename file="${application.splash}" property="splashscreen.basename"/>
40.884 <mkdir dir="${build.classes.dir}/META-INF"/>
40.885 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
40.886 - <manifest file="${tmp.manifest.file}" mode="update">
40.887 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
40.888 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
40.889 </manifest>
40.890 </target>
40.891 - <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">
40.892 + <target depends="init,compile" name="-check-do-mkdist">
40.893 + <condition property="do.mkdist">
40.894 + <and>
40.895 + <isset property="do.archive"/>
40.896 + <isset property="libs.CopyLibs.classpath"/>
40.897 + <not>
40.898 + <istrue value="${mkdist.disabled}"/>
40.899 + </not>
40.900 + <not>
40.901 + <available file="${build.classes.dir}/module-info.class"/>
40.902 + </not>
40.903 + </and>
40.904 + </condition>
40.905 + </target>
40.906 + <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">
40.907 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
40.908 <echo level="info">To run this application from the command line without Ant, try:</echo>
40.909 <property location="${dist.jar}" name="dist.jar.resolved"/>
40.910 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
40.911 </target>
40.912 - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
40.913 + <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">
40.914 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
40.915 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
40.916 + <property location="${dist.jar}" name="dist.jar.resolved"/>
40.917 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
40.918 + <isset property="named.module.internal"/>
40.919 + </condition>
40.920 + <pathconvert property="run.classpath.with.dist.jar">
40.921 + <path path="${run.classpath}"/>
40.922 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
40.923 + </pathconvert>
40.924 + <pathconvert property="run.modulepath.with.dist.jar">
40.925 + <path location="${dist.jar.resolved}"/>
40.926 + <path path="${run.modulepath}"/>
40.927 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
40.928 + </pathconvert>
40.929 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
40.930 + <isset property="named.module.internal"/>
40.931 + </condition>
40.932 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
40.933 + <and>
40.934 + <isset property="modules.supported.internal"/>
40.935 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
40.936 + </and>
40.937 + </condition>
40.938 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
40.939 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
40.940 + </condition>
40.941 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
40.942 + <isset property="do.module.main.class"/>
40.943 + </condition>
40.944 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
40.945 + <isset property="named.module.internal"/>
40.946 + </condition>
40.947 + <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}">
40.948 + <isset property="main.class.available"/>
40.949 + </condition>
40.950 + <condition else="debug" property="jar.usage.level" value="info">
40.951 + <isset property="main.class.available"/>
40.952 + </condition>
40.953 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
40.954 + </target>
40.955 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
40.956 <delete>
40.957 <fileset file="${tmp.manifest.file}"/>
40.958 </delete>
40.959 </target>
40.960 - <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"/>
40.961 + <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"/>
40.962 + <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"/>
40.963 <target name="-post-jar">
40.964 <!-- Empty placeholder for easier customization. -->
40.965 <!-- You can override this target in the ../build.xml file. -->
40.966 </target>
40.967 - <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"/>
40.968 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
40.969 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
40.970 + <!--
40.971 + =================
40.972 + DEPLOY SECTION
40.973 + =================
40.974 + -->
40.975 + <target name="-pre-deploy">
40.976 + <!-- Empty placeholder for easier customization. -->
40.977 + <!-- You can override this target in the ../build.xml file. -->
40.978 + </target>
40.979 + <target depends="init" name="-check-jlink">
40.980 + <condition property="do.jlink.internal">
40.981 + <and>
40.982 + <istrue value="${do.jlink}"/>
40.983 + <isset property="do.archive"/>
40.984 + <isset property="named.module.internal"/>
40.985 + </and>
40.986 + </condition>
40.987 + </target>
40.988 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
40.989 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
40.990 + <property name="jlink.launcher.name" value="${application.title}"/>
40.991 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
40.992 + <and>
40.993 + <isset property="jlink.additionalmodules"/>
40.994 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
40.995 + </and>
40.996 + </condition>
40.997 + <condition property="jlink.do.strip.internal">
40.998 + <and>
40.999 + <isset property="jlink.strip"/>
40.1000 + <istrue value="${jlink.strip}"/>
40.1001 + </and>
40.1002 + </condition>
40.1003 + <condition property="jlink.do.additionalparam.internal">
40.1004 + <and>
40.1005 + <isset property="jlink.additionalparam"/>
40.1006 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
40.1007 + </and>
40.1008 + </condition>
40.1009 + <condition property="jlink.do.launcher.internal">
40.1010 + <and>
40.1011 + <istrue value="${jlink.launcher}"/>
40.1012 + <isset property="main.class.available"/>
40.1013 + </and>
40.1014 + </condition>
40.1015 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
40.1016 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
40.1017 + <exec executable="${platform.jlink}">
40.1018 + <arg value="--module-path"/>
40.1019 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
40.1020 + <arg value="--add-modules"/>
40.1021 + <arg value="${jlink.add.modules}"/>
40.1022 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
40.1023 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
40.1024 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
40.1025 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
40.1026 + <arg value="--output"/>
40.1027 + <arg value="${dist.jlink.output}"/>
40.1028 + </exec>
40.1029 + </target>
40.1030 + <target name="-post-deploy">
40.1031 + <!-- Empty placeholder for easier customization. -->
40.1032 + <!-- You can override this target in the ../build.xml file. -->
40.1033 + </target>
40.1034 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
40.1035 <!--
40.1036 =================
40.1037 EXECUTION SECTION
40.1038 @@ -1050,9 +1357,9 @@
40.1039 </target>
40.1040 <target depends="init,compile" name="-debug-start-debuggee">
40.1041 <j2seproject3:debug>
40.1042 - <customize>
40.1043 + <customizeDebuggee>
40.1044 <arg line="${application.args}"/>
40.1045 - </customize>
40.1046 + </customizeDebuggee>
40.1047 </j2seproject3:debug>
40.1048 </target>
40.1049 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
40.1050 @@ -1118,28 +1425,24 @@
40.1051 </customize>
40.1052 </profile>
40.1053 </target>
40.1054 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
40.1055 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
40.1056 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
40.1057 <nbprofiledirect>
40.1058 <classpath>
40.1059 <path path="${run.test.classpath}"/>
40.1060 </classpath>
40.1061 </nbprofiledirect>
40.1062 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
40.1063 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
40.1064 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
40.1065 - <jvmarg line="${profiler.info.jvmargs}"/>
40.1066 - <test name="${profile.class}"/>
40.1067 - <classpath>
40.1068 - <path path="${run.test.classpath}"/>
40.1069 - </classpath>
40.1070 - <syspropertyset>
40.1071 - <propertyref prefix="test-sys-prop."/>
40.1072 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
40.1073 - </syspropertyset>
40.1074 - <formatter type="brief" usefile="false"/>
40.1075 - <formatter type="xml"/>
40.1076 - </junit>
40.1077 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
40.1078 + <customize>
40.1079 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
40.1080 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
40.1081 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
40.1082 + <jvmarg line="${profiler.info.jvmargs}"/>
40.1083 + <classpath>
40.1084 + <path path="${run.test.classpath}"/>
40.1085 + </classpath>
40.1086 + </customize>
40.1087 + </j2seproject3:junit>
40.1088 </target>
40.1089 <!--
40.1090 end of pre NB72 profiling section
40.1091 @@ -1170,7 +1473,7 @@
40.1092 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
40.1093 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
40.1094 <startprofiler/>
40.1095 - <antcal target="run-test-with-main"/>
40.1096 + <antcall target="run-test-with-main"/>
40.1097 </target>
40.1098 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
40.1099 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
40.1100 @@ -1192,11 +1495,20 @@
40.1101 </not>
40.1102 </and>
40.1103 </condition>
40.1104 - <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}">
40.1105 + <condition else="" property="bug5101868workaround" value="*.java">
40.1106 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
40.1107 + </condition>
40.1108 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
40.1109 + <and>
40.1110 + <isset property="javadoc.html5"/>
40.1111 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
40.1112 + </and>
40.1113 + </condition>
40.1114 + <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}">
40.1115 <classpath>
40.1116 <path path="${javac.classpath}"/>
40.1117 </classpath>
40.1118 - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
40.1119 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
40.1120 <filename name="**/*.java"/>
40.1121 </fileset>
40.1122 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
40.1123 @@ -1204,6 +1516,7 @@
40.1124 <exclude name="*.java"/>
40.1125 </fileset>
40.1126 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
40.1127 + <arg line="${javadoc.html5.cmd.line.arg}"/>
40.1128 </javadoc>
40.1129 <copy todir="${dist.javadoc.dir}">
40.1130 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
40.1131 @@ -1230,11 +1543,63 @@
40.1132 <!-- Empty placeholder for easier customization. -->
40.1133 <!-- You can override this target in the ../build.xml file. -->
40.1134 </target>
40.1135 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
40.1136 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
40.1137 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
40.1138 + <and>
40.1139 + <isset property="test.module.name"/>
40.1140 + <length length="0" string="${test.module.name}" when="greater"/>
40.1141 + </and>
40.1142 + </condition>
40.1143 + <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">
40.1144 + <and>
40.1145 + <isset property="test.module.name"/>
40.1146 + <length length="0" string="${test.module.name}" when="greater"/>
40.1147 + </and>
40.1148 + </condition>
40.1149 + </target>
40.1150 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
40.1151 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
40.1152 + <and>
40.1153 + <isset property="test.module.name"/>
40.1154 + <length length="0" string="${test.module.name}" when="greater"/>
40.1155 + </and>
40.1156 + </condition>
40.1157 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
40.1158 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
40.1159 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
40.1160 + <chainedmapper>
40.1161 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
40.1162 + <filtermapper>
40.1163 + <uniqfilter/>
40.1164 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
40.1165 + </filtermapper>
40.1166 + <cutdirsmapper dirs="1"/>
40.1167 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
40.1168 + </chainedmapper>
40.1169 + </pathconvert>
40.1170 + <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}">
40.1171 + <and>
40.1172 + <isset property="test.module.name"/>
40.1173 + <length length="0" string="${test.module.name}" when="greater"/>
40.1174 + </and>
40.1175 + </condition>
40.1176 + </target>
40.1177 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
40.1178 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
40.1179 + <property name="javac.test.compilerargs" value=""/>
40.1180 + <property name="run.test.jvmargs" value=""/>
40.1181 + </target>
40.1182 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
40.1183 <target if="do.depend.true" name="-compile-test-depend">
40.1184 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
40.1185 </target>
40.1186 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
40.1187 - <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}"/>
40.1188 + <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">
40.1189 + <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}">
40.1190 + <customize>
40.1191 + <compilerarg line="${javac.test.compilerargs}"/>
40.1192 + </customize>
40.1193 + </j2seproject3:javac>
40.1194 <copy todir="${build.test.classes.dir}">
40.1195 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
40.1196 </copy>
40.1197 @@ -1248,10 +1613,14 @@
40.1198 <!-- Empty placeholder for easier customization. -->
40.1199 <!-- You can override this target in the ../build.xml file. -->
40.1200 </target>
40.1201 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
40.1202 + <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">
40.1203 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
40.1204 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
40.1205 - <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}"/>
40.1206 + <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}">
40.1207 + <customize>
40.1208 + <compilerarg line="${javac.test.compilerargs}"/>
40.1209 + </customize>
40.1210 + </j2seproject3:javac>
40.1211 <copy todir="${build.test.classes.dir}">
40.1212 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
40.1213 </copy>
40.1214 @@ -1269,8 +1638,8 @@
40.1215 <target depends="init" if="have.tests" name="-pre-test-run">
40.1216 <mkdir dir="${build.test.results.dir}"/>
40.1217 </target>
40.1218 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
40.1219 - <j2seproject3:test testincludes="**/*Test.java"/>
40.1220 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
40.1221 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
40.1222 </target>
40.1223 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
40.1224 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
40.1225 @@ -1281,14 +1650,14 @@
40.1226 <target depends="init" if="have.tests" name="-pre-test-run-single">
40.1227 <mkdir dir="${build.test.results.dir}"/>
40.1228 </target>
40.1229 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
40.1230 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
40.1231 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
40.1232 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
40.1233 </target>
40.1234 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
40.1235 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
40.1236 </target>
40.1237 - <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"/>
40.1238 + <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"/>
40.1239 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
40.1240 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
40.1241 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
40.1242 @@ -1297,7 +1666,7 @@
40.1243 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
40.1244 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
40.1245 </target>
40.1246 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
40.1247 + <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"/>
40.1248 <!--
40.1249 =======================
40.1250 TEST DEBUGGING SECTION
40.1251 @@ -1315,8 +1684,8 @@
40.1252 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
40.1253 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
40.1254 </target>
40.1255 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
40.1256 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
40.1257 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
40.1258 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
40.1259 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
40.1260 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
40.1261 </target>
40.1262 @@ -1342,9 +1711,9 @@
40.1263 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
40.1264 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
40.1265 <j2seproject3:debug classname="sun.applet.AppletViewer">
40.1266 - <customize>
40.1267 + <customizeDebuggee>
40.1268 <arg value="${applet.url}"/>
40.1269 - </customize>
40.1270 + </customizeDebuggee>
40.1271 </j2seproject3:debug>
40.1272 </target>
40.1273 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
40.1274 @@ -1371,6 +1740,7 @@
40.1275 </target>
40.1276 <target depends="init" name="-do-clean">
40.1277 <delete dir="${build.dir}"/>
40.1278 + <delete dir="${dist.jlink.output}"/>
40.1279 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
40.1280 </target>
40.1281 <target name="-post-clean">
41.1 --- a/samples/individualsamples/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
41.2 +++ b/samples/individualsamples/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
41.3 @@ -1,8 +1,8 @@
41.4 build.xml.data.CRC32=b3e64e2a
41.5 -build.xml.script.CRC32=33aaef08
41.6 -build.xml.stylesheet.CRC32=28e38971@1.54.0.46
41.7 +build.xml.script.CRC32=9e7a955c
41.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
41.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
41.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
41.11 nbproject/build-impl.xml.data.CRC32=b3e64e2a
41.12 -nbproject/build-impl.xml.script.CRC32=8d71c369
41.13 -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46
41.14 +nbproject/build-impl.xml.script.CRC32=ea6f4ce3
41.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
42.1 --- a/samples/individualsamples/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
42.2 +++ b/samples/individualsamples/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
42.3 @@ -12,8 +12,12 @@
42.4 build.test.results.dir=${build.dir}/test/results
42.5 debug.classpath=\
42.6 ${run.classpath}
42.7 +debug.modulepath=\
42.8 + ${run.modulepath}
42.9 debug.test.classpath=\
42.10 ${run.test.classpath}
42.11 +debug.test.modulepath=\
42.12 + ${run.test.modulepath}
42.13 # This directory is removed when the project is cleaned:
42.14 dist.dir=dist
42.15 dist.jar=${dist.dir}/single.jar
42.16 @@ -29,8 +33,10 @@
42.17 # Space-separated list of extra javac options
42.18 javac.compilerargs=
42.19 javac.deprecation=false
42.20 -javac.source=1.5
42.21 -javac.target=1.5
42.22 +javac.modulepath=
42.23 +javac.processormodulepath=
42.24 +javac.source=1.6
42.25 +javac.target=1.6
42.26 javac.test.classpath=\
42.27 ${javac.classpath}:\
42.28 ${build.classes.dir}:\
42.29 @@ -38,6 +44,8 @@
42.30 ${file.reference.org-netbeans-insane.jar}:\
42.31 ${file.reference.org-netbeans-modules-nbjunit.jar}:\
42.32 ${file.reference.org-openide-filesystems.jar}
42.33 +javac.test.modulepath=\
42.34 + ${javac.modulepath}
42.35 javadoc.additionalparam=
42.36 javadoc.author=false
42.37 javadoc.encoding=${source.encoding}
42.38 @@ -58,9 +66,13 @@
42.39 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
42.40 # or test-sys-prop.name=value to set system properties for unit tests):
42.41 run.jvmargs=
42.42 +run.modulepath=\
42.43 + ${javac.modulepath}
42.44 run.test.classpath=\
42.45 ${javac.test.classpath}:\
42.46 ${build.test.classes.dir}
42.47 +run.test.modulepath=\
42.48 + ${javac.test.modulepath}
42.49 source.encoding=UTF-8
42.50 src.dir=src
42.51 test.src.dir=test
43.1 --- a/samples/instanceof/build.xml Mon Nov 11 05:47:32 2019 +0100
43.2 +++ b/samples/instanceof/build.xml Mon Nov 11 13:17:34 2019 +0100
43.3 @@ -2,6 +2,11 @@
43.4 <!-- You may freely edit this file. See commented blocks below for -->
43.5 <!-- some examples of how to customize the build. -->
43.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
43.7 +<!-- By default, only the Clean and Build commands use this build script. -->
43.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
43.9 +<!-- the Compile on Save feature is turned off for the project. -->
43.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
43.11 +<!-- in the project's Project Properties dialog box.-->
43.12 <project name="instanceof" default="default" basedir=".">
43.13 <description>Builds, tests, and runs the project instanceof.</description>
43.14 <import file="nbproject/build-impl.xml"/>
43.15 @@ -46,8 +51,7 @@
43.16 -init-macrodef-junit: defines macro for junit execution
43.17 -init-macrodef-debug: defines macro for class debugging
43.18 -init-macrodef-java: defines macro for class execution
43.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
43.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
43.21 + -do-jar: JAR building
43.22 run: execution of project
43.23 -javadoc-build: Javadoc generation
43.24 test-report: JUnit report generation
44.1 --- a/samples/instanceof/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
44.2 +++ b/samples/instanceof/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
44.3 @@ -12,14 +12,21 @@
44.4 - execution
44.5 - debugging
44.6 - javadoc
44.7 - - junit compilation
44.8 - - junit execution
44.9 - - junit debugging
44.10 + - test compilation
44.11 + - test execution
44.12 + - test debugging
44.13 - applet
44.14 - cleanup
44.15
44.16 -->
44.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="instanceof-impl">
44.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="instanceof-impl">
44.19 + <fail message="Please build using Ant 1.8.0 or higher.">
44.20 + <condition>
44.21 + <not>
44.22 + <antversion atleast="1.8.0"/>
44.23 + </not>
44.24 + </condition>
44.25 + </fail>
44.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
44.27 <!--
44.28 ======================
44.29 @@ -39,28 +46,136 @@
44.30 <property file="${user.properties.file}"/>
44.31 <!-- The two properties below are usually overridden -->
44.32 <!-- by the active platform. Just a fallback. -->
44.33 - <property name="default.javac.source" value="1.4"/>
44.34 - <property name="default.javac.target" value="1.4"/>
44.35 + <property name="default.javac.source" value="1.6"/>
44.36 + <property name="default.javac.target" value="1.6"/>
44.37 </target>
44.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
44.39 <property file="nbproject/configs/${config}.properties"/>
44.40 <property file="nbproject/project.properties"/>
44.41 </target>
44.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
44.43 + <target name="-init-modules-supported">
44.44 + <condition property="modules.supported.internal" value="true">
44.45 + <not>
44.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
44.47 + </not>
44.48 + </condition>
44.49 + </target>
44.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
44.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
44.52 + <attribute name="property"/>
44.53 + <attribute name="sourcepath"/>
44.54 + <sequential>
44.55 + <loadresource property="@{property}" quiet="true">
44.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
44.57 + <filterchain>
44.58 + <stripjavacomments/>
44.59 + <linecontainsregexp>
44.60 + <regexp pattern="module .* \{"/>
44.61 + </linecontainsregexp>
44.62 + <tokenfilter>
44.63 + <linetokenizer/>
44.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
44.65 + </tokenfilter>
44.66 + <striplinebreaks/>
44.67 + </filterchain>
44.68 + </loadresource>
44.69 + </sequential>
44.70 + </macrodef>
44.71 + </target>
44.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
44.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
44.74 + <condition>
44.75 + <not>
44.76 + <antversion atleast="1.10.0"/>
44.77 + </not>
44.78 + </condition>
44.79 + </fail>
44.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
44.81 + <condition property="named.module.internal">
44.82 + <and>
44.83 + <isset property="module.name"/>
44.84 + <length length="0" string="${module.name}" when="greater"/>
44.85 + </and>
44.86 + </condition>
44.87 + <condition property="unnamed.module.internal">
44.88 + <not>
44.89 + <isset property="named.module.internal"/>
44.90 + </not>
44.91 + </condition>
44.92 + <property name="javac.modulepath" value=""/>
44.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
44.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
44.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
44.96 + <property name="javac.upgrademodulepath" value=""/>
44.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
44.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
44.99 + <and>
44.100 + <isset property="javac.systemmodulepath"/>
44.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
44.102 + </and>
44.103 + </condition>
44.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
44.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
44.106 + <property name="module.name" value=""/>
44.107 + </target>
44.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
44.109 + <property name="platform.java" value="${java.home}/bin/java"/>
44.110 <available file="${manifest.file}" property="manifest.available"/>
44.111 - <condition property="manifest.available+main.class">
44.112 + <condition property="splashscreen.available">
44.113 <and>
44.114 - <isset property="manifest.available"/>
44.115 + <not>
44.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
44.117 + </not>
44.118 + <available file="${application.splash}"/>
44.119 + </and>
44.120 + </condition>
44.121 + <condition property="main.class.available">
44.122 + <and>
44.123 <isset property="main.class"/>
44.124 <not>
44.125 <equals arg1="${main.class}" arg2="" trim="true"/>
44.126 </not>
44.127 </and>
44.128 </condition>
44.129 - <condition property="manifest.available+main.class+mkdist.available">
44.130 + <condition property="profile.available">
44.131 <and>
44.132 - <istrue value="${manifest.available+main.class}"/>
44.133 - <isset property="libs.CopyLibs.classpath"/>
44.134 + <isset property="javac.profile"/>
44.135 + <length length="0" string="${javac.profile}" when="greater"/>
44.136 + <not>
44.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
44.138 + </not>
44.139 + </and>
44.140 + </condition>
44.141 + <condition property="do.archive">
44.142 + <or>
44.143 + <not>
44.144 + <istrue value="${jar.archive.disabled}"/>
44.145 + </not>
44.146 + <istrue value="${not.archive.disabled}"/>
44.147 + </or>
44.148 + </condition>
44.149 + <condition property="do.archive+manifest.available">
44.150 + <and>
44.151 + <isset property="manifest.available"/>
44.152 + <istrue value="${do.archive}"/>
44.153 + </and>
44.154 + </condition>
44.155 + <condition property="do.archive+main.class.available">
44.156 + <and>
44.157 + <isset property="main.class.available"/>
44.158 + <istrue value="${do.archive}"/>
44.159 + </and>
44.160 + </condition>
44.161 + <condition property="do.archive+splashscreen.available">
44.162 + <and>
44.163 + <isset property="splashscreen.available"/>
44.164 + <istrue value="${do.archive}"/>
44.165 + </and>
44.166 + </condition>
44.167 + <condition property="do.archive+profile.available">
44.168 + <and>
44.169 + <isset property="profile.available"/>
44.170 + <istrue value="${do.archive}"/>
44.171 </and>
44.172 </condition>
44.173 <condition property="have.tests">
44.174 @@ -86,6 +201,7 @@
44.175 </and>
44.176 </condition>
44.177 <property name="run.jvmargs" value=""/>
44.178 + <property name="run.jvmargs.ide" value=""/>
44.179 <property name="javac.compilerargs" value=""/>
44.180 <property name="work.dir" value="${basedir}"/>
44.181 <condition property="no.deps">
44.182 @@ -97,6 +213,8 @@
44.183 <property name="javadoc.preview" value="true"/>
44.184 <property name="application.args" value=""/>
44.185 <property name="source.encoding" value="${file.encoding}"/>
44.186 + <property name="runtime.encoding" value="${source.encoding}"/>
44.187 + <property name="manifest.encoding" value="${source.encoding}"/>
44.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
44.189 <and>
44.190 <isset property="javadoc.encoding"/>
44.191 @@ -112,12 +230,58 @@
44.192 <condition property="do.depend.true">
44.193 <istrue value="${do.depend}"/>
44.194 </condition>
44.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
44.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
44.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
44.198 <and>
44.199 - <isset property="jaxws.endorsed.dir"/>
44.200 - <available file="nbproject/jaxws-build.xml"/>
44.201 + <isset property="endorsed.classpath"/>
44.202 + <not>
44.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
44.204 + </not>
44.205 </and>
44.206 </condition>
44.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
44.208 + <isset property="profile.available"/>
44.209 + </condition>
44.210 + <condition else="false" property="jdkBug6558476">
44.211 + <and>
44.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
44.213 + <not>
44.214 + <os family="unix"/>
44.215 + </not>
44.216 + </and>
44.217 + </condition>
44.218 + <condition else="false" property="javac.fork">
44.219 + <or>
44.220 + <istrue value="${jdkBug6558476}"/>
44.221 + <istrue value="${javac.external.vm}"/>
44.222 + </or>
44.223 + </condition>
44.224 + <property name="jar.index" value="false"/>
44.225 + <property name="jar.index.metainf" value="${jar.index}"/>
44.226 + <property name="copylibs.rebase" value="true"/>
44.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
44.228 + <condition property="junit.available">
44.229 + <or>
44.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
44.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
44.232 + </or>
44.233 + </condition>
44.234 + <condition property="testng.available">
44.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
44.236 + </condition>
44.237 + <condition property="junit+testng.available">
44.238 + <and>
44.239 + <istrue value="${junit.available}"/>
44.240 + <istrue value="${testng.available}"/>
44.241 + </and>
44.242 + </condition>
44.243 + <condition else="testng" property="testng.mode" value="mixed">
44.244 + <istrue value="${junit+testng.available}"/>
44.245 + </condition>
44.246 + <condition else="" property="testng.debug.mode" value="-mixed">
44.247 + <istrue value="${junit+testng.available}"/>
44.248 + </condition>
44.249 + <property name="java.failonerror" value="true"/>
44.250 </target>
44.251 <target name="-post-init">
44.252 <!-- Empty placeholder for easier customization. -->
44.253 @@ -144,26 +308,152 @@
44.254 </sequential>
44.255 </macrodef>
44.256 </target>
44.257 - <target name="-init-macrodef-javac">
44.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
44.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
44.260 <attribute default="${src.dir}" name="srcdir"/>
44.261 <attribute default="${build.classes.dir}" name="destdir"/>
44.262 <attribute default="${javac.classpath}" name="classpath"/>
44.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
44.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
44.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
44.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
44.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
44.268 <attribute default="${includes}" name="includes"/>
44.269 <attribute default="${excludes}" name="excludes"/>
44.270 <attribute default="${javac.debug}" name="debug"/>
44.271 - <attribute default="" name="sourcepath"/>
44.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
44.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
44.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
44.275 <element name="customize" optional="true"/>
44.276 <sequential>
44.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
44.278 + <condition property="warn.excludes.internal">
44.279 + <and>
44.280 + <isset property="named.module.internal"/>
44.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
44.282 + </and>
44.283 + </condition>
44.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
44.285 + <property location="${build.dir}/empty" name="empty.dir"/>
44.286 + <mkdir dir="${empty.dir}"/>
44.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
44.288 + <condition property="processormodulepath.set">
44.289 + <resourcecount count="0" when="greater">
44.290 + <path>
44.291 + <pathelement path="@{processormodulepath}"/>
44.292 + </path>
44.293 + </resourcecount>
44.294 + </condition>
44.295 + <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}">
44.296 + <src>
44.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
44.298 + <include name="*"/>
44.299 + </dirset>
44.300 + </src>
44.301 <classpath>
44.302 <path path="@{classpath}"/>
44.303 </classpath>
44.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
44.305 + <modulepath>
44.306 + <path path="@{modulepath}"/>
44.307 + </modulepath>
44.308 + <upgrademodulepath>
44.309 + <path path="@{upgrademodulepath}"/>
44.310 + </upgrademodulepath>
44.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
44.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
44.313 + <compilerarg line="${javac.compilerargs}"/>
44.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
44.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
44.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
44.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
44.318 + <compilerarg line="${ap.processors.internal}"/>
44.319 + <compilerarg line="${annotation.processing.processor.options}"/>
44.320 + <compilerarg value="-s"/>
44.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
44.322 + <compilerarg line="${ap.proc.none.internal}"/>
44.323 <customize/>
44.324 </javac>
44.325 </sequential>
44.326 </macrodef>
44.327 + </target>
44.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
44.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
44.330 + <attribute default="${src.dir}" name="srcdir"/>
44.331 + <attribute default="${build.classes.dir}" name="destdir"/>
44.332 + <attribute default="${javac.classpath}" name="classpath"/>
44.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
44.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
44.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
44.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
44.337 + <attribute default="${includes}" name="includes"/>
44.338 + <attribute default="${excludes}" name="excludes"/>
44.339 + <attribute default="${javac.debug}" name="debug"/>
44.340 + <attribute default="${empty.dir}" name="sourcepath"/>
44.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
44.342 + <element name="customize" optional="true"/>
44.343 + <sequential>
44.344 + <property location="${build.dir}/empty" name="empty.dir"/>
44.345 + <mkdir dir="${empty.dir}"/>
44.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
44.347 + <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}">
44.348 + <src>
44.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
44.350 + <include name="*"/>
44.351 + </dirset>
44.352 + </src>
44.353 + <classpath>
44.354 + <path path="@{classpath}"/>
44.355 + </classpath>
44.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
44.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
44.358 + <compilerarg line="${javac.compilerargs}"/>
44.359 + <compilerarg value="-processorpath"/>
44.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
44.361 + <compilerarg line="${ap.processors.internal}"/>
44.362 + <compilerarg line="${annotation.processing.processor.options}"/>
44.363 + <compilerarg value="-s"/>
44.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
44.365 + <compilerarg line="${ap.proc.none.internal}"/>
44.366 + <customize/>
44.367 + </javac>
44.368 + </sequential>
44.369 + </macrodef>
44.370 + </target>
44.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
44.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
44.373 + <attribute default="${src.dir}" name="srcdir"/>
44.374 + <attribute default="${build.classes.dir}" name="destdir"/>
44.375 + <attribute default="${javac.classpath}" name="classpath"/>
44.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
44.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
44.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
44.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
44.380 + <attribute default="${includes}" name="includes"/>
44.381 + <attribute default="${excludes}" name="excludes"/>
44.382 + <attribute default="${javac.debug}" name="debug"/>
44.383 + <attribute default="${empty.dir}" name="sourcepath"/>
44.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
44.385 + <element name="customize" optional="true"/>
44.386 + <sequential>
44.387 + <property location="${build.dir}/empty" name="empty.dir"/>
44.388 + <mkdir dir="${empty.dir}"/>
44.389 + <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}">
44.390 + <src>
44.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
44.392 + <include name="*"/>
44.393 + </dirset>
44.394 + </src>
44.395 + <classpath>
44.396 + <path path="@{classpath}"/>
44.397 + </classpath>
44.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
44.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
44.400 + <compilerarg line="${javac.compilerargs}"/>
44.401 + <customize/>
44.402 + </javac>
44.403 + </sequential>
44.404 + </macrodef>
44.405 + </target>
44.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
44.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
44.408 <attribute default="${src.dir}" name="srcdir"/>
44.409 <attribute default="${build.classes.dir}" name="destdir"/>
44.410 @@ -180,51 +470,383 @@
44.411 <attribute default="${build.classes.dir}" name="destdir"/>
44.412 <sequential>
44.413 <fail unless="javac.includes">Must set javac.includes</fail>
44.414 - <pathconvert pathsep="," property="javac.includes.binary">
44.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
44.416 <path>
44.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
44.418 </path>
44.419 <globmapper from="*.java" to="*.class"/>
44.420 </pathconvert>
44.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
44.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
44.423 <delete>
44.424 - <files includes="${javac.includes.binary}"/>
44.425 + <files includesfile="${javac.includesfile.binary}"/>
44.426 + </delete>
44.427 + <delete>
44.428 + <fileset file="${javac.includesfile.binary}"/>
44.429 </delete>
44.430 </sequential>
44.431 </macrodef>
44.432 </target>
44.433 - <target name="-init-macrodef-junit">
44.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
44.435 + <condition else="false" property="nb.junit.batch" value="true">
44.436 + <and>
44.437 + <istrue value="${junit.available}"/>
44.438 + <not>
44.439 + <isset property="test.method"/>
44.440 + </not>
44.441 + </and>
44.442 + </condition>
44.443 + <condition else="false" property="nb.junit.single" value="true">
44.444 + <and>
44.445 + <istrue value="${junit.available}"/>
44.446 + <isset property="test.method"/>
44.447 + </and>
44.448 + </condition>
44.449 + </target>
44.450 + <target name="-init-test-properties">
44.451 + <property name="test.binaryincludes" value="<nothing>"/>
44.452 + <property name="test.binarytestincludes" value=""/>
44.453 + <property name="test.binaryexcludes" value=""/>
44.454 + </target>
44.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
44.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
44.457 + <attribute default="${includes}" name="includes"/>
44.458 + <attribute default="${excludes}" name="excludes"/>
44.459 + <element name="customizePrototype" optional="true"/>
44.460 + <sequential>
44.461 + <property name="junit.forkmode" value="perTest"/>
44.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
44.463 + <syspropertyset>
44.464 + <propertyref prefix="test-sys-prop."/>
44.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
44.466 + </syspropertyset>
44.467 + <classpath>
44.468 + <path path="${run.test.classpath}"/>
44.469 + </classpath>
44.470 + <modulepath>
44.471 + <path path="${run.test.modulepath}"/>
44.472 + </modulepath>
44.473 + <formatter type="brief" usefile="false"/>
44.474 + <formatter type="xml"/>
44.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
44.476 + <jvmarg value="-ea"/>
44.477 + <jvmarg line="${run.test.jvmargs}"/>
44.478 + <customizePrototype/>
44.479 + </junit>
44.480 + </sequential>
44.481 + </macrodef>
44.482 + </target>
44.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
44.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
44.485 + <attribute default="${includes}" name="includes"/>
44.486 + <attribute default="${excludes}" name="excludes"/>
44.487 + <element name="customizePrototype" optional="true"/>
44.488 + <sequential>
44.489 + <property name="junit.forkmode" value="perTest"/>
44.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
44.491 + <syspropertyset>
44.492 + <propertyref prefix="test-sys-prop."/>
44.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
44.494 + </syspropertyset>
44.495 + <classpath>
44.496 + <path path="${run.test.classpath}"/>
44.497 + </classpath>
44.498 + <formatter type="brief" usefile="false"/>
44.499 + <formatter type="xml"/>
44.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
44.501 + <jvmarg value="-ea"/>
44.502 + <customizePrototype/>
44.503 + </junit>
44.504 + </sequential>
44.505 + </macrodef>
44.506 + </target>
44.507 + <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}">
44.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
44.509 <attribute default="${includes}" name="includes"/>
44.510 <attribute default="${excludes}" name="excludes"/>
44.511 <attribute default="**" name="testincludes"/>
44.512 + <attribute default="" name="testmethods"/>
44.513 + <element name="customize" optional="true"/>
44.514 <sequential>
44.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
44.516 - <batchtest todir="${build.test.results.dir}">
44.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
44.518 - <filename name="@{testincludes}"/>
44.519 - </fileset>
44.520 - </batchtest>
44.521 + <j2seproject3:junit-prototype>
44.522 + <customizePrototype>
44.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
44.524 + <customize/>
44.525 + </customizePrototype>
44.526 + </j2seproject3:junit-prototype>
44.527 + </sequential>
44.528 + </macrodef>
44.529 + </target>
44.530 + <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}">
44.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
44.532 + <attribute default="${includes}" name="includes"/>
44.533 + <attribute default="${excludes}" name="excludes"/>
44.534 + <attribute default="**" name="testincludes"/>
44.535 + <attribute default="" name="testmethods"/>
44.536 + <element name="customize" optional="true"/>
44.537 + <sequential>
44.538 + <j2seproject3:junit-prototype>
44.539 + <customizePrototype>
44.540 + <batchtest todir="${build.test.results.dir}">
44.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
44.542 + <filename name="@{testincludes}"/>
44.543 + </fileset>
44.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
44.545 + <filename name="${test.binarytestincludes}"/>
44.546 + </fileset>
44.547 + </batchtest>
44.548 + <customize/>
44.549 + </customizePrototype>
44.550 + </j2seproject3:junit-prototype>
44.551 + </sequential>
44.552 + </macrodef>
44.553 + </target>
44.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
44.555 + <target if="${testng.available}" name="-init-macrodef-testng">
44.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
44.557 + <attribute default="${includes}" name="includes"/>
44.558 + <attribute default="${excludes}" name="excludes"/>
44.559 + <attribute default="**" name="testincludes"/>
44.560 + <attribute default="" name="testmethods"/>
44.561 + <element name="customize" optional="true"/>
44.562 + <sequential>
44.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
44.564 + <isset property="test.method"/>
44.565 + </condition>
44.566 + <union id="test.set">
44.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
44.568 + <filename name="@{testincludes}"/>
44.569 + </fileset>
44.570 + </union>
44.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
44.572 + <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="instanceof" testname="TestNG tests" workingDir="${work.dir}">
44.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
44.574 + <propertyset>
44.575 + <propertyref prefix="test-sys-prop."/>
44.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
44.577 + </propertyset>
44.578 <classpath>
44.579 <path path="${run.test.classpath}"/>
44.580 </classpath>
44.581 - <syspropertyset>
44.582 - <propertyref prefix="test-sys-prop."/>
44.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
44.584 - </syspropertyset>
44.585 - <formatter type="brief" usefile="false"/>
44.586 - <formatter type="xml"/>
44.587 - <jvmarg line="${run.jvmargs}"/>
44.588 - </junit>
44.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
44.590 + <customize/>
44.591 + </testng>
44.592 </sequential>
44.593 </macrodef>
44.594 </target>
44.595 - <target name="-init-macrodef-nbjpda">
44.596 + <target name="-init-macrodef-test-impl">
44.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
44.598 + <attribute default="${includes}" name="includes"/>
44.599 + <attribute default="${excludes}" name="excludes"/>
44.600 + <attribute default="**" name="testincludes"/>
44.601 + <attribute default="" name="testmethods"/>
44.602 + <element implicit="true" name="customize" optional="true"/>
44.603 + <sequential>
44.604 + <echo>No tests executed.</echo>
44.605 + </sequential>
44.606 + </macrodef>
44.607 + </target>
44.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
44.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
44.610 + <attribute default="${includes}" name="includes"/>
44.611 + <attribute default="${excludes}" name="excludes"/>
44.612 + <attribute default="**" name="testincludes"/>
44.613 + <attribute default="" name="testmethods"/>
44.614 + <element implicit="true" name="customize" optional="true"/>
44.615 + <sequential>
44.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
44.617 + <customize/>
44.618 + </j2seproject3:junit>
44.619 + </sequential>
44.620 + </macrodef>
44.621 + </target>
44.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
44.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
44.624 + <attribute default="${includes}" name="includes"/>
44.625 + <attribute default="${excludes}" name="excludes"/>
44.626 + <attribute default="**" name="testincludes"/>
44.627 + <attribute default="" name="testmethods"/>
44.628 + <element implicit="true" name="customize" optional="true"/>
44.629 + <sequential>
44.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
44.631 + <customize/>
44.632 + </j2seproject3:testng>
44.633 + </sequential>
44.634 + </macrodef>
44.635 + </target>
44.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
44.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
44.638 + <attribute default="${includes}" name="includes"/>
44.639 + <attribute default="${excludes}" name="excludes"/>
44.640 + <attribute default="**" name="testincludes"/>
44.641 + <attribute default="" name="testmethods"/>
44.642 + <sequential>
44.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
44.644 + <customize>
44.645 + <jvmarg line="${run.jvmargs}"/>
44.646 + <jvmarg line="${run.jvmargs.ide}"/>
44.647 + </customize>
44.648 + </j2seproject3:test-impl>
44.649 + </sequential>
44.650 + </macrodef>
44.651 + </target>
44.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
44.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
44.654 + <attribute default="${includes}" name="includes"/>
44.655 + <attribute default="${excludes}" name="excludes"/>
44.656 + <attribute default="**" name="testincludes"/>
44.657 + <attribute default="" name="testmethods"/>
44.658 + <element name="customizeDebuggee" optional="true"/>
44.659 + <sequential>
44.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
44.661 + <customize>
44.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
44.663 + <customizeDebuggee/>
44.664 + </customize>
44.665 + </j2seproject3:junit>
44.666 + </sequential>
44.667 + </macrodef>
44.668 + </target>
44.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
44.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
44.671 + <attribute default="${main.class}" name="testClass"/>
44.672 + <attribute default="" name="testMethod"/>
44.673 + <element name="customize2" optional="true"/>
44.674 + <sequential>
44.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
44.676 + <isset property="test.method"/>
44.677 + </condition>
44.678 + <condition else="-suitename instanceof -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
44.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
44.680 + </condition>
44.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
44.682 + <mkdir dir="${build.test.results.dir}"/>
44.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
44.684 + <customizeDebuggee>
44.685 + <customize2/>
44.686 + <jvmarg value="-ea"/>
44.687 + <arg line="${testng.debug.mode}"/>
44.688 + <arg line="-d ${build.test.results.dir}"/>
44.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
44.690 + <arg line="${testng.cmd.args}"/>
44.691 + </customizeDebuggee>
44.692 + </j2seproject3:debug>
44.693 + </sequential>
44.694 + </macrodef>
44.695 + </target>
44.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
44.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
44.698 + <attribute default="${main.class}" name="testClass"/>
44.699 + <attribute default="" name="testMethod"/>
44.700 + <element implicit="true" name="customize2" optional="true"/>
44.701 + <sequential>
44.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
44.703 + <customize2/>
44.704 + </j2seproject3:testng-debug>
44.705 + </sequential>
44.706 + </macrodef>
44.707 + </target>
44.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
44.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
44.710 + <attribute default="${includes}" name="includes"/>
44.711 + <attribute default="${excludes}" name="excludes"/>
44.712 + <attribute default="**" name="testincludes"/>
44.713 + <attribute default="" name="testmethods"/>
44.714 + <attribute default="${main.class}" name="testClass"/>
44.715 + <attribute default="" name="testMethod"/>
44.716 + <sequential>
44.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
44.718 + <customizeDebuggee>
44.719 + <jvmarg line="${run.jvmargs}"/>
44.720 + <jvmarg line="${run.jvmargs.ide}"/>
44.721 + </customizeDebuggee>
44.722 + </j2seproject3:test-debug-impl>
44.723 + </sequential>
44.724 + </macrodef>
44.725 + </target>
44.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
44.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
44.728 + <attribute default="${includes}" name="includes"/>
44.729 + <attribute default="${excludes}" name="excludes"/>
44.730 + <attribute default="**" name="testincludes"/>
44.731 + <attribute default="" name="testmethods"/>
44.732 + <attribute default="${main.class}" name="testClass"/>
44.733 + <attribute default="" name="testMethod"/>
44.734 + <sequential>
44.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
44.736 + <customize2>
44.737 + <syspropertyset>
44.738 + <propertyref prefix="test-sys-prop."/>
44.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
44.740 + </syspropertyset>
44.741 + </customize2>
44.742 + </j2seproject3:testng-debug-impl>
44.743 + </sequential>
44.744 + </macrodef>
44.745 + </target>
44.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
44.747 + <!--
44.748 + pre NB7.2 profiling section; consider it deprecated
44.749 + -->
44.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
44.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
44.752 + <!-- Empty placeholder for easier customization. -->
44.753 + <!-- You can override this target in the ../build.xml file. -->
44.754 + </target>
44.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
44.756 + <!-- Empty placeholder for easier customization. -->
44.757 + <!-- You can override this target in the ../build.xml file. -->
44.758 + </target>
44.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
44.760 + <macrodef name="resolve">
44.761 + <attribute name="name"/>
44.762 + <attribute name="value"/>
44.763 + <sequential>
44.764 + <property name="@{name}" value="${env.@{value}}"/>
44.765 + </sequential>
44.766 + </macrodef>
44.767 + <macrodef name="profile">
44.768 + <attribute default="${main.class}" name="classname"/>
44.769 + <element name="customize" optional="true"/>
44.770 + <sequential>
44.771 + <property environment="env"/>
44.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
44.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
44.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
44.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
44.776 + <jvmarg line="${profiler.info.jvmargs}"/>
44.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
44.778 + <arg line="${application.args}"/>
44.779 + <classpath>
44.780 + <path path="${run.classpath}"/>
44.781 + </classpath>
44.782 + <syspropertyset>
44.783 + <propertyref prefix="run-sys-prop."/>
44.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
44.785 + </syspropertyset>
44.786 + <customize/>
44.787 + </java>
44.788 + </sequential>
44.789 + </macrodef>
44.790 + </target>
44.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
44.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
44.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
44.794 + </target>
44.795 + <!--
44.796 + end of pre NB7.2 profiling section
44.797 + -->
44.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
44.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
44.800 <attribute default="${main.class}" name="name"/>
44.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
44.802 <attribute default="${debug.classpath}" name="classpath"/>
44.803 <attribute default="" name="stopclassname"/>
44.804 <sequential>
44.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
44.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
44.807 + <modulepath>
44.808 + <path path="@{modulepath}"/>
44.809 + </modulepath>
44.810 <classpath>
44.811 <path path="@{classpath}"/>
44.812 </classpath>
44.813 @@ -235,35 +857,120 @@
44.814 <attribute default="${build.classes.dir}" name="dir"/>
44.815 <sequential>
44.816 <nbjpdareload>
44.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
44.818 + <fileset dir="@{dir}" includes="${fix.classes}">
44.819 + <include name="${fix.includes}*.class"/>
44.820 + </fileset>
44.821 </nbjpdareload>
44.822 </sequential>
44.823 </macrodef>
44.824 </target>
44.825 <target name="-init-debug-args">
44.826 - <property name="version-output" value="java version "${ant.java.version}"/>
44.827 - <condition property="have-jdk-older-than-1.4">
44.828 - <or>
44.829 - <contains string="${version-output}" substring="java version "1.0"/>
44.830 - <contains string="${version-output}" substring="java version "1.1"/>
44.831 - <contains string="${version-output}" substring="java version "1.2"/>
44.832 - <contains string="${version-output}" substring="java version "1.3"/>
44.833 - </or>
44.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
44.835 + <os family="windows"/>
44.836 </condition>
44.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
44.838 - <istrue value="${have-jdk-older-than-1.4}"/>
44.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
44.840 + <isset property="debug.transport"/>
44.841 </condition>
44.842 </target>
44.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
44.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
44.845 + <attribute default="${module.name}" name="modulename"/>
44.846 <attribute default="${main.class}" name="classname"/>
44.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
44.848 <attribute default="${debug.classpath}" name="classpath"/>
44.849 + <element name="customizeDebuggee" optional="true"/>
44.850 + <sequential>
44.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
44.852 + <customize>
44.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
44.854 + <customizeDebuggee/>
44.855 + </customize>
44.856 + </j2seproject1:java>
44.857 + </sequential>
44.858 + </macrodef>
44.859 + </target>
44.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
44.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
44.862 + <attribute default="${module.name}" name="modulename"/>
44.863 + <attribute default="${main.class}" name="classname"/>
44.864 + <attribute default="${run.modulepath}" name="modulepath"/>
44.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
44.866 + <attribute default="${run.classpath}" name="classpath"/>
44.867 + <attribute default="jvm" name="jvm"/>
44.868 <element name="customize" optional="true"/>
44.869 <sequential>
44.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
44.871 - <jvmarg line="${debug-args-line}"/>
44.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
44.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
44.874 + <classpath>
44.875 + <path path="@{classpath}"/>
44.876 + </classpath>
44.877 + <modulepath>
44.878 + <pathelement path="@{modulepath}"/>
44.879 + <pathelement location="${module.build.classes.dir}"/>
44.880 + </modulepath>
44.881 + <upgrademodulepath>
44.882 + <path path="@{upgrademodulepath}"/>
44.883 + </upgrademodulepath>
44.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
44.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
44.886 <jvmarg line="${run.jvmargs}"/>
44.887 + <jvmarg line="${run.jvmargs.ide}"/>
44.888 + <syspropertyset>
44.889 + <propertyref prefix="run-sys-prop."/>
44.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
44.891 + </syspropertyset>
44.892 + <customize/>
44.893 + </java>
44.894 + </sequential>
44.895 + </macrodef>
44.896 + </target>
44.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
44.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
44.899 + <attribute default="" name="modulename"/>
44.900 + <attribute default="${main.class}" name="classname"/>
44.901 + <attribute default="${run.modulepath}" name="modulepath"/>
44.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
44.903 + <attribute default="${run.classpath}" name="classpath"/>
44.904 + <attribute default="jvm" name="jvm"/>
44.905 + <element name="customize" optional="true"/>
44.906 + <sequential>
44.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
44.908 + <classpath>
44.909 + <path path="@{classpath}"/>
44.910 + </classpath>
44.911 + <modulepath>
44.912 + <path path="@{modulepath}"/>
44.913 + </modulepath>
44.914 + <upgrademodulepath>
44.915 + <path path="@{upgrademodulepath}"/>
44.916 + </upgrademodulepath>
44.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
44.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
44.919 + <jvmarg line="${run.jvmargs}"/>
44.920 + <jvmarg line="${run.jvmargs.ide}"/>
44.921 + <syspropertyset>
44.922 + <propertyref prefix="run-sys-prop."/>
44.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
44.924 + </syspropertyset>
44.925 + <customize/>
44.926 + </java>
44.927 + </sequential>
44.928 + </macrodef>
44.929 + </target>
44.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
44.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
44.932 + <attribute default="" name="modulename"/>
44.933 + <attribute default="${main.class}" name="classname"/>
44.934 + <attribute default="" name="modulepath"/>
44.935 + <attribute default="${run.classpath}" name="classpath"/>
44.936 + <attribute default="jvm" name="jvm"/>
44.937 + <element name="customize" optional="true"/>
44.938 + <sequential>
44.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
44.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
44.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
44.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
44.943 + <jvmarg line="${run.jvmargs}"/>
44.944 + <jvmarg line="${run.jvmargs.ide}"/>
44.945 <classpath>
44.946 <path path="@{classpath}"/>
44.947 </classpath>
44.948 @@ -276,39 +983,100 @@
44.949 </sequential>
44.950 </macrodef>
44.951 </target>
44.952 - <target name="-init-macrodef-java">
44.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
44.954 - <attribute default="${main.class}" name="classname"/>
44.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
44.956 + <target name="-init-macrodef-copylibs">
44.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
44.958 + <attribute default="${manifest.file}" name="manifest"/>
44.959 <element name="customize" optional="true"/>
44.960 <sequential>
44.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
44.962 - <jvmarg line="${run.jvmargs}"/>
44.963 - <classpath>
44.964 - <path path="${run.classpath}"/>
44.965 - </classpath>
44.966 - <syspropertyset>
44.967 - <propertyref prefix="run-sys-prop."/>
44.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
44.969 - </syspropertyset>
44.970 - <customize/>
44.971 - </java>
44.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
44.973 + <pathconvert property="run.classpath.without.build.classes.dir">
44.974 + <path path="${run.classpath}"/>
44.975 + <map from="${build.classes.dir.resolved}" to=""/>
44.976 + </pathconvert>
44.977 + <pathconvert pathsep=" " property="jar.classpath">
44.978 + <path path="${run.classpath.without.build.classes.dir}"/>
44.979 + <chainedmapper>
44.980 + <flattenmapper/>
44.981 + <filtermapper>
44.982 + <replacestring from=" " to="%20"/>
44.983 + </filtermapper>
44.984 + <globmapper from="*" to="lib/*"/>
44.985 + </chainedmapper>
44.986 + </pathconvert>
44.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
44.988 + <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}">
44.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
44.990 + <manifest>
44.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
44.992 + <customize/>
44.993 + </manifest>
44.994 + </copylibs>
44.995 </sequential>
44.996 </macrodef>
44.997 </target>
44.998 <target name="-init-presetdef-jar">
44.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
44.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
44.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
44.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
44.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
44.1004 </jar>
44.1005 </presetdef>
44.1006 </target>
44.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
44.1008 + <target name="-init-ap-cmdline-properties">
44.1009 + <property name="annotation.processing.enabled" value="true"/>
44.1010 + <property name="annotation.processing.processors.list" value=""/>
44.1011 + <property name="annotation.processing.processor.options" value=""/>
44.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
44.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
44.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
44.1015 + <condition property="ap.supported.internal" value="true">
44.1016 + <not>
44.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
44.1018 + </not>
44.1019 + </condition>
44.1020 + </target>
44.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
44.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
44.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
44.1024 + </condition>
44.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
44.1026 + <isfalse value="${annotation.processing.enabled}"/>
44.1027 + </condition>
44.1028 + </target>
44.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
44.1030 + <property name="ap.cmd.line.internal" value=""/>
44.1031 + </target>
44.1032 + <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"/>
44.1033 <!--
44.1034 ===================
44.1035 COMPILATION SECTION
44.1036 ===================
44.1037 -->
44.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
44.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
44.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
44.1041 + <delete file="${built-jar.properties}" quiet="true"/>
44.1042 + </target>
44.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
44.1044 + <echo level="warn" message="Cycle detected: instanceof was already built"/>
44.1045 + </target>
44.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
44.1047 + <mkdir dir="${build.dir}"/>
44.1048 + <touch file="${built-jar.properties}" verbose="false"/>
44.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
44.1050 + <antcall target="-warn-already-built-jar"/>
44.1051 + <propertyfile file="${built-jar.properties}">
44.1052 + <entry key="${basedir}" value=""/>
44.1053 + </propertyfile>
44.1054 + </target>
44.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
44.1056 + <target depends="init" name="-check-automatic-build">
44.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
44.1058 + </target>
44.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
44.1060 + <antcall target="clean">
44.1061 + <param name="no.dependencies" value="true"/>
44.1062 + </antcall>
44.1063 + </target>
44.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
44.1065 <mkdir dir="${build.classes.dir}"/>
44.1066 </target>
44.1067 @@ -317,19 +1085,30 @@
44.1068 <!-- You can override this target in the ../build.xml file. -->
44.1069 </target>
44.1070 <target if="do.depend.true" name="-compile-depend">
44.1071 - <j2seproject3:depend/>
44.1072 + <pathconvert property="build.generated.subdirs">
44.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
44.1074 + <include name="*"/>
44.1075 + </dirset>
44.1076 + </pathconvert>
44.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
44.1078 </target>
44.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
44.1080 - <j2seproject3:javac/>
44.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
44.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
44.1083 <copy todir="${build.classes.dir}">
44.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
44.1085 </copy>
44.1086 </target>
44.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
44.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
44.1089 + <copy todir="${build.classes.dir}/META-INF">
44.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
44.1091 + </copy>
44.1092 + </target>
44.1093 <target name="-post-compile">
44.1094 <!-- Empty placeholder for easier customization. -->
44.1095 <!-- You can override this target in the ../build.xml file. -->
44.1096 </target>
44.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
44.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
44.1099 <target name="-pre-compile-single">
44.1100 <!-- Empty placeholder for easier customization. -->
44.1101 <!-- You can override this target in the ../build.xml file. -->
44.1102 @@ -337,13 +1116,13 @@
44.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
44.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
44.1105 <j2seproject3:force-recompile/>
44.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
44.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
44.1108 </target>
44.1109 <target name="-post-compile-single">
44.1110 <!-- Empty placeholder for easier customization. -->
44.1111 <!-- You can override this target in the ../build.xml file. -->
44.1112 </target>
44.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
44.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
44.1115 <!--
44.1116 ====================
44.1117 JAR BUILDING SECTION
44.1118 @@ -357,57 +1136,191 @@
44.1119 <!-- Empty placeholder for easier customization. -->
44.1120 <!-- You can override this target in the ../build.xml file. -->
44.1121 </target>
44.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
44.1123 - <j2seproject1:jar/>
44.1124 + <target depends="init,compile" name="-check-module-main-class">
44.1125 + <pathconvert property="main.class.file">
44.1126 + <string value="${main.class}"/>
44.1127 + <unpackagemapper from="*" to="*.class"/>
44.1128 + </pathconvert>
44.1129 + <condition property="do.module.main.class">
44.1130 + <and>
44.1131 + <isset property="main.class.available"/>
44.1132 + <available file="${build.classes.dir}/module-info.class"/>
44.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
44.1134 + <isset property="libs.CopyLibs.classpath"/>
44.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
44.1136 + </and>
44.1137 + </condition>
44.1138 </target>
44.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
44.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
44.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
44.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
44.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
44.1144 </target>
44.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
44.1146 - <j2seproject1:jar manifest="${manifest.file}">
44.1147 - <j2seproject1:manifest>
44.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
44.1149 - </j2seproject1:manifest>
44.1150 - </j2seproject1:jar>
44.1151 - <echo>To run this application from the command line without Ant, try:</echo>
44.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
44.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
44.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
44.1155 + </target>
44.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
44.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
44.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
44.1159 + </target>
44.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
44.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
44.1162 + <attribute name="Main-Class" value="${main.class}"/>
44.1163 + </manifest>
44.1164 + </target>
44.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
44.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
44.1167 + <attribute name="Profile" value="${javac.profile}"/>
44.1168 + </manifest>
44.1169 + </target>
44.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
44.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
44.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
44.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
44.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
44.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
44.1176 + </manifest>
44.1177 + </target>
44.1178 + <target depends="init,compile" name="-check-do-mkdist">
44.1179 + <condition property="do.mkdist">
44.1180 + <and>
44.1181 + <isset property="do.archive"/>
44.1182 + <isset property="libs.CopyLibs.classpath"/>
44.1183 + <not>
44.1184 + <istrue value="${mkdist.disabled}"/>
44.1185 + </not>
44.1186 + <not>
44.1187 + <available file="${build.classes.dir}/module-info.class"/>
44.1188 + </not>
44.1189 + </and>
44.1190 + </condition>
44.1191 + </target>
44.1192 + <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">
44.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
44.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
44.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
44.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
44.1197 + </target>
44.1198 + <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">
44.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
44.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
44.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
44.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
44.1203 + <isset property="named.module.internal"/>
44.1204 + </condition>
44.1205 <pathconvert property="run.classpath.with.dist.jar">
44.1206 <path path="${run.classpath}"/>
44.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
44.1208 + </pathconvert>
44.1209 + <pathconvert property="run.modulepath.with.dist.jar">
44.1210 + <path location="${dist.jar.resolved}"/>
44.1211 + <path path="${run.modulepath}"/>
44.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
44.1213 </pathconvert>
44.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
44.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
44.1216 + <isset property="named.module.internal"/>
44.1217 + </condition>
44.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
44.1219 + <and>
44.1220 + <isset property="modules.supported.internal"/>
44.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
44.1222 + </and>
44.1223 + </condition>
44.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
44.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
44.1226 + </condition>
44.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
44.1228 + <isset property="do.module.main.class"/>
44.1229 + </condition>
44.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
44.1231 + <isset property="named.module.internal"/>
44.1232 + </condition>
44.1233 + <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}">
44.1234 + <isset property="main.class.available"/>
44.1235 + </condition>
44.1236 + <condition else="debug" property="jar.usage.level" value="info">
44.1237 + <isset property="main.class.available"/>
44.1238 + </condition>
44.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
44.1240 </target>
44.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
44.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
44.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
44.1244 - <path path="${run.classpath}"/>
44.1245 - <map from="${build.classes.dir.resolved}" to=""/>
44.1246 - </pathconvert>
44.1247 - <pathconvert pathsep=" " property="jar.classpath">
44.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
44.1249 - <chainedmapper>
44.1250 - <flattenmapper/>
44.1251 - <globmapper from="*" to="lib/*"/>
44.1252 - </chainedmapper>
44.1253 - </pathconvert>
44.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
44.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
44.1256 - <fileset dir="${build.classes.dir}"/>
44.1257 - <manifest>
44.1258 - <attribute name="Main-Class" value="${main.class}"/>
44.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
44.1260 - </manifest>
44.1261 - </copylibs>
44.1262 - <echo>To run this application from the command line without Ant, try:</echo>
44.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
44.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
44.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
44.1266 + <delete>
44.1267 + <fileset file="${tmp.manifest.file}"/>
44.1268 + </delete>
44.1269 </target>
44.1270 + <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"/>
44.1271 + <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"/>
44.1272 <target name="-post-jar">
44.1273 <!-- Empty placeholder for easier customization. -->
44.1274 <!-- You can override this target in the ../build.xml file. -->
44.1275 </target>
44.1276 - <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"/>
44.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
44.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
44.1279 + <!--
44.1280 + =================
44.1281 + DEPLOY SECTION
44.1282 + =================
44.1283 + -->
44.1284 + <target name="-pre-deploy">
44.1285 + <!-- Empty placeholder for easier customization. -->
44.1286 + <!-- You can override this target in the ../build.xml file. -->
44.1287 + </target>
44.1288 + <target depends="init" name="-check-jlink">
44.1289 + <condition property="do.jlink.internal">
44.1290 + <and>
44.1291 + <istrue value="${do.jlink}"/>
44.1292 + <isset property="do.archive"/>
44.1293 + <isset property="named.module.internal"/>
44.1294 + </and>
44.1295 + </condition>
44.1296 + </target>
44.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
44.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
44.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
44.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
44.1301 + <and>
44.1302 + <isset property="jlink.additionalmodules"/>
44.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
44.1304 + </and>
44.1305 + </condition>
44.1306 + <condition property="jlink.do.strip.internal">
44.1307 + <and>
44.1308 + <isset property="jlink.strip"/>
44.1309 + <istrue value="${jlink.strip}"/>
44.1310 + </and>
44.1311 + </condition>
44.1312 + <condition property="jlink.do.additionalparam.internal">
44.1313 + <and>
44.1314 + <isset property="jlink.additionalparam"/>
44.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
44.1316 + </and>
44.1317 + </condition>
44.1318 + <condition property="jlink.do.launcher.internal">
44.1319 + <and>
44.1320 + <istrue value="${jlink.launcher}"/>
44.1321 + <isset property="main.class.available"/>
44.1322 + </and>
44.1323 + </condition>
44.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
44.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
44.1326 + <exec executable="${platform.jlink}">
44.1327 + <arg value="--module-path"/>
44.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
44.1329 + <arg value="--add-modules"/>
44.1330 + <arg value="${jlink.add.modules}"/>
44.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
44.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
44.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
44.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
44.1335 + <arg value="--output"/>
44.1336 + <arg value="${dist.jlink.output}"/>
44.1337 + </exec>
44.1338 + </target>
44.1339 + <target name="-post-deploy">
44.1340 + <!-- Empty placeholder for easier customization. -->
44.1341 + <!-- You can override this target in the ../build.xml file. -->
44.1342 + </target>
44.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
44.1344 <!--
44.1345 =================
44.1346 EXECUTION SECTION
44.1347 @@ -423,10 +1336,14 @@
44.1348 <target name="-do-not-recompile">
44.1349 <property name="javac.includes.binary" value=""/>
44.1350 </target>
44.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
44.1352 + <target depends="init,compile-single" name="run-single">
44.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
44.1354 <j2seproject1:java classname="${run.class}"/>
44.1355 </target>
44.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
44.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
44.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
44.1359 + </target>
44.1360 <!--
44.1361 =================
44.1362 DEBUGGING SECTION
44.1363 @@ -435,11 +1352,14 @@
44.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
44.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
44.1366 </target>
44.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
44.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
44.1369 + </target>
44.1370 <target depends="init,compile" name="-debug-start-debuggee">
44.1371 <j2seproject3:debug>
44.1372 - <customize>
44.1373 + <customizeDebuggee>
44.1374 <arg line="${application.args}"/>
44.1375 - </customize>
44.1376 + </customizeDebuggee>
44.1377 </j2seproject3:debug>
44.1378 </target>
44.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
44.1380 @@ -451,7 +1371,12 @@
44.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
44.1382 <j2seproject3:debug classname="${debug.class}"/>
44.1383 </target>
44.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
44.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
44.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
44.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
44.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
44.1389 + </target>
44.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
44.1391 <target depends="init" name="-pre-debug-fix">
44.1392 <fail unless="fix.includes">Must set fix.includes</fail>
44.1393 <property name="javac.includes" value="${fix.includes}.java"/>
44.1394 @@ -461,20 +1386,146 @@
44.1395 </target>
44.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
44.1397 <!--
44.1398 + =================
44.1399 + PROFILING SECTION
44.1400 + =================
44.1401 + -->
44.1402 + <!--
44.1403 + pre NB7.2 profiler integration
44.1404 + -->
44.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
44.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
44.1407 + <nbprofiledirect>
44.1408 + <classpath>
44.1409 + <path path="${run.classpath}"/>
44.1410 + </classpath>
44.1411 + </nbprofiledirect>
44.1412 + <profile/>
44.1413 + </target>
44.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
44.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
44.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
44.1417 + <nbprofiledirect>
44.1418 + <classpath>
44.1419 + <path path="${run.classpath}"/>
44.1420 + </classpath>
44.1421 + </nbprofiledirect>
44.1422 + <profile classname="${profile.class}"/>
44.1423 + </target>
44.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
44.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
44.1426 + <nbprofiledirect>
44.1427 + <classpath>
44.1428 + <path path="${run.classpath}"/>
44.1429 + </classpath>
44.1430 + </nbprofiledirect>
44.1431 + <profile classname="sun.applet.AppletViewer">
44.1432 + <customize>
44.1433 + <arg value="${applet.url}"/>
44.1434 + </customize>
44.1435 + </profile>
44.1436 + </target>
44.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
44.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
44.1439 + <nbprofiledirect>
44.1440 + <classpath>
44.1441 + <path path="${run.test.classpath}"/>
44.1442 + </classpath>
44.1443 + </nbprofiledirect>
44.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
44.1445 + <customize>
44.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
44.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
44.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
44.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
44.1450 + <classpath>
44.1451 + <path path="${run.test.classpath}"/>
44.1452 + </classpath>
44.1453 + </customize>
44.1454 + </j2seproject3:junit>
44.1455 + </target>
44.1456 + <!--
44.1457 + end of pre NB72 profiling section
44.1458 + -->
44.1459 + <target if="netbeans.home" name="-profile-check">
44.1460 + <condition property="profiler.configured">
44.1461 + <or>
44.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
44.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
44.1464 + </or>
44.1465 + </condition>
44.1466 + </target>
44.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
44.1468 + <startprofiler/>
44.1469 + <antcall target="run"/>
44.1470 + </target>
44.1471 + <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">
44.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
44.1473 + <startprofiler/>
44.1474 + <antcall target="run-single"/>
44.1475 + </target>
44.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
44.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
44.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
44.1479 + <startprofiler/>
44.1480 + <antcall target="test-single"/>
44.1481 + </target>
44.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
44.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
44.1484 + <startprofiler/>
44.1485 + <antcall target="run-test-with-main"/>
44.1486 + </target>
44.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
44.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
44.1489 + <startprofiler/>
44.1490 + <antcall target="run-applet"/>
44.1491 + </target>
44.1492 + <!--
44.1493 ===============
44.1494 JAVADOC SECTION
44.1495 ===============
44.1496 -->
44.1497 - <target depends="init" name="-javadoc-build">
44.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
44.1499 <mkdir dir="${dist.javadoc.dir}"/>
44.1500 - <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}">
44.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
44.1502 + <and>
44.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
44.1504 + <not>
44.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
44.1506 + </not>
44.1507 + </and>
44.1508 + </condition>
44.1509 + <condition else="" property="bug5101868workaround" value="*.java">
44.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
44.1511 + </condition>
44.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
44.1513 + <and>
44.1514 + <isset property="javadoc.html5"/>
44.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
44.1516 + </and>
44.1517 + </condition>
44.1518 + <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}">
44.1519 <classpath>
44.1520 <path path="${javac.classpath}"/>
44.1521 </classpath>
44.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
44.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
44.1524 <filename name="**/*.java"/>
44.1525 </fileset>
44.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
44.1527 + <include name="**/*.java"/>
44.1528 + <exclude name="*.java"/>
44.1529 + </fileset>
44.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
44.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
44.1532 </javadoc>
44.1533 + <copy todir="${dist.javadoc.dir}">
44.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
44.1535 + <filename name="**/doc-files/**"/>
44.1536 + </fileset>
44.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
44.1538 + <include name="**/doc-files/**"/>
44.1539 + </fileset>
44.1540 + </copy>
44.1541 </target>
44.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
44.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
44.1544 @@ -482,7 +1533,7 @@
44.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
44.1546 <!--
44.1547 =========================
44.1548 - JUNIT COMPILATION SECTION
44.1549 + TEST COMPILATION SECTION
44.1550 =========================
44.1551 -->
44.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
44.1553 @@ -492,11 +1543,63 @@
44.1554 <!-- Empty placeholder for easier customization. -->
44.1555 <!-- You can override this target in the ../build.xml file. -->
44.1556 </target>
44.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
44.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
44.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
44.1560 + <and>
44.1561 + <isset property="test.module.name"/>
44.1562 + <length length="0" string="${test.module.name}" when="greater"/>
44.1563 + </and>
44.1564 + </condition>
44.1565 + <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">
44.1566 + <and>
44.1567 + <isset property="test.module.name"/>
44.1568 + <length length="0" string="${test.module.name}" when="greater"/>
44.1569 + </and>
44.1570 + </condition>
44.1571 + </target>
44.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
44.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
44.1574 + <and>
44.1575 + <isset property="test.module.name"/>
44.1576 + <length length="0" string="${test.module.name}" when="greater"/>
44.1577 + </and>
44.1578 + </condition>
44.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
44.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
44.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
44.1582 + <chainedmapper>
44.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
44.1584 + <filtermapper>
44.1585 + <uniqfilter/>
44.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
44.1587 + </filtermapper>
44.1588 + <cutdirsmapper dirs="1"/>
44.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
44.1590 + </chainedmapper>
44.1591 + </pathconvert>
44.1592 + <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}">
44.1593 + <and>
44.1594 + <isset property="test.module.name"/>
44.1595 + <length length="0" string="${test.module.name}" when="greater"/>
44.1596 + </and>
44.1597 + </condition>
44.1598 + </target>
44.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
44.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
44.1601 + <property name="javac.test.compilerargs" value=""/>
44.1602 + <property name="run.test.jvmargs" value=""/>
44.1603 + </target>
44.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
44.1605 <target if="do.depend.true" name="-compile-test-depend">
44.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
44.1607 </target>
44.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
44.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
44.1610 + <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">
44.1611 + <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}">
44.1612 + <customize>
44.1613 + <compilerarg line="${javac.test.compilerargs}"/>
44.1614 + </customize>
44.1615 + </j2seproject3:javac>
44.1616 <copy todir="${build.test.classes.dir}">
44.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
44.1618 </copy>
44.1619 @@ -510,10 +1613,14 @@
44.1620 <!-- Empty placeholder for easier customization. -->
44.1621 <!-- You can override this target in the ../build.xml file. -->
44.1622 </target>
44.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
44.1624 + <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">
44.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
44.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
44.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
44.1628 + <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}">
44.1629 + <customize>
44.1630 + <compilerarg line="${javac.test.compilerargs}"/>
44.1631 + </customize>
44.1632 + </j2seproject3:javac>
44.1633 <copy todir="${build.test.classes.dir}">
44.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
44.1635 </copy>
44.1636 @@ -525,17 +1632,17 @@
44.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
44.1638 <!--
44.1639 =======================
44.1640 - JUNIT EXECUTION SECTION
44.1641 + TEST EXECUTION SECTION
44.1642 =======================
44.1643 -->
44.1644 <target depends="init" if="have.tests" name="-pre-test-run">
44.1645 <mkdir dir="${build.test.results.dir}"/>
44.1646 </target>
44.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
44.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
44.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
44.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
44.1651 </target>
44.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
44.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
44.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
44.1655 </target>
44.1656 <target depends="init" if="have.tests" name="test-report"/>
44.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
44.1658 @@ -543,41 +1650,42 @@
44.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
44.1660 <mkdir dir="${build.test.results.dir}"/>
44.1661 </target>
44.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
44.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
44.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
44.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
44.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
44.1667 </target>
44.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
44.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
44.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
44.1671 </target>
44.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
44.1673 + <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"/>
44.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
44.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
44.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
44.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
44.1678 + </target>
44.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
44.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
44.1681 + </target>
44.1682 + <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"/>
44.1683 <!--
44.1684 =======================
44.1685 - JUNIT DEBUGGING SECTION
44.1686 + TEST DEBUGGING SECTION
44.1687 =======================
44.1688 -->
44.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
44.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
44.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
44.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
44.1693 - <delete file="${test.report.file}"/>
44.1694 - <mkdir dir="${build.test.results.dir}"/>
44.1695 - <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}">
44.1696 - <customize>
44.1697 - <syspropertyset>
44.1698 - <propertyref prefix="test-sys-prop."/>
44.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
44.1700 - </syspropertyset>
44.1701 - <arg value="${test.class}"/>
44.1702 - <arg value="showoutput=true"/>
44.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
44.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
44.1705 - </customize>
44.1706 - </j2seproject3:debug>
44.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
44.1708 + </target>
44.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
44.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
44.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
44.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
44.1713 </target>
44.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
44.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
44.1716 </target>
44.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
44.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
44.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
44.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
44.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
44.1722 </target>
44.1723 @@ -603,9 +1711,9 @@
44.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
44.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
44.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
44.1727 - <customize>
44.1728 + <customizeDebuggee>
44.1729 <arg value="${applet.url}"/>
44.1730 - </customize>
44.1731 + </customizeDebuggee>
44.1732 </j2seproject3:debug>
44.1733 </target>
44.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
44.1735 @@ -614,14 +1722,49 @@
44.1736 CLEANUP SECTION
44.1737 ===============
44.1738 -->
44.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
44.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
44.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
44.1742 + <delete file="${built-clean.properties}" quiet="true"/>
44.1743 + </target>
44.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
44.1745 + <echo level="warn" message="Cycle detected: instanceof was already built"/>
44.1746 + </target>
44.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
44.1748 + <mkdir dir="${build.dir}"/>
44.1749 + <touch file="${built-clean.properties}" verbose="false"/>
44.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
44.1751 + <antcall target="-warn-already-built-clean"/>
44.1752 + <propertyfile file="${built-clean.properties}">
44.1753 + <entry key="${basedir}" value=""/>
44.1754 + </propertyfile>
44.1755 + </target>
44.1756 <target depends="init" name="-do-clean">
44.1757 <delete dir="${build.dir}"/>
44.1758 - <delete dir="${dist.dir}"/>
44.1759 + <delete dir="${dist.jlink.output}"/>
44.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
44.1761 </target>
44.1762 <target name="-post-clean">
44.1763 <!-- Empty placeholder for easier customization. -->
44.1764 <!-- You can override this target in the ../build.xml file. -->
44.1765 </target>
44.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
44.1767 + <target name="-check-call-dep">
44.1768 + <property file="${call.built.properties}" prefix="already.built."/>
44.1769 + <condition property="should.call.dep">
44.1770 + <and>
44.1771 + <not>
44.1772 + <isset property="already.built.${call.subproject}"/>
44.1773 + </not>
44.1774 + <available file="${call.script}"/>
44.1775 + </and>
44.1776 + </condition>
44.1777 + </target>
44.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
44.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
44.1780 + <propertyset>
44.1781 + <propertyref prefix="transfer."/>
44.1782 + <mapper from="transfer.*" to="*" type="glob"/>
44.1783 + </propertyset>
44.1784 + </ant>
44.1785 + </target>
44.1786 </project>
45.1 --- a/samples/instanceof/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
45.2 +++ b/samples/instanceof/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
45.3 @@ -1,8 +1,8 @@
45.4 build.xml.data.CRC32=a49ad112
45.5 -build.xml.script.CRC32=3267f78e
45.6 -build.xml.stylesheet.CRC32=be360661
45.7 +build.xml.script.CRC32=1e883b21
45.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
45.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
45.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
45.11 nbproject/build-impl.xml.data.CRC32=a49ad112
45.12 -nbproject/build-impl.xml.script.CRC32=bce3fe80
45.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
45.14 +nbproject/build-impl.xml.script.CRC32=07a470b8
45.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
46.1 --- a/samples/instanceof/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
46.2 +++ b/samples/instanceof/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
46.3 @@ -1,59 +1,56 @@
46.4 +#Mon Nov 11 13:15:03 CET 2019
46.5 +excludes=
46.6 +javac.deprecation=false
46.7 +build.test.results.dir=${build.dir}/test/results
46.8 +run.classpath=${javac.classpath}\:${build.classes.dir}
46.9 +javadoc.nonavbar=false
46.10 +javac.test.modulepath=${javac.modulepath}
46.11 +run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
46.12 +javac.target=1.6
46.13 +javadoc.noindex=false
46.14 +javac.processormodulepath=
46.15 +javadoc.additionalparam=
46.16 +includes=**
46.17 build.classes.dir=${build.dir}/classes
46.18 +source.encoding=UTF-8
46.19 +javadoc.author=false
46.20 +test.src.dir=test
46.21 +build.dir=build
46.22 +build.test.classes.dir=${build.dir}/test/classes
46.23 +run.modulepath=${javac.modulepath}
46.24 +platform.active=default_platform
46.25 +javac.compilerargs=
46.26 +dist.jar=${dist.dir}/instanceof.jar
46.27 +javadoc.use=true
46.28 +build.sysclasspath=ignore
46.29 +debug.test.classpath=${run.test.classpath}
46.30 +dist.dir=dist
46.31 build.classes.excludes=**/*.java,**/*.form
46.32 -# This directory is removed when the project is cleaned:
46.33 -build.dir=build
46.34 +javadoc.splitindex=true
46.35 +javadoc.encoding=${source.encoding}
46.36 +javac.source=1.6
46.37 +javac.modulepath=
46.38 +junit.selected.version=3
46.39 +file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
46.40 +debug.classpath=${run.classpath}
46.41 +run.jvmargs=
46.42 +run.test.modulepath=${javac.test.modulepath}
46.43 build.generated.dir=${build.dir}/generated
46.44 -# Only compile against the classpath explicitly listed here:
46.45 -build.sysclasspath=ignore
46.46 -build.test.classes.dir=${build.dir}/test/classes
46.47 -build.test.results.dir=${build.dir}/test/results
46.48 -debug.classpath=\
46.49 - ${run.classpath}
46.50 -debug.test.classpath=\
46.51 - ${run.test.classpath}
46.52 -# This directory is removed when the project is cleaned:
46.53 -dist.dir=dist
46.54 -dist.jar=${dist.dir}/instanceof.jar
46.55 -dist.javadoc.dir=${dist.dir}/javadoc
46.56 -excludes=
46.57 -file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
46.58 -includes=**
46.59 jar.compress=false
46.60 -javac.classpath=
46.61 -# Space-separated list of extra javac options
46.62 -javac.compilerargs=
46.63 -javac.deprecation=false
46.64 -javac.source=1.5
46.65 -javac.target=1.5
46.66 javac.test.classpath=\
46.67 ${javac.classpath}:\
46.68 ${build.classes.dir}:\
46.69 - ${libs.junit.classpath}:\
46.70 ${libs.junit_4.classpath}:\
46.71 - ${file.reference.junit-4.4.jar}
46.72 -javadoc.additionalparam=
46.73 -javadoc.author=false
46.74 -javadoc.encoding=${source.encoding}
46.75 -javadoc.noindex=false
46.76 -javadoc.nonavbar=false
46.77 -javadoc.notree=false
46.78 + ${file.reference.junit-4.4.jar}:\
46.79 + ${libs.hamcrest.classpath}
46.80 javadoc.private=false
46.81 -javadoc.splitindex=true
46.82 -javadoc.use=true
46.83 +debug.test.modulepath=${run.test.modulepath}
46.84 +meta.inf.dir=${src.dir}/META-INF
46.85 +dist.javadoc.dir=${dist.dir}/javadoc
46.86 +src.dir=src
46.87 +debug.modulepath=${run.modulepath}
46.88 +javac.classpath=
46.89 +build.generated.sources.dir=${build.dir}/generated-sources
46.90 javadoc.version=false
46.91 javadoc.windowtitle=
46.92 -meta.inf.dir=${src.dir}/META-INF
46.93 -platform.active=default_platform
46.94 -run.classpath=\
46.95 - ${javac.classpath}:\
46.96 - ${build.classes.dir}
46.97 -# Space-separated list of JVM arguments used when running the project
46.98 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
46.99 -# or test-sys-prop.name=value to set system properties for unit tests):
46.100 -run.jvmargs=
46.101 -run.test.classpath=\
46.102 - ${javac.test.classpath}:\
46.103 - ${build.test.classes.dir}
46.104 -source.encoding=UTF-8
46.105 -src.dir=src
46.106 -test.src.dir=test
46.107 +javadoc.notree=false
47.1 --- a/samples/javabeans/build.xml Mon Nov 11 05:47:32 2019 +0100
47.2 +++ b/samples/javabeans/build.xml Mon Nov 11 13:17:34 2019 +0100
47.3 @@ -2,6 +2,11 @@
47.4 <!-- You may freely edit this file. See commented blocks below for -->
47.5 <!-- some examples of how to customize the build. -->
47.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
47.7 +<!-- By default, only the Clean and Build commands use this build script. -->
47.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
47.9 +<!-- the Compile on Save feature is turned off for the project. -->
47.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
47.11 +<!-- in the project's Project Properties dialog box.-->
47.12 <project name="javabeans" default="default" basedir=".">
47.13 <description>Builds, tests, and runs the project javabeans.</description>
47.14 <import file="nbproject/build-impl.xml"/>
47.15 @@ -46,8 +51,7 @@
47.16 -init-macrodef-junit: defines macro for junit execution
47.17 -init-macrodef-debug: defines macro for class debugging
47.18 -init-macrodef-java: defines macro for class execution
47.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
47.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
47.21 + -do-jar: JAR building
47.22 run: execution of project
47.23 -javadoc-build: Javadoc generation
47.24 test-report: JUnit report generation
48.1 --- a/samples/javabeans/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
48.2 +++ b/samples/javabeans/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
48.3 @@ -12,14 +12,21 @@
48.4 - execution
48.5 - debugging
48.6 - javadoc
48.7 - - junit compilation
48.8 - - junit execution
48.9 - - junit debugging
48.10 + - test compilation
48.11 + - test execution
48.12 + - test debugging
48.13 - applet
48.14 - cleanup
48.15
48.16 -->
48.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="javabeans-impl">
48.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="javabeans-impl">
48.19 + <fail message="Please build using Ant 1.8.0 or higher.">
48.20 + <condition>
48.21 + <not>
48.22 + <antversion atleast="1.8.0"/>
48.23 + </not>
48.24 + </condition>
48.25 + </fail>
48.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
48.27 <!--
48.28 ======================
48.29 @@ -39,28 +46,136 @@
48.30 <property file="${user.properties.file}"/>
48.31 <!-- The two properties below are usually overridden -->
48.32 <!-- by the active platform. Just a fallback. -->
48.33 - <property name="default.javac.source" value="1.4"/>
48.34 - <property name="default.javac.target" value="1.4"/>
48.35 + <property name="default.javac.source" value="1.6"/>
48.36 + <property name="default.javac.target" value="1.6"/>
48.37 </target>
48.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
48.39 <property file="nbproject/configs/${config}.properties"/>
48.40 <property file="nbproject/project.properties"/>
48.41 </target>
48.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
48.43 + <target name="-init-modules-supported">
48.44 + <condition property="modules.supported.internal" value="true">
48.45 + <not>
48.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
48.47 + </not>
48.48 + </condition>
48.49 + </target>
48.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
48.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
48.52 + <attribute name="property"/>
48.53 + <attribute name="sourcepath"/>
48.54 + <sequential>
48.55 + <loadresource property="@{property}" quiet="true">
48.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
48.57 + <filterchain>
48.58 + <stripjavacomments/>
48.59 + <linecontainsregexp>
48.60 + <regexp pattern="module .* \{"/>
48.61 + </linecontainsregexp>
48.62 + <tokenfilter>
48.63 + <linetokenizer/>
48.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
48.65 + </tokenfilter>
48.66 + <striplinebreaks/>
48.67 + </filterchain>
48.68 + </loadresource>
48.69 + </sequential>
48.70 + </macrodef>
48.71 + </target>
48.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
48.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
48.74 + <condition>
48.75 + <not>
48.76 + <antversion atleast="1.10.0"/>
48.77 + </not>
48.78 + </condition>
48.79 + </fail>
48.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
48.81 + <condition property="named.module.internal">
48.82 + <and>
48.83 + <isset property="module.name"/>
48.84 + <length length="0" string="${module.name}" when="greater"/>
48.85 + </and>
48.86 + </condition>
48.87 + <condition property="unnamed.module.internal">
48.88 + <not>
48.89 + <isset property="named.module.internal"/>
48.90 + </not>
48.91 + </condition>
48.92 + <property name="javac.modulepath" value=""/>
48.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
48.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
48.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
48.96 + <property name="javac.upgrademodulepath" value=""/>
48.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
48.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
48.99 + <and>
48.100 + <isset property="javac.systemmodulepath"/>
48.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
48.102 + </and>
48.103 + </condition>
48.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
48.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
48.106 + <property name="module.name" value=""/>
48.107 + </target>
48.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
48.109 + <property name="platform.java" value="${java.home}/bin/java"/>
48.110 <available file="${manifest.file}" property="manifest.available"/>
48.111 - <condition property="manifest.available+main.class">
48.112 + <condition property="splashscreen.available">
48.113 <and>
48.114 - <isset property="manifest.available"/>
48.115 + <not>
48.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
48.117 + </not>
48.118 + <available file="${application.splash}"/>
48.119 + </and>
48.120 + </condition>
48.121 + <condition property="main.class.available">
48.122 + <and>
48.123 <isset property="main.class"/>
48.124 <not>
48.125 <equals arg1="${main.class}" arg2="" trim="true"/>
48.126 </not>
48.127 </and>
48.128 </condition>
48.129 - <condition property="manifest.available+main.class+mkdist.available">
48.130 + <condition property="profile.available">
48.131 <and>
48.132 - <istrue value="${manifest.available+main.class}"/>
48.133 - <isset property="libs.CopyLibs.classpath"/>
48.134 + <isset property="javac.profile"/>
48.135 + <length length="0" string="${javac.profile}" when="greater"/>
48.136 + <not>
48.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
48.138 + </not>
48.139 + </and>
48.140 + </condition>
48.141 + <condition property="do.archive">
48.142 + <or>
48.143 + <not>
48.144 + <istrue value="${jar.archive.disabled}"/>
48.145 + </not>
48.146 + <istrue value="${not.archive.disabled}"/>
48.147 + </or>
48.148 + </condition>
48.149 + <condition property="do.archive+manifest.available">
48.150 + <and>
48.151 + <isset property="manifest.available"/>
48.152 + <istrue value="${do.archive}"/>
48.153 + </and>
48.154 + </condition>
48.155 + <condition property="do.archive+main.class.available">
48.156 + <and>
48.157 + <isset property="main.class.available"/>
48.158 + <istrue value="${do.archive}"/>
48.159 + </and>
48.160 + </condition>
48.161 + <condition property="do.archive+splashscreen.available">
48.162 + <and>
48.163 + <isset property="splashscreen.available"/>
48.164 + <istrue value="${do.archive}"/>
48.165 + </and>
48.166 + </condition>
48.167 + <condition property="do.archive+profile.available">
48.168 + <and>
48.169 + <isset property="profile.available"/>
48.170 + <istrue value="${do.archive}"/>
48.171 </and>
48.172 </condition>
48.173 <condition property="have.tests">
48.174 @@ -86,6 +201,7 @@
48.175 </and>
48.176 </condition>
48.177 <property name="run.jvmargs" value=""/>
48.178 + <property name="run.jvmargs.ide" value=""/>
48.179 <property name="javac.compilerargs" value=""/>
48.180 <property name="work.dir" value="${basedir}"/>
48.181 <condition property="no.deps">
48.182 @@ -97,6 +213,8 @@
48.183 <property name="javadoc.preview" value="true"/>
48.184 <property name="application.args" value=""/>
48.185 <property name="source.encoding" value="${file.encoding}"/>
48.186 + <property name="runtime.encoding" value="${source.encoding}"/>
48.187 + <property name="manifest.encoding" value="${source.encoding}"/>
48.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
48.189 <and>
48.190 <isset property="javadoc.encoding"/>
48.191 @@ -112,12 +230,58 @@
48.192 <condition property="do.depend.true">
48.193 <istrue value="${do.depend}"/>
48.194 </condition>
48.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
48.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
48.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
48.198 <and>
48.199 - <isset property="jaxws.endorsed.dir"/>
48.200 - <available file="nbproject/jaxws-build.xml"/>
48.201 + <isset property="endorsed.classpath"/>
48.202 + <not>
48.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
48.204 + </not>
48.205 </and>
48.206 </condition>
48.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
48.208 + <isset property="profile.available"/>
48.209 + </condition>
48.210 + <condition else="false" property="jdkBug6558476">
48.211 + <and>
48.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
48.213 + <not>
48.214 + <os family="unix"/>
48.215 + </not>
48.216 + </and>
48.217 + </condition>
48.218 + <condition else="false" property="javac.fork">
48.219 + <or>
48.220 + <istrue value="${jdkBug6558476}"/>
48.221 + <istrue value="${javac.external.vm}"/>
48.222 + </or>
48.223 + </condition>
48.224 + <property name="jar.index" value="false"/>
48.225 + <property name="jar.index.metainf" value="${jar.index}"/>
48.226 + <property name="copylibs.rebase" value="true"/>
48.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
48.228 + <condition property="junit.available">
48.229 + <or>
48.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
48.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
48.232 + </or>
48.233 + </condition>
48.234 + <condition property="testng.available">
48.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
48.236 + </condition>
48.237 + <condition property="junit+testng.available">
48.238 + <and>
48.239 + <istrue value="${junit.available}"/>
48.240 + <istrue value="${testng.available}"/>
48.241 + </and>
48.242 + </condition>
48.243 + <condition else="testng" property="testng.mode" value="mixed">
48.244 + <istrue value="${junit+testng.available}"/>
48.245 + </condition>
48.246 + <condition else="" property="testng.debug.mode" value="-mixed">
48.247 + <istrue value="${junit+testng.available}"/>
48.248 + </condition>
48.249 + <property name="java.failonerror" value="true"/>
48.250 </target>
48.251 <target name="-post-init">
48.252 <!-- Empty placeholder for easier customization. -->
48.253 @@ -144,26 +308,152 @@
48.254 </sequential>
48.255 </macrodef>
48.256 </target>
48.257 - <target name="-init-macrodef-javac">
48.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
48.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
48.260 <attribute default="${src.dir}" name="srcdir"/>
48.261 <attribute default="${build.classes.dir}" name="destdir"/>
48.262 <attribute default="${javac.classpath}" name="classpath"/>
48.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
48.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
48.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
48.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
48.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
48.268 <attribute default="${includes}" name="includes"/>
48.269 <attribute default="${excludes}" name="excludes"/>
48.270 <attribute default="${javac.debug}" name="debug"/>
48.271 - <attribute default="" name="sourcepath"/>
48.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
48.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
48.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
48.275 <element name="customize" optional="true"/>
48.276 <sequential>
48.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
48.278 + <condition property="warn.excludes.internal">
48.279 + <and>
48.280 + <isset property="named.module.internal"/>
48.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
48.282 + </and>
48.283 + </condition>
48.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
48.285 + <property location="${build.dir}/empty" name="empty.dir"/>
48.286 + <mkdir dir="${empty.dir}"/>
48.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
48.288 + <condition property="processormodulepath.set">
48.289 + <resourcecount count="0" when="greater">
48.290 + <path>
48.291 + <pathelement path="@{processormodulepath}"/>
48.292 + </path>
48.293 + </resourcecount>
48.294 + </condition>
48.295 + <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}">
48.296 + <src>
48.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
48.298 + <include name="*"/>
48.299 + </dirset>
48.300 + </src>
48.301 <classpath>
48.302 <path path="@{classpath}"/>
48.303 </classpath>
48.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
48.305 + <modulepath>
48.306 + <path path="@{modulepath}"/>
48.307 + </modulepath>
48.308 + <upgrademodulepath>
48.309 + <path path="@{upgrademodulepath}"/>
48.310 + </upgrademodulepath>
48.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
48.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
48.313 + <compilerarg line="${javac.compilerargs}"/>
48.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
48.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
48.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
48.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
48.318 + <compilerarg line="${ap.processors.internal}"/>
48.319 + <compilerarg line="${annotation.processing.processor.options}"/>
48.320 + <compilerarg value="-s"/>
48.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
48.322 + <compilerarg line="${ap.proc.none.internal}"/>
48.323 <customize/>
48.324 </javac>
48.325 </sequential>
48.326 </macrodef>
48.327 + </target>
48.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
48.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
48.330 + <attribute default="${src.dir}" name="srcdir"/>
48.331 + <attribute default="${build.classes.dir}" name="destdir"/>
48.332 + <attribute default="${javac.classpath}" name="classpath"/>
48.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
48.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
48.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
48.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
48.337 + <attribute default="${includes}" name="includes"/>
48.338 + <attribute default="${excludes}" name="excludes"/>
48.339 + <attribute default="${javac.debug}" name="debug"/>
48.340 + <attribute default="${empty.dir}" name="sourcepath"/>
48.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
48.342 + <element name="customize" optional="true"/>
48.343 + <sequential>
48.344 + <property location="${build.dir}/empty" name="empty.dir"/>
48.345 + <mkdir dir="${empty.dir}"/>
48.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
48.347 + <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}">
48.348 + <src>
48.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
48.350 + <include name="*"/>
48.351 + </dirset>
48.352 + </src>
48.353 + <classpath>
48.354 + <path path="@{classpath}"/>
48.355 + </classpath>
48.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
48.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
48.358 + <compilerarg line="${javac.compilerargs}"/>
48.359 + <compilerarg value="-processorpath"/>
48.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
48.361 + <compilerarg line="${ap.processors.internal}"/>
48.362 + <compilerarg line="${annotation.processing.processor.options}"/>
48.363 + <compilerarg value="-s"/>
48.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
48.365 + <compilerarg line="${ap.proc.none.internal}"/>
48.366 + <customize/>
48.367 + </javac>
48.368 + </sequential>
48.369 + </macrodef>
48.370 + </target>
48.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
48.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
48.373 + <attribute default="${src.dir}" name="srcdir"/>
48.374 + <attribute default="${build.classes.dir}" name="destdir"/>
48.375 + <attribute default="${javac.classpath}" name="classpath"/>
48.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
48.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
48.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
48.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
48.380 + <attribute default="${includes}" name="includes"/>
48.381 + <attribute default="${excludes}" name="excludes"/>
48.382 + <attribute default="${javac.debug}" name="debug"/>
48.383 + <attribute default="${empty.dir}" name="sourcepath"/>
48.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
48.385 + <element name="customize" optional="true"/>
48.386 + <sequential>
48.387 + <property location="${build.dir}/empty" name="empty.dir"/>
48.388 + <mkdir dir="${empty.dir}"/>
48.389 + <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}">
48.390 + <src>
48.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
48.392 + <include name="*"/>
48.393 + </dirset>
48.394 + </src>
48.395 + <classpath>
48.396 + <path path="@{classpath}"/>
48.397 + </classpath>
48.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
48.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
48.400 + <compilerarg line="${javac.compilerargs}"/>
48.401 + <customize/>
48.402 + </javac>
48.403 + </sequential>
48.404 + </macrodef>
48.405 + </target>
48.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
48.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
48.408 <attribute default="${src.dir}" name="srcdir"/>
48.409 <attribute default="${build.classes.dir}" name="destdir"/>
48.410 @@ -180,51 +470,383 @@
48.411 <attribute default="${build.classes.dir}" name="destdir"/>
48.412 <sequential>
48.413 <fail unless="javac.includes">Must set javac.includes</fail>
48.414 - <pathconvert pathsep="," property="javac.includes.binary">
48.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
48.416 <path>
48.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
48.418 </path>
48.419 <globmapper from="*.java" to="*.class"/>
48.420 </pathconvert>
48.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
48.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
48.423 <delete>
48.424 - <files includes="${javac.includes.binary}"/>
48.425 + <files includesfile="${javac.includesfile.binary}"/>
48.426 + </delete>
48.427 + <delete>
48.428 + <fileset file="${javac.includesfile.binary}"/>
48.429 </delete>
48.430 </sequential>
48.431 </macrodef>
48.432 </target>
48.433 - <target name="-init-macrodef-junit">
48.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
48.435 + <condition else="false" property="nb.junit.batch" value="true">
48.436 + <and>
48.437 + <istrue value="${junit.available}"/>
48.438 + <not>
48.439 + <isset property="test.method"/>
48.440 + </not>
48.441 + </and>
48.442 + </condition>
48.443 + <condition else="false" property="nb.junit.single" value="true">
48.444 + <and>
48.445 + <istrue value="${junit.available}"/>
48.446 + <isset property="test.method"/>
48.447 + </and>
48.448 + </condition>
48.449 + </target>
48.450 + <target name="-init-test-properties">
48.451 + <property name="test.binaryincludes" value="<nothing>"/>
48.452 + <property name="test.binarytestincludes" value=""/>
48.453 + <property name="test.binaryexcludes" value=""/>
48.454 + </target>
48.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
48.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
48.457 + <attribute default="${includes}" name="includes"/>
48.458 + <attribute default="${excludes}" name="excludes"/>
48.459 + <element name="customizePrototype" optional="true"/>
48.460 + <sequential>
48.461 + <property name="junit.forkmode" value="perTest"/>
48.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
48.463 + <syspropertyset>
48.464 + <propertyref prefix="test-sys-prop."/>
48.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
48.466 + </syspropertyset>
48.467 + <classpath>
48.468 + <path path="${run.test.classpath}"/>
48.469 + </classpath>
48.470 + <modulepath>
48.471 + <path path="${run.test.modulepath}"/>
48.472 + </modulepath>
48.473 + <formatter type="brief" usefile="false"/>
48.474 + <formatter type="xml"/>
48.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
48.476 + <jvmarg value="-ea"/>
48.477 + <jvmarg line="${run.test.jvmargs}"/>
48.478 + <customizePrototype/>
48.479 + </junit>
48.480 + </sequential>
48.481 + </macrodef>
48.482 + </target>
48.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
48.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
48.485 + <attribute default="${includes}" name="includes"/>
48.486 + <attribute default="${excludes}" name="excludes"/>
48.487 + <element name="customizePrototype" optional="true"/>
48.488 + <sequential>
48.489 + <property name="junit.forkmode" value="perTest"/>
48.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
48.491 + <syspropertyset>
48.492 + <propertyref prefix="test-sys-prop."/>
48.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
48.494 + </syspropertyset>
48.495 + <classpath>
48.496 + <path path="${run.test.classpath}"/>
48.497 + </classpath>
48.498 + <formatter type="brief" usefile="false"/>
48.499 + <formatter type="xml"/>
48.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
48.501 + <jvmarg value="-ea"/>
48.502 + <customizePrototype/>
48.503 + </junit>
48.504 + </sequential>
48.505 + </macrodef>
48.506 + </target>
48.507 + <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}">
48.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
48.509 <attribute default="${includes}" name="includes"/>
48.510 <attribute default="${excludes}" name="excludes"/>
48.511 <attribute default="**" name="testincludes"/>
48.512 + <attribute default="" name="testmethods"/>
48.513 + <element name="customize" optional="true"/>
48.514 <sequential>
48.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
48.516 - <batchtest todir="${build.test.results.dir}">
48.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
48.518 - <filename name="@{testincludes}"/>
48.519 - </fileset>
48.520 - </batchtest>
48.521 + <j2seproject3:junit-prototype>
48.522 + <customizePrototype>
48.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
48.524 + <customize/>
48.525 + </customizePrototype>
48.526 + </j2seproject3:junit-prototype>
48.527 + </sequential>
48.528 + </macrodef>
48.529 + </target>
48.530 + <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}">
48.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
48.532 + <attribute default="${includes}" name="includes"/>
48.533 + <attribute default="${excludes}" name="excludes"/>
48.534 + <attribute default="**" name="testincludes"/>
48.535 + <attribute default="" name="testmethods"/>
48.536 + <element name="customize" optional="true"/>
48.537 + <sequential>
48.538 + <j2seproject3:junit-prototype>
48.539 + <customizePrototype>
48.540 + <batchtest todir="${build.test.results.dir}">
48.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
48.542 + <filename name="@{testincludes}"/>
48.543 + </fileset>
48.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
48.545 + <filename name="${test.binarytestincludes}"/>
48.546 + </fileset>
48.547 + </batchtest>
48.548 + <customize/>
48.549 + </customizePrototype>
48.550 + </j2seproject3:junit-prototype>
48.551 + </sequential>
48.552 + </macrodef>
48.553 + </target>
48.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
48.555 + <target if="${testng.available}" name="-init-macrodef-testng">
48.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
48.557 + <attribute default="${includes}" name="includes"/>
48.558 + <attribute default="${excludes}" name="excludes"/>
48.559 + <attribute default="**" name="testincludes"/>
48.560 + <attribute default="" name="testmethods"/>
48.561 + <element name="customize" optional="true"/>
48.562 + <sequential>
48.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
48.564 + <isset property="test.method"/>
48.565 + </condition>
48.566 + <union id="test.set">
48.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
48.568 + <filename name="@{testincludes}"/>
48.569 + </fileset>
48.570 + </union>
48.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
48.572 + <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="javabeans" testname="TestNG tests" workingDir="${work.dir}">
48.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
48.574 + <propertyset>
48.575 + <propertyref prefix="test-sys-prop."/>
48.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
48.577 + </propertyset>
48.578 <classpath>
48.579 <path path="${run.test.classpath}"/>
48.580 </classpath>
48.581 - <syspropertyset>
48.582 - <propertyref prefix="test-sys-prop."/>
48.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
48.584 - </syspropertyset>
48.585 - <formatter type="brief" usefile="false"/>
48.586 - <formatter type="xml"/>
48.587 - <jvmarg line="${run.jvmargs}"/>
48.588 - </junit>
48.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
48.590 + <customize/>
48.591 + </testng>
48.592 </sequential>
48.593 </macrodef>
48.594 </target>
48.595 - <target name="-init-macrodef-nbjpda">
48.596 + <target name="-init-macrodef-test-impl">
48.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
48.598 + <attribute default="${includes}" name="includes"/>
48.599 + <attribute default="${excludes}" name="excludes"/>
48.600 + <attribute default="**" name="testincludes"/>
48.601 + <attribute default="" name="testmethods"/>
48.602 + <element implicit="true" name="customize" optional="true"/>
48.603 + <sequential>
48.604 + <echo>No tests executed.</echo>
48.605 + </sequential>
48.606 + </macrodef>
48.607 + </target>
48.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
48.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
48.610 + <attribute default="${includes}" name="includes"/>
48.611 + <attribute default="${excludes}" name="excludes"/>
48.612 + <attribute default="**" name="testincludes"/>
48.613 + <attribute default="" name="testmethods"/>
48.614 + <element implicit="true" name="customize" optional="true"/>
48.615 + <sequential>
48.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
48.617 + <customize/>
48.618 + </j2seproject3:junit>
48.619 + </sequential>
48.620 + </macrodef>
48.621 + </target>
48.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
48.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
48.624 + <attribute default="${includes}" name="includes"/>
48.625 + <attribute default="${excludes}" name="excludes"/>
48.626 + <attribute default="**" name="testincludes"/>
48.627 + <attribute default="" name="testmethods"/>
48.628 + <element implicit="true" name="customize" optional="true"/>
48.629 + <sequential>
48.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
48.631 + <customize/>
48.632 + </j2seproject3:testng>
48.633 + </sequential>
48.634 + </macrodef>
48.635 + </target>
48.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
48.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
48.638 + <attribute default="${includes}" name="includes"/>
48.639 + <attribute default="${excludes}" name="excludes"/>
48.640 + <attribute default="**" name="testincludes"/>
48.641 + <attribute default="" name="testmethods"/>
48.642 + <sequential>
48.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
48.644 + <customize>
48.645 + <jvmarg line="${run.jvmargs}"/>
48.646 + <jvmarg line="${run.jvmargs.ide}"/>
48.647 + </customize>
48.648 + </j2seproject3:test-impl>
48.649 + </sequential>
48.650 + </macrodef>
48.651 + </target>
48.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
48.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
48.654 + <attribute default="${includes}" name="includes"/>
48.655 + <attribute default="${excludes}" name="excludes"/>
48.656 + <attribute default="**" name="testincludes"/>
48.657 + <attribute default="" name="testmethods"/>
48.658 + <element name="customizeDebuggee" optional="true"/>
48.659 + <sequential>
48.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
48.661 + <customize>
48.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
48.663 + <customizeDebuggee/>
48.664 + </customize>
48.665 + </j2seproject3:junit>
48.666 + </sequential>
48.667 + </macrodef>
48.668 + </target>
48.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
48.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
48.671 + <attribute default="${main.class}" name="testClass"/>
48.672 + <attribute default="" name="testMethod"/>
48.673 + <element name="customize2" optional="true"/>
48.674 + <sequential>
48.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
48.676 + <isset property="test.method"/>
48.677 + </condition>
48.678 + <condition else="-suitename javabeans -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
48.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
48.680 + </condition>
48.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
48.682 + <mkdir dir="${build.test.results.dir}"/>
48.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
48.684 + <customizeDebuggee>
48.685 + <customize2/>
48.686 + <jvmarg value="-ea"/>
48.687 + <arg line="${testng.debug.mode}"/>
48.688 + <arg line="-d ${build.test.results.dir}"/>
48.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
48.690 + <arg line="${testng.cmd.args}"/>
48.691 + </customizeDebuggee>
48.692 + </j2seproject3:debug>
48.693 + </sequential>
48.694 + </macrodef>
48.695 + </target>
48.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
48.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
48.698 + <attribute default="${main.class}" name="testClass"/>
48.699 + <attribute default="" name="testMethod"/>
48.700 + <element implicit="true" name="customize2" optional="true"/>
48.701 + <sequential>
48.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
48.703 + <customize2/>
48.704 + </j2seproject3:testng-debug>
48.705 + </sequential>
48.706 + </macrodef>
48.707 + </target>
48.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
48.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
48.710 + <attribute default="${includes}" name="includes"/>
48.711 + <attribute default="${excludes}" name="excludes"/>
48.712 + <attribute default="**" name="testincludes"/>
48.713 + <attribute default="" name="testmethods"/>
48.714 + <attribute default="${main.class}" name="testClass"/>
48.715 + <attribute default="" name="testMethod"/>
48.716 + <sequential>
48.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
48.718 + <customizeDebuggee>
48.719 + <jvmarg line="${run.jvmargs}"/>
48.720 + <jvmarg line="${run.jvmargs.ide}"/>
48.721 + </customizeDebuggee>
48.722 + </j2seproject3:test-debug-impl>
48.723 + </sequential>
48.724 + </macrodef>
48.725 + </target>
48.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
48.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
48.728 + <attribute default="${includes}" name="includes"/>
48.729 + <attribute default="${excludes}" name="excludes"/>
48.730 + <attribute default="**" name="testincludes"/>
48.731 + <attribute default="" name="testmethods"/>
48.732 + <attribute default="${main.class}" name="testClass"/>
48.733 + <attribute default="" name="testMethod"/>
48.734 + <sequential>
48.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
48.736 + <customize2>
48.737 + <syspropertyset>
48.738 + <propertyref prefix="test-sys-prop."/>
48.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
48.740 + </syspropertyset>
48.741 + </customize2>
48.742 + </j2seproject3:testng-debug-impl>
48.743 + </sequential>
48.744 + </macrodef>
48.745 + </target>
48.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
48.747 + <!--
48.748 + pre NB7.2 profiling section; consider it deprecated
48.749 + -->
48.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
48.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
48.752 + <!-- Empty placeholder for easier customization. -->
48.753 + <!-- You can override this target in the ../build.xml file. -->
48.754 + </target>
48.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
48.756 + <!-- Empty placeholder for easier customization. -->
48.757 + <!-- You can override this target in the ../build.xml file. -->
48.758 + </target>
48.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
48.760 + <macrodef name="resolve">
48.761 + <attribute name="name"/>
48.762 + <attribute name="value"/>
48.763 + <sequential>
48.764 + <property name="@{name}" value="${env.@{value}}"/>
48.765 + </sequential>
48.766 + </macrodef>
48.767 + <macrodef name="profile">
48.768 + <attribute default="${main.class}" name="classname"/>
48.769 + <element name="customize" optional="true"/>
48.770 + <sequential>
48.771 + <property environment="env"/>
48.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
48.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
48.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
48.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
48.776 + <jvmarg line="${profiler.info.jvmargs}"/>
48.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
48.778 + <arg line="${application.args}"/>
48.779 + <classpath>
48.780 + <path path="${run.classpath}"/>
48.781 + </classpath>
48.782 + <syspropertyset>
48.783 + <propertyref prefix="run-sys-prop."/>
48.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
48.785 + </syspropertyset>
48.786 + <customize/>
48.787 + </java>
48.788 + </sequential>
48.789 + </macrodef>
48.790 + </target>
48.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
48.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
48.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
48.794 + </target>
48.795 + <!--
48.796 + end of pre NB7.2 profiling section
48.797 + -->
48.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
48.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
48.800 <attribute default="${main.class}" name="name"/>
48.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
48.802 <attribute default="${debug.classpath}" name="classpath"/>
48.803 <attribute default="" name="stopclassname"/>
48.804 <sequential>
48.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
48.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
48.807 + <modulepath>
48.808 + <path path="@{modulepath}"/>
48.809 + </modulepath>
48.810 <classpath>
48.811 <path path="@{classpath}"/>
48.812 </classpath>
48.813 @@ -235,35 +857,120 @@
48.814 <attribute default="${build.classes.dir}" name="dir"/>
48.815 <sequential>
48.816 <nbjpdareload>
48.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
48.818 + <fileset dir="@{dir}" includes="${fix.classes}">
48.819 + <include name="${fix.includes}*.class"/>
48.820 + </fileset>
48.821 </nbjpdareload>
48.822 </sequential>
48.823 </macrodef>
48.824 </target>
48.825 <target name="-init-debug-args">
48.826 - <property name="version-output" value="java version "${ant.java.version}"/>
48.827 - <condition property="have-jdk-older-than-1.4">
48.828 - <or>
48.829 - <contains string="${version-output}" substring="java version "1.0"/>
48.830 - <contains string="${version-output}" substring="java version "1.1"/>
48.831 - <contains string="${version-output}" substring="java version "1.2"/>
48.832 - <contains string="${version-output}" substring="java version "1.3"/>
48.833 - </or>
48.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
48.835 + <os family="windows"/>
48.836 </condition>
48.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
48.838 - <istrue value="${have-jdk-older-than-1.4}"/>
48.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
48.840 + <isset property="debug.transport"/>
48.841 </condition>
48.842 </target>
48.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
48.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
48.845 + <attribute default="${module.name}" name="modulename"/>
48.846 <attribute default="${main.class}" name="classname"/>
48.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
48.848 <attribute default="${debug.classpath}" name="classpath"/>
48.849 + <element name="customizeDebuggee" optional="true"/>
48.850 + <sequential>
48.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
48.852 + <customize>
48.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
48.854 + <customizeDebuggee/>
48.855 + </customize>
48.856 + </j2seproject1:java>
48.857 + </sequential>
48.858 + </macrodef>
48.859 + </target>
48.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
48.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
48.862 + <attribute default="${module.name}" name="modulename"/>
48.863 + <attribute default="${main.class}" name="classname"/>
48.864 + <attribute default="${run.modulepath}" name="modulepath"/>
48.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
48.866 + <attribute default="${run.classpath}" name="classpath"/>
48.867 + <attribute default="jvm" name="jvm"/>
48.868 <element name="customize" optional="true"/>
48.869 <sequential>
48.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
48.871 - <jvmarg line="${debug-args-line}"/>
48.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
48.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
48.874 + <classpath>
48.875 + <path path="@{classpath}"/>
48.876 + </classpath>
48.877 + <modulepath>
48.878 + <pathelement path="@{modulepath}"/>
48.879 + <pathelement location="${module.build.classes.dir}"/>
48.880 + </modulepath>
48.881 + <upgrademodulepath>
48.882 + <path path="@{upgrademodulepath}"/>
48.883 + </upgrademodulepath>
48.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
48.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
48.886 <jvmarg line="${run.jvmargs}"/>
48.887 + <jvmarg line="${run.jvmargs.ide}"/>
48.888 + <syspropertyset>
48.889 + <propertyref prefix="run-sys-prop."/>
48.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
48.891 + </syspropertyset>
48.892 + <customize/>
48.893 + </java>
48.894 + </sequential>
48.895 + </macrodef>
48.896 + </target>
48.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
48.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
48.899 + <attribute default="" name="modulename"/>
48.900 + <attribute default="${main.class}" name="classname"/>
48.901 + <attribute default="${run.modulepath}" name="modulepath"/>
48.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
48.903 + <attribute default="${run.classpath}" name="classpath"/>
48.904 + <attribute default="jvm" name="jvm"/>
48.905 + <element name="customize" optional="true"/>
48.906 + <sequential>
48.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
48.908 + <classpath>
48.909 + <path path="@{classpath}"/>
48.910 + </classpath>
48.911 + <modulepath>
48.912 + <path path="@{modulepath}"/>
48.913 + </modulepath>
48.914 + <upgrademodulepath>
48.915 + <path path="@{upgrademodulepath}"/>
48.916 + </upgrademodulepath>
48.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
48.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
48.919 + <jvmarg line="${run.jvmargs}"/>
48.920 + <jvmarg line="${run.jvmargs.ide}"/>
48.921 + <syspropertyset>
48.922 + <propertyref prefix="run-sys-prop."/>
48.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
48.924 + </syspropertyset>
48.925 + <customize/>
48.926 + </java>
48.927 + </sequential>
48.928 + </macrodef>
48.929 + </target>
48.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
48.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
48.932 + <attribute default="" name="modulename"/>
48.933 + <attribute default="${main.class}" name="classname"/>
48.934 + <attribute default="" name="modulepath"/>
48.935 + <attribute default="${run.classpath}" name="classpath"/>
48.936 + <attribute default="jvm" name="jvm"/>
48.937 + <element name="customize" optional="true"/>
48.938 + <sequential>
48.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
48.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
48.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
48.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
48.943 + <jvmarg line="${run.jvmargs}"/>
48.944 + <jvmarg line="${run.jvmargs.ide}"/>
48.945 <classpath>
48.946 <path path="@{classpath}"/>
48.947 </classpath>
48.948 @@ -276,39 +983,100 @@
48.949 </sequential>
48.950 </macrodef>
48.951 </target>
48.952 - <target name="-init-macrodef-java">
48.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
48.954 - <attribute default="${main.class}" name="classname"/>
48.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
48.956 + <target name="-init-macrodef-copylibs">
48.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
48.958 + <attribute default="${manifest.file}" name="manifest"/>
48.959 <element name="customize" optional="true"/>
48.960 <sequential>
48.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
48.962 - <jvmarg line="${run.jvmargs}"/>
48.963 - <classpath>
48.964 - <path path="${run.classpath}"/>
48.965 - </classpath>
48.966 - <syspropertyset>
48.967 - <propertyref prefix="run-sys-prop."/>
48.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
48.969 - </syspropertyset>
48.970 - <customize/>
48.971 - </java>
48.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
48.973 + <pathconvert property="run.classpath.without.build.classes.dir">
48.974 + <path path="${run.classpath}"/>
48.975 + <map from="${build.classes.dir.resolved}" to=""/>
48.976 + </pathconvert>
48.977 + <pathconvert pathsep=" " property="jar.classpath">
48.978 + <path path="${run.classpath.without.build.classes.dir}"/>
48.979 + <chainedmapper>
48.980 + <flattenmapper/>
48.981 + <filtermapper>
48.982 + <replacestring from=" " to="%20"/>
48.983 + </filtermapper>
48.984 + <globmapper from="*" to="lib/*"/>
48.985 + </chainedmapper>
48.986 + </pathconvert>
48.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
48.988 + <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}">
48.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
48.990 + <manifest>
48.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
48.992 + <customize/>
48.993 + </manifest>
48.994 + </copylibs>
48.995 </sequential>
48.996 </macrodef>
48.997 </target>
48.998 <target name="-init-presetdef-jar">
48.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
48.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
48.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
48.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
48.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
48.1004 </jar>
48.1005 </presetdef>
48.1006 </target>
48.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
48.1008 + <target name="-init-ap-cmdline-properties">
48.1009 + <property name="annotation.processing.enabled" value="true"/>
48.1010 + <property name="annotation.processing.processors.list" value=""/>
48.1011 + <property name="annotation.processing.processor.options" value=""/>
48.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
48.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
48.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
48.1015 + <condition property="ap.supported.internal" value="true">
48.1016 + <not>
48.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
48.1018 + </not>
48.1019 + </condition>
48.1020 + </target>
48.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
48.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
48.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
48.1024 + </condition>
48.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
48.1026 + <isfalse value="${annotation.processing.enabled}"/>
48.1027 + </condition>
48.1028 + </target>
48.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
48.1030 + <property name="ap.cmd.line.internal" value=""/>
48.1031 + </target>
48.1032 + <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"/>
48.1033 <!--
48.1034 ===================
48.1035 COMPILATION SECTION
48.1036 ===================
48.1037 -->
48.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
48.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
48.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
48.1041 + <delete file="${built-jar.properties}" quiet="true"/>
48.1042 + </target>
48.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
48.1044 + <echo level="warn" message="Cycle detected: javabeans was already built"/>
48.1045 + </target>
48.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
48.1047 + <mkdir dir="${build.dir}"/>
48.1048 + <touch file="${built-jar.properties}" verbose="false"/>
48.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
48.1050 + <antcall target="-warn-already-built-jar"/>
48.1051 + <propertyfile file="${built-jar.properties}">
48.1052 + <entry key="${basedir}" value=""/>
48.1053 + </propertyfile>
48.1054 + </target>
48.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
48.1056 + <target depends="init" name="-check-automatic-build">
48.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
48.1058 + </target>
48.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
48.1060 + <antcall target="clean">
48.1061 + <param name="no.dependencies" value="true"/>
48.1062 + </antcall>
48.1063 + </target>
48.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
48.1065 <mkdir dir="${build.classes.dir}"/>
48.1066 </target>
48.1067 @@ -317,19 +1085,30 @@
48.1068 <!-- You can override this target in the ../build.xml file. -->
48.1069 </target>
48.1070 <target if="do.depend.true" name="-compile-depend">
48.1071 - <j2seproject3:depend/>
48.1072 + <pathconvert property="build.generated.subdirs">
48.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
48.1074 + <include name="*"/>
48.1075 + </dirset>
48.1076 + </pathconvert>
48.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
48.1078 </target>
48.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
48.1080 - <j2seproject3:javac/>
48.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
48.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
48.1083 <copy todir="${build.classes.dir}">
48.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
48.1085 </copy>
48.1086 </target>
48.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
48.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
48.1089 + <copy todir="${build.classes.dir}/META-INF">
48.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
48.1091 + </copy>
48.1092 + </target>
48.1093 <target name="-post-compile">
48.1094 <!-- Empty placeholder for easier customization. -->
48.1095 <!-- You can override this target in the ../build.xml file. -->
48.1096 </target>
48.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
48.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
48.1099 <target name="-pre-compile-single">
48.1100 <!-- Empty placeholder for easier customization. -->
48.1101 <!-- You can override this target in the ../build.xml file. -->
48.1102 @@ -337,13 +1116,13 @@
48.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
48.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
48.1105 <j2seproject3:force-recompile/>
48.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
48.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
48.1108 </target>
48.1109 <target name="-post-compile-single">
48.1110 <!-- Empty placeholder for easier customization. -->
48.1111 <!-- You can override this target in the ../build.xml file. -->
48.1112 </target>
48.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
48.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
48.1115 <!--
48.1116 ====================
48.1117 JAR BUILDING SECTION
48.1118 @@ -357,57 +1136,191 @@
48.1119 <!-- Empty placeholder for easier customization. -->
48.1120 <!-- You can override this target in the ../build.xml file. -->
48.1121 </target>
48.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
48.1123 - <j2seproject1:jar/>
48.1124 + <target depends="init,compile" name="-check-module-main-class">
48.1125 + <pathconvert property="main.class.file">
48.1126 + <string value="${main.class}"/>
48.1127 + <unpackagemapper from="*" to="*.class"/>
48.1128 + </pathconvert>
48.1129 + <condition property="do.module.main.class">
48.1130 + <and>
48.1131 + <isset property="main.class.available"/>
48.1132 + <available file="${build.classes.dir}/module-info.class"/>
48.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
48.1134 + <isset property="libs.CopyLibs.classpath"/>
48.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
48.1136 + </and>
48.1137 + </condition>
48.1138 </target>
48.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
48.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
48.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
48.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
48.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
48.1144 </target>
48.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
48.1146 - <j2seproject1:jar manifest="${manifest.file}">
48.1147 - <j2seproject1:manifest>
48.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
48.1149 - </j2seproject1:manifest>
48.1150 - </j2seproject1:jar>
48.1151 - <echo>To run this application from the command line without Ant, try:</echo>
48.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
48.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
48.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
48.1155 + </target>
48.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
48.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
48.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
48.1159 + </target>
48.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
48.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
48.1162 + <attribute name="Main-Class" value="${main.class}"/>
48.1163 + </manifest>
48.1164 + </target>
48.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
48.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
48.1167 + <attribute name="Profile" value="${javac.profile}"/>
48.1168 + </manifest>
48.1169 + </target>
48.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
48.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
48.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
48.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
48.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
48.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
48.1176 + </manifest>
48.1177 + </target>
48.1178 + <target depends="init,compile" name="-check-do-mkdist">
48.1179 + <condition property="do.mkdist">
48.1180 + <and>
48.1181 + <isset property="do.archive"/>
48.1182 + <isset property="libs.CopyLibs.classpath"/>
48.1183 + <not>
48.1184 + <istrue value="${mkdist.disabled}"/>
48.1185 + </not>
48.1186 + <not>
48.1187 + <available file="${build.classes.dir}/module-info.class"/>
48.1188 + </not>
48.1189 + </and>
48.1190 + </condition>
48.1191 + </target>
48.1192 + <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">
48.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
48.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
48.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
48.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
48.1197 + </target>
48.1198 + <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">
48.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
48.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
48.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
48.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
48.1203 + <isset property="named.module.internal"/>
48.1204 + </condition>
48.1205 <pathconvert property="run.classpath.with.dist.jar">
48.1206 <path path="${run.classpath}"/>
48.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
48.1208 + </pathconvert>
48.1209 + <pathconvert property="run.modulepath.with.dist.jar">
48.1210 + <path location="${dist.jar.resolved}"/>
48.1211 + <path path="${run.modulepath}"/>
48.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
48.1213 </pathconvert>
48.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
48.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
48.1216 + <isset property="named.module.internal"/>
48.1217 + </condition>
48.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
48.1219 + <and>
48.1220 + <isset property="modules.supported.internal"/>
48.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
48.1222 + </and>
48.1223 + </condition>
48.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
48.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
48.1226 + </condition>
48.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
48.1228 + <isset property="do.module.main.class"/>
48.1229 + </condition>
48.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
48.1231 + <isset property="named.module.internal"/>
48.1232 + </condition>
48.1233 + <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}">
48.1234 + <isset property="main.class.available"/>
48.1235 + </condition>
48.1236 + <condition else="debug" property="jar.usage.level" value="info">
48.1237 + <isset property="main.class.available"/>
48.1238 + </condition>
48.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
48.1240 </target>
48.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
48.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
48.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
48.1244 - <path path="${run.classpath}"/>
48.1245 - <map from="${build.classes.dir.resolved}" to=""/>
48.1246 - </pathconvert>
48.1247 - <pathconvert pathsep=" " property="jar.classpath">
48.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
48.1249 - <chainedmapper>
48.1250 - <flattenmapper/>
48.1251 - <globmapper from="*" to="lib/*"/>
48.1252 - </chainedmapper>
48.1253 - </pathconvert>
48.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
48.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
48.1256 - <fileset dir="${build.classes.dir}"/>
48.1257 - <manifest>
48.1258 - <attribute name="Main-Class" value="${main.class}"/>
48.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
48.1260 - </manifest>
48.1261 - </copylibs>
48.1262 - <echo>To run this application from the command line without Ant, try:</echo>
48.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
48.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
48.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
48.1266 + <delete>
48.1267 + <fileset file="${tmp.manifest.file}"/>
48.1268 + </delete>
48.1269 </target>
48.1270 + <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"/>
48.1271 + <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"/>
48.1272 <target name="-post-jar">
48.1273 <!-- Empty placeholder for easier customization. -->
48.1274 <!-- You can override this target in the ../build.xml file. -->
48.1275 </target>
48.1276 - <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"/>
48.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
48.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
48.1279 + <!--
48.1280 + =================
48.1281 + DEPLOY SECTION
48.1282 + =================
48.1283 + -->
48.1284 + <target name="-pre-deploy">
48.1285 + <!-- Empty placeholder for easier customization. -->
48.1286 + <!-- You can override this target in the ../build.xml file. -->
48.1287 + </target>
48.1288 + <target depends="init" name="-check-jlink">
48.1289 + <condition property="do.jlink.internal">
48.1290 + <and>
48.1291 + <istrue value="${do.jlink}"/>
48.1292 + <isset property="do.archive"/>
48.1293 + <isset property="named.module.internal"/>
48.1294 + </and>
48.1295 + </condition>
48.1296 + </target>
48.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
48.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
48.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
48.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
48.1301 + <and>
48.1302 + <isset property="jlink.additionalmodules"/>
48.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
48.1304 + </and>
48.1305 + </condition>
48.1306 + <condition property="jlink.do.strip.internal">
48.1307 + <and>
48.1308 + <isset property="jlink.strip"/>
48.1309 + <istrue value="${jlink.strip}"/>
48.1310 + </and>
48.1311 + </condition>
48.1312 + <condition property="jlink.do.additionalparam.internal">
48.1313 + <and>
48.1314 + <isset property="jlink.additionalparam"/>
48.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
48.1316 + </and>
48.1317 + </condition>
48.1318 + <condition property="jlink.do.launcher.internal">
48.1319 + <and>
48.1320 + <istrue value="${jlink.launcher}"/>
48.1321 + <isset property="main.class.available"/>
48.1322 + </and>
48.1323 + </condition>
48.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
48.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
48.1326 + <exec executable="${platform.jlink}">
48.1327 + <arg value="--module-path"/>
48.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
48.1329 + <arg value="--add-modules"/>
48.1330 + <arg value="${jlink.add.modules}"/>
48.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
48.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
48.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
48.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
48.1335 + <arg value="--output"/>
48.1336 + <arg value="${dist.jlink.output}"/>
48.1337 + </exec>
48.1338 + </target>
48.1339 + <target name="-post-deploy">
48.1340 + <!-- Empty placeholder for easier customization. -->
48.1341 + <!-- You can override this target in the ../build.xml file. -->
48.1342 + </target>
48.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
48.1344 <!--
48.1345 =================
48.1346 EXECUTION SECTION
48.1347 @@ -423,10 +1336,14 @@
48.1348 <target name="-do-not-recompile">
48.1349 <property name="javac.includes.binary" value=""/>
48.1350 </target>
48.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
48.1352 + <target depends="init,compile-single" name="run-single">
48.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
48.1354 <j2seproject1:java classname="${run.class}"/>
48.1355 </target>
48.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
48.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
48.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
48.1359 + </target>
48.1360 <!--
48.1361 =================
48.1362 DEBUGGING SECTION
48.1363 @@ -435,11 +1352,14 @@
48.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
48.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
48.1366 </target>
48.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
48.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
48.1369 + </target>
48.1370 <target depends="init,compile" name="-debug-start-debuggee">
48.1371 <j2seproject3:debug>
48.1372 - <customize>
48.1373 + <customizeDebuggee>
48.1374 <arg line="${application.args}"/>
48.1375 - </customize>
48.1376 + </customizeDebuggee>
48.1377 </j2seproject3:debug>
48.1378 </target>
48.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
48.1380 @@ -451,7 +1371,12 @@
48.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
48.1382 <j2seproject3:debug classname="${debug.class}"/>
48.1383 </target>
48.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
48.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
48.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
48.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
48.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
48.1389 + </target>
48.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
48.1391 <target depends="init" name="-pre-debug-fix">
48.1392 <fail unless="fix.includes">Must set fix.includes</fail>
48.1393 <property name="javac.includes" value="${fix.includes}.java"/>
48.1394 @@ -461,20 +1386,146 @@
48.1395 </target>
48.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
48.1397 <!--
48.1398 + =================
48.1399 + PROFILING SECTION
48.1400 + =================
48.1401 + -->
48.1402 + <!--
48.1403 + pre NB7.2 profiler integration
48.1404 + -->
48.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
48.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
48.1407 + <nbprofiledirect>
48.1408 + <classpath>
48.1409 + <path path="${run.classpath}"/>
48.1410 + </classpath>
48.1411 + </nbprofiledirect>
48.1412 + <profile/>
48.1413 + </target>
48.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
48.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
48.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
48.1417 + <nbprofiledirect>
48.1418 + <classpath>
48.1419 + <path path="${run.classpath}"/>
48.1420 + </classpath>
48.1421 + </nbprofiledirect>
48.1422 + <profile classname="${profile.class}"/>
48.1423 + </target>
48.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
48.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
48.1426 + <nbprofiledirect>
48.1427 + <classpath>
48.1428 + <path path="${run.classpath}"/>
48.1429 + </classpath>
48.1430 + </nbprofiledirect>
48.1431 + <profile classname="sun.applet.AppletViewer">
48.1432 + <customize>
48.1433 + <arg value="${applet.url}"/>
48.1434 + </customize>
48.1435 + </profile>
48.1436 + </target>
48.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
48.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
48.1439 + <nbprofiledirect>
48.1440 + <classpath>
48.1441 + <path path="${run.test.classpath}"/>
48.1442 + </classpath>
48.1443 + </nbprofiledirect>
48.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
48.1445 + <customize>
48.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
48.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
48.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
48.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
48.1450 + <classpath>
48.1451 + <path path="${run.test.classpath}"/>
48.1452 + </classpath>
48.1453 + </customize>
48.1454 + </j2seproject3:junit>
48.1455 + </target>
48.1456 + <!--
48.1457 + end of pre NB72 profiling section
48.1458 + -->
48.1459 + <target if="netbeans.home" name="-profile-check">
48.1460 + <condition property="profiler.configured">
48.1461 + <or>
48.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
48.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
48.1464 + </or>
48.1465 + </condition>
48.1466 + </target>
48.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
48.1468 + <startprofiler/>
48.1469 + <antcall target="run"/>
48.1470 + </target>
48.1471 + <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">
48.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
48.1473 + <startprofiler/>
48.1474 + <antcall target="run-single"/>
48.1475 + </target>
48.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
48.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
48.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
48.1479 + <startprofiler/>
48.1480 + <antcall target="test-single"/>
48.1481 + </target>
48.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
48.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
48.1484 + <startprofiler/>
48.1485 + <antcall target="run-test-with-main"/>
48.1486 + </target>
48.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
48.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
48.1489 + <startprofiler/>
48.1490 + <antcall target="run-applet"/>
48.1491 + </target>
48.1492 + <!--
48.1493 ===============
48.1494 JAVADOC SECTION
48.1495 ===============
48.1496 -->
48.1497 - <target depends="init" name="-javadoc-build">
48.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
48.1499 <mkdir dir="${dist.javadoc.dir}"/>
48.1500 - <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}">
48.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
48.1502 + <and>
48.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
48.1504 + <not>
48.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
48.1506 + </not>
48.1507 + </and>
48.1508 + </condition>
48.1509 + <condition else="" property="bug5101868workaround" value="*.java">
48.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
48.1511 + </condition>
48.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
48.1513 + <and>
48.1514 + <isset property="javadoc.html5"/>
48.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
48.1516 + </and>
48.1517 + </condition>
48.1518 + <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}">
48.1519 <classpath>
48.1520 <path path="${javac.classpath}"/>
48.1521 </classpath>
48.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
48.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
48.1524 <filename name="**/*.java"/>
48.1525 </fileset>
48.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
48.1527 + <include name="**/*.java"/>
48.1528 + <exclude name="*.java"/>
48.1529 + </fileset>
48.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
48.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
48.1532 </javadoc>
48.1533 + <copy todir="${dist.javadoc.dir}">
48.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
48.1535 + <filename name="**/doc-files/**"/>
48.1536 + </fileset>
48.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
48.1538 + <include name="**/doc-files/**"/>
48.1539 + </fileset>
48.1540 + </copy>
48.1541 </target>
48.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
48.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
48.1544 @@ -482,7 +1533,7 @@
48.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
48.1546 <!--
48.1547 =========================
48.1548 - JUNIT COMPILATION SECTION
48.1549 + TEST COMPILATION SECTION
48.1550 =========================
48.1551 -->
48.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
48.1553 @@ -492,11 +1543,63 @@
48.1554 <!-- Empty placeholder for easier customization. -->
48.1555 <!-- You can override this target in the ../build.xml file. -->
48.1556 </target>
48.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
48.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
48.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
48.1560 + <and>
48.1561 + <isset property="test.module.name"/>
48.1562 + <length length="0" string="${test.module.name}" when="greater"/>
48.1563 + </and>
48.1564 + </condition>
48.1565 + <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">
48.1566 + <and>
48.1567 + <isset property="test.module.name"/>
48.1568 + <length length="0" string="${test.module.name}" when="greater"/>
48.1569 + </and>
48.1570 + </condition>
48.1571 + </target>
48.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
48.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
48.1574 + <and>
48.1575 + <isset property="test.module.name"/>
48.1576 + <length length="0" string="${test.module.name}" when="greater"/>
48.1577 + </and>
48.1578 + </condition>
48.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
48.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
48.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
48.1582 + <chainedmapper>
48.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
48.1584 + <filtermapper>
48.1585 + <uniqfilter/>
48.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
48.1587 + </filtermapper>
48.1588 + <cutdirsmapper dirs="1"/>
48.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
48.1590 + </chainedmapper>
48.1591 + </pathconvert>
48.1592 + <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}">
48.1593 + <and>
48.1594 + <isset property="test.module.name"/>
48.1595 + <length length="0" string="${test.module.name}" when="greater"/>
48.1596 + </and>
48.1597 + </condition>
48.1598 + </target>
48.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
48.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
48.1601 + <property name="javac.test.compilerargs" value=""/>
48.1602 + <property name="run.test.jvmargs" value=""/>
48.1603 + </target>
48.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
48.1605 <target if="do.depend.true" name="-compile-test-depend">
48.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
48.1607 </target>
48.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
48.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
48.1610 + <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">
48.1611 + <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}">
48.1612 + <customize>
48.1613 + <compilerarg line="${javac.test.compilerargs}"/>
48.1614 + </customize>
48.1615 + </j2seproject3:javac>
48.1616 <copy todir="${build.test.classes.dir}">
48.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
48.1618 </copy>
48.1619 @@ -510,10 +1613,14 @@
48.1620 <!-- Empty placeholder for easier customization. -->
48.1621 <!-- You can override this target in the ../build.xml file. -->
48.1622 </target>
48.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
48.1624 + <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">
48.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
48.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
48.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
48.1628 + <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}">
48.1629 + <customize>
48.1630 + <compilerarg line="${javac.test.compilerargs}"/>
48.1631 + </customize>
48.1632 + </j2seproject3:javac>
48.1633 <copy todir="${build.test.classes.dir}">
48.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
48.1635 </copy>
48.1636 @@ -525,17 +1632,17 @@
48.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
48.1638 <!--
48.1639 =======================
48.1640 - JUNIT EXECUTION SECTION
48.1641 + TEST EXECUTION SECTION
48.1642 =======================
48.1643 -->
48.1644 <target depends="init" if="have.tests" name="-pre-test-run">
48.1645 <mkdir dir="${build.test.results.dir}"/>
48.1646 </target>
48.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
48.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
48.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
48.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
48.1651 </target>
48.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
48.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
48.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
48.1655 </target>
48.1656 <target depends="init" if="have.tests" name="test-report"/>
48.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
48.1658 @@ -543,41 +1650,42 @@
48.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
48.1660 <mkdir dir="${build.test.results.dir}"/>
48.1661 </target>
48.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
48.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
48.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
48.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
48.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
48.1667 </target>
48.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
48.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
48.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
48.1671 </target>
48.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
48.1673 + <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"/>
48.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
48.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
48.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
48.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
48.1678 + </target>
48.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
48.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
48.1681 + </target>
48.1682 + <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"/>
48.1683 <!--
48.1684 =======================
48.1685 - JUNIT DEBUGGING SECTION
48.1686 + TEST DEBUGGING SECTION
48.1687 =======================
48.1688 -->
48.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
48.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
48.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
48.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
48.1693 - <delete file="${test.report.file}"/>
48.1694 - <mkdir dir="${build.test.results.dir}"/>
48.1695 - <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}">
48.1696 - <customize>
48.1697 - <syspropertyset>
48.1698 - <propertyref prefix="test-sys-prop."/>
48.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
48.1700 - </syspropertyset>
48.1701 - <arg value="${test.class}"/>
48.1702 - <arg value="showoutput=true"/>
48.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
48.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
48.1705 - </customize>
48.1706 - </j2seproject3:debug>
48.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
48.1708 + </target>
48.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
48.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
48.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
48.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
48.1713 </target>
48.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
48.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
48.1716 </target>
48.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
48.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
48.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
48.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
48.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
48.1722 </target>
48.1723 @@ -603,9 +1711,9 @@
48.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
48.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
48.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
48.1727 - <customize>
48.1728 + <customizeDebuggee>
48.1729 <arg value="${applet.url}"/>
48.1730 - </customize>
48.1731 + </customizeDebuggee>
48.1732 </j2seproject3:debug>
48.1733 </target>
48.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
48.1735 @@ -614,14 +1722,49 @@
48.1736 CLEANUP SECTION
48.1737 ===============
48.1738 -->
48.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
48.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
48.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
48.1742 + <delete file="${built-clean.properties}" quiet="true"/>
48.1743 + </target>
48.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
48.1745 + <echo level="warn" message="Cycle detected: javabeans was already built"/>
48.1746 + </target>
48.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
48.1748 + <mkdir dir="${build.dir}"/>
48.1749 + <touch file="${built-clean.properties}" verbose="false"/>
48.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
48.1751 + <antcall target="-warn-already-built-clean"/>
48.1752 + <propertyfile file="${built-clean.properties}">
48.1753 + <entry key="${basedir}" value=""/>
48.1754 + </propertyfile>
48.1755 + </target>
48.1756 <target depends="init" name="-do-clean">
48.1757 <delete dir="${build.dir}"/>
48.1758 - <delete dir="${dist.dir}"/>
48.1759 + <delete dir="${dist.jlink.output}"/>
48.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
48.1761 </target>
48.1762 <target name="-post-clean">
48.1763 <!-- Empty placeholder for easier customization. -->
48.1764 <!-- You can override this target in the ../build.xml file. -->
48.1765 </target>
48.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
48.1767 + <target name="-check-call-dep">
48.1768 + <property file="${call.built.properties}" prefix="already.built."/>
48.1769 + <condition property="should.call.dep">
48.1770 + <and>
48.1771 + <not>
48.1772 + <isset property="already.built.${call.subproject}"/>
48.1773 + </not>
48.1774 + <available file="${call.script}"/>
48.1775 + </and>
48.1776 + </condition>
48.1777 + </target>
48.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
48.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
48.1780 + <propertyset>
48.1781 + <propertyref prefix="transfer."/>
48.1782 + <mapper from="transfer.*" to="*" type="glob"/>
48.1783 + </propertyset>
48.1784 + </ant>
48.1785 + </target>
48.1786 </project>
49.1 --- a/samples/javabeans/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
49.2 +++ b/samples/javabeans/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
49.3 @@ -1,8 +1,8 @@
49.4 build.xml.data.CRC32=c293c311
49.5 -build.xml.script.CRC32=371fa8da
49.6 -build.xml.stylesheet.CRC32=be360661
49.7 +build.xml.script.CRC32=e45b1e1d
49.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
49.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
49.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
49.11 nbproject/build-impl.xml.data.CRC32=c293c311
49.12 -nbproject/build-impl.xml.script.CRC32=b691f55c
49.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
49.14 +nbproject/build-impl.xml.script.CRC32=1929a372
49.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
50.1 --- a/samples/javabeans/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
50.2 +++ b/samples/javabeans/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
50.3 @@ -1,57 +1,55 @@
50.4 +#Mon Nov 11 13:15:12 CET 2019
50.5 +excludes=
50.6 +javac.deprecation=false
50.7 +build.test.results.dir=${build.dir}/test/results
50.8 +run.classpath=${javac.classpath}\:${build.classes.dir}
50.9 +javadoc.nonavbar=false
50.10 +javac.test.modulepath=${javac.modulepath}
50.11 +run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
50.12 +javac.target=1.6
50.13 +javadoc.noindex=false
50.14 +javac.processormodulepath=
50.15 +javadoc.additionalparam=
50.16 +includes=**
50.17 build.classes.dir=${build.dir}/classes
50.18 +source.encoding=UTF-8
50.19 +javadoc.author=false
50.20 +test.src.dir=test
50.21 +build.dir=build
50.22 +build.test.classes.dir=${build.dir}/test/classes
50.23 +run.modulepath=${javac.modulepath}
50.24 +platform.active=default_platform
50.25 +javac.compilerargs=
50.26 +dist.jar=${dist.dir}/javabeans.jar
50.27 +javadoc.use=true
50.28 +build.sysclasspath=ignore
50.29 +debug.test.classpath=${run.test.classpath}
50.30 +dist.dir=dist
50.31 build.classes.excludes=**/*.java,**/*.form
50.32 -# This directory is removed when the project is cleaned:
50.33 -build.dir=build
50.34 +libs.junit_4.classpath=../libs/dist/junit-4.4.jar
50.35 +javadoc.splitindex=true
50.36 +javadoc.encoding=${source.encoding}
50.37 +javac.source=1.6
50.38 +javac.modulepath=
50.39 +junit.selected.version=4
50.40 +debug.classpath=${run.classpath}
50.41 +run.jvmargs=
50.42 +run.test.modulepath=${javac.test.modulepath}
50.43 build.generated.dir=${build.dir}/generated
50.44 -# Only compile against the classpath explicitly listed here:
50.45 -build.sysclasspath=ignore
50.46 -build.test.classes.dir=${build.dir}/test/classes
50.47 -build.test.results.dir=${build.dir}/test/results
50.48 -debug.classpath=\
50.49 - ${run.classpath}
50.50 -debug.test.classpath=\
50.51 - ${run.test.classpath}
50.52 -# This directory is removed when the project is cleaned:
50.53 -dist.dir=dist
50.54 -dist.jar=${dist.dir}/javabeans.jar
50.55 -dist.javadoc.dir=${dist.dir}/javadoc
50.56 -excludes=
50.57 -includes=**
50.58 jar.compress=false
50.59 -javac.classpath=
50.60 -libs.junit_4.classpath=../libs/dist/junit-4.4.jar
50.61 -# Space-separated list of extra javac options
50.62 -javac.compilerargs=
50.63 -javac.deprecation=false
50.64 -javac.source=1.5
50.65 -javac.target=1.5
50.66 javac.test.classpath=\
50.67 ${javac.classpath}:\
50.68 ${build.classes.dir}:\
50.69 - ${libs.junit_4.classpath}
50.70 -javadoc.additionalparam=
50.71 -javadoc.author=false
50.72 -javadoc.encoding=${source.encoding}
50.73 -javadoc.noindex=false
50.74 -javadoc.nonavbar=false
50.75 -javadoc.notree=false
50.76 + ${libs.junit_4.classpath}:\
50.77 + ${libs.hamcrest.classpath}
50.78 javadoc.private=false
50.79 -javadoc.splitindex=true
50.80 -javadoc.use=true
50.81 +debug.test.modulepath=${run.test.modulepath}
50.82 +meta.inf.dir=${src.dir}/META-INF
50.83 +dist.javadoc.dir=${dist.dir}/javadoc
50.84 +src.dir=src
50.85 +debug.modulepath=${run.modulepath}
50.86 +javac.classpath=
50.87 +build.generated.sources.dir=${build.dir}/generated-sources
50.88 javadoc.version=false
50.89 javadoc.windowtitle=
50.90 -meta.inf.dir=${src.dir}/META-INF
50.91 -platform.active=default_platform
50.92 -run.classpath=\
50.93 - ${javac.classpath}:\
50.94 - ${build.classes.dir}
50.95 -# Space-separated list of JVM arguments used when running the project
50.96 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
50.97 -# or test-sys-prop.name=value to set system properties for unit tests):
50.98 -run.jvmargs=
50.99 -run.test.classpath=\
50.100 - ${javac.test.classpath}:\
50.101 - ${build.test.classes.dir}
50.102 -source.encoding=UTF-8
50.103 -src.dir=src
50.104 -test.src.dir=test
50.105 +javadoc.notree=false
51.1 --- a/samples/livedb/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
51.2 +++ b/samples/livedb/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
51.3 @@ -12,18 +12,18 @@
51.4 - execution
51.5 - debugging
51.6 - javadoc
51.7 - - junit compilation
51.8 - - junit execution
51.9 - - junit debugging
51.10 + - test compilation
51.11 + - test execution
51.12 + - test debugging
51.13 - applet
51.14 - cleanup
51.15
51.16 -->
51.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="livedb-impl">
51.18 - <fail message="Please build using Ant 1.7.1 or higher.">
51.19 +<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="livedb-impl">
51.20 + <fail message="Please build using Ant 1.8.0 or higher.">
51.21 <condition>
51.22 <not>
51.23 - <antversion atleast="1.7.1"/>
51.24 + <antversion atleast="1.8.0"/>
51.25 </not>
51.26 </condition>
51.27 </fail>
51.28 @@ -46,14 +46,80 @@
51.29 <property file="${user.properties.file}"/>
51.30 <!-- The two properties below are usually overridden -->
51.31 <!-- by the active platform. Just a fallback. -->
51.32 - <property name="default.javac.source" value="1.4"/>
51.33 - <property name="default.javac.target" value="1.4"/>
51.34 + <property name="default.javac.source" value="1.6"/>
51.35 + <property name="default.javac.target" value="1.6"/>
51.36 </target>
51.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
51.38 <property file="nbproject/configs/${config}.properties"/>
51.39 <property file="nbproject/project.properties"/>
51.40 </target>
51.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
51.42 + <target name="-init-modules-supported">
51.43 + <condition property="modules.supported.internal" value="true">
51.44 + <not>
51.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
51.46 + </not>
51.47 + </condition>
51.48 + </target>
51.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
51.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
51.51 + <attribute name="property"/>
51.52 + <attribute name="sourcepath"/>
51.53 + <sequential>
51.54 + <loadresource property="@{property}" quiet="true">
51.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
51.56 + <filterchain>
51.57 + <stripjavacomments/>
51.58 + <linecontainsregexp>
51.59 + <regexp pattern="module .* \{"/>
51.60 + </linecontainsregexp>
51.61 + <tokenfilter>
51.62 + <linetokenizer/>
51.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
51.64 + </tokenfilter>
51.65 + <striplinebreaks/>
51.66 + </filterchain>
51.67 + </loadresource>
51.68 + </sequential>
51.69 + </macrodef>
51.70 + </target>
51.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
51.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
51.73 + <condition>
51.74 + <not>
51.75 + <antversion atleast="1.10.0"/>
51.76 + </not>
51.77 + </condition>
51.78 + </fail>
51.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
51.80 + <condition property="named.module.internal">
51.81 + <and>
51.82 + <isset property="module.name"/>
51.83 + <length length="0" string="${module.name}" when="greater"/>
51.84 + </and>
51.85 + </condition>
51.86 + <condition property="unnamed.module.internal">
51.87 + <not>
51.88 + <isset property="named.module.internal"/>
51.89 + </not>
51.90 + </condition>
51.91 + <property name="javac.modulepath" value=""/>
51.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
51.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
51.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
51.95 + <property name="javac.upgrademodulepath" value=""/>
51.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
51.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
51.98 + <and>
51.99 + <isset property="javac.systemmodulepath"/>
51.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
51.101 + </and>
51.102 + </condition>
51.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
51.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
51.105 + <property name="module.name" value=""/>
51.106 + </target>
51.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
51.108 + <property name="platform.java" value="${java.home}/bin/java"/>
51.109 <available file="${manifest.file}" property="manifest.available"/>
51.110 <condition property="splashscreen.available">
51.111 <and>
51.112 @@ -71,36 +137,22 @@
51.113 </not>
51.114 </and>
51.115 </condition>
51.116 - <condition property="manifest.available+main.class">
51.117 + <condition property="profile.available">
51.118 <and>
51.119 - <isset property="manifest.available"/>
51.120 - <isset property="main.class.available"/>
51.121 - </and>
51.122 - </condition>
51.123 - <condition property="do.mkdist">
51.124 - <and>
51.125 - <isset property="libs.CopyLibs.classpath"/>
51.126 + <isset property="javac.profile"/>
51.127 + <length length="0" string="${javac.profile}" when="greater"/>
51.128 <not>
51.129 - <istrue value="${mkdist.disabled}"/>
51.130 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
51.131 </not>
51.132 </and>
51.133 </condition>
51.134 - <condition property="manifest.available+main.class+mkdist.available">
51.135 - <and>
51.136 - <istrue value="${manifest.available+main.class}"/>
51.137 - <isset property="do.mkdist"/>
51.138 - </and>
51.139 - </condition>
51.140 - <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
51.141 - <and>
51.142 - <istrue value="${manifest.available+main.class+mkdist.available}"/>
51.143 - <istrue value="${splashscreen.available}"/>
51.144 - </and>
51.145 - </condition>
51.146 <condition property="do.archive">
51.147 - <not>
51.148 - <istrue value="${jar.archive.disabled}"/>
51.149 - </not>
51.150 + <or>
51.151 + <not>
51.152 + <istrue value="${jar.archive.disabled}"/>
51.153 + </not>
51.154 + <istrue value="${not.archive.disabled}"/>
51.155 + </or>
51.156 </condition>
51.157 <condition property="do.archive+manifest.available">
51.158 <and>
51.159 @@ -108,21 +160,21 @@
51.160 <istrue value="${do.archive}"/>
51.161 </and>
51.162 </condition>
51.163 - <condition property="do.archive+manifest.available+main.class">
51.164 + <condition property="do.archive+main.class.available">
51.165 <and>
51.166 - <istrue value="${manifest.available+main.class}"/>
51.167 + <isset property="main.class.available"/>
51.168 <istrue value="${do.archive}"/>
51.169 </and>
51.170 </condition>
51.171 - <condition property="do.archive+manifest.available+main.class+mkdist.available">
51.172 + <condition property="do.archive+splashscreen.available">
51.173 <and>
51.174 - <istrue value="${manifest.available+main.class+mkdist.available}"/>
51.175 + <isset property="splashscreen.available"/>
51.176 <istrue value="${do.archive}"/>
51.177 </and>
51.178 </condition>
51.179 - <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
51.180 + <condition property="do.archive+profile.available">
51.181 <and>
51.182 - <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
51.183 + <isset property="profile.available"/>
51.184 <istrue value="${do.archive}"/>
51.185 </and>
51.186 </condition>
51.187 @@ -149,6 +201,7 @@
51.188 </and>
51.189 </condition>
51.190 <property name="run.jvmargs" value=""/>
51.191 + <property name="run.jvmargs.ide" value=""/>
51.192 <property name="javac.compilerargs" value=""/>
51.193 <property name="work.dir" value="${basedir}"/>
51.194 <condition property="no.deps">
51.195 @@ -161,6 +214,7 @@
51.196 <property name="application.args" value=""/>
51.197 <property name="source.encoding" value="${file.encoding}"/>
51.198 <property name="runtime.encoding" value="${source.encoding}"/>
51.199 + <property name="manifest.encoding" value="${source.encoding}"/>
51.200 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
51.201 <and>
51.202 <isset property="javadoc.encoding"/>
51.203 @@ -178,11 +232,56 @@
51.204 </condition>
51.205 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
51.206 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
51.207 - <length length="0" string="${endorsed.classpath}" when="greater"/>
51.208 + <and>
51.209 + <isset property="endorsed.classpath"/>
51.210 + <not>
51.211 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
51.212 + </not>
51.213 + </and>
51.214 </condition>
51.215 - <property name="javac.fork" value="false"/>
51.216 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
51.217 + <isset property="profile.available"/>
51.218 + </condition>
51.219 + <condition else="false" property="jdkBug6558476">
51.220 + <and>
51.221 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
51.222 + <not>
51.223 + <os family="unix"/>
51.224 + </not>
51.225 + </and>
51.226 + </condition>
51.227 + <condition else="false" property="javac.fork">
51.228 + <or>
51.229 + <istrue value="${jdkBug6558476}"/>
51.230 + <istrue value="${javac.external.vm}"/>
51.231 + </or>
51.232 + </condition>
51.233 <property name="jar.index" value="false"/>
51.234 + <property name="jar.index.metainf" value="${jar.index}"/>
51.235 + <property name="copylibs.rebase" value="true"/>
51.236 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
51.237 + <condition property="junit.available">
51.238 + <or>
51.239 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
51.240 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
51.241 + </or>
51.242 + </condition>
51.243 + <condition property="testng.available">
51.244 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
51.245 + </condition>
51.246 + <condition property="junit+testng.available">
51.247 + <and>
51.248 + <istrue value="${junit.available}"/>
51.249 + <istrue value="${testng.available}"/>
51.250 + </and>
51.251 + </condition>
51.252 + <condition else="testng" property="testng.mode" value="mixed">
51.253 + <istrue value="${junit+testng.available}"/>
51.254 + </condition>
51.255 + <condition else="" property="testng.debug.mode" value="-mixed">
51.256 + <istrue value="${junit+testng.available}"/>
51.257 + </condition>
51.258 + <property name="java.failonerror" value="true"/>
51.259 </target>
51.260 <target name="-post-init">
51.261 <!-- Empty placeholder for easier customization. -->
51.262 @@ -209,11 +308,80 @@
51.263 </sequential>
51.264 </macrodef>
51.265 </target>
51.266 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
51.267 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
51.268 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
51.269 <attribute default="${src.dir}" name="srcdir"/>
51.270 <attribute default="${build.classes.dir}" name="destdir"/>
51.271 <attribute default="${javac.classpath}" name="classpath"/>
51.272 + <attribute default="${javac.modulepath}" name="modulepath"/>
51.273 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
51.274 + <attribute default="${javac.processorpath}" name="processorpath"/>
51.275 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
51.276 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
51.277 + <attribute default="${includes}" name="includes"/>
51.278 + <attribute default="${excludes}" name="excludes"/>
51.279 + <attribute default="${javac.debug}" name="debug"/>
51.280 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
51.281 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
51.282 + <attribute default="${empty.dir}" name="gensrcdir"/>
51.283 + <element name="customize" optional="true"/>
51.284 + <sequential>
51.285 + <condition property="warn.excludes.internal">
51.286 + <and>
51.287 + <isset property="named.module.internal"/>
51.288 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
51.289 + </and>
51.290 + </condition>
51.291 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
51.292 + <property location="${build.dir}/empty" name="empty.dir"/>
51.293 + <mkdir dir="${empty.dir}"/>
51.294 + <mkdir dir="@{apgeneratedsrcdir}"/>
51.295 + <condition property="processormodulepath.set">
51.296 + <resourcecount count="0" when="greater">
51.297 + <path>
51.298 + <pathelement path="@{processormodulepath}"/>
51.299 + </path>
51.300 + </resourcecount>
51.301 + </condition>
51.302 + <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}">
51.303 + <src>
51.304 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
51.305 + <include name="*"/>
51.306 + </dirset>
51.307 + </src>
51.308 + <classpath>
51.309 + <path path="@{classpath}"/>
51.310 + </classpath>
51.311 + <modulepath>
51.312 + <path path="@{modulepath}"/>
51.313 + </modulepath>
51.314 + <upgrademodulepath>
51.315 + <path path="@{upgrademodulepath}"/>
51.316 + </upgrademodulepath>
51.317 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
51.318 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
51.319 + <compilerarg line="${javac.compilerargs}"/>
51.320 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
51.321 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
51.322 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
51.323 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
51.324 + <compilerarg line="${ap.processors.internal}"/>
51.325 + <compilerarg line="${annotation.processing.processor.options}"/>
51.326 + <compilerarg value="-s"/>
51.327 + <compilerarg path="@{apgeneratedsrcdir}"/>
51.328 + <compilerarg line="${ap.proc.none.internal}"/>
51.329 + <customize/>
51.330 + </javac>
51.331 + </sequential>
51.332 + </macrodef>
51.333 + </target>
51.334 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
51.335 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
51.336 + <attribute default="${src.dir}" name="srcdir"/>
51.337 + <attribute default="${build.classes.dir}" name="destdir"/>
51.338 + <attribute default="${javac.classpath}" name="classpath"/>
51.339 + <attribute default="${javac.modulepath}" name="modulepath"/>
51.340 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
51.341 <attribute default="${javac.processorpath}" name="processorpath"/>
51.342 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
51.343 <attribute default="${includes}" name="includes"/>
51.344 @@ -236,6 +404,7 @@
51.345 <path path="@{classpath}"/>
51.346 </classpath>
51.347 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
51.348 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
51.349 <compilerarg line="${javac.compilerargs}"/>
51.350 <compilerarg value="-processorpath"/>
51.351 <compilerarg path="@{processorpath}:${empty.dir}"/>
51.352 @@ -249,11 +418,13 @@
51.353 </sequential>
51.354 </macrodef>
51.355 </target>
51.356 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
51.357 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
51.358 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
51.359 <attribute default="${src.dir}" name="srcdir"/>
51.360 <attribute default="${build.classes.dir}" name="destdir"/>
51.361 <attribute default="${javac.classpath}" name="classpath"/>
51.362 + <attribute default="${javac.modulepath}" name="modulepath"/>
51.363 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
51.364 <attribute default="${javac.processorpath}" name="processorpath"/>
51.365 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
51.366 <attribute default="${includes}" name="includes"/>
51.367 @@ -275,13 +446,14 @@
51.368 <path path="@{classpath}"/>
51.369 </classpath>
51.370 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
51.371 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
51.372 <compilerarg line="${javac.compilerargs}"/>
51.373 <customize/>
51.374 </javac>
51.375 </sequential>
51.376 </macrodef>
51.377 </target>
51.378 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
51.379 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
51.380 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
51.381 <attribute default="${src.dir}" name="srcdir"/>
51.382 <attribute default="${build.classes.dir}" name="destdir"/>
51.383 @@ -298,52 +470,383 @@
51.384 <attribute default="${build.classes.dir}" name="destdir"/>
51.385 <sequential>
51.386 <fail unless="javac.includes">Must set javac.includes</fail>
51.387 - <pathconvert pathsep="," property="javac.includes.binary">
51.388 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
51.389 <path>
51.390 <filelist dir="@{destdir}" files="${javac.includes}"/>
51.391 </path>
51.392 <globmapper from="*.java" to="*.class"/>
51.393 </pathconvert>
51.394 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
51.395 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
51.396 <delete>
51.397 - <files includes="${javac.includes.binary}"/>
51.398 + <files includesfile="${javac.includesfile.binary}"/>
51.399 + </delete>
51.400 + <delete>
51.401 + <fileset file="${javac.includesfile.binary}"/>
51.402 </delete>
51.403 </sequential>
51.404 </macrodef>
51.405 </target>
51.406 - <target name="-init-macrodef-junit">
51.407 + <target if="${junit.available}" name="-init-macrodef-junit-init">
51.408 + <condition else="false" property="nb.junit.batch" value="true">
51.409 + <and>
51.410 + <istrue value="${junit.available}"/>
51.411 + <not>
51.412 + <isset property="test.method"/>
51.413 + </not>
51.414 + </and>
51.415 + </condition>
51.416 + <condition else="false" property="nb.junit.single" value="true">
51.417 + <and>
51.418 + <istrue value="${junit.available}"/>
51.419 + <isset property="test.method"/>
51.420 + </and>
51.421 + </condition>
51.422 + </target>
51.423 + <target name="-init-test-properties">
51.424 + <property name="test.binaryincludes" value="<nothing>"/>
51.425 + <property name="test.binarytestincludes" value=""/>
51.426 + <property name="test.binaryexcludes" value=""/>
51.427 + </target>
51.428 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
51.429 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
51.430 + <attribute default="${includes}" name="includes"/>
51.431 + <attribute default="${excludes}" name="excludes"/>
51.432 + <element name="customizePrototype" optional="true"/>
51.433 + <sequential>
51.434 + <property name="junit.forkmode" value="perTest"/>
51.435 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
51.436 + <syspropertyset>
51.437 + <propertyref prefix="test-sys-prop."/>
51.438 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
51.439 + </syspropertyset>
51.440 + <classpath>
51.441 + <path path="${run.test.classpath}"/>
51.442 + </classpath>
51.443 + <modulepath>
51.444 + <path path="${run.test.modulepath}"/>
51.445 + </modulepath>
51.446 + <formatter type="brief" usefile="false"/>
51.447 + <formatter type="xml"/>
51.448 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.449 + <jvmarg value="-ea"/>
51.450 + <jvmarg line="${run.test.jvmargs}"/>
51.451 + <customizePrototype/>
51.452 + </junit>
51.453 + </sequential>
51.454 + </macrodef>
51.455 + </target>
51.456 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
51.457 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
51.458 + <attribute default="${includes}" name="includes"/>
51.459 + <attribute default="${excludes}" name="excludes"/>
51.460 + <element name="customizePrototype" optional="true"/>
51.461 + <sequential>
51.462 + <property name="junit.forkmode" value="perTest"/>
51.463 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
51.464 + <syspropertyset>
51.465 + <propertyref prefix="test-sys-prop."/>
51.466 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
51.467 + </syspropertyset>
51.468 + <classpath>
51.469 + <path path="${run.test.classpath}"/>
51.470 + </classpath>
51.471 + <formatter type="brief" usefile="false"/>
51.472 + <formatter type="xml"/>
51.473 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.474 + <jvmarg value="-ea"/>
51.475 + <customizePrototype/>
51.476 + </junit>
51.477 + </sequential>
51.478 + </macrodef>
51.479 + </target>
51.480 + <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}">
51.481 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
51.482 <attribute default="${includes}" name="includes"/>
51.483 <attribute default="${excludes}" name="excludes"/>
51.484 <attribute default="**" name="testincludes"/>
51.485 + <attribute default="" name="testmethods"/>
51.486 + <element name="customize" optional="true"/>
51.487 <sequential>
51.488 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
51.489 - <batchtest todir="${build.test.results.dir}">
51.490 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
51.491 - <filename name="@{testincludes}"/>
51.492 - </fileset>
51.493 - </batchtest>
51.494 + <j2seproject3:junit-prototype>
51.495 + <customizePrototype>
51.496 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
51.497 + <customize/>
51.498 + </customizePrototype>
51.499 + </j2seproject3:junit-prototype>
51.500 + </sequential>
51.501 + </macrodef>
51.502 + </target>
51.503 + <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}">
51.504 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
51.505 + <attribute default="${includes}" name="includes"/>
51.506 + <attribute default="${excludes}" name="excludes"/>
51.507 + <attribute default="**" name="testincludes"/>
51.508 + <attribute default="" name="testmethods"/>
51.509 + <element name="customize" optional="true"/>
51.510 + <sequential>
51.511 + <j2seproject3:junit-prototype>
51.512 + <customizePrototype>
51.513 + <batchtest todir="${build.test.results.dir}">
51.514 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
51.515 + <filename name="@{testincludes}"/>
51.516 + </fileset>
51.517 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
51.518 + <filename name="${test.binarytestincludes}"/>
51.519 + </fileset>
51.520 + </batchtest>
51.521 + <customize/>
51.522 + </customizePrototype>
51.523 + </j2seproject3:junit-prototype>
51.524 + </sequential>
51.525 + </macrodef>
51.526 + </target>
51.527 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
51.528 + <target if="${testng.available}" name="-init-macrodef-testng">
51.529 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
51.530 + <attribute default="${includes}" name="includes"/>
51.531 + <attribute default="${excludes}" name="excludes"/>
51.532 + <attribute default="**" name="testincludes"/>
51.533 + <attribute default="" name="testmethods"/>
51.534 + <element name="customize" optional="true"/>
51.535 + <sequential>
51.536 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
51.537 + <isset property="test.method"/>
51.538 + </condition>
51.539 + <union id="test.set">
51.540 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
51.541 + <filename name="@{testincludes}"/>
51.542 + </fileset>
51.543 + </union>
51.544 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
51.545 + <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="livedb" testname="TestNG tests" workingDir="${work.dir}">
51.546 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
51.547 + <propertyset>
51.548 + <propertyref prefix="test-sys-prop."/>
51.549 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
51.550 + </propertyset>
51.551 <classpath>
51.552 <path path="${run.test.classpath}"/>
51.553 </classpath>
51.554 - <syspropertyset>
51.555 - <propertyref prefix="test-sys-prop."/>
51.556 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
51.557 - </syspropertyset>
51.558 - <formatter type="brief" usefile="false"/>
51.559 - <formatter type="xml"/>
51.560 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.561 - <jvmarg line="${run.jvmargs}"/>
51.562 - </junit>
51.563 + <customize/>
51.564 + </testng>
51.565 </sequential>
51.566 </macrodef>
51.567 </target>
51.568 + <target name="-init-macrodef-test-impl">
51.569 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
51.570 + <attribute default="${includes}" name="includes"/>
51.571 + <attribute default="${excludes}" name="excludes"/>
51.572 + <attribute default="**" name="testincludes"/>
51.573 + <attribute default="" name="testmethods"/>
51.574 + <element implicit="true" name="customize" optional="true"/>
51.575 + <sequential>
51.576 + <echo>No tests executed.</echo>
51.577 + </sequential>
51.578 + </macrodef>
51.579 + </target>
51.580 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
51.581 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
51.582 + <attribute default="${includes}" name="includes"/>
51.583 + <attribute default="${excludes}" name="excludes"/>
51.584 + <attribute default="**" name="testincludes"/>
51.585 + <attribute default="" name="testmethods"/>
51.586 + <element implicit="true" name="customize" optional="true"/>
51.587 + <sequential>
51.588 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
51.589 + <customize/>
51.590 + </j2seproject3:junit>
51.591 + </sequential>
51.592 + </macrodef>
51.593 + </target>
51.594 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
51.595 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
51.596 + <attribute default="${includes}" name="includes"/>
51.597 + <attribute default="${excludes}" name="excludes"/>
51.598 + <attribute default="**" name="testincludes"/>
51.599 + <attribute default="" name="testmethods"/>
51.600 + <element implicit="true" name="customize" optional="true"/>
51.601 + <sequential>
51.602 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
51.603 + <customize/>
51.604 + </j2seproject3:testng>
51.605 + </sequential>
51.606 + </macrodef>
51.607 + </target>
51.608 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
51.609 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
51.610 + <attribute default="${includes}" name="includes"/>
51.611 + <attribute default="${excludes}" name="excludes"/>
51.612 + <attribute default="**" name="testincludes"/>
51.613 + <attribute default="" name="testmethods"/>
51.614 + <sequential>
51.615 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
51.616 + <customize>
51.617 + <jvmarg line="${run.jvmargs}"/>
51.618 + <jvmarg line="${run.jvmargs.ide}"/>
51.619 + </customize>
51.620 + </j2seproject3:test-impl>
51.621 + </sequential>
51.622 + </macrodef>
51.623 + </target>
51.624 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
51.625 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
51.626 + <attribute default="${includes}" name="includes"/>
51.627 + <attribute default="${excludes}" name="excludes"/>
51.628 + <attribute default="**" name="testincludes"/>
51.629 + <attribute default="" name="testmethods"/>
51.630 + <element name="customizeDebuggee" optional="true"/>
51.631 + <sequential>
51.632 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
51.633 + <customize>
51.634 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
51.635 + <customizeDebuggee/>
51.636 + </customize>
51.637 + </j2seproject3:junit>
51.638 + </sequential>
51.639 + </macrodef>
51.640 + </target>
51.641 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
51.642 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
51.643 + <attribute default="${main.class}" name="testClass"/>
51.644 + <attribute default="" name="testMethod"/>
51.645 + <element name="customize2" optional="true"/>
51.646 + <sequential>
51.647 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
51.648 + <isset property="test.method"/>
51.649 + </condition>
51.650 + <condition else="-suitename livedb -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
51.651 + <matches pattern=".*\.xml" string="@{testClass}"/>
51.652 + </condition>
51.653 + <delete dir="${build.test.results.dir}" quiet="true"/>
51.654 + <mkdir dir="${build.test.results.dir}"/>
51.655 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
51.656 + <customizeDebuggee>
51.657 + <customize2/>
51.658 + <jvmarg value="-ea"/>
51.659 + <arg line="${testng.debug.mode}"/>
51.660 + <arg line="-d ${build.test.results.dir}"/>
51.661 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
51.662 + <arg line="${testng.cmd.args}"/>
51.663 + </customizeDebuggee>
51.664 + </j2seproject3:debug>
51.665 + </sequential>
51.666 + </macrodef>
51.667 + </target>
51.668 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
51.669 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
51.670 + <attribute default="${main.class}" name="testClass"/>
51.671 + <attribute default="" name="testMethod"/>
51.672 + <element implicit="true" name="customize2" optional="true"/>
51.673 + <sequential>
51.674 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
51.675 + <customize2/>
51.676 + </j2seproject3:testng-debug>
51.677 + </sequential>
51.678 + </macrodef>
51.679 + </target>
51.680 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
51.681 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
51.682 + <attribute default="${includes}" name="includes"/>
51.683 + <attribute default="${excludes}" name="excludes"/>
51.684 + <attribute default="**" name="testincludes"/>
51.685 + <attribute default="" name="testmethods"/>
51.686 + <attribute default="${main.class}" name="testClass"/>
51.687 + <attribute default="" name="testMethod"/>
51.688 + <sequential>
51.689 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
51.690 + <customizeDebuggee>
51.691 + <jvmarg line="${run.jvmargs}"/>
51.692 + <jvmarg line="${run.jvmargs.ide}"/>
51.693 + </customizeDebuggee>
51.694 + </j2seproject3:test-debug-impl>
51.695 + </sequential>
51.696 + </macrodef>
51.697 + </target>
51.698 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
51.699 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
51.700 + <attribute default="${includes}" name="includes"/>
51.701 + <attribute default="${excludes}" name="excludes"/>
51.702 + <attribute default="**" name="testincludes"/>
51.703 + <attribute default="" name="testmethods"/>
51.704 + <attribute default="${main.class}" name="testClass"/>
51.705 + <attribute default="" name="testMethod"/>
51.706 + <sequential>
51.707 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
51.708 + <customize2>
51.709 + <syspropertyset>
51.710 + <propertyref prefix="test-sys-prop."/>
51.711 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
51.712 + </syspropertyset>
51.713 + </customize2>
51.714 + </j2seproject3:testng-debug-impl>
51.715 + </sequential>
51.716 + </macrodef>
51.717 + </target>
51.718 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
51.719 + <!--
51.720 + pre NB7.2 profiling section; consider it deprecated
51.721 + -->
51.722 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
51.723 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
51.724 + <!-- Empty placeholder for easier customization. -->
51.725 + <!-- You can override this target in the ../build.xml file. -->
51.726 + </target>
51.727 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
51.728 + <!-- Empty placeholder for easier customization. -->
51.729 + <!-- You can override this target in the ../build.xml file. -->
51.730 + </target>
51.731 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
51.732 + <macrodef name="resolve">
51.733 + <attribute name="name"/>
51.734 + <attribute name="value"/>
51.735 + <sequential>
51.736 + <property name="@{name}" value="${env.@{value}}"/>
51.737 + </sequential>
51.738 + </macrodef>
51.739 + <macrodef name="profile">
51.740 + <attribute default="${main.class}" name="classname"/>
51.741 + <element name="customize" optional="true"/>
51.742 + <sequential>
51.743 + <property environment="env"/>
51.744 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
51.745 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
51.746 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.747 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
51.748 + <jvmarg line="${profiler.info.jvmargs}"/>
51.749 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
51.750 + <arg line="${application.args}"/>
51.751 + <classpath>
51.752 + <path path="${run.classpath}"/>
51.753 + </classpath>
51.754 + <syspropertyset>
51.755 + <propertyref prefix="run-sys-prop."/>
51.756 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
51.757 + </syspropertyset>
51.758 + <customize/>
51.759 + </java>
51.760 + </sequential>
51.761 + </macrodef>
51.762 + </target>
51.763 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
51.764 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
51.765 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
51.766 + </target>
51.767 + <!--
51.768 + end of pre NB7.2 profiling section
51.769 + -->
51.770 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
51.771 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
51.772 <attribute default="${main.class}" name="name"/>
51.773 + <attribute default="${debug.modulepath}" name="modulepath"/>
51.774 <attribute default="${debug.classpath}" name="classpath"/>
51.775 <attribute default="" name="stopclassname"/>
51.776 <sequential>
51.777 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
51.778 + <modulepath>
51.779 + <path path="@{modulepath}"/>
51.780 + </modulepath>
51.781 <classpath>
51.782 <path path="@{classpath}"/>
51.783 </classpath>
51.784 @@ -362,18 +865,6 @@
51.785 </macrodef>
51.786 </target>
51.787 <target name="-init-debug-args">
51.788 - <property name="version-output" value="java version "${ant.java.version}"/>
51.789 - <condition property="have-jdk-older-than-1.4">
51.790 - <or>
51.791 - <contains string="${version-output}" substring="java version "1.0"/>
51.792 - <contains string="${version-output}" substring="java version "1.1"/>
51.793 - <contains string="${version-output}" substring="java version "1.2"/>
51.794 - <contains string="${version-output}" substring="java version "1.3"/>
51.795 - </or>
51.796 - </condition>
51.797 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
51.798 - <istrue value="${have-jdk-older-than-1.4}"/>
51.799 - </condition>
51.800 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
51.801 <os family="windows"/>
51.802 </condition>
51.803 @@ -383,17 +874,103 @@
51.804 </target>
51.805 <target depends="-init-debug-args" name="-init-macrodef-debug">
51.806 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
51.807 + <attribute default="${module.name}" name="modulename"/>
51.808 <attribute default="${main.class}" name="classname"/>
51.809 + <attribute default="${debug.modulepath}" name="modulepath"/>
51.810 <attribute default="${debug.classpath}" name="classpath"/>
51.811 + <element name="customizeDebuggee" optional="true"/>
51.812 + <sequential>
51.813 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
51.814 + <customize>
51.815 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
51.816 + <customizeDebuggee/>
51.817 + </customize>
51.818 + </j2seproject1:java>
51.819 + </sequential>
51.820 + </macrodef>
51.821 + </target>
51.822 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
51.823 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
51.824 + <attribute default="${module.name}" name="modulename"/>
51.825 + <attribute default="${main.class}" name="classname"/>
51.826 + <attribute default="${run.modulepath}" name="modulepath"/>
51.827 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
51.828 + <attribute default="${run.classpath}" name="classpath"/>
51.829 + <attribute default="jvm" name="jvm"/>
51.830 <element name="customize" optional="true"/>
51.831 <sequential>
51.832 - <java classname="@{classname}" dir="${work.dir}" fork="true">
51.833 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.834 - <jvmarg line="${debug-args-line}"/>
51.835 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
51.836 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
51.837 + <classpath>
51.838 + <path path="@{classpath}"/>
51.839 + </classpath>
51.840 + <modulepath>
51.841 + <pathelement path="@{modulepath}"/>
51.842 + <pathelement location="${module.build.classes.dir}"/>
51.843 + </modulepath>
51.844 + <upgrademodulepath>
51.845 + <path path="@{upgrademodulepath}"/>
51.846 + </upgrademodulepath>
51.847 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
51.848 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
51.849 <jvmarg line="${run.jvmargs}"/>
51.850 + <jvmarg line="${run.jvmargs.ide}"/>
51.851 + <syspropertyset>
51.852 + <propertyref prefix="run-sys-prop."/>
51.853 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
51.854 + </syspropertyset>
51.855 + <customize/>
51.856 + </java>
51.857 + </sequential>
51.858 + </macrodef>
51.859 + </target>
51.860 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
51.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
51.862 + <attribute default="" name="modulename"/>
51.863 + <attribute default="${main.class}" name="classname"/>
51.864 + <attribute default="${run.modulepath}" name="modulepath"/>
51.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
51.866 + <attribute default="${run.classpath}" name="classpath"/>
51.867 + <attribute default="jvm" name="jvm"/>
51.868 + <element name="customize" optional="true"/>
51.869 + <sequential>
51.870 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
51.871 + <classpath>
51.872 + <path path="@{classpath}"/>
51.873 + </classpath>
51.874 + <modulepath>
51.875 + <path path="@{modulepath}"/>
51.876 + </modulepath>
51.877 + <upgrademodulepath>
51.878 + <path path="@{upgrademodulepath}"/>
51.879 + </upgrademodulepath>
51.880 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
51.881 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
51.882 + <jvmarg line="${run.jvmargs}"/>
51.883 + <jvmarg line="${run.jvmargs.ide}"/>
51.884 + <syspropertyset>
51.885 + <propertyref prefix="run-sys-prop."/>
51.886 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
51.887 + </syspropertyset>
51.888 + <customize/>
51.889 + </java>
51.890 + </sequential>
51.891 + </macrodef>
51.892 + </target>
51.893 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
51.894 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
51.895 + <attribute default="" name="modulename"/>
51.896 + <attribute default="${main.class}" name="classname"/>
51.897 + <attribute default="" name="modulepath"/>
51.898 + <attribute default="${run.classpath}" name="classpath"/>
51.899 + <attribute default="jvm" name="jvm"/>
51.900 + <element name="customize" optional="true"/>
51.901 + <sequential>
51.902 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
51.903 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.904 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
51.905 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
51.906 + <jvmarg line="${run.jvmargs}"/>
51.907 + <jvmarg line="${run.jvmargs.ide}"/>
51.908 <classpath>
51.909 <path path="@{classpath}"/>
51.910 </classpath>
51.911 @@ -406,31 +983,10 @@
51.912 </sequential>
51.913 </macrodef>
51.914 </target>
51.915 - <target name="-init-macrodef-java">
51.916 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
51.917 - <attribute default="${main.class}" name="classname"/>
51.918 - <attribute default="${run.classpath}" name="classpath"/>
51.919 - <element name="customize" optional="true"/>
51.920 - <sequential>
51.921 - <java classname="@{classname}" dir="${work.dir}" fork="true">
51.922 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
51.923 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
51.924 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
51.925 - <jvmarg line="${run.jvmargs}"/>
51.926 - <classpath>
51.927 - <path path="@{classpath}"/>
51.928 - </classpath>
51.929 - <syspropertyset>
51.930 - <propertyref prefix="run-sys-prop."/>
51.931 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
51.932 - </syspropertyset>
51.933 - <customize/>
51.934 - </java>
51.935 - </sequential>
51.936 - </macrodef>
51.937 - </target>
51.938 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
51.939 <target name="-init-macrodef-copylibs">
51.940 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
51.941 + <attribute default="${manifest.file}" name="manifest"/>
51.942 <element name="customize" optional="true"/>
51.943 <sequential>
51.944 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
51.945 @@ -442,12 +998,15 @@
51.946 <path path="${run.classpath.without.build.classes.dir}"/>
51.947 <chainedmapper>
51.948 <flattenmapper/>
51.949 + <filtermapper>
51.950 + <replacestring from=" " to="%20"/>
51.951 + </filtermapper>
51.952 <globmapper from="*" to="lib/*"/>
51.953 </chainedmapper>
51.954 </pathconvert>
51.955 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
51.956 - <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
51.957 - <fileset dir="${build.classes.dir}"/>
51.958 + <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}">
51.959 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
51.960 <manifest>
51.961 <attribute name="Class-Path" value="${jar.classpath}"/>
51.962 <customize/>
51.963 @@ -458,8 +1017,8 @@
51.964 </target>
51.965 <target name="-init-presetdef-jar">
51.966 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
51.967 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
51.968 - <j2seproject1:fileset dir="${build.classes.dir}"/>
51.969 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
51.970 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
51.971 </jar>
51.972 </presetdef>
51.973 </target>
51.974 @@ -487,7 +1046,7 @@
51.975 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
51.976 <property name="ap.cmd.line.internal" value=""/>
51.977 </target>
51.978 - <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"/>
51.979 + <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"/>
51.980 <!--
51.981 ===================
51.982 COMPILATION SECTION
51.983 @@ -514,7 +1073,9 @@
51.984 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
51.985 </target>
51.986 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
51.987 - <antcall target="clean"/>
51.988 + <antcall target="clean">
51.989 + <param name="no.dependencies" value="true"/>
51.990 + </antcall>
51.991 </target>
51.992 <target depends="init,deps-jar" name="-pre-pre-compile">
51.993 <mkdir dir="${build.classes.dir}"/>
51.994 @@ -540,7 +1101,7 @@
51.995 <target if="has.persistence.xml" name="-copy-persistence-xml">
51.996 <mkdir dir="${build.classes.dir}/META-INF"/>
51.997 <copy todir="${build.classes.dir}/META-INF">
51.998 - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
51.999 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
51.1000 </copy>
51.1001 </target>
51.1002 <target name="-post-compile">
51.1003 @@ -555,7 +1116,7 @@
51.1004 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
51.1005 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
51.1006 <j2seproject3:force-recompile/>
51.1007 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
51.1008 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
51.1009 </target>
51.1010 <target name="-post-compile-single">
51.1011 <!-- Empty placeholder for easier customization. -->
51.1012 @@ -575,56 +1136,191 @@
51.1013 <!-- Empty placeholder for easier customization. -->
51.1014 <!-- You can override this target in the ../build.xml file. -->
51.1015 </target>
51.1016 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
51.1017 - <j2seproject1:jar/>
51.1018 + <target depends="init,compile" name="-check-module-main-class">
51.1019 + <pathconvert property="main.class.file">
51.1020 + <string value="${main.class}"/>
51.1021 + <unpackagemapper from="*" to="*.class"/>
51.1022 + </pathconvert>
51.1023 + <condition property="do.module.main.class">
51.1024 + <and>
51.1025 + <isset property="main.class.available"/>
51.1026 + <available file="${build.classes.dir}/module-info.class"/>
51.1027 + <available file="${build.classes.dir}/${main.class.file}"/>
51.1028 + <isset property="libs.CopyLibs.classpath"/>
51.1029 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
51.1030 + </and>
51.1031 + </condition>
51.1032 </target>
51.1033 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
51.1034 - <j2seproject1:jar manifest="${manifest.file}"/>
51.1035 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
51.1036 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
51.1037 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
51.1038 </target>
51.1039 - <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">
51.1040 - <j2seproject1:jar manifest="${manifest.file}">
51.1041 - <j2seproject1:manifest>
51.1042 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
51.1043 - </j2seproject1:manifest>
51.1044 - </j2seproject1:jar>
51.1045 - <echo>To run this application from the command line without Ant, try:</echo>
51.1046 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
51.1047 - <property location="${dist.jar}" name="dist.jar.resolved"/>
51.1048 - <pathconvert property="run.classpath.with.dist.jar">
51.1049 - <path path="${run.classpath}"/>
51.1050 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
51.1051 - </pathconvert>
51.1052 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
51.1053 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
51.1054 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
51.1055 + <touch file="${tmp.manifest.file}" verbose="false"/>
51.1056 </target>
51.1057 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
51.1058 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
51.1059 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
51.1060 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
51.1061 + </target>
51.1062 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
51.1063 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
51.1064 + <attribute name="Main-Class" value="${main.class}"/>
51.1065 + </manifest>
51.1066 + </target>
51.1067 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
51.1068 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
51.1069 + <attribute name="Profile" value="${javac.profile}"/>
51.1070 + </manifest>
51.1071 + </target>
51.1072 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
51.1073 <basename file="${application.splash}" property="splashscreen.basename"/>
51.1074 <mkdir dir="${build.classes.dir}/META-INF"/>
51.1075 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
51.1076 - <j2seproject3:copylibs>
51.1077 - <customize>
51.1078 - <attribute name="Main-Class" value="${main.class}"/>
51.1079 - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
51.1080 - </customize>
51.1081 - </j2seproject3:copylibs>
51.1082 - <echo>To run this application from the command line without Ant, try:</echo>
51.1083 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
51.1084 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
51.1085 + </manifest>
51.1086 + </target>
51.1087 + <target depends="init,compile" name="-check-do-mkdist">
51.1088 + <condition property="do.mkdist">
51.1089 + <and>
51.1090 + <isset property="do.archive"/>
51.1091 + <isset property="libs.CopyLibs.classpath"/>
51.1092 + <not>
51.1093 + <istrue value="${mkdist.disabled}"/>
51.1094 + </not>
51.1095 + <not>
51.1096 + <available file="${build.classes.dir}/module-info.class"/>
51.1097 + </not>
51.1098 + </and>
51.1099 + </condition>
51.1100 + </target>
51.1101 + <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">
51.1102 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
51.1103 + <echo level="info">To run this application from the command line without Ant, try:</echo>
51.1104 <property location="${dist.jar}" name="dist.jar.resolved"/>
51.1105 - <echo>java -jar "${dist.jar.resolved}"</echo>
51.1106 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
51.1107 </target>
51.1108 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
51.1109 - <j2seproject3:copylibs>
51.1110 - <customize>
51.1111 - <attribute name="Main-Class" value="${main.class}"/>
51.1112 - </customize>
51.1113 - </j2seproject3:copylibs>
51.1114 - <echo>To run this application from the command line without Ant, try:</echo>
51.1115 + <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">
51.1116 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
51.1117 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
51.1118 <property location="${dist.jar}" name="dist.jar.resolved"/>
51.1119 - <echo>java -jar "${dist.jar.resolved}"</echo>
51.1120 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
51.1121 + <isset property="named.module.internal"/>
51.1122 + </condition>
51.1123 + <pathconvert property="run.classpath.with.dist.jar">
51.1124 + <path path="${run.classpath}"/>
51.1125 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
51.1126 + </pathconvert>
51.1127 + <pathconvert property="run.modulepath.with.dist.jar">
51.1128 + <path location="${dist.jar.resolved}"/>
51.1129 + <path path="${run.modulepath}"/>
51.1130 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
51.1131 + </pathconvert>
51.1132 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
51.1133 + <isset property="named.module.internal"/>
51.1134 + </condition>
51.1135 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
51.1136 + <and>
51.1137 + <isset property="modules.supported.internal"/>
51.1138 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
51.1139 + </and>
51.1140 + </condition>
51.1141 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
51.1142 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
51.1143 + </condition>
51.1144 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
51.1145 + <isset property="do.module.main.class"/>
51.1146 + </condition>
51.1147 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
51.1148 + <isset property="named.module.internal"/>
51.1149 + </condition>
51.1150 + <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}">
51.1151 + <isset property="main.class.available"/>
51.1152 + </condition>
51.1153 + <condition else="debug" property="jar.usage.level" value="info">
51.1154 + <isset property="main.class.available"/>
51.1155 + </condition>
51.1156 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
51.1157 </target>
51.1158 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
51.1159 + <delete>
51.1160 + <fileset file="${tmp.manifest.file}"/>
51.1161 + </delete>
51.1162 + </target>
51.1163 + <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"/>
51.1164 + <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"/>
51.1165 <target name="-post-jar">
51.1166 <!-- Empty placeholder for easier customization. -->
51.1167 <!-- You can override this target in the ../build.xml file. -->
51.1168 </target>
51.1169 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
51.1170 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
51.1171 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
51.1172 + <!--
51.1173 + =================
51.1174 + DEPLOY SECTION
51.1175 + =================
51.1176 + -->
51.1177 + <target name="-pre-deploy">
51.1178 + <!-- Empty placeholder for easier customization. -->
51.1179 + <!-- You can override this target in the ../build.xml file. -->
51.1180 + </target>
51.1181 + <target depends="init" name="-check-jlink">
51.1182 + <condition property="do.jlink.internal">
51.1183 + <and>
51.1184 + <istrue value="${do.jlink}"/>
51.1185 + <isset property="do.archive"/>
51.1186 + <isset property="named.module.internal"/>
51.1187 + </and>
51.1188 + </condition>
51.1189 + </target>
51.1190 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
51.1191 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
51.1192 + <property name="jlink.launcher.name" value="${application.title}"/>
51.1193 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
51.1194 + <and>
51.1195 + <isset property="jlink.additionalmodules"/>
51.1196 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
51.1197 + </and>
51.1198 + </condition>
51.1199 + <condition property="jlink.do.strip.internal">
51.1200 + <and>
51.1201 + <isset property="jlink.strip"/>
51.1202 + <istrue value="${jlink.strip}"/>
51.1203 + </and>
51.1204 + </condition>
51.1205 + <condition property="jlink.do.additionalparam.internal">
51.1206 + <and>
51.1207 + <isset property="jlink.additionalparam"/>
51.1208 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
51.1209 + </and>
51.1210 + </condition>
51.1211 + <condition property="jlink.do.launcher.internal">
51.1212 + <and>
51.1213 + <istrue value="${jlink.launcher}"/>
51.1214 + <isset property="main.class.available"/>
51.1215 + </and>
51.1216 + </condition>
51.1217 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
51.1218 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
51.1219 + <exec executable="${platform.jlink}">
51.1220 + <arg value="--module-path"/>
51.1221 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
51.1222 + <arg value="--add-modules"/>
51.1223 + <arg value="${jlink.add.modules}"/>
51.1224 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
51.1225 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
51.1226 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
51.1227 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
51.1228 + <arg value="--output"/>
51.1229 + <arg value="${dist.jlink.output}"/>
51.1230 + </exec>
51.1231 + </target>
51.1232 + <target name="-post-deploy">
51.1233 + <!-- Empty placeholder for easier customization. -->
51.1234 + <!-- You can override this target in the ../build.xml file. -->
51.1235 + </target>
51.1236 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
51.1237 <!--
51.1238 =================
51.1239 EXECUTION SECTION
51.1240 @@ -661,9 +1357,9 @@
51.1241 </target>
51.1242 <target depends="init,compile" name="-debug-start-debuggee">
51.1243 <j2seproject3:debug>
51.1244 - <customize>
51.1245 + <customizeDebuggee>
51.1246 <arg line="${application.args}"/>
51.1247 - </customize>
51.1248 + </customizeDebuggee>
51.1249 </j2seproject3:debug>
51.1250 </target>
51.1251 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
51.1252 @@ -690,22 +1386,137 @@
51.1253 </target>
51.1254 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
51.1255 <!--
51.1256 + =================
51.1257 + PROFILING SECTION
51.1258 + =================
51.1259 + -->
51.1260 + <!--
51.1261 + pre NB7.2 profiler integration
51.1262 + -->
51.1263 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
51.1264 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
51.1265 + <nbprofiledirect>
51.1266 + <classpath>
51.1267 + <path path="${run.classpath}"/>
51.1268 + </classpath>
51.1269 + </nbprofiledirect>
51.1270 + <profile/>
51.1271 + </target>
51.1272 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
51.1273 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
51.1274 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
51.1275 + <nbprofiledirect>
51.1276 + <classpath>
51.1277 + <path path="${run.classpath}"/>
51.1278 + </classpath>
51.1279 + </nbprofiledirect>
51.1280 + <profile classname="${profile.class}"/>
51.1281 + </target>
51.1282 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
51.1283 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
51.1284 + <nbprofiledirect>
51.1285 + <classpath>
51.1286 + <path path="${run.classpath}"/>
51.1287 + </classpath>
51.1288 + </nbprofiledirect>
51.1289 + <profile classname="sun.applet.AppletViewer">
51.1290 + <customize>
51.1291 + <arg value="${applet.url}"/>
51.1292 + </customize>
51.1293 + </profile>
51.1294 + </target>
51.1295 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
51.1296 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
51.1297 + <nbprofiledirect>
51.1298 + <classpath>
51.1299 + <path path="${run.test.classpath}"/>
51.1300 + </classpath>
51.1301 + </nbprofiledirect>
51.1302 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
51.1303 + <customize>
51.1304 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
51.1305 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
51.1306 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
51.1307 + <jvmarg line="${profiler.info.jvmargs}"/>
51.1308 + <classpath>
51.1309 + <path path="${run.test.classpath}"/>
51.1310 + </classpath>
51.1311 + </customize>
51.1312 + </j2seproject3:junit>
51.1313 + </target>
51.1314 + <!--
51.1315 + end of pre NB72 profiling section
51.1316 + -->
51.1317 + <target if="netbeans.home" name="-profile-check">
51.1318 + <condition property="profiler.configured">
51.1319 + <or>
51.1320 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
51.1321 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
51.1322 + </or>
51.1323 + </condition>
51.1324 + </target>
51.1325 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
51.1326 + <startprofiler/>
51.1327 + <antcall target="run"/>
51.1328 + </target>
51.1329 + <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">
51.1330 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
51.1331 + <startprofiler/>
51.1332 + <antcall target="run-single"/>
51.1333 + </target>
51.1334 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
51.1335 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
51.1336 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
51.1337 + <startprofiler/>
51.1338 + <antcall target="test-single"/>
51.1339 + </target>
51.1340 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
51.1341 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
51.1342 + <startprofiler/>
51.1343 + <antcall target="run-test-with-main"/>
51.1344 + </target>
51.1345 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
51.1346 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
51.1347 + <startprofiler/>
51.1348 + <antcall target="run-applet"/>
51.1349 + </target>
51.1350 + <!--
51.1351 ===============
51.1352 JAVADOC SECTION
51.1353 ===============
51.1354 -->
51.1355 <target depends="init" if="have.sources" name="-javadoc-build">
51.1356 <mkdir dir="${dist.javadoc.dir}"/>
51.1357 - <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}">
51.1358 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
51.1359 + <and>
51.1360 + <isset property="endorsed.classpath.cmd.line.arg"/>
51.1361 + <not>
51.1362 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
51.1363 + </not>
51.1364 + </and>
51.1365 + </condition>
51.1366 + <condition else="" property="bug5101868workaround" value="*.java">
51.1367 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
51.1368 + </condition>
51.1369 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
51.1370 + <and>
51.1371 + <isset property="javadoc.html5"/>
51.1372 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
51.1373 + </and>
51.1374 + </condition>
51.1375 + <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}">
51.1376 <classpath>
51.1377 <path path="${javac.classpath}"/>
51.1378 </classpath>
51.1379 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
51.1380 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
51.1381 <filename name="**/*.java"/>
51.1382 </fileset>
51.1383 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
51.1384 <include name="**/*.java"/>
51.1385 + <exclude name="*.java"/>
51.1386 </fileset>
51.1387 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
51.1388 + <arg line="${javadoc.html5.cmd.line.arg}"/>
51.1389 </javadoc>
51.1390 <copy todir="${dist.javadoc.dir}">
51.1391 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
51.1392 @@ -722,7 +1533,7 @@
51.1393 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
51.1394 <!--
51.1395 =========================
51.1396 - JUNIT COMPILATION SECTION
51.1397 + TEST COMPILATION SECTION
51.1398 =========================
51.1399 -->
51.1400 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
51.1401 @@ -732,11 +1543,63 @@
51.1402 <!-- Empty placeholder for easier customization. -->
51.1403 <!-- You can override this target in the ../build.xml file. -->
51.1404 </target>
51.1405 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
51.1406 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
51.1407 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
51.1408 + <and>
51.1409 + <isset property="test.module.name"/>
51.1410 + <length length="0" string="${test.module.name}" when="greater"/>
51.1411 + </and>
51.1412 + </condition>
51.1413 + <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">
51.1414 + <and>
51.1415 + <isset property="test.module.name"/>
51.1416 + <length length="0" string="${test.module.name}" when="greater"/>
51.1417 + </and>
51.1418 + </condition>
51.1419 + </target>
51.1420 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
51.1421 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
51.1422 + <and>
51.1423 + <isset property="test.module.name"/>
51.1424 + <length length="0" string="${test.module.name}" when="greater"/>
51.1425 + </and>
51.1426 + </condition>
51.1427 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
51.1428 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
51.1429 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
51.1430 + <chainedmapper>
51.1431 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
51.1432 + <filtermapper>
51.1433 + <uniqfilter/>
51.1434 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
51.1435 + </filtermapper>
51.1436 + <cutdirsmapper dirs="1"/>
51.1437 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
51.1438 + </chainedmapper>
51.1439 + </pathconvert>
51.1440 + <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}">
51.1441 + <and>
51.1442 + <isset property="test.module.name"/>
51.1443 + <length length="0" string="${test.module.name}" when="greater"/>
51.1444 + </and>
51.1445 + </condition>
51.1446 + </target>
51.1447 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
51.1448 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
51.1449 + <property name="javac.test.compilerargs" value=""/>
51.1450 + <property name="run.test.jvmargs" value=""/>
51.1451 + </target>
51.1452 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
51.1453 <target if="do.depend.true" name="-compile-test-depend">
51.1454 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
51.1455 </target>
51.1456 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
51.1457 - <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}"/>
51.1458 + <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">
51.1459 + <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}">
51.1460 + <customize>
51.1461 + <compilerarg line="${javac.test.compilerargs}"/>
51.1462 + </customize>
51.1463 + </j2seproject3:javac>
51.1464 <copy todir="${build.test.classes.dir}">
51.1465 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
51.1466 </copy>
51.1467 @@ -750,10 +1613,14 @@
51.1468 <!-- Empty placeholder for easier customization. -->
51.1469 <!-- You can override this target in the ../build.xml file. -->
51.1470 </target>
51.1471 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
51.1472 + <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">
51.1473 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
51.1474 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
51.1475 - <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}"/>
51.1476 + <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}">
51.1477 + <customize>
51.1478 + <compilerarg line="${javac.test.compilerargs}"/>
51.1479 + </customize>
51.1480 + </j2seproject3:javac>
51.1481 <copy todir="${build.test.classes.dir}">
51.1482 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
51.1483 </copy>
51.1484 @@ -765,14 +1632,14 @@
51.1485 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
51.1486 <!--
51.1487 =======================
51.1488 - JUNIT EXECUTION SECTION
51.1489 + TEST EXECUTION SECTION
51.1490 =======================
51.1491 -->
51.1492 <target depends="init" if="have.tests" name="-pre-test-run">
51.1493 <mkdir dir="${build.test.results.dir}"/>
51.1494 </target>
51.1495 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
51.1496 - <j2seproject3:junit testincludes="**/*Test.java"/>
51.1497 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
51.1498 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
51.1499 </target>
51.1500 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
51.1501 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
51.1502 @@ -783,41 +1650,42 @@
51.1503 <target depends="init" if="have.tests" name="-pre-test-run-single">
51.1504 <mkdir dir="${build.test.results.dir}"/>
51.1505 </target>
51.1506 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
51.1507 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
51.1508 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
51.1509 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
51.1510 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
51.1511 </target>
51.1512 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
51.1513 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
51.1514 </target>
51.1515 - <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"/>
51.1516 + <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"/>
51.1517 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
51.1518 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
51.1519 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
51.1520 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
51.1521 + </target>
51.1522 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
51.1523 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
51.1524 + </target>
51.1525 + <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"/>
51.1526 <!--
51.1527 =======================
51.1528 - JUNIT DEBUGGING SECTION
51.1529 + TEST DEBUGGING SECTION
51.1530 =======================
51.1531 -->
51.1532 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
51.1533 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
51.1534 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
51.1535 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
51.1536 - <delete file="${test.report.file}"/>
51.1537 - <mkdir dir="${build.test.results.dir}"/>
51.1538 - <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}">
51.1539 - <customize>
51.1540 - <syspropertyset>
51.1541 - <propertyref prefix="test-sys-prop."/>
51.1542 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
51.1543 - </syspropertyset>
51.1544 - <arg value="${test.class}"/>
51.1545 - <arg value="showoutput=true"/>
51.1546 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
51.1547 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
51.1548 - </customize>
51.1549 - </j2seproject3:debug>
51.1550 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
51.1551 + </target>
51.1552 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
51.1553 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
51.1554 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
51.1555 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
51.1556 </target>
51.1557 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
51.1558 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
51.1559 </target>
51.1560 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
51.1561 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
51.1562 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
51.1563 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
51.1564 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
51.1565 </target>
51.1566 @@ -843,9 +1711,9 @@
51.1567 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
51.1568 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
51.1569 <j2seproject3:debug classname="sun.applet.AppletViewer">
51.1570 - <customize>
51.1571 + <customizeDebuggee>
51.1572 <arg value="${applet.url}"/>
51.1573 - </customize>
51.1574 + </customizeDebuggee>
51.1575 </j2seproject3:debug>
51.1576 </target>
51.1577 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
51.1578 @@ -872,6 +1740,7 @@
51.1579 </target>
51.1580 <target depends="init" name="-do-clean">
51.1581 <delete dir="${build.dir}"/>
51.1582 + <delete dir="${dist.jlink.output}"/>
51.1583 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
51.1584 </target>
51.1585 <target name="-post-clean">
51.1586 @@ -882,9 +1751,12 @@
51.1587 <target name="-check-call-dep">
51.1588 <property file="${call.built.properties}" prefix="already.built."/>
51.1589 <condition property="should.call.dep">
51.1590 - <not>
51.1591 - <isset property="already.built.${call.subproject}"/>
51.1592 - </not>
51.1593 + <and>
51.1594 + <not>
51.1595 + <isset property="already.built.${call.subproject}"/>
51.1596 + </not>
51.1597 + <available file="${call.script}"/>
51.1598 + </and>
51.1599 </condition>
51.1600 </target>
51.1601 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
52.1 --- a/samples/livedb/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
52.2 +++ b/samples/livedb/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
52.3 @@ -4,5 +4,5 @@
52.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
52.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
52.6 nbproject/build-impl.xml.data.CRC32=acb473e7
52.7 -nbproject/build-impl.xml.script.CRC32=e442701c
52.8 -nbproject/build-impl.xml.stylesheet.CRC32=78d75bcc@1.39.0.45
52.9 +nbproject/build-impl.xml.script.CRC32=186a778a
52.10 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
53.1 --- a/samples/livedb/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
53.2 +++ b/samples/livedb/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
53.3 @@ -18,8 +18,12 @@
53.4 #debug.transport=dt_socket
53.5 debug.classpath=\
53.6 ${run.classpath}
53.7 +debug.modulepath=\
53.8 + ${run.modulepath}
53.9 debug.test.classpath=\
53.10 ${run.test.classpath}
53.11 +debug.test.modulepath=\
53.12 + ${run.test.modulepath}
53.13 # This directory is removed when the project is cleaned:
53.14 dist.dir=dist
53.15 dist.jar=${dist.dir}/livedb.jar
53.16 @@ -36,15 +40,19 @@
53.17 # Space-separated list of extra javac options
53.18 javac.compilerargs=
53.19 javac.deprecation=false
53.20 +javac.modulepath=
53.21 +javac.processormodulepath=
53.22 javac.processorpath=\
53.23 ${javac.classpath}
53.24 -javac.source=1.5
53.25 -javac.target=1.5
53.26 +javac.source=1.6
53.27 +javac.target=1.6
53.28 javac.test.classpath=\
53.29 ${javac.classpath}:\
53.30 ${build.classes.dir}:\
53.31 ${file.reference.derby.jar}:\
53.32 ${file.reference.junit-4.4.jar}
53.33 +javac.test.modulepath=\
53.34 + ${javac.modulepath}
53.35 javac.test.processorpath=\
53.36 ${javac.test.classpath}
53.37 javadoc.additionalparam=
53.38 @@ -67,9 +75,13 @@
53.39 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
53.40 # or test-sys-prop.name=value to set system properties for unit tests):
53.41 run.jvmargs=
53.42 +run.modulepath=\
53.43 + ${javac.modulepath}
53.44 run.test.classpath=\
53.45 ${javac.test.classpath}:\
53.46 ${build.test.classes.dir}
53.47 +run.test.modulepath=\
53.48 + ${javac.test.modulepath}
53.49 source.encoding=UTF-8
53.50 src.dir=src
53.51 test.src.dir=test
54.1 --- a/samples/misuse/build.xml Mon Nov 11 05:47:32 2019 +0100
54.2 +++ b/samples/misuse/build.xml Mon Nov 11 13:17:34 2019 +0100
54.3 @@ -2,6 +2,11 @@
54.4 <!-- You may freely edit this file. See commented blocks below for -->
54.5 <!-- some examples of how to customize the build. -->
54.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
54.7 +<!-- By default, only the Clean and Build commands use this build script. -->
54.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
54.9 +<!-- the Compile on Save feature is turned off for the project. -->
54.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
54.11 +<!-- in the project's Project Properties dialog box.-->
54.12 <project name="misuse" default="default" basedir=".">
54.13 <description>Builds, tests, and runs the project misuse.</description>
54.14 <import file="nbproject/build-impl.xml"/>
54.15 @@ -46,8 +51,7 @@
54.16 -init-macrodef-junit: defines macro for junit execution
54.17 -init-macrodef-debug: defines macro for class debugging
54.18 -init-macrodef-java: defines macro for class execution
54.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
54.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
54.21 + -do-jar: JAR building
54.22 run: execution of project
54.23 -javadoc-build: Javadoc generation
54.24 test-report: JUnit report generation
55.1 --- a/samples/misuse/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
55.2 +++ b/samples/misuse/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
55.3 @@ -12,14 +12,21 @@
55.4 - execution
55.5 - debugging
55.6 - javadoc
55.7 - - junit compilation
55.8 - - junit execution
55.9 - - junit debugging
55.10 + - test compilation
55.11 + - test execution
55.12 + - test debugging
55.13 - applet
55.14 - cleanup
55.15
55.16 -->
55.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="misuse-impl">
55.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="misuse-impl">
55.19 + <fail message="Please build using Ant 1.8.0 or higher.">
55.20 + <condition>
55.21 + <not>
55.22 + <antversion atleast="1.8.0"/>
55.23 + </not>
55.24 + </condition>
55.25 + </fail>
55.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
55.27 <!--
55.28 ======================
55.29 @@ -39,28 +46,136 @@
55.30 <property file="${user.properties.file}"/>
55.31 <!-- The two properties below are usually overridden -->
55.32 <!-- by the active platform. Just a fallback. -->
55.33 - <property name="default.javac.source" value="1.4"/>
55.34 - <property name="default.javac.target" value="1.4"/>
55.35 + <property name="default.javac.source" value="1.6"/>
55.36 + <property name="default.javac.target" value="1.6"/>
55.37 </target>
55.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
55.39 <property file="nbproject/configs/${config}.properties"/>
55.40 <property file="nbproject/project.properties"/>
55.41 </target>
55.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
55.43 + <target name="-init-modules-supported">
55.44 + <condition property="modules.supported.internal" value="true">
55.45 + <not>
55.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
55.47 + </not>
55.48 + </condition>
55.49 + </target>
55.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
55.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
55.52 + <attribute name="property"/>
55.53 + <attribute name="sourcepath"/>
55.54 + <sequential>
55.55 + <loadresource property="@{property}" quiet="true">
55.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
55.57 + <filterchain>
55.58 + <stripjavacomments/>
55.59 + <linecontainsregexp>
55.60 + <regexp pattern="module .* \{"/>
55.61 + </linecontainsregexp>
55.62 + <tokenfilter>
55.63 + <linetokenizer/>
55.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
55.65 + </tokenfilter>
55.66 + <striplinebreaks/>
55.67 + </filterchain>
55.68 + </loadresource>
55.69 + </sequential>
55.70 + </macrodef>
55.71 + </target>
55.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
55.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
55.74 + <condition>
55.75 + <not>
55.76 + <antversion atleast="1.10.0"/>
55.77 + </not>
55.78 + </condition>
55.79 + </fail>
55.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
55.81 + <condition property="named.module.internal">
55.82 + <and>
55.83 + <isset property="module.name"/>
55.84 + <length length="0" string="${module.name}" when="greater"/>
55.85 + </and>
55.86 + </condition>
55.87 + <condition property="unnamed.module.internal">
55.88 + <not>
55.89 + <isset property="named.module.internal"/>
55.90 + </not>
55.91 + </condition>
55.92 + <property name="javac.modulepath" value=""/>
55.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
55.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
55.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
55.96 + <property name="javac.upgrademodulepath" value=""/>
55.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
55.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
55.99 + <and>
55.100 + <isset property="javac.systemmodulepath"/>
55.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
55.102 + </and>
55.103 + </condition>
55.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
55.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
55.106 + <property name="module.name" value=""/>
55.107 + </target>
55.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
55.109 + <property name="platform.java" value="${java.home}/bin/java"/>
55.110 <available file="${manifest.file}" property="manifest.available"/>
55.111 - <condition property="manifest.available+main.class">
55.112 + <condition property="splashscreen.available">
55.113 <and>
55.114 - <isset property="manifest.available"/>
55.115 + <not>
55.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
55.117 + </not>
55.118 + <available file="${application.splash}"/>
55.119 + </and>
55.120 + </condition>
55.121 + <condition property="main.class.available">
55.122 + <and>
55.123 <isset property="main.class"/>
55.124 <not>
55.125 <equals arg1="${main.class}" arg2="" trim="true"/>
55.126 </not>
55.127 </and>
55.128 </condition>
55.129 - <condition property="manifest.available+main.class+mkdist.available">
55.130 + <condition property="profile.available">
55.131 <and>
55.132 - <istrue value="${manifest.available+main.class}"/>
55.133 - <isset property="libs.CopyLibs.classpath"/>
55.134 + <isset property="javac.profile"/>
55.135 + <length length="0" string="${javac.profile}" when="greater"/>
55.136 + <not>
55.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
55.138 + </not>
55.139 + </and>
55.140 + </condition>
55.141 + <condition property="do.archive">
55.142 + <or>
55.143 + <not>
55.144 + <istrue value="${jar.archive.disabled}"/>
55.145 + </not>
55.146 + <istrue value="${not.archive.disabled}"/>
55.147 + </or>
55.148 + </condition>
55.149 + <condition property="do.archive+manifest.available">
55.150 + <and>
55.151 + <isset property="manifest.available"/>
55.152 + <istrue value="${do.archive}"/>
55.153 + </and>
55.154 + </condition>
55.155 + <condition property="do.archive+main.class.available">
55.156 + <and>
55.157 + <isset property="main.class.available"/>
55.158 + <istrue value="${do.archive}"/>
55.159 + </and>
55.160 + </condition>
55.161 + <condition property="do.archive+splashscreen.available">
55.162 + <and>
55.163 + <isset property="splashscreen.available"/>
55.164 + <istrue value="${do.archive}"/>
55.165 + </and>
55.166 + </condition>
55.167 + <condition property="do.archive+profile.available">
55.168 + <and>
55.169 + <isset property="profile.available"/>
55.170 + <istrue value="${do.archive}"/>
55.171 </and>
55.172 </condition>
55.173 <condition property="have.tests">
55.174 @@ -86,6 +201,7 @@
55.175 </and>
55.176 </condition>
55.177 <property name="run.jvmargs" value=""/>
55.178 + <property name="run.jvmargs.ide" value=""/>
55.179 <property name="javac.compilerargs" value=""/>
55.180 <property name="work.dir" value="${basedir}"/>
55.181 <condition property="no.deps">
55.182 @@ -97,6 +213,8 @@
55.183 <property name="javadoc.preview" value="true"/>
55.184 <property name="application.args" value=""/>
55.185 <property name="source.encoding" value="${file.encoding}"/>
55.186 + <property name="runtime.encoding" value="${source.encoding}"/>
55.187 + <property name="manifest.encoding" value="${source.encoding}"/>
55.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
55.189 <and>
55.190 <isset property="javadoc.encoding"/>
55.191 @@ -112,12 +230,58 @@
55.192 <condition property="do.depend.true">
55.193 <istrue value="${do.depend}"/>
55.194 </condition>
55.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
55.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
55.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
55.198 <and>
55.199 - <isset property="jaxws.endorsed.dir"/>
55.200 - <available file="nbproject/jaxws-build.xml"/>
55.201 + <isset property="endorsed.classpath"/>
55.202 + <not>
55.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
55.204 + </not>
55.205 </and>
55.206 </condition>
55.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
55.208 + <isset property="profile.available"/>
55.209 + </condition>
55.210 + <condition else="false" property="jdkBug6558476">
55.211 + <and>
55.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
55.213 + <not>
55.214 + <os family="unix"/>
55.215 + </not>
55.216 + </and>
55.217 + </condition>
55.218 + <condition else="false" property="javac.fork">
55.219 + <or>
55.220 + <istrue value="${jdkBug6558476}"/>
55.221 + <istrue value="${javac.external.vm}"/>
55.222 + </or>
55.223 + </condition>
55.224 + <property name="jar.index" value="false"/>
55.225 + <property name="jar.index.metainf" value="${jar.index}"/>
55.226 + <property name="copylibs.rebase" value="true"/>
55.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
55.228 + <condition property="junit.available">
55.229 + <or>
55.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
55.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
55.232 + </or>
55.233 + </condition>
55.234 + <condition property="testng.available">
55.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
55.236 + </condition>
55.237 + <condition property="junit+testng.available">
55.238 + <and>
55.239 + <istrue value="${junit.available}"/>
55.240 + <istrue value="${testng.available}"/>
55.241 + </and>
55.242 + </condition>
55.243 + <condition else="testng" property="testng.mode" value="mixed">
55.244 + <istrue value="${junit+testng.available}"/>
55.245 + </condition>
55.246 + <condition else="" property="testng.debug.mode" value="-mixed">
55.247 + <istrue value="${junit+testng.available}"/>
55.248 + </condition>
55.249 + <property name="java.failonerror" value="true"/>
55.250 </target>
55.251 <target name="-post-init">
55.252 <!-- Empty placeholder for easier customization. -->
55.253 @@ -144,26 +308,152 @@
55.254 </sequential>
55.255 </macrodef>
55.256 </target>
55.257 - <target name="-init-macrodef-javac">
55.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
55.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
55.260 <attribute default="${src.dir}" name="srcdir"/>
55.261 <attribute default="${build.classes.dir}" name="destdir"/>
55.262 <attribute default="${javac.classpath}" name="classpath"/>
55.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
55.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
55.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
55.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
55.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
55.268 <attribute default="${includes}" name="includes"/>
55.269 <attribute default="${excludes}" name="excludes"/>
55.270 <attribute default="${javac.debug}" name="debug"/>
55.271 - <attribute default="" name="sourcepath"/>
55.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
55.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
55.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
55.275 <element name="customize" optional="true"/>
55.276 <sequential>
55.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
55.278 + <condition property="warn.excludes.internal">
55.279 + <and>
55.280 + <isset property="named.module.internal"/>
55.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
55.282 + </and>
55.283 + </condition>
55.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
55.285 + <property location="${build.dir}/empty" name="empty.dir"/>
55.286 + <mkdir dir="${empty.dir}"/>
55.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
55.288 + <condition property="processormodulepath.set">
55.289 + <resourcecount count="0" when="greater">
55.290 + <path>
55.291 + <pathelement path="@{processormodulepath}"/>
55.292 + </path>
55.293 + </resourcecount>
55.294 + </condition>
55.295 + <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}">
55.296 + <src>
55.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
55.298 + <include name="*"/>
55.299 + </dirset>
55.300 + </src>
55.301 <classpath>
55.302 <path path="@{classpath}"/>
55.303 </classpath>
55.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
55.305 + <modulepath>
55.306 + <path path="@{modulepath}"/>
55.307 + </modulepath>
55.308 + <upgrademodulepath>
55.309 + <path path="@{upgrademodulepath}"/>
55.310 + </upgrademodulepath>
55.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
55.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
55.313 + <compilerarg line="${javac.compilerargs}"/>
55.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
55.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
55.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
55.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
55.318 + <compilerarg line="${ap.processors.internal}"/>
55.319 + <compilerarg line="${annotation.processing.processor.options}"/>
55.320 + <compilerarg value="-s"/>
55.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
55.322 + <compilerarg line="${ap.proc.none.internal}"/>
55.323 <customize/>
55.324 </javac>
55.325 </sequential>
55.326 </macrodef>
55.327 + </target>
55.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
55.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
55.330 + <attribute default="${src.dir}" name="srcdir"/>
55.331 + <attribute default="${build.classes.dir}" name="destdir"/>
55.332 + <attribute default="${javac.classpath}" name="classpath"/>
55.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
55.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
55.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
55.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
55.337 + <attribute default="${includes}" name="includes"/>
55.338 + <attribute default="${excludes}" name="excludes"/>
55.339 + <attribute default="${javac.debug}" name="debug"/>
55.340 + <attribute default="${empty.dir}" name="sourcepath"/>
55.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
55.342 + <element name="customize" optional="true"/>
55.343 + <sequential>
55.344 + <property location="${build.dir}/empty" name="empty.dir"/>
55.345 + <mkdir dir="${empty.dir}"/>
55.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
55.347 + <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}">
55.348 + <src>
55.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
55.350 + <include name="*"/>
55.351 + </dirset>
55.352 + </src>
55.353 + <classpath>
55.354 + <path path="@{classpath}"/>
55.355 + </classpath>
55.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
55.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
55.358 + <compilerarg line="${javac.compilerargs}"/>
55.359 + <compilerarg value="-processorpath"/>
55.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
55.361 + <compilerarg line="${ap.processors.internal}"/>
55.362 + <compilerarg line="${annotation.processing.processor.options}"/>
55.363 + <compilerarg value="-s"/>
55.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
55.365 + <compilerarg line="${ap.proc.none.internal}"/>
55.366 + <customize/>
55.367 + </javac>
55.368 + </sequential>
55.369 + </macrodef>
55.370 + </target>
55.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
55.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
55.373 + <attribute default="${src.dir}" name="srcdir"/>
55.374 + <attribute default="${build.classes.dir}" name="destdir"/>
55.375 + <attribute default="${javac.classpath}" name="classpath"/>
55.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
55.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
55.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
55.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
55.380 + <attribute default="${includes}" name="includes"/>
55.381 + <attribute default="${excludes}" name="excludes"/>
55.382 + <attribute default="${javac.debug}" name="debug"/>
55.383 + <attribute default="${empty.dir}" name="sourcepath"/>
55.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
55.385 + <element name="customize" optional="true"/>
55.386 + <sequential>
55.387 + <property location="${build.dir}/empty" name="empty.dir"/>
55.388 + <mkdir dir="${empty.dir}"/>
55.389 + <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}">
55.390 + <src>
55.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
55.392 + <include name="*"/>
55.393 + </dirset>
55.394 + </src>
55.395 + <classpath>
55.396 + <path path="@{classpath}"/>
55.397 + </classpath>
55.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
55.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
55.400 + <compilerarg line="${javac.compilerargs}"/>
55.401 + <customize/>
55.402 + </javac>
55.403 + </sequential>
55.404 + </macrodef>
55.405 + </target>
55.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
55.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
55.408 <attribute default="${src.dir}" name="srcdir"/>
55.409 <attribute default="${build.classes.dir}" name="destdir"/>
55.410 @@ -180,51 +470,383 @@
55.411 <attribute default="${build.classes.dir}" name="destdir"/>
55.412 <sequential>
55.413 <fail unless="javac.includes">Must set javac.includes</fail>
55.414 - <pathconvert pathsep="," property="javac.includes.binary">
55.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
55.416 <path>
55.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
55.418 </path>
55.419 <globmapper from="*.java" to="*.class"/>
55.420 </pathconvert>
55.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
55.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
55.423 <delete>
55.424 - <files includes="${javac.includes.binary}"/>
55.425 + <files includesfile="${javac.includesfile.binary}"/>
55.426 + </delete>
55.427 + <delete>
55.428 + <fileset file="${javac.includesfile.binary}"/>
55.429 </delete>
55.430 </sequential>
55.431 </macrodef>
55.432 </target>
55.433 - <target name="-init-macrodef-junit">
55.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
55.435 + <condition else="false" property="nb.junit.batch" value="true">
55.436 + <and>
55.437 + <istrue value="${junit.available}"/>
55.438 + <not>
55.439 + <isset property="test.method"/>
55.440 + </not>
55.441 + </and>
55.442 + </condition>
55.443 + <condition else="false" property="nb.junit.single" value="true">
55.444 + <and>
55.445 + <istrue value="${junit.available}"/>
55.446 + <isset property="test.method"/>
55.447 + </and>
55.448 + </condition>
55.449 + </target>
55.450 + <target name="-init-test-properties">
55.451 + <property name="test.binaryincludes" value="<nothing>"/>
55.452 + <property name="test.binarytestincludes" value=""/>
55.453 + <property name="test.binaryexcludes" value=""/>
55.454 + </target>
55.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
55.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
55.457 + <attribute default="${includes}" name="includes"/>
55.458 + <attribute default="${excludes}" name="excludes"/>
55.459 + <element name="customizePrototype" optional="true"/>
55.460 + <sequential>
55.461 + <property name="junit.forkmode" value="perTest"/>
55.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
55.463 + <syspropertyset>
55.464 + <propertyref prefix="test-sys-prop."/>
55.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
55.466 + </syspropertyset>
55.467 + <classpath>
55.468 + <path path="${run.test.classpath}"/>
55.469 + </classpath>
55.470 + <modulepath>
55.471 + <path path="${run.test.modulepath}"/>
55.472 + </modulepath>
55.473 + <formatter type="brief" usefile="false"/>
55.474 + <formatter type="xml"/>
55.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
55.476 + <jvmarg value="-ea"/>
55.477 + <jvmarg line="${run.test.jvmargs}"/>
55.478 + <customizePrototype/>
55.479 + </junit>
55.480 + </sequential>
55.481 + </macrodef>
55.482 + </target>
55.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
55.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
55.485 + <attribute default="${includes}" name="includes"/>
55.486 + <attribute default="${excludes}" name="excludes"/>
55.487 + <element name="customizePrototype" optional="true"/>
55.488 + <sequential>
55.489 + <property name="junit.forkmode" value="perTest"/>
55.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
55.491 + <syspropertyset>
55.492 + <propertyref prefix="test-sys-prop."/>
55.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
55.494 + </syspropertyset>
55.495 + <classpath>
55.496 + <path path="${run.test.classpath}"/>
55.497 + </classpath>
55.498 + <formatter type="brief" usefile="false"/>
55.499 + <formatter type="xml"/>
55.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
55.501 + <jvmarg value="-ea"/>
55.502 + <customizePrototype/>
55.503 + </junit>
55.504 + </sequential>
55.505 + </macrodef>
55.506 + </target>
55.507 + <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}">
55.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
55.509 <attribute default="${includes}" name="includes"/>
55.510 <attribute default="${excludes}" name="excludes"/>
55.511 <attribute default="**" name="testincludes"/>
55.512 + <attribute default="" name="testmethods"/>
55.513 + <element name="customize" optional="true"/>
55.514 <sequential>
55.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
55.516 - <batchtest todir="${build.test.results.dir}">
55.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
55.518 - <filename name="@{testincludes}"/>
55.519 - </fileset>
55.520 - </batchtest>
55.521 + <j2seproject3:junit-prototype>
55.522 + <customizePrototype>
55.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
55.524 + <customize/>
55.525 + </customizePrototype>
55.526 + </j2seproject3:junit-prototype>
55.527 + </sequential>
55.528 + </macrodef>
55.529 + </target>
55.530 + <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}">
55.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
55.532 + <attribute default="${includes}" name="includes"/>
55.533 + <attribute default="${excludes}" name="excludes"/>
55.534 + <attribute default="**" name="testincludes"/>
55.535 + <attribute default="" name="testmethods"/>
55.536 + <element name="customize" optional="true"/>
55.537 + <sequential>
55.538 + <j2seproject3:junit-prototype>
55.539 + <customizePrototype>
55.540 + <batchtest todir="${build.test.results.dir}">
55.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
55.542 + <filename name="@{testincludes}"/>
55.543 + </fileset>
55.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
55.545 + <filename name="${test.binarytestincludes}"/>
55.546 + </fileset>
55.547 + </batchtest>
55.548 + <customize/>
55.549 + </customizePrototype>
55.550 + </j2seproject3:junit-prototype>
55.551 + </sequential>
55.552 + </macrodef>
55.553 + </target>
55.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
55.555 + <target if="${testng.available}" name="-init-macrodef-testng">
55.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
55.557 + <attribute default="${includes}" name="includes"/>
55.558 + <attribute default="${excludes}" name="excludes"/>
55.559 + <attribute default="**" name="testincludes"/>
55.560 + <attribute default="" name="testmethods"/>
55.561 + <element name="customize" optional="true"/>
55.562 + <sequential>
55.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
55.564 + <isset property="test.method"/>
55.565 + </condition>
55.566 + <union id="test.set">
55.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
55.568 + <filename name="@{testincludes}"/>
55.569 + </fileset>
55.570 + </union>
55.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
55.572 + <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="misuse" testname="TestNG tests" workingDir="${work.dir}">
55.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
55.574 + <propertyset>
55.575 + <propertyref prefix="test-sys-prop."/>
55.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
55.577 + </propertyset>
55.578 <classpath>
55.579 <path path="${run.test.classpath}"/>
55.580 </classpath>
55.581 - <syspropertyset>
55.582 - <propertyref prefix="test-sys-prop."/>
55.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
55.584 - </syspropertyset>
55.585 - <formatter type="brief" usefile="false"/>
55.586 - <formatter type="xml"/>
55.587 - <jvmarg line="${run.jvmargs}"/>
55.588 - </junit>
55.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
55.590 + <customize/>
55.591 + </testng>
55.592 </sequential>
55.593 </macrodef>
55.594 </target>
55.595 - <target name="-init-macrodef-nbjpda">
55.596 + <target name="-init-macrodef-test-impl">
55.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
55.598 + <attribute default="${includes}" name="includes"/>
55.599 + <attribute default="${excludes}" name="excludes"/>
55.600 + <attribute default="**" name="testincludes"/>
55.601 + <attribute default="" name="testmethods"/>
55.602 + <element implicit="true" name="customize" optional="true"/>
55.603 + <sequential>
55.604 + <echo>No tests executed.</echo>
55.605 + </sequential>
55.606 + </macrodef>
55.607 + </target>
55.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
55.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
55.610 + <attribute default="${includes}" name="includes"/>
55.611 + <attribute default="${excludes}" name="excludes"/>
55.612 + <attribute default="**" name="testincludes"/>
55.613 + <attribute default="" name="testmethods"/>
55.614 + <element implicit="true" name="customize" optional="true"/>
55.615 + <sequential>
55.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
55.617 + <customize/>
55.618 + </j2seproject3:junit>
55.619 + </sequential>
55.620 + </macrodef>
55.621 + </target>
55.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
55.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
55.624 + <attribute default="${includes}" name="includes"/>
55.625 + <attribute default="${excludes}" name="excludes"/>
55.626 + <attribute default="**" name="testincludes"/>
55.627 + <attribute default="" name="testmethods"/>
55.628 + <element implicit="true" name="customize" optional="true"/>
55.629 + <sequential>
55.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
55.631 + <customize/>
55.632 + </j2seproject3:testng>
55.633 + </sequential>
55.634 + </macrodef>
55.635 + </target>
55.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
55.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
55.638 + <attribute default="${includes}" name="includes"/>
55.639 + <attribute default="${excludes}" name="excludes"/>
55.640 + <attribute default="**" name="testincludes"/>
55.641 + <attribute default="" name="testmethods"/>
55.642 + <sequential>
55.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
55.644 + <customize>
55.645 + <jvmarg line="${run.jvmargs}"/>
55.646 + <jvmarg line="${run.jvmargs.ide}"/>
55.647 + </customize>
55.648 + </j2seproject3:test-impl>
55.649 + </sequential>
55.650 + </macrodef>
55.651 + </target>
55.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
55.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
55.654 + <attribute default="${includes}" name="includes"/>
55.655 + <attribute default="${excludes}" name="excludes"/>
55.656 + <attribute default="**" name="testincludes"/>
55.657 + <attribute default="" name="testmethods"/>
55.658 + <element name="customizeDebuggee" optional="true"/>
55.659 + <sequential>
55.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
55.661 + <customize>
55.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
55.663 + <customizeDebuggee/>
55.664 + </customize>
55.665 + </j2seproject3:junit>
55.666 + </sequential>
55.667 + </macrodef>
55.668 + </target>
55.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
55.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
55.671 + <attribute default="${main.class}" name="testClass"/>
55.672 + <attribute default="" name="testMethod"/>
55.673 + <element name="customize2" optional="true"/>
55.674 + <sequential>
55.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
55.676 + <isset property="test.method"/>
55.677 + </condition>
55.678 + <condition else="-suitename misuse -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
55.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
55.680 + </condition>
55.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
55.682 + <mkdir dir="${build.test.results.dir}"/>
55.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
55.684 + <customizeDebuggee>
55.685 + <customize2/>
55.686 + <jvmarg value="-ea"/>
55.687 + <arg line="${testng.debug.mode}"/>
55.688 + <arg line="-d ${build.test.results.dir}"/>
55.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
55.690 + <arg line="${testng.cmd.args}"/>
55.691 + </customizeDebuggee>
55.692 + </j2seproject3:debug>
55.693 + </sequential>
55.694 + </macrodef>
55.695 + </target>
55.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
55.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
55.698 + <attribute default="${main.class}" name="testClass"/>
55.699 + <attribute default="" name="testMethod"/>
55.700 + <element implicit="true" name="customize2" optional="true"/>
55.701 + <sequential>
55.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
55.703 + <customize2/>
55.704 + </j2seproject3:testng-debug>
55.705 + </sequential>
55.706 + </macrodef>
55.707 + </target>
55.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
55.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
55.710 + <attribute default="${includes}" name="includes"/>
55.711 + <attribute default="${excludes}" name="excludes"/>
55.712 + <attribute default="**" name="testincludes"/>
55.713 + <attribute default="" name="testmethods"/>
55.714 + <attribute default="${main.class}" name="testClass"/>
55.715 + <attribute default="" name="testMethod"/>
55.716 + <sequential>
55.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
55.718 + <customizeDebuggee>
55.719 + <jvmarg line="${run.jvmargs}"/>
55.720 + <jvmarg line="${run.jvmargs.ide}"/>
55.721 + </customizeDebuggee>
55.722 + </j2seproject3:test-debug-impl>
55.723 + </sequential>
55.724 + </macrodef>
55.725 + </target>
55.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
55.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
55.728 + <attribute default="${includes}" name="includes"/>
55.729 + <attribute default="${excludes}" name="excludes"/>
55.730 + <attribute default="**" name="testincludes"/>
55.731 + <attribute default="" name="testmethods"/>
55.732 + <attribute default="${main.class}" name="testClass"/>
55.733 + <attribute default="" name="testMethod"/>
55.734 + <sequential>
55.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
55.736 + <customize2>
55.737 + <syspropertyset>
55.738 + <propertyref prefix="test-sys-prop."/>
55.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
55.740 + </syspropertyset>
55.741 + </customize2>
55.742 + </j2seproject3:testng-debug-impl>
55.743 + </sequential>
55.744 + </macrodef>
55.745 + </target>
55.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
55.747 + <!--
55.748 + pre NB7.2 profiling section; consider it deprecated
55.749 + -->
55.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
55.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
55.752 + <!-- Empty placeholder for easier customization. -->
55.753 + <!-- You can override this target in the ../build.xml file. -->
55.754 + </target>
55.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
55.756 + <!-- Empty placeholder for easier customization. -->
55.757 + <!-- You can override this target in the ../build.xml file. -->
55.758 + </target>
55.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
55.760 + <macrodef name="resolve">
55.761 + <attribute name="name"/>
55.762 + <attribute name="value"/>
55.763 + <sequential>
55.764 + <property name="@{name}" value="${env.@{value}}"/>
55.765 + </sequential>
55.766 + </macrodef>
55.767 + <macrodef name="profile">
55.768 + <attribute default="${main.class}" name="classname"/>
55.769 + <element name="customize" optional="true"/>
55.770 + <sequential>
55.771 + <property environment="env"/>
55.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
55.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
55.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
55.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
55.776 + <jvmarg line="${profiler.info.jvmargs}"/>
55.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
55.778 + <arg line="${application.args}"/>
55.779 + <classpath>
55.780 + <path path="${run.classpath}"/>
55.781 + </classpath>
55.782 + <syspropertyset>
55.783 + <propertyref prefix="run-sys-prop."/>
55.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
55.785 + </syspropertyset>
55.786 + <customize/>
55.787 + </java>
55.788 + </sequential>
55.789 + </macrodef>
55.790 + </target>
55.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
55.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
55.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
55.794 + </target>
55.795 + <!--
55.796 + end of pre NB7.2 profiling section
55.797 + -->
55.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
55.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
55.800 <attribute default="${main.class}" name="name"/>
55.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
55.802 <attribute default="${debug.classpath}" name="classpath"/>
55.803 <attribute default="" name="stopclassname"/>
55.804 <sequential>
55.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
55.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
55.807 + <modulepath>
55.808 + <path path="@{modulepath}"/>
55.809 + </modulepath>
55.810 <classpath>
55.811 <path path="@{classpath}"/>
55.812 </classpath>
55.813 @@ -235,35 +857,120 @@
55.814 <attribute default="${build.classes.dir}" name="dir"/>
55.815 <sequential>
55.816 <nbjpdareload>
55.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
55.818 + <fileset dir="@{dir}" includes="${fix.classes}">
55.819 + <include name="${fix.includes}*.class"/>
55.820 + </fileset>
55.821 </nbjpdareload>
55.822 </sequential>
55.823 </macrodef>
55.824 </target>
55.825 <target name="-init-debug-args">
55.826 - <property name="version-output" value="java version "${ant.java.version}"/>
55.827 - <condition property="have-jdk-older-than-1.4">
55.828 - <or>
55.829 - <contains string="${version-output}" substring="java version "1.0"/>
55.830 - <contains string="${version-output}" substring="java version "1.1"/>
55.831 - <contains string="${version-output}" substring="java version "1.2"/>
55.832 - <contains string="${version-output}" substring="java version "1.3"/>
55.833 - </or>
55.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
55.835 + <os family="windows"/>
55.836 </condition>
55.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
55.838 - <istrue value="${have-jdk-older-than-1.4}"/>
55.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
55.840 + <isset property="debug.transport"/>
55.841 </condition>
55.842 </target>
55.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
55.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
55.845 + <attribute default="${module.name}" name="modulename"/>
55.846 <attribute default="${main.class}" name="classname"/>
55.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
55.848 <attribute default="${debug.classpath}" name="classpath"/>
55.849 + <element name="customizeDebuggee" optional="true"/>
55.850 + <sequential>
55.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
55.852 + <customize>
55.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
55.854 + <customizeDebuggee/>
55.855 + </customize>
55.856 + </j2seproject1:java>
55.857 + </sequential>
55.858 + </macrodef>
55.859 + </target>
55.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
55.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
55.862 + <attribute default="${module.name}" name="modulename"/>
55.863 + <attribute default="${main.class}" name="classname"/>
55.864 + <attribute default="${run.modulepath}" name="modulepath"/>
55.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
55.866 + <attribute default="${run.classpath}" name="classpath"/>
55.867 + <attribute default="jvm" name="jvm"/>
55.868 <element name="customize" optional="true"/>
55.869 <sequential>
55.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
55.871 - <jvmarg line="${debug-args-line}"/>
55.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
55.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
55.874 + <classpath>
55.875 + <path path="@{classpath}"/>
55.876 + </classpath>
55.877 + <modulepath>
55.878 + <pathelement path="@{modulepath}"/>
55.879 + <pathelement location="${module.build.classes.dir}"/>
55.880 + </modulepath>
55.881 + <upgrademodulepath>
55.882 + <path path="@{upgrademodulepath}"/>
55.883 + </upgrademodulepath>
55.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
55.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
55.886 <jvmarg line="${run.jvmargs}"/>
55.887 + <jvmarg line="${run.jvmargs.ide}"/>
55.888 + <syspropertyset>
55.889 + <propertyref prefix="run-sys-prop."/>
55.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
55.891 + </syspropertyset>
55.892 + <customize/>
55.893 + </java>
55.894 + </sequential>
55.895 + </macrodef>
55.896 + </target>
55.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
55.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
55.899 + <attribute default="" name="modulename"/>
55.900 + <attribute default="${main.class}" name="classname"/>
55.901 + <attribute default="${run.modulepath}" name="modulepath"/>
55.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
55.903 + <attribute default="${run.classpath}" name="classpath"/>
55.904 + <attribute default="jvm" name="jvm"/>
55.905 + <element name="customize" optional="true"/>
55.906 + <sequential>
55.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
55.908 + <classpath>
55.909 + <path path="@{classpath}"/>
55.910 + </classpath>
55.911 + <modulepath>
55.912 + <path path="@{modulepath}"/>
55.913 + </modulepath>
55.914 + <upgrademodulepath>
55.915 + <path path="@{upgrademodulepath}"/>
55.916 + </upgrademodulepath>
55.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
55.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
55.919 + <jvmarg line="${run.jvmargs}"/>
55.920 + <jvmarg line="${run.jvmargs.ide}"/>
55.921 + <syspropertyset>
55.922 + <propertyref prefix="run-sys-prop."/>
55.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
55.924 + </syspropertyset>
55.925 + <customize/>
55.926 + </java>
55.927 + </sequential>
55.928 + </macrodef>
55.929 + </target>
55.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
55.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
55.932 + <attribute default="" name="modulename"/>
55.933 + <attribute default="${main.class}" name="classname"/>
55.934 + <attribute default="" name="modulepath"/>
55.935 + <attribute default="${run.classpath}" name="classpath"/>
55.936 + <attribute default="jvm" name="jvm"/>
55.937 + <element name="customize" optional="true"/>
55.938 + <sequential>
55.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
55.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
55.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
55.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
55.943 + <jvmarg line="${run.jvmargs}"/>
55.944 + <jvmarg line="${run.jvmargs.ide}"/>
55.945 <classpath>
55.946 <path path="@{classpath}"/>
55.947 </classpath>
55.948 @@ -276,39 +983,100 @@
55.949 </sequential>
55.950 </macrodef>
55.951 </target>
55.952 - <target name="-init-macrodef-java">
55.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
55.954 - <attribute default="${main.class}" name="classname"/>
55.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
55.956 + <target name="-init-macrodef-copylibs">
55.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
55.958 + <attribute default="${manifest.file}" name="manifest"/>
55.959 <element name="customize" optional="true"/>
55.960 <sequential>
55.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
55.962 - <jvmarg line="${run.jvmargs}"/>
55.963 - <classpath>
55.964 - <path path="${run.classpath}"/>
55.965 - </classpath>
55.966 - <syspropertyset>
55.967 - <propertyref prefix="run-sys-prop."/>
55.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
55.969 - </syspropertyset>
55.970 - <customize/>
55.971 - </java>
55.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
55.973 + <pathconvert property="run.classpath.without.build.classes.dir">
55.974 + <path path="${run.classpath}"/>
55.975 + <map from="${build.classes.dir.resolved}" to=""/>
55.976 + </pathconvert>
55.977 + <pathconvert pathsep=" " property="jar.classpath">
55.978 + <path path="${run.classpath.without.build.classes.dir}"/>
55.979 + <chainedmapper>
55.980 + <flattenmapper/>
55.981 + <filtermapper>
55.982 + <replacestring from=" " to="%20"/>
55.983 + </filtermapper>
55.984 + <globmapper from="*" to="lib/*"/>
55.985 + </chainedmapper>
55.986 + </pathconvert>
55.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
55.988 + <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}">
55.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
55.990 + <manifest>
55.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
55.992 + <customize/>
55.993 + </manifest>
55.994 + </copylibs>
55.995 </sequential>
55.996 </macrodef>
55.997 </target>
55.998 <target name="-init-presetdef-jar">
55.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
55.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
55.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
55.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
55.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
55.1004 </jar>
55.1005 </presetdef>
55.1006 </target>
55.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
55.1008 + <target name="-init-ap-cmdline-properties">
55.1009 + <property name="annotation.processing.enabled" value="true"/>
55.1010 + <property name="annotation.processing.processors.list" value=""/>
55.1011 + <property name="annotation.processing.processor.options" value=""/>
55.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
55.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
55.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
55.1015 + <condition property="ap.supported.internal" value="true">
55.1016 + <not>
55.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
55.1018 + </not>
55.1019 + </condition>
55.1020 + </target>
55.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
55.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
55.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
55.1024 + </condition>
55.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
55.1026 + <isfalse value="${annotation.processing.enabled}"/>
55.1027 + </condition>
55.1028 + </target>
55.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
55.1030 + <property name="ap.cmd.line.internal" value=""/>
55.1031 + </target>
55.1032 + <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"/>
55.1033 <!--
55.1034 ===================
55.1035 COMPILATION SECTION
55.1036 ===================
55.1037 -->
55.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
55.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
55.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
55.1041 + <delete file="${built-jar.properties}" quiet="true"/>
55.1042 + </target>
55.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
55.1044 + <echo level="warn" message="Cycle detected: misuse was already built"/>
55.1045 + </target>
55.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
55.1047 + <mkdir dir="${build.dir}"/>
55.1048 + <touch file="${built-jar.properties}" verbose="false"/>
55.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
55.1050 + <antcall target="-warn-already-built-jar"/>
55.1051 + <propertyfile file="${built-jar.properties}">
55.1052 + <entry key="${basedir}" value=""/>
55.1053 + </propertyfile>
55.1054 + </target>
55.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
55.1056 + <target depends="init" name="-check-automatic-build">
55.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
55.1058 + </target>
55.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
55.1060 + <antcall target="clean">
55.1061 + <param name="no.dependencies" value="true"/>
55.1062 + </antcall>
55.1063 + </target>
55.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
55.1065 <mkdir dir="${build.classes.dir}"/>
55.1066 </target>
55.1067 @@ -317,19 +1085,30 @@
55.1068 <!-- You can override this target in the ../build.xml file. -->
55.1069 </target>
55.1070 <target if="do.depend.true" name="-compile-depend">
55.1071 - <j2seproject3:depend/>
55.1072 + <pathconvert property="build.generated.subdirs">
55.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
55.1074 + <include name="*"/>
55.1075 + </dirset>
55.1076 + </pathconvert>
55.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
55.1078 </target>
55.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
55.1080 - <j2seproject3:javac/>
55.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
55.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
55.1083 <copy todir="${build.classes.dir}">
55.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
55.1085 </copy>
55.1086 </target>
55.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
55.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
55.1089 + <copy todir="${build.classes.dir}/META-INF">
55.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
55.1091 + </copy>
55.1092 + </target>
55.1093 <target name="-post-compile">
55.1094 <!-- Empty placeholder for easier customization. -->
55.1095 <!-- You can override this target in the ../build.xml file. -->
55.1096 </target>
55.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
55.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
55.1099 <target name="-pre-compile-single">
55.1100 <!-- Empty placeholder for easier customization. -->
55.1101 <!-- You can override this target in the ../build.xml file. -->
55.1102 @@ -337,13 +1116,13 @@
55.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
55.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
55.1105 <j2seproject3:force-recompile/>
55.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
55.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
55.1108 </target>
55.1109 <target name="-post-compile-single">
55.1110 <!-- Empty placeholder for easier customization. -->
55.1111 <!-- You can override this target in the ../build.xml file. -->
55.1112 </target>
55.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
55.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
55.1115 <!--
55.1116 ====================
55.1117 JAR BUILDING SECTION
55.1118 @@ -357,57 +1136,191 @@
55.1119 <!-- Empty placeholder for easier customization. -->
55.1120 <!-- You can override this target in the ../build.xml file. -->
55.1121 </target>
55.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
55.1123 - <j2seproject1:jar/>
55.1124 + <target depends="init,compile" name="-check-module-main-class">
55.1125 + <pathconvert property="main.class.file">
55.1126 + <string value="${main.class}"/>
55.1127 + <unpackagemapper from="*" to="*.class"/>
55.1128 + </pathconvert>
55.1129 + <condition property="do.module.main.class">
55.1130 + <and>
55.1131 + <isset property="main.class.available"/>
55.1132 + <available file="${build.classes.dir}/module-info.class"/>
55.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
55.1134 + <isset property="libs.CopyLibs.classpath"/>
55.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
55.1136 + </and>
55.1137 + </condition>
55.1138 </target>
55.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
55.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
55.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
55.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
55.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
55.1144 </target>
55.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
55.1146 - <j2seproject1:jar manifest="${manifest.file}">
55.1147 - <j2seproject1:manifest>
55.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
55.1149 - </j2seproject1:manifest>
55.1150 - </j2seproject1:jar>
55.1151 - <echo>To run this application from the command line without Ant, try:</echo>
55.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
55.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
55.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
55.1155 + </target>
55.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
55.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
55.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
55.1159 + </target>
55.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
55.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
55.1162 + <attribute name="Main-Class" value="${main.class}"/>
55.1163 + </manifest>
55.1164 + </target>
55.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
55.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
55.1167 + <attribute name="Profile" value="${javac.profile}"/>
55.1168 + </manifest>
55.1169 + </target>
55.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
55.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
55.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
55.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
55.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
55.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
55.1176 + </manifest>
55.1177 + </target>
55.1178 + <target depends="init,compile" name="-check-do-mkdist">
55.1179 + <condition property="do.mkdist">
55.1180 + <and>
55.1181 + <isset property="do.archive"/>
55.1182 + <isset property="libs.CopyLibs.classpath"/>
55.1183 + <not>
55.1184 + <istrue value="${mkdist.disabled}"/>
55.1185 + </not>
55.1186 + <not>
55.1187 + <available file="${build.classes.dir}/module-info.class"/>
55.1188 + </not>
55.1189 + </and>
55.1190 + </condition>
55.1191 + </target>
55.1192 + <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">
55.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
55.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
55.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
55.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
55.1197 + </target>
55.1198 + <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">
55.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
55.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
55.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
55.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
55.1203 + <isset property="named.module.internal"/>
55.1204 + </condition>
55.1205 <pathconvert property="run.classpath.with.dist.jar">
55.1206 <path path="${run.classpath}"/>
55.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
55.1208 + </pathconvert>
55.1209 + <pathconvert property="run.modulepath.with.dist.jar">
55.1210 + <path location="${dist.jar.resolved}"/>
55.1211 + <path path="${run.modulepath}"/>
55.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
55.1213 </pathconvert>
55.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
55.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
55.1216 + <isset property="named.module.internal"/>
55.1217 + </condition>
55.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
55.1219 + <and>
55.1220 + <isset property="modules.supported.internal"/>
55.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
55.1222 + </and>
55.1223 + </condition>
55.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
55.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
55.1226 + </condition>
55.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
55.1228 + <isset property="do.module.main.class"/>
55.1229 + </condition>
55.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
55.1231 + <isset property="named.module.internal"/>
55.1232 + </condition>
55.1233 + <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}">
55.1234 + <isset property="main.class.available"/>
55.1235 + </condition>
55.1236 + <condition else="debug" property="jar.usage.level" value="info">
55.1237 + <isset property="main.class.available"/>
55.1238 + </condition>
55.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
55.1240 </target>
55.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
55.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
55.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
55.1244 - <path path="${run.classpath}"/>
55.1245 - <map from="${build.classes.dir.resolved}" to=""/>
55.1246 - </pathconvert>
55.1247 - <pathconvert pathsep=" " property="jar.classpath">
55.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
55.1249 - <chainedmapper>
55.1250 - <flattenmapper/>
55.1251 - <globmapper from="*" to="lib/*"/>
55.1252 - </chainedmapper>
55.1253 - </pathconvert>
55.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
55.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
55.1256 - <fileset dir="${build.classes.dir}"/>
55.1257 - <manifest>
55.1258 - <attribute name="Main-Class" value="${main.class}"/>
55.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
55.1260 - </manifest>
55.1261 - </copylibs>
55.1262 - <echo>To run this application from the command line without Ant, try:</echo>
55.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
55.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
55.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
55.1266 + <delete>
55.1267 + <fileset file="${tmp.manifest.file}"/>
55.1268 + </delete>
55.1269 </target>
55.1270 + <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"/>
55.1271 + <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"/>
55.1272 <target name="-post-jar">
55.1273 <!-- Empty placeholder for easier customization. -->
55.1274 <!-- You can override this target in the ../build.xml file. -->
55.1275 </target>
55.1276 - <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"/>
55.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
55.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
55.1279 + <!--
55.1280 + =================
55.1281 + DEPLOY SECTION
55.1282 + =================
55.1283 + -->
55.1284 + <target name="-pre-deploy">
55.1285 + <!-- Empty placeholder for easier customization. -->
55.1286 + <!-- You can override this target in the ../build.xml file. -->
55.1287 + </target>
55.1288 + <target depends="init" name="-check-jlink">
55.1289 + <condition property="do.jlink.internal">
55.1290 + <and>
55.1291 + <istrue value="${do.jlink}"/>
55.1292 + <isset property="do.archive"/>
55.1293 + <isset property="named.module.internal"/>
55.1294 + </and>
55.1295 + </condition>
55.1296 + </target>
55.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
55.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
55.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
55.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
55.1301 + <and>
55.1302 + <isset property="jlink.additionalmodules"/>
55.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
55.1304 + </and>
55.1305 + </condition>
55.1306 + <condition property="jlink.do.strip.internal">
55.1307 + <and>
55.1308 + <isset property="jlink.strip"/>
55.1309 + <istrue value="${jlink.strip}"/>
55.1310 + </and>
55.1311 + </condition>
55.1312 + <condition property="jlink.do.additionalparam.internal">
55.1313 + <and>
55.1314 + <isset property="jlink.additionalparam"/>
55.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
55.1316 + </and>
55.1317 + </condition>
55.1318 + <condition property="jlink.do.launcher.internal">
55.1319 + <and>
55.1320 + <istrue value="${jlink.launcher}"/>
55.1321 + <isset property="main.class.available"/>
55.1322 + </and>
55.1323 + </condition>
55.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
55.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
55.1326 + <exec executable="${platform.jlink}">
55.1327 + <arg value="--module-path"/>
55.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
55.1329 + <arg value="--add-modules"/>
55.1330 + <arg value="${jlink.add.modules}"/>
55.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
55.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
55.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
55.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
55.1335 + <arg value="--output"/>
55.1336 + <arg value="${dist.jlink.output}"/>
55.1337 + </exec>
55.1338 + </target>
55.1339 + <target name="-post-deploy">
55.1340 + <!-- Empty placeholder for easier customization. -->
55.1341 + <!-- You can override this target in the ../build.xml file. -->
55.1342 + </target>
55.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
55.1344 <!--
55.1345 =================
55.1346 EXECUTION SECTION
55.1347 @@ -423,10 +1336,14 @@
55.1348 <target name="-do-not-recompile">
55.1349 <property name="javac.includes.binary" value=""/>
55.1350 </target>
55.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
55.1352 + <target depends="init,compile-single" name="run-single">
55.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
55.1354 <j2seproject1:java classname="${run.class}"/>
55.1355 </target>
55.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
55.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
55.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
55.1359 + </target>
55.1360 <!--
55.1361 =================
55.1362 DEBUGGING SECTION
55.1363 @@ -435,11 +1352,14 @@
55.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
55.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
55.1366 </target>
55.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
55.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
55.1369 + </target>
55.1370 <target depends="init,compile" name="-debug-start-debuggee">
55.1371 <j2seproject3:debug>
55.1372 - <customize>
55.1373 + <customizeDebuggee>
55.1374 <arg line="${application.args}"/>
55.1375 - </customize>
55.1376 + </customizeDebuggee>
55.1377 </j2seproject3:debug>
55.1378 </target>
55.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
55.1380 @@ -451,7 +1371,12 @@
55.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
55.1382 <j2seproject3:debug classname="${debug.class}"/>
55.1383 </target>
55.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
55.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
55.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
55.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
55.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
55.1389 + </target>
55.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
55.1391 <target depends="init" name="-pre-debug-fix">
55.1392 <fail unless="fix.includes">Must set fix.includes</fail>
55.1393 <property name="javac.includes" value="${fix.includes}.java"/>
55.1394 @@ -461,20 +1386,146 @@
55.1395 </target>
55.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
55.1397 <!--
55.1398 + =================
55.1399 + PROFILING SECTION
55.1400 + =================
55.1401 + -->
55.1402 + <!--
55.1403 + pre NB7.2 profiler integration
55.1404 + -->
55.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
55.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
55.1407 + <nbprofiledirect>
55.1408 + <classpath>
55.1409 + <path path="${run.classpath}"/>
55.1410 + </classpath>
55.1411 + </nbprofiledirect>
55.1412 + <profile/>
55.1413 + </target>
55.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
55.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
55.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
55.1417 + <nbprofiledirect>
55.1418 + <classpath>
55.1419 + <path path="${run.classpath}"/>
55.1420 + </classpath>
55.1421 + </nbprofiledirect>
55.1422 + <profile classname="${profile.class}"/>
55.1423 + </target>
55.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
55.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
55.1426 + <nbprofiledirect>
55.1427 + <classpath>
55.1428 + <path path="${run.classpath}"/>
55.1429 + </classpath>
55.1430 + </nbprofiledirect>
55.1431 + <profile classname="sun.applet.AppletViewer">
55.1432 + <customize>
55.1433 + <arg value="${applet.url}"/>
55.1434 + </customize>
55.1435 + </profile>
55.1436 + </target>
55.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
55.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
55.1439 + <nbprofiledirect>
55.1440 + <classpath>
55.1441 + <path path="${run.test.classpath}"/>
55.1442 + </classpath>
55.1443 + </nbprofiledirect>
55.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
55.1445 + <customize>
55.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
55.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
55.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
55.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
55.1450 + <classpath>
55.1451 + <path path="${run.test.classpath}"/>
55.1452 + </classpath>
55.1453 + </customize>
55.1454 + </j2seproject3:junit>
55.1455 + </target>
55.1456 + <!--
55.1457 + end of pre NB72 profiling section
55.1458 + -->
55.1459 + <target if="netbeans.home" name="-profile-check">
55.1460 + <condition property="profiler.configured">
55.1461 + <or>
55.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
55.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
55.1464 + </or>
55.1465 + </condition>
55.1466 + </target>
55.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
55.1468 + <startprofiler/>
55.1469 + <antcall target="run"/>
55.1470 + </target>
55.1471 + <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">
55.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
55.1473 + <startprofiler/>
55.1474 + <antcall target="run-single"/>
55.1475 + </target>
55.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
55.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
55.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
55.1479 + <startprofiler/>
55.1480 + <antcall target="test-single"/>
55.1481 + </target>
55.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
55.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
55.1484 + <startprofiler/>
55.1485 + <antcall target="run-test-with-main"/>
55.1486 + </target>
55.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
55.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
55.1489 + <startprofiler/>
55.1490 + <antcall target="run-applet"/>
55.1491 + </target>
55.1492 + <!--
55.1493 ===============
55.1494 JAVADOC SECTION
55.1495 ===============
55.1496 -->
55.1497 - <target depends="init" name="-javadoc-build">
55.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
55.1499 <mkdir dir="${dist.javadoc.dir}"/>
55.1500 - <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}">
55.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
55.1502 + <and>
55.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
55.1504 + <not>
55.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
55.1506 + </not>
55.1507 + </and>
55.1508 + </condition>
55.1509 + <condition else="" property="bug5101868workaround" value="*.java">
55.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
55.1511 + </condition>
55.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
55.1513 + <and>
55.1514 + <isset property="javadoc.html5"/>
55.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
55.1516 + </and>
55.1517 + </condition>
55.1518 + <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}">
55.1519 <classpath>
55.1520 <path path="${javac.classpath}"/>
55.1521 </classpath>
55.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
55.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
55.1524 <filename name="**/*.java"/>
55.1525 </fileset>
55.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
55.1527 + <include name="**/*.java"/>
55.1528 + <exclude name="*.java"/>
55.1529 + </fileset>
55.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
55.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
55.1532 </javadoc>
55.1533 + <copy todir="${dist.javadoc.dir}">
55.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
55.1535 + <filename name="**/doc-files/**"/>
55.1536 + </fileset>
55.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
55.1538 + <include name="**/doc-files/**"/>
55.1539 + </fileset>
55.1540 + </copy>
55.1541 </target>
55.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
55.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
55.1544 @@ -482,7 +1533,7 @@
55.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
55.1546 <!--
55.1547 =========================
55.1548 - JUNIT COMPILATION SECTION
55.1549 + TEST COMPILATION SECTION
55.1550 =========================
55.1551 -->
55.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
55.1553 @@ -492,11 +1543,63 @@
55.1554 <!-- Empty placeholder for easier customization. -->
55.1555 <!-- You can override this target in the ../build.xml file. -->
55.1556 </target>
55.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
55.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
55.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
55.1560 + <and>
55.1561 + <isset property="test.module.name"/>
55.1562 + <length length="0" string="${test.module.name}" when="greater"/>
55.1563 + </and>
55.1564 + </condition>
55.1565 + <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">
55.1566 + <and>
55.1567 + <isset property="test.module.name"/>
55.1568 + <length length="0" string="${test.module.name}" when="greater"/>
55.1569 + </and>
55.1570 + </condition>
55.1571 + </target>
55.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
55.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
55.1574 + <and>
55.1575 + <isset property="test.module.name"/>
55.1576 + <length length="0" string="${test.module.name}" when="greater"/>
55.1577 + </and>
55.1578 + </condition>
55.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
55.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
55.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
55.1582 + <chainedmapper>
55.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
55.1584 + <filtermapper>
55.1585 + <uniqfilter/>
55.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
55.1587 + </filtermapper>
55.1588 + <cutdirsmapper dirs="1"/>
55.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
55.1590 + </chainedmapper>
55.1591 + </pathconvert>
55.1592 + <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}">
55.1593 + <and>
55.1594 + <isset property="test.module.name"/>
55.1595 + <length length="0" string="${test.module.name}" when="greater"/>
55.1596 + </and>
55.1597 + </condition>
55.1598 + </target>
55.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
55.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
55.1601 + <property name="javac.test.compilerargs" value=""/>
55.1602 + <property name="run.test.jvmargs" value=""/>
55.1603 + </target>
55.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
55.1605 <target if="do.depend.true" name="-compile-test-depend">
55.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
55.1607 </target>
55.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
55.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
55.1610 + <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">
55.1611 + <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}">
55.1612 + <customize>
55.1613 + <compilerarg line="${javac.test.compilerargs}"/>
55.1614 + </customize>
55.1615 + </j2seproject3:javac>
55.1616 <copy todir="${build.test.classes.dir}">
55.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
55.1618 </copy>
55.1619 @@ -510,10 +1613,14 @@
55.1620 <!-- Empty placeholder for easier customization. -->
55.1621 <!-- You can override this target in the ../build.xml file. -->
55.1622 </target>
55.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
55.1624 + <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">
55.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
55.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
55.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
55.1628 + <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}">
55.1629 + <customize>
55.1630 + <compilerarg line="${javac.test.compilerargs}"/>
55.1631 + </customize>
55.1632 + </j2seproject3:javac>
55.1633 <copy todir="${build.test.classes.dir}">
55.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
55.1635 </copy>
55.1636 @@ -525,17 +1632,17 @@
55.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
55.1638 <!--
55.1639 =======================
55.1640 - JUNIT EXECUTION SECTION
55.1641 + TEST EXECUTION SECTION
55.1642 =======================
55.1643 -->
55.1644 <target depends="init" if="have.tests" name="-pre-test-run">
55.1645 <mkdir dir="${build.test.results.dir}"/>
55.1646 </target>
55.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
55.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
55.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
55.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
55.1651 </target>
55.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
55.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
55.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
55.1655 </target>
55.1656 <target depends="init" if="have.tests" name="test-report"/>
55.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
55.1658 @@ -543,41 +1650,42 @@
55.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
55.1660 <mkdir dir="${build.test.results.dir}"/>
55.1661 </target>
55.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
55.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
55.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
55.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
55.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
55.1667 </target>
55.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
55.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
55.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
55.1671 </target>
55.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
55.1673 + <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"/>
55.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
55.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
55.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
55.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
55.1678 + </target>
55.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
55.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
55.1681 + </target>
55.1682 + <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"/>
55.1683 <!--
55.1684 =======================
55.1685 - JUNIT DEBUGGING SECTION
55.1686 + TEST DEBUGGING SECTION
55.1687 =======================
55.1688 -->
55.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
55.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
55.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
55.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
55.1693 - <delete file="${test.report.file}"/>
55.1694 - <mkdir dir="${build.test.results.dir}"/>
55.1695 - <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}">
55.1696 - <customize>
55.1697 - <syspropertyset>
55.1698 - <propertyref prefix="test-sys-prop."/>
55.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
55.1700 - </syspropertyset>
55.1701 - <arg value="${test.class}"/>
55.1702 - <arg value="showoutput=true"/>
55.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
55.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
55.1705 - </customize>
55.1706 - </j2seproject3:debug>
55.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
55.1708 + </target>
55.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
55.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
55.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
55.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
55.1713 </target>
55.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
55.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
55.1716 </target>
55.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
55.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
55.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
55.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
55.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
55.1722 </target>
55.1723 @@ -603,9 +1711,9 @@
55.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
55.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
55.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
55.1727 - <customize>
55.1728 + <customizeDebuggee>
55.1729 <arg value="${applet.url}"/>
55.1730 - </customize>
55.1731 + </customizeDebuggee>
55.1732 </j2seproject3:debug>
55.1733 </target>
55.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
55.1735 @@ -614,14 +1722,49 @@
55.1736 CLEANUP SECTION
55.1737 ===============
55.1738 -->
55.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
55.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
55.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
55.1742 + <delete file="${built-clean.properties}" quiet="true"/>
55.1743 + </target>
55.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
55.1745 + <echo level="warn" message="Cycle detected: misuse was already built"/>
55.1746 + </target>
55.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
55.1748 + <mkdir dir="${build.dir}"/>
55.1749 + <touch file="${built-clean.properties}" verbose="false"/>
55.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
55.1751 + <antcall target="-warn-already-built-clean"/>
55.1752 + <propertyfile file="${built-clean.properties}">
55.1753 + <entry key="${basedir}" value=""/>
55.1754 + </propertyfile>
55.1755 + </target>
55.1756 <target depends="init" name="-do-clean">
55.1757 <delete dir="${build.dir}"/>
55.1758 - <delete dir="${dist.dir}"/>
55.1759 + <delete dir="${dist.jlink.output}"/>
55.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
55.1761 </target>
55.1762 <target name="-post-clean">
55.1763 <!-- Empty placeholder for easier customization. -->
55.1764 <!-- You can override this target in the ../build.xml file. -->
55.1765 </target>
55.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
55.1767 + <target name="-check-call-dep">
55.1768 + <property file="${call.built.properties}" prefix="already.built."/>
55.1769 + <condition property="should.call.dep">
55.1770 + <and>
55.1771 + <not>
55.1772 + <isset property="already.built.${call.subproject}"/>
55.1773 + </not>
55.1774 + <available file="${call.script}"/>
55.1775 + </and>
55.1776 + </condition>
55.1777 + </target>
55.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
55.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
55.1780 + <propertyset>
55.1781 + <propertyref prefix="transfer."/>
55.1782 + <mapper from="transfer.*" to="*" type="glob"/>
55.1783 + </propertyset>
55.1784 + </ant>
55.1785 + </target>
55.1786 </project>
56.1 --- a/samples/misuse/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
56.2 +++ b/samples/misuse/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
56.3 @@ -1,8 +1,8 @@
56.4 build.xml.data.CRC32=8bdd6677
56.5 -build.xml.script.CRC32=59d6f058
56.6 -build.xml.stylesheet.CRC32=be360661
56.7 +build.xml.script.CRC32=2f891f15
56.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
56.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
56.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
56.11 nbproject/build-impl.xml.data.CRC32=8bdd6677
56.12 -nbproject/build-impl.xml.script.CRC32=4af44842
56.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
56.14 +nbproject/build-impl.xml.script.CRC32=7a0988f1
56.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
57.1 --- a/samples/misuse/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
57.2 +++ b/samples/misuse/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
57.3 @@ -5,14 +5,19 @@
57.4 # This directory is removed when the project is cleaned:
57.5 build.dir=build
57.6 build.generated.dir=${build.dir}/generated
57.7 +build.generated.sources.dir=${build.dir}/generated-sources
57.8 # Only compile against the classpath explicitly listed here:
57.9 build.sysclasspath=ignore
57.10 build.test.classes.dir=${build.dir}/test/classes
57.11 build.test.results.dir=${build.dir}/test/results
57.12 debug.classpath=\
57.13 ${run.classpath}
57.14 +debug.modulepath=\
57.15 + ${run.modulepath}
57.16 debug.test.classpath=\
57.17 ${run.test.classpath}
57.18 +debug.test.modulepath=\
57.19 + ${run.test.modulepath}
57.20 # This directory is removed when the project is cleaned:
57.21 dist.dir=dist
57.22 dist.jar=${dist.dir}/misuse.jar
57.23 @@ -24,13 +29,17 @@
57.24 # Space-separated list of extra javac options
57.25 javac.compilerargs=-Xlint:unchecked
57.26 javac.deprecation=false
57.27 -javac.source=1.5
57.28 -javac.target=1.5
57.29 +javac.modulepath=
57.30 +javac.processormodulepath=
57.31 +javac.source=1.6
57.32 +javac.target=1.6
57.33 javac.test.classpath=\
57.34 ${javac.classpath}:\
57.35 ${build.classes.dir}:\
57.36 ${libs.junit.classpath}:\
57.37 ${libs.junit_4.classpath}
57.38 +javac.test.modulepath=\
57.39 + ${javac.modulepath}
57.40 javadoc.additionalparam=
57.41 javadoc.author=false
57.42 javadoc.encoding=${source.encoding}
57.43 @@ -51,9 +60,13 @@
57.44 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
57.45 # or test-sys-prop.name=value to set system properties for unit tests):
57.46 run.jvmargs=
57.47 +run.modulepath=\
57.48 + ${javac.modulepath}
57.49 run.test.classpath=\
57.50 ${javac.test.classpath}:\
57.51 ${build.test.classes.dir}
57.52 +run.test.modulepath=\
57.53 + ${javac.test.modulepath}
57.54 source.encoding=UTF-8
57.55 src.dir=src
57.56 test.src.dir=test
58.1 --- a/samples/openfixed/build.xml Mon Nov 11 05:47:32 2019 +0100
58.2 +++ b/samples/openfixed/build.xml Mon Nov 11 13:17:34 2019 +0100
58.3 @@ -51,8 +51,7 @@
58.4 -init-macrodef-junit: defines macro for junit execution
58.5 -init-macrodef-debug: defines macro for class debugging
58.6 -init-macrodef-java: defines macro for class execution
58.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
58.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
58.9 + -do-jar: JAR building
58.10 run: execution of project
58.11 -javadoc-build: Javadoc generation
58.12 test-report: JUnit report generation
59.1 --- a/samples/openfixed/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
59.2 +++ b/samples/openfixed/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
59.3 @@ -19,7 +19,7 @@
59.4 - cleanup
59.5
59.6 -->
59.7 -<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="openfixed-impl">
59.8 +<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="openfixed-impl">
59.9 <fail message="Please build using Ant 1.8.0 or higher.">
59.10 <condition>
59.11 <not>
59.12 @@ -46,14 +46,80 @@
59.13 <property file="${user.properties.file}"/>
59.14 <!-- The two properties below are usually overridden -->
59.15 <!-- by the active platform. Just a fallback. -->
59.16 - <property name="default.javac.source" value="1.4"/>
59.17 - <property name="default.javac.target" value="1.4"/>
59.18 + <property name="default.javac.source" value="1.6"/>
59.19 + <property name="default.javac.target" value="1.6"/>
59.20 </target>
59.21 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
59.22 <property file="nbproject/configs/${config}.properties"/>
59.23 <property file="nbproject/project.properties"/>
59.24 </target>
59.25 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
59.26 + <target name="-init-modules-supported">
59.27 + <condition property="modules.supported.internal" value="true">
59.28 + <not>
59.29 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
59.30 + </not>
59.31 + </condition>
59.32 + </target>
59.33 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
59.34 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
59.35 + <attribute name="property"/>
59.36 + <attribute name="sourcepath"/>
59.37 + <sequential>
59.38 + <loadresource property="@{property}" quiet="true">
59.39 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
59.40 + <filterchain>
59.41 + <stripjavacomments/>
59.42 + <linecontainsregexp>
59.43 + <regexp pattern="module .* \{"/>
59.44 + </linecontainsregexp>
59.45 + <tokenfilter>
59.46 + <linetokenizer/>
59.47 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
59.48 + </tokenfilter>
59.49 + <striplinebreaks/>
59.50 + </filterchain>
59.51 + </loadresource>
59.52 + </sequential>
59.53 + </macrodef>
59.54 + </target>
59.55 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
59.56 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
59.57 + <condition>
59.58 + <not>
59.59 + <antversion atleast="1.10.0"/>
59.60 + </not>
59.61 + </condition>
59.62 + </fail>
59.63 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
59.64 + <condition property="named.module.internal">
59.65 + <and>
59.66 + <isset property="module.name"/>
59.67 + <length length="0" string="${module.name}" when="greater"/>
59.68 + </and>
59.69 + </condition>
59.70 + <condition property="unnamed.module.internal">
59.71 + <not>
59.72 + <isset property="named.module.internal"/>
59.73 + </not>
59.74 + </condition>
59.75 + <property name="javac.modulepath" value=""/>
59.76 + <property name="run.modulepath" value="${javac.modulepath}"/>
59.77 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
59.78 + <property name="debug.modulepath" value="${run.modulepath}"/>
59.79 + <property name="javac.upgrademodulepath" value=""/>
59.80 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
59.81 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
59.82 + <and>
59.83 + <isset property="javac.systemmodulepath"/>
59.84 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
59.85 + </and>
59.86 + </condition>
59.87 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
59.88 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
59.89 + <property name="module.name" value=""/>
59.90 + </target>
59.91 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
59.92 + <property name="platform.java" value="${java.home}/bin/java"/>
59.93 <available file="${manifest.file}" property="manifest.available"/>
59.94 <condition property="splashscreen.available">
59.95 <and>
59.96 @@ -71,31 +137,22 @@
59.97 </not>
59.98 </and>
59.99 </condition>
59.100 - <condition property="manifest.available+main.class">
59.101 + <condition property="profile.available">
59.102 <and>
59.103 - <isset property="manifest.available"/>
59.104 - <isset property="main.class.available"/>
59.105 + <isset property="javac.profile"/>
59.106 + <length length="0" string="${javac.profile}" when="greater"/>
59.107 + <not>
59.108 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
59.109 + </not>
59.110 </and>
59.111 </condition>
59.112 <condition property="do.archive">
59.113 - <not>
59.114 - <istrue value="${jar.archive.disabled}"/>
59.115 - </not>
59.116 - </condition>
59.117 - <condition property="do.mkdist">
59.118 - <and>
59.119 - <isset property="do.archive"/>
59.120 - <isset property="libs.CopyLibs.classpath"/>
59.121 + <or>
59.122 <not>
59.123 - <istrue value="${mkdist.disabled}"/>
59.124 + <istrue value="${jar.archive.disabled}"/>
59.125 </not>
59.126 - </and>
59.127 - </condition>
59.128 - <condition property="manifest.available+main.class+mkdist.available">
59.129 - <and>
59.130 - <istrue value="${manifest.available+main.class}"/>
59.131 - <isset property="do.mkdist"/>
59.132 - </and>
59.133 + <istrue value="${not.archive.disabled}"/>
59.134 + </or>
59.135 </condition>
59.136 <condition property="do.archive+manifest.available">
59.137 <and>
59.138 @@ -115,24 +172,12 @@
59.139 <istrue value="${do.archive}"/>
59.140 </and>
59.141 </condition>
59.142 - <condition property="do.archive+manifest.available+main.class">
59.143 + <condition property="do.archive+profile.available">
59.144 <and>
59.145 - <istrue value="${manifest.available+main.class}"/>
59.146 + <isset property="profile.available"/>
59.147 <istrue value="${do.archive}"/>
59.148 </and>
59.149 </condition>
59.150 - <condition property="manifest.available-mkdist.available">
59.151 - <or>
59.152 - <istrue value="${manifest.available}"/>
59.153 - <isset property="do.mkdist"/>
59.154 - </or>
59.155 - </condition>
59.156 - <condition property="manifest.available+main.class-mkdist.available">
59.157 - <or>
59.158 - <istrue value="${manifest.available+main.class}"/>
59.159 - <isset property="do.mkdist"/>
59.160 - </or>
59.161 - </condition>
59.162 <condition property="have.tests">
59.163 <or>
59.164 <available file="${test.src.dir}"/>
59.165 @@ -169,6 +214,7 @@
59.166 <property name="application.args" value=""/>
59.167 <property name="source.encoding" value="${file.encoding}"/>
59.168 <property name="runtime.encoding" value="${source.encoding}"/>
59.169 + <property name="manifest.encoding" value="${source.encoding}"/>
59.170 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
59.171 <and>
59.172 <isset property="javadoc.encoding"/>
59.173 @@ -186,7 +232,15 @@
59.174 </condition>
59.175 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
59.176 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
59.177 - <length length="0" string="${endorsed.classpath}" when="greater"/>
59.178 + <and>
59.179 + <isset property="endorsed.classpath"/>
59.180 + <not>
59.181 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
59.182 + </not>
59.183 + </and>
59.184 + </condition>
59.185 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
59.186 + <isset property="profile.available"/>
59.187 </condition>
59.188 <condition else="false" property="jdkBug6558476">
59.189 <and>
59.190 @@ -196,7 +250,12 @@
59.191 </not>
59.192 </and>
59.193 </condition>
59.194 - <property name="javac.fork" value="${jdkBug6558476}"/>
59.195 + <condition else="false" property="javac.fork">
59.196 + <or>
59.197 + <istrue value="${jdkBug6558476}"/>
59.198 + <istrue value="${javac.external.vm}"/>
59.199 + </or>
59.200 + </condition>
59.201 <property name="jar.index" value="false"/>
59.202 <property name="jar.index.metainf" value="${jar.index}"/>
59.203 <property name="copylibs.rebase" value="true"/>
59.204 @@ -222,6 +281,7 @@
59.205 <condition else="" property="testng.debug.mode" value="-mixed">
59.206 <istrue value="${junit+testng.available}"/>
59.207 </condition>
59.208 + <property name="java.failonerror" value="true"/>
59.209 </target>
59.210 <target name="-post-init">
59.211 <!-- Empty placeholder for easier customization. -->
59.212 @@ -248,11 +308,80 @@
59.213 </sequential>
59.214 </macrodef>
59.215 </target>
59.216 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
59.217 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
59.218 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
59.219 <attribute default="${src.dir}" name="srcdir"/>
59.220 <attribute default="${build.classes.dir}" name="destdir"/>
59.221 <attribute default="${javac.classpath}" name="classpath"/>
59.222 + <attribute default="${javac.modulepath}" name="modulepath"/>
59.223 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
59.224 + <attribute default="${javac.processorpath}" name="processorpath"/>
59.225 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
59.226 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
59.227 + <attribute default="${includes}" name="includes"/>
59.228 + <attribute default="${excludes}" name="excludes"/>
59.229 + <attribute default="${javac.debug}" name="debug"/>
59.230 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
59.231 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
59.232 + <attribute default="${empty.dir}" name="gensrcdir"/>
59.233 + <element name="customize" optional="true"/>
59.234 + <sequential>
59.235 + <condition property="warn.excludes.internal">
59.236 + <and>
59.237 + <isset property="named.module.internal"/>
59.238 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
59.239 + </and>
59.240 + </condition>
59.241 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
59.242 + <property location="${build.dir}/empty" name="empty.dir"/>
59.243 + <mkdir dir="${empty.dir}"/>
59.244 + <mkdir dir="@{apgeneratedsrcdir}"/>
59.245 + <condition property="processormodulepath.set">
59.246 + <resourcecount count="0" when="greater">
59.247 + <path>
59.248 + <pathelement path="@{processormodulepath}"/>
59.249 + </path>
59.250 + </resourcecount>
59.251 + </condition>
59.252 + <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}">
59.253 + <src>
59.254 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
59.255 + <include name="*"/>
59.256 + </dirset>
59.257 + </src>
59.258 + <classpath>
59.259 + <path path="@{classpath}"/>
59.260 + </classpath>
59.261 + <modulepath>
59.262 + <path path="@{modulepath}"/>
59.263 + </modulepath>
59.264 + <upgrademodulepath>
59.265 + <path path="@{upgrademodulepath}"/>
59.266 + </upgrademodulepath>
59.267 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
59.268 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
59.269 + <compilerarg line="${javac.compilerargs}"/>
59.270 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
59.271 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
59.272 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
59.273 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
59.274 + <compilerarg line="${ap.processors.internal}"/>
59.275 + <compilerarg line="${annotation.processing.processor.options}"/>
59.276 + <compilerarg value="-s"/>
59.277 + <compilerarg path="@{apgeneratedsrcdir}"/>
59.278 + <compilerarg line="${ap.proc.none.internal}"/>
59.279 + <customize/>
59.280 + </javac>
59.281 + </sequential>
59.282 + </macrodef>
59.283 + </target>
59.284 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
59.285 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
59.286 + <attribute default="${src.dir}" name="srcdir"/>
59.287 + <attribute default="${build.classes.dir}" name="destdir"/>
59.288 + <attribute default="${javac.classpath}" name="classpath"/>
59.289 + <attribute default="${javac.modulepath}" name="modulepath"/>
59.290 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
59.291 <attribute default="${javac.processorpath}" name="processorpath"/>
59.292 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
59.293 <attribute default="${includes}" name="includes"/>
59.294 @@ -275,6 +404,7 @@
59.295 <path path="@{classpath}"/>
59.296 </classpath>
59.297 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
59.298 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
59.299 <compilerarg line="${javac.compilerargs}"/>
59.300 <compilerarg value="-processorpath"/>
59.301 <compilerarg path="@{processorpath}:${empty.dir}"/>
59.302 @@ -288,11 +418,13 @@
59.303 </sequential>
59.304 </macrodef>
59.305 </target>
59.306 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
59.307 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
59.308 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
59.309 <attribute default="${src.dir}" name="srcdir"/>
59.310 <attribute default="${build.classes.dir}" name="destdir"/>
59.311 <attribute default="${javac.classpath}" name="classpath"/>
59.312 + <attribute default="${javac.modulepath}" name="modulepath"/>
59.313 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
59.314 <attribute default="${javac.processorpath}" name="processorpath"/>
59.315 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
59.316 <attribute default="${includes}" name="includes"/>
59.317 @@ -314,13 +446,14 @@
59.318 <path path="@{classpath}"/>
59.319 </classpath>
59.320 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
59.321 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
59.322 <compilerarg line="${javac.compilerargs}"/>
59.323 <customize/>
59.324 </javac>
59.325 </sequential>
59.326 </macrodef>
59.327 </target>
59.328 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
59.329 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
59.330 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
59.331 <attribute default="${src.dir}" name="srcdir"/>
59.332 <attribute default="${build.classes.dir}" name="destdir"/>
59.333 @@ -370,7 +503,64 @@
59.334 </and>
59.335 </condition>
59.336 </target>
59.337 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
59.338 + <target name="-init-test-properties">
59.339 + <property name="test.binaryincludes" value="<nothing>"/>
59.340 + <property name="test.binarytestincludes" value=""/>
59.341 + <property name="test.binaryexcludes" value=""/>
59.342 + </target>
59.343 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
59.344 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
59.345 + <attribute default="${includes}" name="includes"/>
59.346 + <attribute default="${excludes}" name="excludes"/>
59.347 + <element name="customizePrototype" optional="true"/>
59.348 + <sequential>
59.349 + <property name="junit.forkmode" value="perTest"/>
59.350 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
59.351 + <syspropertyset>
59.352 + <propertyref prefix="test-sys-prop."/>
59.353 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.354 + </syspropertyset>
59.355 + <classpath>
59.356 + <path path="${run.test.classpath}"/>
59.357 + </classpath>
59.358 + <modulepath>
59.359 + <path path="${run.test.modulepath}"/>
59.360 + </modulepath>
59.361 + <formatter type="brief" usefile="false"/>
59.362 + <formatter type="xml"/>
59.363 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.364 + <jvmarg value="-ea"/>
59.365 + <jvmarg line="${run.test.jvmargs}"/>
59.366 + <customizePrototype/>
59.367 + </junit>
59.368 + </sequential>
59.369 + </macrodef>
59.370 + </target>
59.371 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
59.372 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
59.373 + <attribute default="${includes}" name="includes"/>
59.374 + <attribute default="${excludes}" name="excludes"/>
59.375 + <element name="customizePrototype" optional="true"/>
59.376 + <sequential>
59.377 + <property name="junit.forkmode" value="perTest"/>
59.378 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
59.379 + <syspropertyset>
59.380 + <propertyref prefix="test-sys-prop."/>
59.381 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.382 + </syspropertyset>
59.383 + <classpath>
59.384 + <path path="${run.test.classpath}"/>
59.385 + </classpath>
59.386 + <formatter type="brief" usefile="false"/>
59.387 + <formatter type="xml"/>
59.388 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.389 + <jvmarg value="-ea"/>
59.390 + <customizePrototype/>
59.391 + </junit>
59.392 + </sequential>
59.393 + </macrodef>
59.394 + </target>
59.395 + <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}">
59.396 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
59.397 <attribute default="${includes}" name="includes"/>
59.398 <attribute default="${excludes}" name="excludes"/>
59.399 @@ -378,22 +568,16 @@
59.400 <attribute default="" name="testmethods"/>
59.401 <element name="customize" optional="true"/>
59.402 <sequential>
59.403 - <property name="junit.forkmode" value="perTest"/>
59.404 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
59.405 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
59.406 - <syspropertyset>
59.407 - <propertyref prefix="test-sys-prop."/>
59.408 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.409 - </syspropertyset>
59.410 - <formatter type="brief" usefile="false"/>
59.411 - <formatter type="xml"/>
59.412 - <jvmarg value="-ea"/>
59.413 - <customize/>
59.414 - </junit>
59.415 + <j2seproject3:junit-prototype>
59.416 + <customizePrototype>
59.417 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
59.418 + <customize/>
59.419 + </customizePrototype>
59.420 + </j2seproject3:junit-prototype>
59.421 </sequential>
59.422 </macrodef>
59.423 </target>
59.424 - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
59.425 + <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}">
59.426 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
59.427 <attribute default="${includes}" name="includes"/>
59.428 <attribute default="${excludes}" name="excludes"/>
59.429 @@ -401,22 +585,19 @@
59.430 <attribute default="" name="testmethods"/>
59.431 <element name="customize" optional="true"/>
59.432 <sequential>
59.433 - <property name="junit.forkmode" value="perTest"/>
59.434 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
59.435 - <batchtest todir="${build.test.results.dir}">
59.436 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
59.437 - <filename name="@{testincludes}"/>
59.438 - </fileset>
59.439 - </batchtest>
59.440 - <syspropertyset>
59.441 - <propertyref prefix="test-sys-prop."/>
59.442 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.443 - </syspropertyset>
59.444 - <formatter type="brief" usefile="false"/>
59.445 - <formatter type="xml"/>
59.446 - <jvmarg value="-ea"/>
59.447 - <customize/>
59.448 - </junit>
59.449 + <j2seproject3:junit-prototype>
59.450 + <customizePrototype>
59.451 + <batchtest todir="${build.test.results.dir}">
59.452 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
59.453 + <filename name="@{testincludes}"/>
59.454 + </fileset>
59.455 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
59.456 + <filename name="${test.binarytestincludes}"/>
59.457 + </fileset>
59.458 + </batchtest>
59.459 + <customize/>
59.460 + </customizePrototype>
59.461 + </j2seproject3:junit-prototype>
59.462 </sequential>
59.463 </macrodef>
59.464 </target>
59.465 @@ -438,12 +619,16 @@
59.466 </fileset>
59.467 </union>
59.468 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
59.469 - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="openfixed" testname="TestNG tests" workingDir="${work.dir}">
59.470 + <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="openfixed" testname="TestNG tests" workingDir="${work.dir}">
59.471 <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
59.472 <propertyset>
59.473 <propertyref prefix="test-sys-prop."/>
59.474 <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.475 </propertyset>
59.476 + <classpath>
59.477 + <path path="${run.test.classpath}"/>
59.478 + </classpath>
59.479 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.480 <customize/>
59.481 </testng>
59.482 </sequential>
59.483 @@ -498,10 +683,6 @@
59.484 <sequential>
59.485 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
59.486 <customize>
59.487 - <classpath>
59.488 - <path path="${run.test.classpath}"/>
59.489 - </classpath>
59.490 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.491 <jvmarg line="${run.jvmargs}"/>
59.492 <jvmarg line="${run.jvmargs.ide}"/>
59.493 </customize>
59.494 @@ -509,71 +690,20 @@
59.495 </sequential>
59.496 </macrodef>
59.497 </target>
59.498 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
59.499 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
59.500 - <attribute default="${includes}" name="includes"/>
59.501 - <attribute default="${excludes}" name="excludes"/>
59.502 - <attribute default="**" name="testincludes"/>
59.503 - <attribute default="" name="testmethods"/>
59.504 - <element name="customize" optional="true"/>
59.505 - <sequential>
59.506 - <property name="junit.forkmode" value="perTest"/>
59.507 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
59.508 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
59.509 - <syspropertyset>
59.510 - <propertyref prefix="test-sys-prop."/>
59.511 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.512 - </syspropertyset>
59.513 - <formatter type="brief" usefile="false"/>
59.514 - <formatter type="xml"/>
59.515 - <jvmarg value="-ea"/>
59.516 - <jvmarg line="${debug-args-line}"/>
59.517 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
59.518 - <customize/>
59.519 - </junit>
59.520 - </sequential>
59.521 - </macrodef>
59.522 - </target>
59.523 - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
59.524 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
59.525 - <attribute default="${includes}" name="includes"/>
59.526 - <attribute default="${excludes}" name="excludes"/>
59.527 - <attribute default="**" name="testincludes"/>
59.528 - <attribute default="" name="testmethods"/>
59.529 - <element name="customize" optional="true"/>
59.530 - <sequential>
59.531 - <property name="junit.forkmode" value="perTest"/>
59.532 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
59.533 - <batchtest todir="${build.test.results.dir}">
59.534 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
59.535 - <filename name="@{testincludes}"/>
59.536 - </fileset>
59.537 - </batchtest>
59.538 - <syspropertyset>
59.539 - <propertyref prefix="test-sys-prop."/>
59.540 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.541 - </syspropertyset>
59.542 - <formatter type="brief" usefile="false"/>
59.543 - <formatter type="xml"/>
59.544 - <jvmarg value="-ea"/>
59.545 - <jvmarg line="${debug-args-line}"/>
59.546 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
59.547 - <customize/>
59.548 - </junit>
59.549 - </sequential>
59.550 - </macrodef>
59.551 - </target>
59.552 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
59.553 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
59.554 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
59.555 <attribute default="${includes}" name="includes"/>
59.556 <attribute default="${excludes}" name="excludes"/>
59.557 <attribute default="**" name="testincludes"/>
59.558 <attribute default="" name="testmethods"/>
59.559 - <element implicit="true" name="customize" optional="true"/>
59.560 + <element name="customizeDebuggee" optional="true"/>
59.561 <sequential>
59.562 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
59.563 - <customize/>
59.564 - </j2seproject3:junit-debug>
59.565 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
59.566 + <customize>
59.567 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
59.568 + <customizeDebuggee/>
59.569 + </customize>
59.570 + </j2seproject3:junit>
59.571 </sequential>
59.572 </macrodef>
59.573 </target>
59.574 @@ -592,14 +722,14 @@
59.575 <delete dir="${build.test.results.dir}" quiet="true"/>
59.576 <mkdir dir="${build.test.results.dir}"/>
59.577 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
59.578 - <customize>
59.579 + <customizeDebuggee>
59.580 <customize2/>
59.581 <jvmarg value="-ea"/>
59.582 <arg line="${testng.debug.mode}"/>
59.583 <arg line="-d ${build.test.results.dir}"/>
59.584 <arg line="-listener org.testng.reporters.VerboseReporter"/>
59.585 <arg line="${testng.cmd.args}"/>
59.586 - </customize>
59.587 + </customizeDebuggee>
59.588 </j2seproject3:debug>
59.589 </sequential>
59.590 </macrodef>
59.591 @@ -626,14 +756,10 @@
59.592 <attribute default="" name="testMethod"/>
59.593 <sequential>
59.594 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
59.595 - <customize>
59.596 - <classpath>
59.597 - <path path="${run.test.classpath}"/>
59.598 - </classpath>
59.599 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.600 + <customizeDebuggee>
59.601 <jvmarg line="${run.jvmargs}"/>
59.602 <jvmarg line="${run.jvmargs.ide}"/>
59.603 - </customize>
59.604 + </customizeDebuggee>
59.605 </j2seproject3:test-debug-impl>
59.606 </sequential>
59.607 </macrodef>
59.608 @@ -685,7 +811,7 @@
59.609 <sequential>
59.610 <property environment="env"/>
59.611 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
59.612 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
59.613 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
59.614 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.615 <jvmarg value="${profiler.info.jvmargs.agent}"/>
59.616 <jvmarg line="${profiler.info.jvmargs}"/>
59.617 @@ -713,10 +839,14 @@
59.618 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
59.619 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
59.620 <attribute default="${main.class}" name="name"/>
59.621 + <attribute default="${debug.modulepath}" name="modulepath"/>
59.622 <attribute default="${debug.classpath}" name="classpath"/>
59.623 <attribute default="" name="stopclassname"/>
59.624 <sequential>
59.625 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
59.626 + <modulepath>
59.627 + <path path="@{modulepath}"/>
59.628 + </modulepath>
59.629 <classpath>
59.630 <path path="@{classpath}"/>
59.631 </classpath>
59.632 @@ -735,18 +865,6 @@
59.633 </macrodef>
59.634 </target>
59.635 <target name="-init-debug-args">
59.636 - <property name="version-output" value="java version "${ant.java.version}"/>
59.637 - <condition property="have-jdk-older-than-1.4">
59.638 - <or>
59.639 - <contains string="${version-output}" substring="java version "1.0"/>
59.640 - <contains string="${version-output}" substring="java version "1.1"/>
59.641 - <contains string="${version-output}" substring="java version "1.2"/>
59.642 - <contains string="${version-output}" substring="java version "1.3"/>
59.643 - </or>
59.644 - </condition>
59.645 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
59.646 - <istrue value="${have-jdk-older-than-1.4}"/>
59.647 - </condition>
59.648 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
59.649 <os family="windows"/>
59.650 </condition>
59.651 @@ -756,21 +874,46 @@
59.652 </target>
59.653 <target depends="-init-debug-args" name="-init-macrodef-debug">
59.654 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
59.655 + <attribute default="${module.name}" name="modulename"/>
59.656 <attribute default="${main.class}" name="classname"/>
59.657 + <attribute default="${debug.modulepath}" name="modulepath"/>
59.658 <attribute default="${debug.classpath}" name="classpath"/>
59.659 + <element name="customizeDebuggee" optional="true"/>
59.660 + <sequential>
59.661 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
59.662 + <customize>
59.663 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
59.664 + <customizeDebuggee/>
59.665 + </customize>
59.666 + </j2seproject1:java>
59.667 + </sequential>
59.668 + </macrodef>
59.669 + </target>
59.670 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
59.671 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
59.672 + <attribute default="${module.name}" name="modulename"/>
59.673 + <attribute default="${main.class}" name="classname"/>
59.674 + <attribute default="${run.modulepath}" name="modulepath"/>
59.675 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
59.676 + <attribute default="${run.classpath}" name="classpath"/>
59.677 + <attribute default="jvm" name="jvm"/>
59.678 <element name="customize" optional="true"/>
59.679 <sequential>
59.680 - <java classname="@{classname}" dir="${work.dir}" fork="true">
59.681 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.682 - <jvmarg line="${debug-args-line}"/>
59.683 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
59.684 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
59.685 + <classpath>
59.686 + <path path="@{classpath}"/>
59.687 + </classpath>
59.688 + <modulepath>
59.689 + <pathelement path="@{modulepath}"/>
59.690 + <pathelement location="${module.build.classes.dir}"/>
59.691 + </modulepath>
59.692 + <upgrademodulepath>
59.693 + <path path="@{upgrademodulepath}"/>
59.694 + </upgrademodulepath>
59.695 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
59.696 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
59.697 <jvmarg line="${run.jvmargs}"/>
59.698 <jvmarg line="${run.jvmargs.ide}"/>
59.699 - <classpath>
59.700 - <path path="@{classpath}"/>
59.701 - </classpath>
59.702 <syspropertyset>
59.703 <propertyref prefix="run-sys-prop."/>
59.704 <mapper from="run-sys-prop.*" to="*" type="glob"/>
59.705 @@ -780,14 +923,49 @@
59.706 </sequential>
59.707 </macrodef>
59.708 </target>
59.709 - <target name="-init-macrodef-java">
59.710 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
59.711 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
59.712 + <attribute default="" name="modulename"/>
59.713 <attribute default="${main.class}" name="classname"/>
59.714 + <attribute default="${run.modulepath}" name="modulepath"/>
59.715 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
59.716 <attribute default="${run.classpath}" name="classpath"/>
59.717 <attribute default="jvm" name="jvm"/>
59.718 <element name="customize" optional="true"/>
59.719 <sequential>
59.720 - <java classname="@{classname}" dir="${work.dir}" fork="true">
59.721 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
59.722 + <classpath>
59.723 + <path path="@{classpath}"/>
59.724 + </classpath>
59.725 + <modulepath>
59.726 + <path path="@{modulepath}"/>
59.727 + </modulepath>
59.728 + <upgrademodulepath>
59.729 + <path path="@{upgrademodulepath}"/>
59.730 + </upgrademodulepath>
59.731 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
59.732 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
59.733 + <jvmarg line="${run.jvmargs}"/>
59.734 + <jvmarg line="${run.jvmargs.ide}"/>
59.735 + <syspropertyset>
59.736 + <propertyref prefix="run-sys-prop."/>
59.737 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
59.738 + </syspropertyset>
59.739 + <customize/>
59.740 + </java>
59.741 + </sequential>
59.742 + </macrodef>
59.743 + </target>
59.744 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
59.745 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
59.746 + <attribute default="" name="modulename"/>
59.747 + <attribute default="${main.class}" name="classname"/>
59.748 + <attribute default="" name="modulepath"/>
59.749 + <attribute default="${run.classpath}" name="classpath"/>
59.750 + <attribute default="jvm" name="jvm"/>
59.751 + <element name="customize" optional="true"/>
59.752 + <sequential>
59.753 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
59.754 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
59.755 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
59.756 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
59.757 @@ -805,6 +983,7 @@
59.758 </sequential>
59.759 </macrodef>
59.760 </target>
59.761 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
59.762 <target name="-init-macrodef-copylibs">
59.763 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
59.764 <attribute default="${manifest.file}" name="manifest"/>
59.765 @@ -826,8 +1005,8 @@
59.766 </chainedmapper>
59.767 </pathconvert>
59.768 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
59.769 - <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}">
59.770 - <fileset dir="${build.classes.dir}"/>
59.771 + <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}">
59.772 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
59.773 <manifest>
59.774 <attribute name="Class-Path" value="${jar.classpath}"/>
59.775 <customize/>
59.776 @@ -838,8 +1017,8 @@
59.777 </target>
59.778 <target name="-init-presetdef-jar">
59.779 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
59.780 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
59.781 - <j2seproject1:fileset dir="${build.classes.dir}"/>
59.782 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
59.783 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
59.784 </jar>
59.785 </presetdef>
59.786 </target>
59.787 @@ -894,7 +1073,9 @@
59.788 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
59.789 </target>
59.790 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
59.791 - <antcall target="clean"/>
59.792 + <antcall target="clean">
59.793 + <param name="no.dependencies" value="true"/>
59.794 + </antcall>
59.795 </target>
59.796 <target depends="init,deps-jar" name="-pre-pre-compile">
59.797 <mkdir dir="${build.classes.dir}"/>
59.798 @@ -920,7 +1101,7 @@
59.799 <target if="has.persistence.xml" name="-copy-persistence-xml">
59.800 <mkdir dir="${build.classes.dir}/META-INF"/>
59.801 <copy todir="${build.classes.dir}/META-INF">
59.802 - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
59.803 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
59.804 </copy>
59.805 </target>
59.806 <target name="-post-compile">
59.807 @@ -935,7 +1116,7 @@
59.808 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
59.809 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
59.810 <j2seproject3:force-recompile/>
59.811 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
59.812 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
59.813 </target>
59.814 <target name="-post-compile-single">
59.815 <!-- Empty placeholder for easier customization. -->
59.816 @@ -955,65 +1136,191 @@
59.817 <!-- Empty placeholder for easier customization. -->
59.818 <!-- You can override this target in the ../build.xml file. -->
59.819 </target>
59.820 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
59.821 - <j2seproject1:jar/>
59.822 + <target depends="init,compile" name="-check-module-main-class">
59.823 + <pathconvert property="main.class.file">
59.824 + <string value="${main.class}"/>
59.825 + <unpackagemapper from="*" to="*.class"/>
59.826 + </pathconvert>
59.827 + <condition property="do.module.main.class">
59.828 + <and>
59.829 + <isset property="main.class.available"/>
59.830 + <available file="${build.classes.dir}/module-info.class"/>
59.831 + <available file="${build.classes.dir}/${main.class.file}"/>
59.832 + <isset property="libs.CopyLibs.classpath"/>
59.833 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
59.834 + </and>
59.835 + </condition>
59.836 </target>
59.837 - <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">
59.838 - <j2seproject1:jar manifest="${manifest.file}"/>
59.839 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
59.840 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
59.841 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
59.842 </target>
59.843 - <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">
59.844 - <j2seproject1:jar manifest="${manifest.file}">
59.845 - <j2seproject1:manifest>
59.846 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
59.847 - </j2seproject1:manifest>
59.848 - </j2seproject1:jar>
59.849 - <echo level="info">To run this application from the command line without Ant, try:</echo>
59.850 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
59.851 - <property location="${dist.jar}" name="dist.jar.resolved"/>
59.852 - <pathconvert property="run.classpath.with.dist.jar">
59.853 - <path path="${run.classpath}"/>
59.854 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
59.855 - </pathconvert>
59.856 - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
59.857 - </target>
59.858 - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
59.859 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
59.860 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
59.861 <touch file="${tmp.manifest.file}" verbose="false"/>
59.862 </target>
59.863 - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
59.864 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
59.865 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
59.866 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
59.867 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
59.868 </target>
59.869 - <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">
59.870 - <manifest file="${tmp.manifest.file}" mode="update">
59.871 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
59.872 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
59.873 <attribute name="Main-Class" value="${main.class}"/>
59.874 </manifest>
59.875 </target>
59.876 - <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">
59.877 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
59.878 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
59.879 + <attribute name="Profile" value="${javac.profile}"/>
59.880 + </manifest>
59.881 + </target>
59.882 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
59.883 <basename file="${application.splash}" property="splashscreen.basename"/>
59.884 <mkdir dir="${build.classes.dir}/META-INF"/>
59.885 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
59.886 - <manifest file="${tmp.manifest.file}" mode="update">
59.887 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
59.888 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
59.889 </manifest>
59.890 </target>
59.891 - <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">
59.892 + <target depends="init,compile" name="-check-do-mkdist">
59.893 + <condition property="do.mkdist">
59.894 + <and>
59.895 + <isset property="do.archive"/>
59.896 + <isset property="libs.CopyLibs.classpath"/>
59.897 + <not>
59.898 + <istrue value="${mkdist.disabled}"/>
59.899 + </not>
59.900 + <not>
59.901 + <available file="${build.classes.dir}/module-info.class"/>
59.902 + </not>
59.903 + </and>
59.904 + </condition>
59.905 + </target>
59.906 + <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">
59.907 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
59.908 <echo level="info">To run this application from the command line without Ant, try:</echo>
59.909 <property location="${dist.jar}" name="dist.jar.resolved"/>
59.910 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
59.911 </target>
59.912 - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
59.913 + <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">
59.914 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
59.915 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
59.916 + <property location="${dist.jar}" name="dist.jar.resolved"/>
59.917 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
59.918 + <isset property="named.module.internal"/>
59.919 + </condition>
59.920 + <pathconvert property="run.classpath.with.dist.jar">
59.921 + <path path="${run.classpath}"/>
59.922 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
59.923 + </pathconvert>
59.924 + <pathconvert property="run.modulepath.with.dist.jar">
59.925 + <path location="${dist.jar.resolved}"/>
59.926 + <path path="${run.modulepath}"/>
59.927 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
59.928 + </pathconvert>
59.929 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
59.930 + <isset property="named.module.internal"/>
59.931 + </condition>
59.932 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
59.933 + <and>
59.934 + <isset property="modules.supported.internal"/>
59.935 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
59.936 + </and>
59.937 + </condition>
59.938 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
59.939 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
59.940 + </condition>
59.941 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
59.942 + <isset property="do.module.main.class"/>
59.943 + </condition>
59.944 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
59.945 + <isset property="named.module.internal"/>
59.946 + </condition>
59.947 + <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}">
59.948 + <isset property="main.class.available"/>
59.949 + </condition>
59.950 + <condition else="debug" property="jar.usage.level" value="info">
59.951 + <isset property="main.class.available"/>
59.952 + </condition>
59.953 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
59.954 + </target>
59.955 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
59.956 <delete>
59.957 <fileset file="${tmp.manifest.file}"/>
59.958 </delete>
59.959 </target>
59.960 - <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"/>
59.961 + <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"/>
59.962 + <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"/>
59.963 <target name="-post-jar">
59.964 <!-- Empty placeholder for easier customization. -->
59.965 <!-- You can override this target in the ../build.xml file. -->
59.966 </target>
59.967 - <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"/>
59.968 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
59.969 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
59.970 + <!--
59.971 + =================
59.972 + DEPLOY SECTION
59.973 + =================
59.974 + -->
59.975 + <target name="-pre-deploy">
59.976 + <!-- Empty placeholder for easier customization. -->
59.977 + <!-- You can override this target in the ../build.xml file. -->
59.978 + </target>
59.979 + <target depends="init" name="-check-jlink">
59.980 + <condition property="do.jlink.internal">
59.981 + <and>
59.982 + <istrue value="${do.jlink}"/>
59.983 + <isset property="do.archive"/>
59.984 + <isset property="named.module.internal"/>
59.985 + </and>
59.986 + </condition>
59.987 + </target>
59.988 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
59.989 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
59.990 + <property name="jlink.launcher.name" value="${application.title}"/>
59.991 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
59.992 + <and>
59.993 + <isset property="jlink.additionalmodules"/>
59.994 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
59.995 + </and>
59.996 + </condition>
59.997 + <condition property="jlink.do.strip.internal">
59.998 + <and>
59.999 + <isset property="jlink.strip"/>
59.1000 + <istrue value="${jlink.strip}"/>
59.1001 + </and>
59.1002 + </condition>
59.1003 + <condition property="jlink.do.additionalparam.internal">
59.1004 + <and>
59.1005 + <isset property="jlink.additionalparam"/>
59.1006 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
59.1007 + </and>
59.1008 + </condition>
59.1009 + <condition property="jlink.do.launcher.internal">
59.1010 + <and>
59.1011 + <istrue value="${jlink.launcher}"/>
59.1012 + <isset property="main.class.available"/>
59.1013 + </and>
59.1014 + </condition>
59.1015 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
59.1016 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
59.1017 + <exec executable="${platform.jlink}">
59.1018 + <arg value="--module-path"/>
59.1019 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
59.1020 + <arg value="--add-modules"/>
59.1021 + <arg value="${jlink.add.modules}"/>
59.1022 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
59.1023 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
59.1024 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
59.1025 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
59.1026 + <arg value="--output"/>
59.1027 + <arg value="${dist.jlink.output}"/>
59.1028 + </exec>
59.1029 + </target>
59.1030 + <target name="-post-deploy">
59.1031 + <!-- Empty placeholder for easier customization. -->
59.1032 + <!-- You can override this target in the ../build.xml file. -->
59.1033 + </target>
59.1034 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
59.1035 <!--
59.1036 =================
59.1037 EXECUTION SECTION
59.1038 @@ -1050,9 +1357,9 @@
59.1039 </target>
59.1040 <target depends="init,compile" name="-debug-start-debuggee">
59.1041 <j2seproject3:debug>
59.1042 - <customize>
59.1043 + <customizeDebuggee>
59.1044 <arg line="${application.args}"/>
59.1045 - </customize>
59.1046 + </customizeDebuggee>
59.1047 </j2seproject3:debug>
59.1048 </target>
59.1049 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
59.1050 @@ -1118,28 +1425,24 @@
59.1051 </customize>
59.1052 </profile>
59.1053 </target>
59.1054 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
59.1055 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
59.1056 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
59.1057 <nbprofiledirect>
59.1058 <classpath>
59.1059 <path path="${run.test.classpath}"/>
59.1060 </classpath>
59.1061 </nbprofiledirect>
59.1062 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
59.1063 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
59.1064 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
59.1065 - <jvmarg line="${profiler.info.jvmargs}"/>
59.1066 - <test name="${profile.class}"/>
59.1067 - <classpath>
59.1068 - <path path="${run.test.classpath}"/>
59.1069 - </classpath>
59.1070 - <syspropertyset>
59.1071 - <propertyref prefix="test-sys-prop."/>
59.1072 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
59.1073 - </syspropertyset>
59.1074 - <formatter type="brief" usefile="false"/>
59.1075 - <formatter type="xml"/>
59.1076 - </junit>
59.1077 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
59.1078 + <customize>
59.1079 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
59.1080 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
59.1081 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
59.1082 + <jvmarg line="${profiler.info.jvmargs}"/>
59.1083 + <classpath>
59.1084 + <path path="${run.test.classpath}"/>
59.1085 + </classpath>
59.1086 + </customize>
59.1087 + </j2seproject3:junit>
59.1088 </target>
59.1089 <!--
59.1090 end of pre NB72 profiling section
59.1091 @@ -1170,7 +1473,7 @@
59.1092 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
59.1093 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
59.1094 <startprofiler/>
59.1095 - <antcal target="run-test-with-main"/>
59.1096 + <antcall target="run-test-with-main"/>
59.1097 </target>
59.1098 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
59.1099 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
59.1100 @@ -1192,11 +1495,20 @@
59.1101 </not>
59.1102 </and>
59.1103 </condition>
59.1104 - <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}">
59.1105 + <condition else="" property="bug5101868workaround" value="*.java">
59.1106 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
59.1107 + </condition>
59.1108 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
59.1109 + <and>
59.1110 + <isset property="javadoc.html5"/>
59.1111 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
59.1112 + </and>
59.1113 + </condition>
59.1114 + <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}">
59.1115 <classpath>
59.1116 <path path="${javac.classpath}"/>
59.1117 </classpath>
59.1118 - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
59.1119 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
59.1120 <filename name="**/*.java"/>
59.1121 </fileset>
59.1122 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
59.1123 @@ -1204,6 +1516,7 @@
59.1124 <exclude name="*.java"/>
59.1125 </fileset>
59.1126 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
59.1127 + <arg line="${javadoc.html5.cmd.line.arg}"/>
59.1128 </javadoc>
59.1129 <copy todir="${dist.javadoc.dir}">
59.1130 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
59.1131 @@ -1230,11 +1543,63 @@
59.1132 <!-- Empty placeholder for easier customization. -->
59.1133 <!-- You can override this target in the ../build.xml file. -->
59.1134 </target>
59.1135 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
59.1136 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
59.1137 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
59.1138 + <and>
59.1139 + <isset property="test.module.name"/>
59.1140 + <length length="0" string="${test.module.name}" when="greater"/>
59.1141 + </and>
59.1142 + </condition>
59.1143 + <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">
59.1144 + <and>
59.1145 + <isset property="test.module.name"/>
59.1146 + <length length="0" string="${test.module.name}" when="greater"/>
59.1147 + </and>
59.1148 + </condition>
59.1149 + </target>
59.1150 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
59.1151 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
59.1152 + <and>
59.1153 + <isset property="test.module.name"/>
59.1154 + <length length="0" string="${test.module.name}" when="greater"/>
59.1155 + </and>
59.1156 + </condition>
59.1157 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
59.1158 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
59.1159 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
59.1160 + <chainedmapper>
59.1161 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
59.1162 + <filtermapper>
59.1163 + <uniqfilter/>
59.1164 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
59.1165 + </filtermapper>
59.1166 + <cutdirsmapper dirs="1"/>
59.1167 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
59.1168 + </chainedmapper>
59.1169 + </pathconvert>
59.1170 + <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}">
59.1171 + <and>
59.1172 + <isset property="test.module.name"/>
59.1173 + <length length="0" string="${test.module.name}" when="greater"/>
59.1174 + </and>
59.1175 + </condition>
59.1176 + </target>
59.1177 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
59.1178 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
59.1179 + <property name="javac.test.compilerargs" value=""/>
59.1180 + <property name="run.test.jvmargs" value=""/>
59.1181 + </target>
59.1182 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
59.1183 <target if="do.depend.true" name="-compile-test-depend">
59.1184 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
59.1185 </target>
59.1186 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
59.1187 - <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}"/>
59.1188 + <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">
59.1189 + <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}">
59.1190 + <customize>
59.1191 + <compilerarg line="${javac.test.compilerargs}"/>
59.1192 + </customize>
59.1193 + </j2seproject3:javac>
59.1194 <copy todir="${build.test.classes.dir}">
59.1195 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
59.1196 </copy>
59.1197 @@ -1248,10 +1613,14 @@
59.1198 <!-- Empty placeholder for easier customization. -->
59.1199 <!-- You can override this target in the ../build.xml file. -->
59.1200 </target>
59.1201 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
59.1202 + <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">
59.1203 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
59.1204 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
59.1205 - <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}"/>
59.1206 + <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}">
59.1207 + <customize>
59.1208 + <compilerarg line="${javac.test.compilerargs}"/>
59.1209 + </customize>
59.1210 + </j2seproject3:javac>
59.1211 <copy todir="${build.test.classes.dir}">
59.1212 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
59.1213 </copy>
59.1214 @@ -1269,8 +1638,8 @@
59.1215 <target depends="init" if="have.tests" name="-pre-test-run">
59.1216 <mkdir dir="${build.test.results.dir}"/>
59.1217 </target>
59.1218 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
59.1219 - <j2seproject3:test testincludes="**/*Test.java"/>
59.1220 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
59.1221 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
59.1222 </target>
59.1223 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
59.1224 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
59.1225 @@ -1281,14 +1650,14 @@
59.1226 <target depends="init" if="have.tests" name="-pre-test-run-single">
59.1227 <mkdir dir="${build.test.results.dir}"/>
59.1228 </target>
59.1229 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
59.1230 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
59.1231 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
59.1232 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
59.1233 </target>
59.1234 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
59.1235 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
59.1236 </target>
59.1237 - <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"/>
59.1238 + <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"/>
59.1239 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
59.1240 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
59.1241 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
59.1242 @@ -1297,7 +1666,7 @@
59.1243 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
59.1244 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
59.1245 </target>
59.1246 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
59.1247 + <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"/>
59.1248 <!--
59.1249 =======================
59.1250 TEST DEBUGGING SECTION
59.1251 @@ -1315,8 +1684,8 @@
59.1252 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
59.1253 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
59.1254 </target>
59.1255 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
59.1256 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
59.1257 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
59.1258 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
59.1259 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
59.1260 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
59.1261 </target>
59.1262 @@ -1342,9 +1711,9 @@
59.1263 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
59.1264 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
59.1265 <j2seproject3:debug classname="sun.applet.AppletViewer">
59.1266 - <customize>
59.1267 + <customizeDebuggee>
59.1268 <arg value="${applet.url}"/>
59.1269 - </customize>
59.1270 + </customizeDebuggee>
59.1271 </j2seproject3:debug>
59.1272 </target>
59.1273 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
59.1274 @@ -1371,6 +1740,7 @@
59.1275 </target>
59.1276 <target depends="init" name="-do-clean">
59.1277 <delete dir="${build.dir}"/>
59.1278 + <delete dir="${dist.jlink.output}"/>
59.1279 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
59.1280 </target>
59.1281 <target name="-post-clean">
60.1 --- a/samples/openfixed/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
60.2 +++ b/samples/openfixed/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
60.3 @@ -1,8 +1,8 @@
60.4 build.xml.data.CRC32=33b4766a
60.5 -build.xml.script.CRC32=5b02ecff
60.6 -build.xml.stylesheet.CRC32=28e38971@1.43.0.45
60.7 +build.xml.script.CRC32=5a3f4c79
60.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
60.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
60.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
60.11 nbproject/build-impl.xml.data.CRC32=33b4766a
60.12 -nbproject/build-impl.xml.script.CRC32=9666fd7c
60.13 -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46
60.14 +nbproject/build-impl.xml.script.CRC32=07b925b7
60.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
61.1 --- a/samples/openfixed/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
61.2 +++ b/samples/openfixed/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
61.3 @@ -18,8 +18,12 @@
61.4 #debug.transport=dt_socket
61.5 debug.classpath=\
61.6 ${run.classpath}
61.7 +debug.modulepath=\
61.8 + ${run.modulepath}
61.9 debug.test.classpath=\
61.10 ${run.test.classpath}
61.11 +debug.test.modulepath=\
61.12 + ${run.test.modulepath}
61.13 # This directory is removed when the project is cleaned:
61.14 dist.dir=dist
61.15 dist.jar=${dist.dir}/openfixed.jar
61.16 @@ -32,6 +36,8 @@
61.17 # Space-separated list of extra javac options
61.18 javac.compilerargs=
61.19 javac.deprecation=false
61.20 +javac.modulepath=
61.21 +javac.processormodulepath=
61.22 javac.processorpath=\
61.23 ${javac.classpath}
61.24 javac.source=1.6
61.25 @@ -40,6 +46,8 @@
61.26 ${javac.classpath}:\
61.27 ${build.classes.dir}:\
61.28 ${file.reference.junit-4.4.jar}
61.29 +javac.test.modulepath=\
61.30 + ${javac.modulepath}
61.31 javac.test.processorpath=\
61.32 ${javac.test.classpath}
61.33 javadoc.additionalparam=
61.34 @@ -63,9 +71,13 @@
61.35 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
61.36 # or test-sys-prop.name=value to set system properties for unit tests):
61.37 run.jvmargs=
61.38 +run.modulepath=\
61.39 + ${javac.modulepath}
61.40 run.test.classpath=\
61.41 ${javac.test.classpath}:\
61.42 ${build.test.classes.dir}
61.43 +run.test.modulepath=\
61.44 + ${javac.test.modulepath}
61.45 source.encoding=UTF-8
61.46 src.dir=src
61.47 test.src.dir=test
62.1 --- a/samples/privilegedcreator/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
62.2 +++ b/samples/privilegedcreator/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
62.3 @@ -12,14 +12,21 @@
62.4 - execution
62.5 - debugging
62.6 - javadoc
62.7 - - junit compilation
62.8 - - junit execution
62.9 - - junit debugging
62.10 + - test compilation
62.11 + - test execution
62.12 + - test debugging
62.13 - applet
62.14 - cleanup
62.15
62.16 -->
62.17 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="privilegedcreator-impl">
62.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="privilegedcreator-impl">
62.19 + <fail message="Please build using Ant 1.8.0 or higher.">
62.20 + <condition>
62.21 + <not>
62.22 + <antversion atleast="1.8.0"/>
62.23 + </not>
62.24 + </condition>
62.25 + </fail>
62.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
62.27 <!--
62.28 ======================
62.29 @@ -39,28 +46,136 @@
62.30 <property file="${user.properties.file}"/>
62.31 <!-- The two properties below are usually overridden -->
62.32 <!-- by the active platform. Just a fallback. -->
62.33 - <property name="default.javac.source" value="1.4"/>
62.34 - <property name="default.javac.target" value="1.4"/>
62.35 + <property name="default.javac.source" value="1.6"/>
62.36 + <property name="default.javac.target" value="1.6"/>
62.37 </target>
62.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
62.39 <property file="nbproject/configs/${config}.properties"/>
62.40 <property file="nbproject/project.properties"/>
62.41 </target>
62.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
62.43 + <target name="-init-modules-supported">
62.44 + <condition property="modules.supported.internal" value="true">
62.45 + <not>
62.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
62.47 + </not>
62.48 + </condition>
62.49 + </target>
62.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
62.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
62.52 + <attribute name="property"/>
62.53 + <attribute name="sourcepath"/>
62.54 + <sequential>
62.55 + <loadresource property="@{property}" quiet="true">
62.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
62.57 + <filterchain>
62.58 + <stripjavacomments/>
62.59 + <linecontainsregexp>
62.60 + <regexp pattern="module .* \{"/>
62.61 + </linecontainsregexp>
62.62 + <tokenfilter>
62.63 + <linetokenizer/>
62.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
62.65 + </tokenfilter>
62.66 + <striplinebreaks/>
62.67 + </filterchain>
62.68 + </loadresource>
62.69 + </sequential>
62.70 + </macrodef>
62.71 + </target>
62.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
62.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
62.74 + <condition>
62.75 + <not>
62.76 + <antversion atleast="1.10.0"/>
62.77 + </not>
62.78 + </condition>
62.79 + </fail>
62.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
62.81 + <condition property="named.module.internal">
62.82 + <and>
62.83 + <isset property="module.name"/>
62.84 + <length length="0" string="${module.name}" when="greater"/>
62.85 + </and>
62.86 + </condition>
62.87 + <condition property="unnamed.module.internal">
62.88 + <not>
62.89 + <isset property="named.module.internal"/>
62.90 + </not>
62.91 + </condition>
62.92 + <property name="javac.modulepath" value=""/>
62.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
62.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
62.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
62.96 + <property name="javac.upgrademodulepath" value=""/>
62.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
62.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
62.99 + <and>
62.100 + <isset property="javac.systemmodulepath"/>
62.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
62.102 + </and>
62.103 + </condition>
62.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
62.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
62.106 + <property name="module.name" value=""/>
62.107 + </target>
62.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
62.109 + <property name="platform.java" value="${java.home}/bin/java"/>
62.110 <available file="${manifest.file}" property="manifest.available"/>
62.111 - <condition property="manifest.available+main.class">
62.112 + <condition property="splashscreen.available">
62.113 <and>
62.114 - <isset property="manifest.available"/>
62.115 + <not>
62.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
62.117 + </not>
62.118 + <available file="${application.splash}"/>
62.119 + </and>
62.120 + </condition>
62.121 + <condition property="main.class.available">
62.122 + <and>
62.123 <isset property="main.class"/>
62.124 <not>
62.125 <equals arg1="${main.class}" arg2="" trim="true"/>
62.126 </not>
62.127 </and>
62.128 </condition>
62.129 - <condition property="manifest.available+main.class+mkdist.available">
62.130 + <condition property="profile.available">
62.131 <and>
62.132 - <istrue value="${manifest.available+main.class}"/>
62.133 - <isset property="libs.CopyLibs.classpath"/>
62.134 + <isset property="javac.profile"/>
62.135 + <length length="0" string="${javac.profile}" when="greater"/>
62.136 + <not>
62.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
62.138 + </not>
62.139 + </and>
62.140 + </condition>
62.141 + <condition property="do.archive">
62.142 + <or>
62.143 + <not>
62.144 + <istrue value="${jar.archive.disabled}"/>
62.145 + </not>
62.146 + <istrue value="${not.archive.disabled}"/>
62.147 + </or>
62.148 + </condition>
62.149 + <condition property="do.archive+manifest.available">
62.150 + <and>
62.151 + <isset property="manifest.available"/>
62.152 + <istrue value="${do.archive}"/>
62.153 + </and>
62.154 + </condition>
62.155 + <condition property="do.archive+main.class.available">
62.156 + <and>
62.157 + <isset property="main.class.available"/>
62.158 + <istrue value="${do.archive}"/>
62.159 + </and>
62.160 + </condition>
62.161 + <condition property="do.archive+splashscreen.available">
62.162 + <and>
62.163 + <isset property="splashscreen.available"/>
62.164 + <istrue value="${do.archive}"/>
62.165 + </and>
62.166 + </condition>
62.167 + <condition property="do.archive+profile.available">
62.168 + <and>
62.169 + <isset property="profile.available"/>
62.170 + <istrue value="${do.archive}"/>
62.171 </and>
62.172 </condition>
62.173 <condition property="have.tests">
62.174 @@ -86,6 +201,7 @@
62.175 </and>
62.176 </condition>
62.177 <property name="run.jvmargs" value=""/>
62.178 + <property name="run.jvmargs.ide" value=""/>
62.179 <property name="javac.compilerargs" value=""/>
62.180 <property name="work.dir" value="${basedir}"/>
62.181 <condition property="no.deps">
62.182 @@ -97,6 +213,8 @@
62.183 <property name="javadoc.preview" value="true"/>
62.184 <property name="application.args" value=""/>
62.185 <property name="source.encoding" value="${file.encoding}"/>
62.186 + <property name="runtime.encoding" value="${source.encoding}"/>
62.187 + <property name="manifest.encoding" value="${source.encoding}"/>
62.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
62.189 <and>
62.190 <isset property="javadoc.encoding"/>
62.191 @@ -112,12 +230,58 @@
62.192 <condition property="do.depend.true">
62.193 <istrue value="${do.depend}"/>
62.194 </condition>
62.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
62.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
62.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
62.198 <and>
62.199 - <isset property="jaxws.endorsed.dir"/>
62.200 - <available file="nbproject/jaxws-build.xml"/>
62.201 + <isset property="endorsed.classpath"/>
62.202 + <not>
62.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
62.204 + </not>
62.205 </and>
62.206 </condition>
62.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
62.208 + <isset property="profile.available"/>
62.209 + </condition>
62.210 + <condition else="false" property="jdkBug6558476">
62.211 + <and>
62.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
62.213 + <not>
62.214 + <os family="unix"/>
62.215 + </not>
62.216 + </and>
62.217 + </condition>
62.218 + <condition else="false" property="javac.fork">
62.219 + <or>
62.220 + <istrue value="${jdkBug6558476}"/>
62.221 + <istrue value="${javac.external.vm}"/>
62.222 + </or>
62.223 + </condition>
62.224 + <property name="jar.index" value="false"/>
62.225 + <property name="jar.index.metainf" value="${jar.index}"/>
62.226 + <property name="copylibs.rebase" value="true"/>
62.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
62.228 + <condition property="junit.available">
62.229 + <or>
62.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
62.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
62.232 + </or>
62.233 + </condition>
62.234 + <condition property="testng.available">
62.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
62.236 + </condition>
62.237 + <condition property="junit+testng.available">
62.238 + <and>
62.239 + <istrue value="${junit.available}"/>
62.240 + <istrue value="${testng.available}"/>
62.241 + </and>
62.242 + </condition>
62.243 + <condition else="testng" property="testng.mode" value="mixed">
62.244 + <istrue value="${junit+testng.available}"/>
62.245 + </condition>
62.246 + <condition else="" property="testng.debug.mode" value="-mixed">
62.247 + <istrue value="${junit+testng.available}"/>
62.248 + </condition>
62.249 + <property name="java.failonerror" value="true"/>
62.250 </target>
62.251 <target name="-post-init">
62.252 <!-- Empty placeholder for easier customization. -->
62.253 @@ -144,26 +308,152 @@
62.254 </sequential>
62.255 </macrodef>
62.256 </target>
62.257 - <target name="-init-macrodef-javac">
62.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
62.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
62.260 <attribute default="${src.dir}" name="srcdir"/>
62.261 <attribute default="${build.classes.dir}" name="destdir"/>
62.262 <attribute default="${javac.classpath}" name="classpath"/>
62.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
62.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
62.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
62.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
62.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
62.268 <attribute default="${includes}" name="includes"/>
62.269 <attribute default="${excludes}" name="excludes"/>
62.270 <attribute default="${javac.debug}" name="debug"/>
62.271 - <attribute default="" name="sourcepath"/>
62.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
62.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
62.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
62.275 <element name="customize" optional="true"/>
62.276 <sequential>
62.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
62.278 + <condition property="warn.excludes.internal">
62.279 + <and>
62.280 + <isset property="named.module.internal"/>
62.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
62.282 + </and>
62.283 + </condition>
62.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
62.285 + <property location="${build.dir}/empty" name="empty.dir"/>
62.286 + <mkdir dir="${empty.dir}"/>
62.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
62.288 + <condition property="processormodulepath.set">
62.289 + <resourcecount count="0" when="greater">
62.290 + <path>
62.291 + <pathelement path="@{processormodulepath}"/>
62.292 + </path>
62.293 + </resourcecount>
62.294 + </condition>
62.295 + <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}">
62.296 + <src>
62.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
62.298 + <include name="*"/>
62.299 + </dirset>
62.300 + </src>
62.301 <classpath>
62.302 <path path="@{classpath}"/>
62.303 </classpath>
62.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
62.305 + <modulepath>
62.306 + <path path="@{modulepath}"/>
62.307 + </modulepath>
62.308 + <upgrademodulepath>
62.309 + <path path="@{upgrademodulepath}"/>
62.310 + </upgrademodulepath>
62.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
62.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
62.313 + <compilerarg line="${javac.compilerargs}"/>
62.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
62.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
62.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
62.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
62.318 + <compilerarg line="${ap.processors.internal}"/>
62.319 + <compilerarg line="${annotation.processing.processor.options}"/>
62.320 + <compilerarg value="-s"/>
62.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
62.322 + <compilerarg line="${ap.proc.none.internal}"/>
62.323 <customize/>
62.324 </javac>
62.325 </sequential>
62.326 </macrodef>
62.327 + </target>
62.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
62.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
62.330 + <attribute default="${src.dir}" name="srcdir"/>
62.331 + <attribute default="${build.classes.dir}" name="destdir"/>
62.332 + <attribute default="${javac.classpath}" name="classpath"/>
62.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
62.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
62.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
62.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
62.337 + <attribute default="${includes}" name="includes"/>
62.338 + <attribute default="${excludes}" name="excludes"/>
62.339 + <attribute default="${javac.debug}" name="debug"/>
62.340 + <attribute default="${empty.dir}" name="sourcepath"/>
62.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
62.342 + <element name="customize" optional="true"/>
62.343 + <sequential>
62.344 + <property location="${build.dir}/empty" name="empty.dir"/>
62.345 + <mkdir dir="${empty.dir}"/>
62.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
62.347 + <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}">
62.348 + <src>
62.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
62.350 + <include name="*"/>
62.351 + </dirset>
62.352 + </src>
62.353 + <classpath>
62.354 + <path path="@{classpath}"/>
62.355 + </classpath>
62.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
62.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
62.358 + <compilerarg line="${javac.compilerargs}"/>
62.359 + <compilerarg value="-processorpath"/>
62.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
62.361 + <compilerarg line="${ap.processors.internal}"/>
62.362 + <compilerarg line="${annotation.processing.processor.options}"/>
62.363 + <compilerarg value="-s"/>
62.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
62.365 + <compilerarg line="${ap.proc.none.internal}"/>
62.366 + <customize/>
62.367 + </javac>
62.368 + </sequential>
62.369 + </macrodef>
62.370 + </target>
62.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
62.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
62.373 + <attribute default="${src.dir}" name="srcdir"/>
62.374 + <attribute default="${build.classes.dir}" name="destdir"/>
62.375 + <attribute default="${javac.classpath}" name="classpath"/>
62.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
62.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
62.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
62.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
62.380 + <attribute default="${includes}" name="includes"/>
62.381 + <attribute default="${excludes}" name="excludes"/>
62.382 + <attribute default="${javac.debug}" name="debug"/>
62.383 + <attribute default="${empty.dir}" name="sourcepath"/>
62.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
62.385 + <element name="customize" optional="true"/>
62.386 + <sequential>
62.387 + <property location="${build.dir}/empty" name="empty.dir"/>
62.388 + <mkdir dir="${empty.dir}"/>
62.389 + <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}">
62.390 + <src>
62.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
62.392 + <include name="*"/>
62.393 + </dirset>
62.394 + </src>
62.395 + <classpath>
62.396 + <path path="@{classpath}"/>
62.397 + </classpath>
62.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
62.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
62.400 + <compilerarg line="${javac.compilerargs}"/>
62.401 + <customize/>
62.402 + </javac>
62.403 + </sequential>
62.404 + </macrodef>
62.405 + </target>
62.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
62.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
62.408 <attribute default="${src.dir}" name="srcdir"/>
62.409 <attribute default="${build.classes.dir}" name="destdir"/>
62.410 @@ -180,51 +470,383 @@
62.411 <attribute default="${build.classes.dir}" name="destdir"/>
62.412 <sequential>
62.413 <fail unless="javac.includes">Must set javac.includes</fail>
62.414 - <pathconvert pathsep="," property="javac.includes.binary">
62.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
62.416 <path>
62.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
62.418 </path>
62.419 <globmapper from="*.java" to="*.class"/>
62.420 </pathconvert>
62.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
62.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
62.423 <delete>
62.424 - <files includes="${javac.includes.binary}"/>
62.425 + <files includesfile="${javac.includesfile.binary}"/>
62.426 + </delete>
62.427 + <delete>
62.428 + <fileset file="${javac.includesfile.binary}"/>
62.429 </delete>
62.430 </sequential>
62.431 </macrodef>
62.432 </target>
62.433 - <target name="-init-macrodef-junit">
62.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
62.435 + <condition else="false" property="nb.junit.batch" value="true">
62.436 + <and>
62.437 + <istrue value="${junit.available}"/>
62.438 + <not>
62.439 + <isset property="test.method"/>
62.440 + </not>
62.441 + </and>
62.442 + </condition>
62.443 + <condition else="false" property="nb.junit.single" value="true">
62.444 + <and>
62.445 + <istrue value="${junit.available}"/>
62.446 + <isset property="test.method"/>
62.447 + </and>
62.448 + </condition>
62.449 + </target>
62.450 + <target name="-init-test-properties">
62.451 + <property name="test.binaryincludes" value="<nothing>"/>
62.452 + <property name="test.binarytestincludes" value=""/>
62.453 + <property name="test.binaryexcludes" value=""/>
62.454 + </target>
62.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
62.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
62.457 + <attribute default="${includes}" name="includes"/>
62.458 + <attribute default="${excludes}" name="excludes"/>
62.459 + <element name="customizePrototype" optional="true"/>
62.460 + <sequential>
62.461 + <property name="junit.forkmode" value="perTest"/>
62.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
62.463 + <syspropertyset>
62.464 + <propertyref prefix="test-sys-prop."/>
62.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
62.466 + </syspropertyset>
62.467 + <classpath>
62.468 + <path path="${run.test.classpath}"/>
62.469 + </classpath>
62.470 + <modulepath>
62.471 + <path path="${run.test.modulepath}"/>
62.472 + </modulepath>
62.473 + <formatter type="brief" usefile="false"/>
62.474 + <formatter type="xml"/>
62.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
62.476 + <jvmarg value="-ea"/>
62.477 + <jvmarg line="${run.test.jvmargs}"/>
62.478 + <customizePrototype/>
62.479 + </junit>
62.480 + </sequential>
62.481 + </macrodef>
62.482 + </target>
62.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
62.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
62.485 + <attribute default="${includes}" name="includes"/>
62.486 + <attribute default="${excludes}" name="excludes"/>
62.487 + <element name="customizePrototype" optional="true"/>
62.488 + <sequential>
62.489 + <property name="junit.forkmode" value="perTest"/>
62.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
62.491 + <syspropertyset>
62.492 + <propertyref prefix="test-sys-prop."/>
62.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
62.494 + </syspropertyset>
62.495 + <classpath>
62.496 + <path path="${run.test.classpath}"/>
62.497 + </classpath>
62.498 + <formatter type="brief" usefile="false"/>
62.499 + <formatter type="xml"/>
62.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
62.501 + <jvmarg value="-ea"/>
62.502 + <customizePrototype/>
62.503 + </junit>
62.504 + </sequential>
62.505 + </macrodef>
62.506 + </target>
62.507 + <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}">
62.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
62.509 <attribute default="${includes}" name="includes"/>
62.510 <attribute default="${excludes}" name="excludes"/>
62.511 <attribute default="**" name="testincludes"/>
62.512 + <attribute default="" name="testmethods"/>
62.513 + <element name="customize" optional="true"/>
62.514 <sequential>
62.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
62.516 - <batchtest todir="${build.test.results.dir}">
62.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
62.518 - <filename name="@{testincludes}"/>
62.519 - </fileset>
62.520 - </batchtest>
62.521 + <j2seproject3:junit-prototype>
62.522 + <customizePrototype>
62.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
62.524 + <customize/>
62.525 + </customizePrototype>
62.526 + </j2seproject3:junit-prototype>
62.527 + </sequential>
62.528 + </macrodef>
62.529 + </target>
62.530 + <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}">
62.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
62.532 + <attribute default="${includes}" name="includes"/>
62.533 + <attribute default="${excludes}" name="excludes"/>
62.534 + <attribute default="**" name="testincludes"/>
62.535 + <attribute default="" name="testmethods"/>
62.536 + <element name="customize" optional="true"/>
62.537 + <sequential>
62.538 + <j2seproject3:junit-prototype>
62.539 + <customizePrototype>
62.540 + <batchtest todir="${build.test.results.dir}">
62.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
62.542 + <filename name="@{testincludes}"/>
62.543 + </fileset>
62.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
62.545 + <filename name="${test.binarytestincludes}"/>
62.546 + </fileset>
62.547 + </batchtest>
62.548 + <customize/>
62.549 + </customizePrototype>
62.550 + </j2seproject3:junit-prototype>
62.551 + </sequential>
62.552 + </macrodef>
62.553 + </target>
62.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
62.555 + <target if="${testng.available}" name="-init-macrodef-testng">
62.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
62.557 + <attribute default="${includes}" name="includes"/>
62.558 + <attribute default="${excludes}" name="excludes"/>
62.559 + <attribute default="**" name="testincludes"/>
62.560 + <attribute default="" name="testmethods"/>
62.561 + <element name="customize" optional="true"/>
62.562 + <sequential>
62.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
62.564 + <isset property="test.method"/>
62.565 + </condition>
62.566 + <union id="test.set">
62.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
62.568 + <filename name="@{testincludes}"/>
62.569 + </fileset>
62.570 + </union>
62.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
62.572 + <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="privilegedcreator" testname="TestNG tests" workingDir="${work.dir}">
62.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
62.574 + <propertyset>
62.575 + <propertyref prefix="test-sys-prop."/>
62.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
62.577 + </propertyset>
62.578 <classpath>
62.579 <path path="${run.test.classpath}"/>
62.580 </classpath>
62.581 - <syspropertyset>
62.582 - <propertyref prefix="test-sys-prop."/>
62.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
62.584 - </syspropertyset>
62.585 - <formatter type="brief" usefile="false"/>
62.586 - <formatter type="xml"/>
62.587 - <jvmarg line="${run.jvmargs}"/>
62.588 - </junit>
62.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
62.590 + <customize/>
62.591 + </testng>
62.592 </sequential>
62.593 </macrodef>
62.594 </target>
62.595 - <target name="-init-macrodef-nbjpda">
62.596 + <target name="-init-macrodef-test-impl">
62.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
62.598 + <attribute default="${includes}" name="includes"/>
62.599 + <attribute default="${excludes}" name="excludes"/>
62.600 + <attribute default="**" name="testincludes"/>
62.601 + <attribute default="" name="testmethods"/>
62.602 + <element implicit="true" name="customize" optional="true"/>
62.603 + <sequential>
62.604 + <echo>No tests executed.</echo>
62.605 + </sequential>
62.606 + </macrodef>
62.607 + </target>
62.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
62.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
62.610 + <attribute default="${includes}" name="includes"/>
62.611 + <attribute default="${excludes}" name="excludes"/>
62.612 + <attribute default="**" name="testincludes"/>
62.613 + <attribute default="" name="testmethods"/>
62.614 + <element implicit="true" name="customize" optional="true"/>
62.615 + <sequential>
62.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
62.617 + <customize/>
62.618 + </j2seproject3:junit>
62.619 + </sequential>
62.620 + </macrodef>
62.621 + </target>
62.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
62.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
62.624 + <attribute default="${includes}" name="includes"/>
62.625 + <attribute default="${excludes}" name="excludes"/>
62.626 + <attribute default="**" name="testincludes"/>
62.627 + <attribute default="" name="testmethods"/>
62.628 + <element implicit="true" name="customize" optional="true"/>
62.629 + <sequential>
62.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
62.631 + <customize/>
62.632 + </j2seproject3:testng>
62.633 + </sequential>
62.634 + </macrodef>
62.635 + </target>
62.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
62.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
62.638 + <attribute default="${includes}" name="includes"/>
62.639 + <attribute default="${excludes}" name="excludes"/>
62.640 + <attribute default="**" name="testincludes"/>
62.641 + <attribute default="" name="testmethods"/>
62.642 + <sequential>
62.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
62.644 + <customize>
62.645 + <jvmarg line="${run.jvmargs}"/>
62.646 + <jvmarg line="${run.jvmargs.ide}"/>
62.647 + </customize>
62.648 + </j2seproject3:test-impl>
62.649 + </sequential>
62.650 + </macrodef>
62.651 + </target>
62.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
62.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
62.654 + <attribute default="${includes}" name="includes"/>
62.655 + <attribute default="${excludes}" name="excludes"/>
62.656 + <attribute default="**" name="testincludes"/>
62.657 + <attribute default="" name="testmethods"/>
62.658 + <element name="customizeDebuggee" optional="true"/>
62.659 + <sequential>
62.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
62.661 + <customize>
62.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
62.663 + <customizeDebuggee/>
62.664 + </customize>
62.665 + </j2seproject3:junit>
62.666 + </sequential>
62.667 + </macrodef>
62.668 + </target>
62.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
62.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
62.671 + <attribute default="${main.class}" name="testClass"/>
62.672 + <attribute default="" name="testMethod"/>
62.673 + <element name="customize2" optional="true"/>
62.674 + <sequential>
62.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
62.676 + <isset property="test.method"/>
62.677 + </condition>
62.678 + <condition else="-suitename privilegedcreator -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
62.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
62.680 + </condition>
62.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
62.682 + <mkdir dir="${build.test.results.dir}"/>
62.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
62.684 + <customizeDebuggee>
62.685 + <customize2/>
62.686 + <jvmarg value="-ea"/>
62.687 + <arg line="${testng.debug.mode}"/>
62.688 + <arg line="-d ${build.test.results.dir}"/>
62.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
62.690 + <arg line="${testng.cmd.args}"/>
62.691 + </customizeDebuggee>
62.692 + </j2seproject3:debug>
62.693 + </sequential>
62.694 + </macrodef>
62.695 + </target>
62.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
62.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
62.698 + <attribute default="${main.class}" name="testClass"/>
62.699 + <attribute default="" name="testMethod"/>
62.700 + <element implicit="true" name="customize2" optional="true"/>
62.701 + <sequential>
62.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
62.703 + <customize2/>
62.704 + </j2seproject3:testng-debug>
62.705 + </sequential>
62.706 + </macrodef>
62.707 + </target>
62.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
62.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
62.710 + <attribute default="${includes}" name="includes"/>
62.711 + <attribute default="${excludes}" name="excludes"/>
62.712 + <attribute default="**" name="testincludes"/>
62.713 + <attribute default="" name="testmethods"/>
62.714 + <attribute default="${main.class}" name="testClass"/>
62.715 + <attribute default="" name="testMethod"/>
62.716 + <sequential>
62.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
62.718 + <customizeDebuggee>
62.719 + <jvmarg line="${run.jvmargs}"/>
62.720 + <jvmarg line="${run.jvmargs.ide}"/>
62.721 + </customizeDebuggee>
62.722 + </j2seproject3:test-debug-impl>
62.723 + </sequential>
62.724 + </macrodef>
62.725 + </target>
62.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
62.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
62.728 + <attribute default="${includes}" name="includes"/>
62.729 + <attribute default="${excludes}" name="excludes"/>
62.730 + <attribute default="**" name="testincludes"/>
62.731 + <attribute default="" name="testmethods"/>
62.732 + <attribute default="${main.class}" name="testClass"/>
62.733 + <attribute default="" name="testMethod"/>
62.734 + <sequential>
62.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
62.736 + <customize2>
62.737 + <syspropertyset>
62.738 + <propertyref prefix="test-sys-prop."/>
62.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
62.740 + </syspropertyset>
62.741 + </customize2>
62.742 + </j2seproject3:testng-debug-impl>
62.743 + </sequential>
62.744 + </macrodef>
62.745 + </target>
62.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
62.747 + <!--
62.748 + pre NB7.2 profiling section; consider it deprecated
62.749 + -->
62.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
62.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
62.752 + <!-- Empty placeholder for easier customization. -->
62.753 + <!-- You can override this target in the ../build.xml file. -->
62.754 + </target>
62.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
62.756 + <!-- Empty placeholder for easier customization. -->
62.757 + <!-- You can override this target in the ../build.xml file. -->
62.758 + </target>
62.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
62.760 + <macrodef name="resolve">
62.761 + <attribute name="name"/>
62.762 + <attribute name="value"/>
62.763 + <sequential>
62.764 + <property name="@{name}" value="${env.@{value}}"/>
62.765 + </sequential>
62.766 + </macrodef>
62.767 + <macrodef name="profile">
62.768 + <attribute default="${main.class}" name="classname"/>
62.769 + <element name="customize" optional="true"/>
62.770 + <sequential>
62.771 + <property environment="env"/>
62.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
62.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
62.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
62.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
62.776 + <jvmarg line="${profiler.info.jvmargs}"/>
62.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
62.778 + <arg line="${application.args}"/>
62.779 + <classpath>
62.780 + <path path="${run.classpath}"/>
62.781 + </classpath>
62.782 + <syspropertyset>
62.783 + <propertyref prefix="run-sys-prop."/>
62.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
62.785 + </syspropertyset>
62.786 + <customize/>
62.787 + </java>
62.788 + </sequential>
62.789 + </macrodef>
62.790 + </target>
62.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
62.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
62.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
62.794 + </target>
62.795 + <!--
62.796 + end of pre NB7.2 profiling section
62.797 + -->
62.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
62.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
62.800 <attribute default="${main.class}" name="name"/>
62.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
62.802 <attribute default="${debug.classpath}" name="classpath"/>
62.803 <attribute default="" name="stopclassname"/>
62.804 <sequential>
62.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
62.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
62.807 + <modulepath>
62.808 + <path path="@{modulepath}"/>
62.809 + </modulepath>
62.810 <classpath>
62.811 <path path="@{classpath}"/>
62.812 </classpath>
62.813 @@ -235,35 +857,120 @@
62.814 <attribute default="${build.classes.dir}" name="dir"/>
62.815 <sequential>
62.816 <nbjpdareload>
62.817 - <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
62.818 + <fileset dir="@{dir}" includes="${fix.classes}">
62.819 + <include name="${fix.includes}*.class"/>
62.820 + </fileset>
62.821 </nbjpdareload>
62.822 </sequential>
62.823 </macrodef>
62.824 </target>
62.825 <target name="-init-debug-args">
62.826 - <property name="version-output" value="java version "${ant.java.version}"/>
62.827 - <condition property="have-jdk-older-than-1.4">
62.828 - <or>
62.829 - <contains string="${version-output}" substring="java version "1.0"/>
62.830 - <contains string="${version-output}" substring="java version "1.1"/>
62.831 - <contains string="${version-output}" substring="java version "1.2"/>
62.832 - <contains string="${version-output}" substring="java version "1.3"/>
62.833 - </or>
62.834 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
62.835 + <os family="windows"/>
62.836 </condition>
62.837 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
62.838 - <istrue value="${have-jdk-older-than-1.4}"/>
62.839 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
62.840 + <isset property="debug.transport"/>
62.841 </condition>
62.842 </target>
62.843 <target depends="-init-debug-args" name="-init-macrodef-debug">
62.844 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
62.845 + <attribute default="${module.name}" name="modulename"/>
62.846 <attribute default="${main.class}" name="classname"/>
62.847 + <attribute default="${debug.modulepath}" name="modulepath"/>
62.848 <attribute default="${debug.classpath}" name="classpath"/>
62.849 + <element name="customizeDebuggee" optional="true"/>
62.850 + <sequential>
62.851 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
62.852 + <customize>
62.853 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
62.854 + <customizeDebuggee/>
62.855 + </customize>
62.856 + </j2seproject1:java>
62.857 + </sequential>
62.858 + </macrodef>
62.859 + </target>
62.860 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
62.861 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
62.862 + <attribute default="${module.name}" name="modulename"/>
62.863 + <attribute default="${main.class}" name="classname"/>
62.864 + <attribute default="${run.modulepath}" name="modulepath"/>
62.865 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
62.866 + <attribute default="${run.classpath}" name="classpath"/>
62.867 + <attribute default="jvm" name="jvm"/>
62.868 <element name="customize" optional="true"/>
62.869 <sequential>
62.870 - <java classname="@{classname}" dir="${work.dir}" fork="true">
62.871 - <jvmarg line="${debug-args-line}"/>
62.872 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
62.873 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
62.874 + <classpath>
62.875 + <path path="@{classpath}"/>
62.876 + </classpath>
62.877 + <modulepath>
62.878 + <pathelement path="@{modulepath}"/>
62.879 + <pathelement location="${module.build.classes.dir}"/>
62.880 + </modulepath>
62.881 + <upgrademodulepath>
62.882 + <path path="@{upgrademodulepath}"/>
62.883 + </upgrademodulepath>
62.884 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
62.885 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
62.886 <jvmarg line="${run.jvmargs}"/>
62.887 + <jvmarg line="${run.jvmargs.ide}"/>
62.888 + <syspropertyset>
62.889 + <propertyref prefix="run-sys-prop."/>
62.890 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
62.891 + </syspropertyset>
62.892 + <customize/>
62.893 + </java>
62.894 + </sequential>
62.895 + </macrodef>
62.896 + </target>
62.897 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
62.898 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
62.899 + <attribute default="" name="modulename"/>
62.900 + <attribute default="${main.class}" name="classname"/>
62.901 + <attribute default="${run.modulepath}" name="modulepath"/>
62.902 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
62.903 + <attribute default="${run.classpath}" name="classpath"/>
62.904 + <attribute default="jvm" name="jvm"/>
62.905 + <element name="customize" optional="true"/>
62.906 + <sequential>
62.907 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
62.908 + <classpath>
62.909 + <path path="@{classpath}"/>
62.910 + </classpath>
62.911 + <modulepath>
62.912 + <path path="@{modulepath}"/>
62.913 + </modulepath>
62.914 + <upgrademodulepath>
62.915 + <path path="@{upgrademodulepath}"/>
62.916 + </upgrademodulepath>
62.917 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
62.918 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
62.919 + <jvmarg line="${run.jvmargs}"/>
62.920 + <jvmarg line="${run.jvmargs.ide}"/>
62.921 + <syspropertyset>
62.922 + <propertyref prefix="run-sys-prop."/>
62.923 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
62.924 + </syspropertyset>
62.925 + <customize/>
62.926 + </java>
62.927 + </sequential>
62.928 + </macrodef>
62.929 + </target>
62.930 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
62.931 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
62.932 + <attribute default="" name="modulename"/>
62.933 + <attribute default="${main.class}" name="classname"/>
62.934 + <attribute default="" name="modulepath"/>
62.935 + <attribute default="${run.classpath}" name="classpath"/>
62.936 + <attribute default="jvm" name="jvm"/>
62.937 + <element name="customize" optional="true"/>
62.938 + <sequential>
62.939 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
62.940 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
62.941 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
62.942 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
62.943 + <jvmarg line="${run.jvmargs}"/>
62.944 + <jvmarg line="${run.jvmargs.ide}"/>
62.945 <classpath>
62.946 <path path="@{classpath}"/>
62.947 </classpath>
62.948 @@ -276,39 +983,100 @@
62.949 </sequential>
62.950 </macrodef>
62.951 </target>
62.952 - <target name="-init-macrodef-java">
62.953 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
62.954 - <attribute default="${main.class}" name="classname"/>
62.955 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
62.956 + <target name="-init-macrodef-copylibs">
62.957 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
62.958 + <attribute default="${manifest.file}" name="manifest"/>
62.959 <element name="customize" optional="true"/>
62.960 <sequential>
62.961 - <java classname="@{classname}" dir="${work.dir}" fork="true">
62.962 - <jvmarg line="${run.jvmargs}"/>
62.963 - <classpath>
62.964 - <path path="${run.classpath}"/>
62.965 - </classpath>
62.966 - <syspropertyset>
62.967 - <propertyref prefix="run-sys-prop."/>
62.968 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
62.969 - </syspropertyset>
62.970 - <customize/>
62.971 - </java>
62.972 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
62.973 + <pathconvert property="run.classpath.without.build.classes.dir">
62.974 + <path path="${run.classpath}"/>
62.975 + <map from="${build.classes.dir.resolved}" to=""/>
62.976 + </pathconvert>
62.977 + <pathconvert pathsep=" " property="jar.classpath">
62.978 + <path path="${run.classpath.without.build.classes.dir}"/>
62.979 + <chainedmapper>
62.980 + <flattenmapper/>
62.981 + <filtermapper>
62.982 + <replacestring from=" " to="%20"/>
62.983 + </filtermapper>
62.984 + <globmapper from="*" to="lib/*"/>
62.985 + </chainedmapper>
62.986 + </pathconvert>
62.987 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
62.988 + <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}">
62.989 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
62.990 + <manifest>
62.991 + <attribute name="Class-Path" value="${jar.classpath}"/>
62.992 + <customize/>
62.993 + </manifest>
62.994 + </copylibs>
62.995 </sequential>
62.996 </macrodef>
62.997 </target>
62.998 <target name="-init-presetdef-jar">
62.999 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
62.1000 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
62.1001 - <j2seproject1:fileset dir="${build.classes.dir}"/>
62.1002 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
62.1003 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
62.1004 </jar>
62.1005 </presetdef>
62.1006 </target>
62.1007 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
62.1008 + <target name="-init-ap-cmdline-properties">
62.1009 + <property name="annotation.processing.enabled" value="true"/>
62.1010 + <property name="annotation.processing.processors.list" value=""/>
62.1011 + <property name="annotation.processing.processor.options" value=""/>
62.1012 + <property name="annotation.processing.run.all.processors" value="true"/>
62.1013 + <property name="javac.processorpath" value="${javac.classpath}"/>
62.1014 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
62.1015 + <condition property="ap.supported.internal" value="true">
62.1016 + <not>
62.1017 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
62.1018 + </not>
62.1019 + </condition>
62.1020 + </target>
62.1021 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
62.1022 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
62.1023 + <isfalse value="${annotation.processing.run.all.processors}"/>
62.1024 + </condition>
62.1025 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
62.1026 + <isfalse value="${annotation.processing.enabled}"/>
62.1027 + </condition>
62.1028 + </target>
62.1029 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
62.1030 + <property name="ap.cmd.line.internal" value=""/>
62.1031 + </target>
62.1032 + <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"/>
62.1033 <!--
62.1034 ===================
62.1035 COMPILATION SECTION
62.1036 ===================
62.1037 -->
62.1038 - <target depends="init" name="deps-jar" unless="no.deps"/>
62.1039 + <target name="-deps-jar-init" unless="built-jar.properties">
62.1040 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
62.1041 + <delete file="${built-jar.properties}" quiet="true"/>
62.1042 + </target>
62.1043 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
62.1044 + <echo level="warn" message="Cycle detected: privilegedcreator was already built"/>
62.1045 + </target>
62.1046 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
62.1047 + <mkdir dir="${build.dir}"/>
62.1048 + <touch file="${built-jar.properties}" verbose="false"/>
62.1049 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
62.1050 + <antcall target="-warn-already-built-jar"/>
62.1051 + <propertyfile file="${built-jar.properties}">
62.1052 + <entry key="${basedir}" value=""/>
62.1053 + </propertyfile>
62.1054 + </target>
62.1055 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
62.1056 + <target depends="init" name="-check-automatic-build">
62.1057 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
62.1058 + </target>
62.1059 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
62.1060 + <antcall target="clean">
62.1061 + <param name="no.dependencies" value="true"/>
62.1062 + </antcall>
62.1063 + </target>
62.1064 <target depends="init,deps-jar" name="-pre-pre-compile">
62.1065 <mkdir dir="${build.classes.dir}"/>
62.1066 </target>
62.1067 @@ -317,19 +1085,30 @@
62.1068 <!-- You can override this target in the ../build.xml file. -->
62.1069 </target>
62.1070 <target if="do.depend.true" name="-compile-depend">
62.1071 - <j2seproject3:depend/>
62.1072 + <pathconvert property="build.generated.subdirs">
62.1073 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
62.1074 + <include name="*"/>
62.1075 + </dirset>
62.1076 + </pathconvert>
62.1077 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
62.1078 </target>
62.1079 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
62.1080 - <j2seproject3:javac/>
62.1081 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
62.1082 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
62.1083 <copy todir="${build.classes.dir}">
62.1084 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
62.1085 </copy>
62.1086 </target>
62.1087 + <target if="has.persistence.xml" name="-copy-persistence-xml">
62.1088 + <mkdir dir="${build.classes.dir}/META-INF"/>
62.1089 + <copy todir="${build.classes.dir}/META-INF">
62.1090 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
62.1091 + </copy>
62.1092 + </target>
62.1093 <target name="-post-compile">
62.1094 <!-- Empty placeholder for easier customization. -->
62.1095 <!-- You can override this target in the ../build.xml file. -->
62.1096 </target>
62.1097 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
62.1098 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
62.1099 <target name="-pre-compile-single">
62.1100 <!-- Empty placeholder for easier customization. -->
62.1101 <!-- You can override this target in the ../build.xml file. -->
62.1102 @@ -337,13 +1116,13 @@
62.1103 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
62.1104 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
62.1105 <j2seproject3:force-recompile/>
62.1106 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
62.1107 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
62.1108 </target>
62.1109 <target name="-post-compile-single">
62.1110 <!-- Empty placeholder for easier customization. -->
62.1111 <!-- You can override this target in the ../build.xml file. -->
62.1112 </target>
62.1113 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
62.1114 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
62.1115 <!--
62.1116 ====================
62.1117 JAR BUILDING SECTION
62.1118 @@ -357,57 +1136,191 @@
62.1119 <!-- Empty placeholder for easier customization. -->
62.1120 <!-- You can override this target in the ../build.xml file. -->
62.1121 </target>
62.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
62.1123 - <j2seproject1:jar/>
62.1124 + <target depends="init,compile" name="-check-module-main-class">
62.1125 + <pathconvert property="main.class.file">
62.1126 + <string value="${main.class}"/>
62.1127 + <unpackagemapper from="*" to="*.class"/>
62.1128 + </pathconvert>
62.1129 + <condition property="do.module.main.class">
62.1130 + <and>
62.1131 + <isset property="main.class.available"/>
62.1132 + <available file="${build.classes.dir}/module-info.class"/>
62.1133 + <available file="${build.classes.dir}/${main.class.file}"/>
62.1134 + <isset property="libs.CopyLibs.classpath"/>
62.1135 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
62.1136 + </and>
62.1137 + </condition>
62.1138 </target>
62.1139 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
62.1140 - <j2seproject1:jar manifest="${manifest.file}"/>
62.1141 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
62.1142 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
62.1143 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
62.1144 </target>
62.1145 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
62.1146 - <j2seproject1:jar manifest="${manifest.file}">
62.1147 - <j2seproject1:manifest>
62.1148 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
62.1149 - </j2seproject1:manifest>
62.1150 - </j2seproject1:jar>
62.1151 - <echo>To run this application from the command line without Ant, try:</echo>
62.1152 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
62.1153 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
62.1154 + <touch file="${tmp.manifest.file}" verbose="false"/>
62.1155 + </target>
62.1156 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
62.1157 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
62.1158 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
62.1159 + </target>
62.1160 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
62.1161 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
62.1162 + <attribute name="Main-Class" value="${main.class}"/>
62.1163 + </manifest>
62.1164 + </target>
62.1165 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
62.1166 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
62.1167 + <attribute name="Profile" value="${javac.profile}"/>
62.1168 + </manifest>
62.1169 + </target>
62.1170 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
62.1171 + <basename file="${application.splash}" property="splashscreen.basename"/>
62.1172 + <mkdir dir="${build.classes.dir}/META-INF"/>
62.1173 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
62.1174 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
62.1175 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
62.1176 + </manifest>
62.1177 + </target>
62.1178 + <target depends="init,compile" name="-check-do-mkdist">
62.1179 + <condition property="do.mkdist">
62.1180 + <and>
62.1181 + <isset property="do.archive"/>
62.1182 + <isset property="libs.CopyLibs.classpath"/>
62.1183 + <not>
62.1184 + <istrue value="${mkdist.disabled}"/>
62.1185 + </not>
62.1186 + <not>
62.1187 + <available file="${build.classes.dir}/module-info.class"/>
62.1188 + </not>
62.1189 + </and>
62.1190 + </condition>
62.1191 + </target>
62.1192 + <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">
62.1193 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
62.1194 + <echo level="info">To run this application from the command line without Ant, try:</echo>
62.1195 + <property location="${dist.jar}" name="dist.jar.resolved"/>
62.1196 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
62.1197 + </target>
62.1198 + <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">
62.1199 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
62.1200 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
62.1201 <property location="${dist.jar}" name="dist.jar.resolved"/>
62.1202 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
62.1203 + <isset property="named.module.internal"/>
62.1204 + </condition>
62.1205 <pathconvert property="run.classpath.with.dist.jar">
62.1206 <path path="${run.classpath}"/>
62.1207 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
62.1208 + </pathconvert>
62.1209 + <pathconvert property="run.modulepath.with.dist.jar">
62.1210 + <path location="${dist.jar.resolved}"/>
62.1211 + <path path="${run.modulepath}"/>
62.1212 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
62.1213 </pathconvert>
62.1214 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
62.1215 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
62.1216 + <isset property="named.module.internal"/>
62.1217 + </condition>
62.1218 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
62.1219 + <and>
62.1220 + <isset property="modules.supported.internal"/>
62.1221 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
62.1222 + </and>
62.1223 + </condition>
62.1224 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
62.1225 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
62.1226 + </condition>
62.1227 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
62.1228 + <isset property="do.module.main.class"/>
62.1229 + </condition>
62.1230 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
62.1231 + <isset property="named.module.internal"/>
62.1232 + </condition>
62.1233 + <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}">
62.1234 + <isset property="main.class.available"/>
62.1235 + </condition>
62.1236 + <condition else="debug" property="jar.usage.level" value="info">
62.1237 + <isset property="main.class.available"/>
62.1238 + </condition>
62.1239 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
62.1240 </target>
62.1241 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
62.1242 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
62.1243 - <pathconvert property="run.classpath.without.build.classes.dir">
62.1244 - <path path="${run.classpath}"/>
62.1245 - <map from="${build.classes.dir.resolved}" to=""/>
62.1246 - </pathconvert>
62.1247 - <pathconvert pathsep=" " property="jar.classpath">
62.1248 - <path path="${run.classpath.without.build.classes.dir}"/>
62.1249 - <chainedmapper>
62.1250 - <flattenmapper/>
62.1251 - <globmapper from="*" to="lib/*"/>
62.1252 - </chainedmapper>
62.1253 - </pathconvert>
62.1254 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
62.1255 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
62.1256 - <fileset dir="${build.classes.dir}"/>
62.1257 - <manifest>
62.1258 - <attribute name="Main-Class" value="${main.class}"/>
62.1259 - <attribute name="Class-Path" value="${jar.classpath}"/>
62.1260 - </manifest>
62.1261 - </copylibs>
62.1262 - <echo>To run this application from the command line without Ant, try:</echo>
62.1263 - <property location="${dist.jar}" name="dist.jar.resolved"/>
62.1264 - <echo>java -jar "${dist.jar.resolved}"</echo>
62.1265 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
62.1266 + <delete>
62.1267 + <fileset file="${tmp.manifest.file}"/>
62.1268 + </delete>
62.1269 </target>
62.1270 + <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"/>
62.1271 + <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"/>
62.1272 <target name="-post-jar">
62.1273 <!-- Empty placeholder for easier customization. -->
62.1274 <!-- You can override this target in the ../build.xml file. -->
62.1275 </target>
62.1276 - <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"/>
62.1277 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
62.1278 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
62.1279 + <!--
62.1280 + =================
62.1281 + DEPLOY SECTION
62.1282 + =================
62.1283 + -->
62.1284 + <target name="-pre-deploy">
62.1285 + <!-- Empty placeholder for easier customization. -->
62.1286 + <!-- You can override this target in the ../build.xml file. -->
62.1287 + </target>
62.1288 + <target depends="init" name="-check-jlink">
62.1289 + <condition property="do.jlink.internal">
62.1290 + <and>
62.1291 + <istrue value="${do.jlink}"/>
62.1292 + <isset property="do.archive"/>
62.1293 + <isset property="named.module.internal"/>
62.1294 + </and>
62.1295 + </condition>
62.1296 + </target>
62.1297 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
62.1298 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
62.1299 + <property name="jlink.launcher.name" value="${application.title}"/>
62.1300 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
62.1301 + <and>
62.1302 + <isset property="jlink.additionalmodules"/>
62.1303 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
62.1304 + </and>
62.1305 + </condition>
62.1306 + <condition property="jlink.do.strip.internal">
62.1307 + <and>
62.1308 + <isset property="jlink.strip"/>
62.1309 + <istrue value="${jlink.strip}"/>
62.1310 + </and>
62.1311 + </condition>
62.1312 + <condition property="jlink.do.additionalparam.internal">
62.1313 + <and>
62.1314 + <isset property="jlink.additionalparam"/>
62.1315 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
62.1316 + </and>
62.1317 + </condition>
62.1318 + <condition property="jlink.do.launcher.internal">
62.1319 + <and>
62.1320 + <istrue value="${jlink.launcher}"/>
62.1321 + <isset property="main.class.available"/>
62.1322 + </and>
62.1323 + </condition>
62.1324 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
62.1325 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
62.1326 + <exec executable="${platform.jlink}">
62.1327 + <arg value="--module-path"/>
62.1328 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
62.1329 + <arg value="--add-modules"/>
62.1330 + <arg value="${jlink.add.modules}"/>
62.1331 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
62.1332 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
62.1333 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
62.1334 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
62.1335 + <arg value="--output"/>
62.1336 + <arg value="${dist.jlink.output}"/>
62.1337 + </exec>
62.1338 + </target>
62.1339 + <target name="-post-deploy">
62.1340 + <!-- Empty placeholder for easier customization. -->
62.1341 + <!-- You can override this target in the ../build.xml file. -->
62.1342 + </target>
62.1343 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
62.1344 <!--
62.1345 =================
62.1346 EXECUTION SECTION
62.1347 @@ -423,10 +1336,14 @@
62.1348 <target name="-do-not-recompile">
62.1349 <property name="javac.includes.binary" value=""/>
62.1350 </target>
62.1351 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
62.1352 + <target depends="init,compile-single" name="run-single">
62.1353 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
62.1354 <j2seproject1:java classname="${run.class}"/>
62.1355 </target>
62.1356 + <target depends="init,compile-test-single" name="run-test-with-main">
62.1357 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
62.1358 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
62.1359 + </target>
62.1360 <!--
62.1361 =================
62.1362 DEBUGGING SECTION
62.1363 @@ -435,11 +1352,14 @@
62.1364 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
62.1365 <j2seproject1:nbjpdastart name="${debug.class}"/>
62.1366 </target>
62.1367 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
62.1368 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
62.1369 + </target>
62.1370 <target depends="init,compile" name="-debug-start-debuggee">
62.1371 <j2seproject3:debug>
62.1372 - <customize>
62.1373 + <customizeDebuggee>
62.1374 <arg line="${application.args}"/>
62.1375 - </customize>
62.1376 + </customizeDebuggee>
62.1377 </j2seproject3:debug>
62.1378 </target>
62.1379 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
62.1380 @@ -451,7 +1371,12 @@
62.1381 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
62.1382 <j2seproject3:debug classname="${debug.class}"/>
62.1383 </target>
62.1384 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
62.1385 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
62.1386 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
62.1387 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
62.1388 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
62.1389 + </target>
62.1390 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
62.1391 <target depends="init" name="-pre-debug-fix">
62.1392 <fail unless="fix.includes">Must set fix.includes</fail>
62.1393 <property name="javac.includes" value="${fix.includes}.java"/>
62.1394 @@ -461,20 +1386,146 @@
62.1395 </target>
62.1396 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
62.1397 <!--
62.1398 + =================
62.1399 + PROFILING SECTION
62.1400 + =================
62.1401 + -->
62.1402 + <!--
62.1403 + pre NB7.2 profiler integration
62.1404 + -->
62.1405 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
62.1406 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
62.1407 + <nbprofiledirect>
62.1408 + <classpath>
62.1409 + <path path="${run.classpath}"/>
62.1410 + </classpath>
62.1411 + </nbprofiledirect>
62.1412 + <profile/>
62.1413 + </target>
62.1414 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
62.1415 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
62.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
62.1417 + <nbprofiledirect>
62.1418 + <classpath>
62.1419 + <path path="${run.classpath}"/>
62.1420 + </classpath>
62.1421 + </nbprofiledirect>
62.1422 + <profile classname="${profile.class}"/>
62.1423 + </target>
62.1424 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
62.1425 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
62.1426 + <nbprofiledirect>
62.1427 + <classpath>
62.1428 + <path path="${run.classpath}"/>
62.1429 + </classpath>
62.1430 + </nbprofiledirect>
62.1431 + <profile classname="sun.applet.AppletViewer">
62.1432 + <customize>
62.1433 + <arg value="${applet.url}"/>
62.1434 + </customize>
62.1435 + </profile>
62.1436 + </target>
62.1437 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
62.1438 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
62.1439 + <nbprofiledirect>
62.1440 + <classpath>
62.1441 + <path path="${run.test.classpath}"/>
62.1442 + </classpath>
62.1443 + </nbprofiledirect>
62.1444 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
62.1445 + <customize>
62.1446 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
62.1447 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
62.1448 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
62.1449 + <jvmarg line="${profiler.info.jvmargs}"/>
62.1450 + <classpath>
62.1451 + <path path="${run.test.classpath}"/>
62.1452 + </classpath>
62.1453 + </customize>
62.1454 + </j2seproject3:junit>
62.1455 + </target>
62.1456 + <!--
62.1457 + end of pre NB72 profiling section
62.1458 + -->
62.1459 + <target if="netbeans.home" name="-profile-check">
62.1460 + <condition property="profiler.configured">
62.1461 + <or>
62.1462 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
62.1463 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
62.1464 + </or>
62.1465 + </condition>
62.1466 + </target>
62.1467 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
62.1468 + <startprofiler/>
62.1469 + <antcall target="run"/>
62.1470 + </target>
62.1471 + <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">
62.1472 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
62.1473 + <startprofiler/>
62.1474 + <antcall target="run-single"/>
62.1475 + </target>
62.1476 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
62.1477 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
62.1478 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
62.1479 + <startprofiler/>
62.1480 + <antcall target="test-single"/>
62.1481 + </target>
62.1482 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
62.1483 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
62.1484 + <startprofiler/>
62.1485 + <antcall target="run-test-with-main"/>
62.1486 + </target>
62.1487 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
62.1488 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
62.1489 + <startprofiler/>
62.1490 + <antcall target="run-applet"/>
62.1491 + </target>
62.1492 + <!--
62.1493 ===============
62.1494 JAVADOC SECTION
62.1495 ===============
62.1496 -->
62.1497 - <target depends="init" name="-javadoc-build">
62.1498 + <target depends="init" if="have.sources" name="-javadoc-build">
62.1499 <mkdir dir="${dist.javadoc.dir}"/>
62.1500 - <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}">
62.1501 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
62.1502 + <and>
62.1503 + <isset property="endorsed.classpath.cmd.line.arg"/>
62.1504 + <not>
62.1505 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
62.1506 + </not>
62.1507 + </and>
62.1508 + </condition>
62.1509 + <condition else="" property="bug5101868workaround" value="*.java">
62.1510 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
62.1511 + </condition>
62.1512 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
62.1513 + <and>
62.1514 + <isset property="javadoc.html5"/>
62.1515 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
62.1516 + </and>
62.1517 + </condition>
62.1518 + <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}">
62.1519 <classpath>
62.1520 <path path="${javac.classpath}"/>
62.1521 </classpath>
62.1522 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
62.1523 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
62.1524 <filename name="**/*.java"/>
62.1525 </fileset>
62.1526 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
62.1527 + <include name="**/*.java"/>
62.1528 + <exclude name="*.java"/>
62.1529 + </fileset>
62.1530 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
62.1531 + <arg line="${javadoc.html5.cmd.line.arg}"/>
62.1532 </javadoc>
62.1533 + <copy todir="${dist.javadoc.dir}">
62.1534 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
62.1535 + <filename name="**/doc-files/**"/>
62.1536 + </fileset>
62.1537 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
62.1538 + <include name="**/doc-files/**"/>
62.1539 + </fileset>
62.1540 + </copy>
62.1541 </target>
62.1542 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
62.1543 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
62.1544 @@ -482,7 +1533,7 @@
62.1545 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
62.1546 <!--
62.1547 =========================
62.1548 - JUNIT COMPILATION SECTION
62.1549 + TEST COMPILATION SECTION
62.1550 =========================
62.1551 -->
62.1552 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
62.1553 @@ -492,11 +1543,63 @@
62.1554 <!-- Empty placeholder for easier customization. -->
62.1555 <!-- You can override this target in the ../build.xml file. -->
62.1556 </target>
62.1557 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
62.1558 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
62.1559 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
62.1560 + <and>
62.1561 + <isset property="test.module.name"/>
62.1562 + <length length="0" string="${test.module.name}" when="greater"/>
62.1563 + </and>
62.1564 + </condition>
62.1565 + <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">
62.1566 + <and>
62.1567 + <isset property="test.module.name"/>
62.1568 + <length length="0" string="${test.module.name}" when="greater"/>
62.1569 + </and>
62.1570 + </condition>
62.1571 + </target>
62.1572 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
62.1573 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
62.1574 + <and>
62.1575 + <isset property="test.module.name"/>
62.1576 + <length length="0" string="${test.module.name}" when="greater"/>
62.1577 + </and>
62.1578 + </condition>
62.1579 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
62.1580 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
62.1581 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
62.1582 + <chainedmapper>
62.1583 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
62.1584 + <filtermapper>
62.1585 + <uniqfilter/>
62.1586 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
62.1587 + </filtermapper>
62.1588 + <cutdirsmapper dirs="1"/>
62.1589 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
62.1590 + </chainedmapper>
62.1591 + </pathconvert>
62.1592 + <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}">
62.1593 + <and>
62.1594 + <isset property="test.module.name"/>
62.1595 + <length length="0" string="${test.module.name}" when="greater"/>
62.1596 + </and>
62.1597 + </condition>
62.1598 + </target>
62.1599 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
62.1600 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
62.1601 + <property name="javac.test.compilerargs" value=""/>
62.1602 + <property name="run.test.jvmargs" value=""/>
62.1603 + </target>
62.1604 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
62.1605 <target if="do.depend.true" name="-compile-test-depend">
62.1606 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
62.1607 </target>
62.1608 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
62.1609 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
62.1610 + <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">
62.1611 + <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}">
62.1612 + <customize>
62.1613 + <compilerarg line="${javac.test.compilerargs}"/>
62.1614 + </customize>
62.1615 + </j2seproject3:javac>
62.1616 <copy todir="${build.test.classes.dir}">
62.1617 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
62.1618 </copy>
62.1619 @@ -510,10 +1613,14 @@
62.1620 <!-- Empty placeholder for easier customization. -->
62.1621 <!-- You can override this target in the ../build.xml file. -->
62.1622 </target>
62.1623 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
62.1624 + <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">
62.1625 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
62.1626 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
62.1627 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
62.1628 + <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}">
62.1629 + <customize>
62.1630 + <compilerarg line="${javac.test.compilerargs}"/>
62.1631 + </customize>
62.1632 + </j2seproject3:javac>
62.1633 <copy todir="${build.test.classes.dir}">
62.1634 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
62.1635 </copy>
62.1636 @@ -525,17 +1632,17 @@
62.1637 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
62.1638 <!--
62.1639 =======================
62.1640 - JUNIT EXECUTION SECTION
62.1641 + TEST EXECUTION SECTION
62.1642 =======================
62.1643 -->
62.1644 <target depends="init" if="have.tests" name="-pre-test-run">
62.1645 <mkdir dir="${build.test.results.dir}"/>
62.1646 </target>
62.1647 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
62.1648 - <j2seproject3:junit testincludes="**/*Test.java"/>
62.1649 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
62.1650 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
62.1651 </target>
62.1652 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
62.1653 - <fail if="tests.failed">Some tests failed; see details above.</fail>
62.1654 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
62.1655 </target>
62.1656 <target depends="init" if="have.tests" name="test-report"/>
62.1657 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
62.1658 @@ -543,41 +1650,42 @@
62.1659 <target depends="init" if="have.tests" name="-pre-test-run-single">
62.1660 <mkdir dir="${build.test.results.dir}"/>
62.1661 </target>
62.1662 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
62.1663 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
62.1664 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
62.1665 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
62.1666 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
62.1667 </target>
62.1668 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
62.1669 - <fail if="tests.failed">Some tests failed; see details above.</fail>
62.1670 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
62.1671 </target>
62.1672 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
62.1673 + <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"/>
62.1674 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
62.1675 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
62.1676 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
62.1677 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
62.1678 + </target>
62.1679 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
62.1680 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
62.1681 + </target>
62.1682 + <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"/>
62.1683 <!--
62.1684 =======================
62.1685 - JUNIT DEBUGGING SECTION
62.1686 + TEST DEBUGGING SECTION
62.1687 =======================
62.1688 -->
62.1689 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
62.1690 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
62.1691 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
62.1692 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
62.1693 - <delete file="${test.report.file}"/>
62.1694 - <mkdir dir="${build.test.results.dir}"/>
62.1695 - <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}">
62.1696 - <customize>
62.1697 - <syspropertyset>
62.1698 - <propertyref prefix="test-sys-prop."/>
62.1699 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
62.1700 - </syspropertyset>
62.1701 - <arg value="${test.class}"/>
62.1702 - <arg value="showoutput=true"/>
62.1703 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
62.1704 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
62.1705 - </customize>
62.1706 - </j2seproject3:debug>
62.1707 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
62.1708 + </target>
62.1709 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
62.1710 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
62.1711 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
62.1712 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
62.1713 </target>
62.1714 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
62.1715 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
62.1716 </target>
62.1717 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
62.1718 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
62.1719 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
62.1720 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
62.1721 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
62.1722 </target>
62.1723 @@ -603,9 +1711,9 @@
62.1724 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
62.1725 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
62.1726 <j2seproject3:debug classname="sun.applet.AppletViewer">
62.1727 - <customize>
62.1728 + <customizeDebuggee>
62.1729 <arg value="${applet.url}"/>
62.1730 - </customize>
62.1731 + </customizeDebuggee>
62.1732 </j2seproject3:debug>
62.1733 </target>
62.1734 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
62.1735 @@ -614,14 +1722,49 @@
62.1736 CLEANUP SECTION
62.1737 ===============
62.1738 -->
62.1739 - <target depends="init" name="deps-clean" unless="no.deps"/>
62.1740 + <target name="-deps-clean-init" unless="built-clean.properties">
62.1741 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
62.1742 + <delete file="${built-clean.properties}" quiet="true"/>
62.1743 + </target>
62.1744 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
62.1745 + <echo level="warn" message="Cycle detected: privilegedcreator was already built"/>
62.1746 + </target>
62.1747 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
62.1748 + <mkdir dir="${build.dir}"/>
62.1749 + <touch file="${built-clean.properties}" verbose="false"/>
62.1750 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
62.1751 + <antcall target="-warn-already-built-clean"/>
62.1752 + <propertyfile file="${built-clean.properties}">
62.1753 + <entry key="${basedir}" value=""/>
62.1754 + </propertyfile>
62.1755 + </target>
62.1756 <target depends="init" name="-do-clean">
62.1757 <delete dir="${build.dir}"/>
62.1758 - <delete dir="${dist.dir}"/>
62.1759 + <delete dir="${dist.jlink.output}"/>
62.1760 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
62.1761 </target>
62.1762 <target name="-post-clean">
62.1763 <!-- Empty placeholder for easier customization. -->
62.1764 <!-- You can override this target in the ../build.xml file. -->
62.1765 </target>
62.1766 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
62.1767 + <target name="-check-call-dep">
62.1768 + <property file="${call.built.properties}" prefix="already.built."/>
62.1769 + <condition property="should.call.dep">
62.1770 + <and>
62.1771 + <not>
62.1772 + <isset property="already.built.${call.subproject}"/>
62.1773 + </not>
62.1774 + <available file="${call.script}"/>
62.1775 + </and>
62.1776 + </condition>
62.1777 + </target>
62.1778 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
62.1779 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
62.1780 + <propertyset>
62.1781 + <propertyref prefix="transfer."/>
62.1782 + <mapper from="transfer.*" to="*" type="glob"/>
62.1783 + </propertyset>
62.1784 + </ant>
62.1785 + </target>
62.1786 </project>
63.1 --- a/samples/privilegedcreator/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
63.2 +++ b/samples/privilegedcreator/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
63.3 @@ -4,5 +4,5 @@
63.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
63.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
63.6 nbproject/build-impl.xml.data.CRC32=8060b75c
63.7 -nbproject/build-impl.xml.script.CRC32=c2094987
63.8 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
63.9 +nbproject/build-impl.xml.script.CRC32=d7bed647
63.10 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
64.1 --- a/samples/privilegedcreator/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
64.2 +++ b/samples/privilegedcreator/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
64.3 @@ -5,14 +5,19 @@
64.4 # This directory is removed when the project is cleaned:
64.5 build.dir=build
64.6 build.generated.dir=${build.dir}/generated
64.7 +build.generated.sources.dir=${build.dir}/generated-sources
64.8 # Only compile against the classpath explicitly listed here:
64.9 build.sysclasspath=ignore
64.10 build.test.classes.dir=${build.dir}/test/classes
64.11 build.test.results.dir=${build.dir}/test/results
64.12 debug.classpath=\
64.13 ${run.classpath}
64.14 +debug.modulepath=\
64.15 + ${run.modulepath}
64.16 debug.test.classpath=\
64.17 ${run.test.classpath}
64.18 +debug.test.modulepath=\
64.19 + ${run.test.modulepath}
64.20 # This directory is removed when the project is cleaned:
64.21 dist.dir=dist
64.22 dist.jar=${dist.dir}/privilegedcreator.jar
64.23 @@ -25,12 +30,16 @@
64.24 # Space-separated list of extra javac options
64.25 javac.compilerargs=
64.26 javac.deprecation=false
64.27 -javac.source=1.5
64.28 -javac.target=1.5
64.29 +javac.modulepath=
64.30 +javac.processormodulepath=
64.31 +javac.source=1.6
64.32 +javac.target=1.6
64.33 javac.test.classpath=\
64.34 ${javac.classpath}:\
64.35 ${build.classes.dir}:\
64.36 ${file.reference.junit-4.4.jar}
64.37 +javac.test.modulepath=\
64.38 + ${javac.modulepath}
64.39 javadoc.additionalparam=
64.40 javadoc.author=false
64.41 javadoc.encoding=${source.encoding}
64.42 @@ -51,9 +60,13 @@
64.43 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
64.44 # or test-sys-prop.name=value to set system properties for unit tests):
64.45 run.jvmargs=
64.46 +run.modulepath=\
64.47 + ${javac.modulepath}
64.48 run.test.classpath=\
64.49 ${javac.test.classpath}:\
64.50 ${build.test.classes.dir}
64.51 +run.test.modulepath=\
64.52 + ${javac.test.modulepath}
64.53 source.encoding=UTF-8
64.54 src.dir=src
64.55 test.src.dir=test
65.1 --- a/samples/reentrant/build.xml Mon Nov 11 05:47:32 2019 +0100
65.2 +++ b/samples/reentrant/build.xml Mon Nov 11 13:17:34 2019 +0100
65.3 @@ -2,6 +2,11 @@
65.4 <!-- You may freely edit this file. See commented blocks below for -->
65.5 <!-- some examples of how to customize the build. -->
65.6 <!-- (If you delete it and reopen the project it will be recreated.) -->
65.7 +<!-- By default, only the Clean and Build commands use this build script. -->
65.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
65.9 +<!-- the Compile on Save feature is turned off for the project. -->
65.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
65.11 +<!-- in the project's Project Properties dialog box.-->
65.12 <project name="reentrant" default="default" basedir=".">
65.13 <description>Builds, tests, and runs the project reentrant.</description>
65.14 <import file="nbproject/build-impl.xml"/>
65.15 @@ -46,8 +51,7 @@
65.16 -init-macrodef-junit: defines macro for junit execution
65.17 -init-macrodef-debug: defines macro for class debugging
65.18 -init-macrodef-java: defines macro for class execution
65.19 - -do-jar-with-manifest: JAR building (if you are using a manifest)
65.20 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
65.21 + -do-jar: JAR building
65.22 run: execution of project
65.23 -javadoc-build: Javadoc generation
65.24 test-report: JUnit report generation
66.1 --- a/samples/reentrant/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
66.2 +++ b/samples/reentrant/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
66.3 @@ -12,14 +12,21 @@
66.4 - execution
66.5 - debugging
66.6 - javadoc
66.7 - - junit compilation
66.8 - - junit execution
66.9 - - junit debugging
66.10 + - test compilation
66.11 + - test execution
66.12 + - test debugging
66.13 - applet
66.14 - cleanup
66.15
66.16 -->
66.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="reentrant-impl">
66.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="reentrant-impl">
66.19 + <fail message="Please build using Ant 1.8.0 or higher.">
66.20 + <condition>
66.21 + <not>
66.22 + <antversion atleast="1.8.0"/>
66.23 + </not>
66.24 + </condition>
66.25 + </fail>
66.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
66.27 <!--
66.28 ======================
66.29 @@ -39,28 +46,136 @@
66.30 <property file="${user.properties.file}"/>
66.31 <!-- The two properties below are usually overridden -->
66.32 <!-- by the active platform. Just a fallback. -->
66.33 - <property name="default.javac.source" value="1.4"/>
66.34 - <property name="default.javac.target" value="1.4"/>
66.35 + <property name="default.javac.source" value="1.6"/>
66.36 + <property name="default.javac.target" value="1.6"/>
66.37 </target>
66.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
66.39 <property file="nbproject/configs/${config}.properties"/>
66.40 <property file="nbproject/project.properties"/>
66.41 </target>
66.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
66.43 + <target name="-init-modules-supported">
66.44 + <condition property="modules.supported.internal" value="true">
66.45 + <not>
66.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
66.47 + </not>
66.48 + </condition>
66.49 + </target>
66.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
66.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
66.52 + <attribute name="property"/>
66.53 + <attribute name="sourcepath"/>
66.54 + <sequential>
66.55 + <loadresource property="@{property}" quiet="true">
66.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
66.57 + <filterchain>
66.58 + <stripjavacomments/>
66.59 + <linecontainsregexp>
66.60 + <regexp pattern="module .* \{"/>
66.61 + </linecontainsregexp>
66.62 + <tokenfilter>
66.63 + <linetokenizer/>
66.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
66.65 + </tokenfilter>
66.66 + <striplinebreaks/>
66.67 + </filterchain>
66.68 + </loadresource>
66.69 + </sequential>
66.70 + </macrodef>
66.71 + </target>
66.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
66.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
66.74 + <condition>
66.75 + <not>
66.76 + <antversion atleast="1.10.0"/>
66.77 + </not>
66.78 + </condition>
66.79 + </fail>
66.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
66.81 + <condition property="named.module.internal">
66.82 + <and>
66.83 + <isset property="module.name"/>
66.84 + <length length="0" string="${module.name}" when="greater"/>
66.85 + </and>
66.86 + </condition>
66.87 + <condition property="unnamed.module.internal">
66.88 + <not>
66.89 + <isset property="named.module.internal"/>
66.90 + </not>
66.91 + </condition>
66.92 + <property name="javac.modulepath" value=""/>
66.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
66.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
66.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
66.96 + <property name="javac.upgrademodulepath" value=""/>
66.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
66.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
66.99 + <and>
66.100 + <isset property="javac.systemmodulepath"/>
66.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
66.102 + </and>
66.103 + </condition>
66.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
66.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
66.106 + <property name="module.name" value=""/>
66.107 + </target>
66.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
66.109 + <property name="platform.java" value="${java.home}/bin/java"/>
66.110 <available file="${manifest.file}" property="manifest.available"/>
66.111 - <condition property="manifest.available+main.class">
66.112 + <condition property="splashscreen.available">
66.113 <and>
66.114 - <isset property="manifest.available"/>
66.115 + <not>
66.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
66.117 + </not>
66.118 + <available file="${application.splash}"/>
66.119 + </and>
66.120 + </condition>
66.121 + <condition property="main.class.available">
66.122 + <and>
66.123 <isset property="main.class"/>
66.124 <not>
66.125 <equals arg1="${main.class}" arg2="" trim="true"/>
66.126 </not>
66.127 </and>
66.128 </condition>
66.129 - <condition property="manifest.available+main.class+mkdist.available">
66.130 + <condition property="profile.available">
66.131 <and>
66.132 - <istrue value="${manifest.available+main.class}"/>
66.133 - <isset property="libs.CopyLibs.classpath"/>
66.134 + <isset property="javac.profile"/>
66.135 + <length length="0" string="${javac.profile}" when="greater"/>
66.136 + <not>
66.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
66.138 + </not>
66.139 + </and>
66.140 + </condition>
66.141 + <condition property="do.archive">
66.142 + <or>
66.143 + <not>
66.144 + <istrue value="${jar.archive.disabled}"/>
66.145 + </not>
66.146 + <istrue value="${not.archive.disabled}"/>
66.147 + </or>
66.148 + </condition>
66.149 + <condition property="do.archive+manifest.available">
66.150 + <and>
66.151 + <isset property="manifest.available"/>
66.152 + <istrue value="${do.archive}"/>
66.153 + </and>
66.154 + </condition>
66.155 + <condition property="do.archive+main.class.available">
66.156 + <and>
66.157 + <isset property="main.class.available"/>
66.158 + <istrue value="${do.archive}"/>
66.159 + </and>
66.160 + </condition>
66.161 + <condition property="do.archive+splashscreen.available">
66.162 + <and>
66.163 + <isset property="splashscreen.available"/>
66.164 + <istrue value="${do.archive}"/>
66.165 + </and>
66.166 + </condition>
66.167 + <condition property="do.archive+profile.available">
66.168 + <and>
66.169 + <isset property="profile.available"/>
66.170 + <istrue value="${do.archive}"/>
66.171 </and>
66.172 </condition>
66.173 <condition property="have.tests">
66.174 @@ -86,6 +201,7 @@
66.175 </and>
66.176 </condition>
66.177 <property name="run.jvmargs" value=""/>
66.178 + <property name="run.jvmargs.ide" value=""/>
66.179 <property name="javac.compilerargs" value=""/>
66.180 <property name="work.dir" value="${basedir}"/>
66.181 <condition property="no.deps">
66.182 @@ -97,6 +213,8 @@
66.183 <property name="javadoc.preview" value="true"/>
66.184 <property name="application.args" value=""/>
66.185 <property name="source.encoding" value="${file.encoding}"/>
66.186 + <property name="runtime.encoding" value="${source.encoding}"/>
66.187 + <property name="manifest.encoding" value="${source.encoding}"/>
66.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
66.189 <and>
66.190 <isset property="javadoc.encoding"/>
66.191 @@ -112,12 +230,58 @@
66.192 <condition property="do.depend.true">
66.193 <istrue value="${do.depend}"/>
66.194 </condition>
66.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
66.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
66.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
66.198 <and>
66.199 - <isset property="jaxws.endorsed.dir"/>
66.200 - <available file="nbproject/jaxws-build.xml"/>
66.201 + <isset property="endorsed.classpath"/>
66.202 + <not>
66.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
66.204 + </not>
66.205 </and>
66.206 </condition>
66.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
66.208 + <isset property="profile.available"/>
66.209 + </condition>
66.210 + <condition else="false" property="jdkBug6558476">
66.211 + <and>
66.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
66.213 + <not>
66.214 + <os family="unix"/>
66.215 + </not>
66.216 + </and>
66.217 + </condition>
66.218 + <condition else="false" property="javac.fork">
66.219 + <or>
66.220 + <istrue value="${jdkBug6558476}"/>
66.221 + <istrue value="${javac.external.vm}"/>
66.222 + </or>
66.223 + </condition>
66.224 + <property name="jar.index" value="false"/>
66.225 + <property name="jar.index.metainf" value="${jar.index}"/>
66.226 + <property name="copylibs.rebase" value="true"/>
66.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
66.228 + <condition property="junit.available">
66.229 + <or>
66.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
66.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
66.232 + </or>
66.233 + </condition>
66.234 + <condition property="testng.available">
66.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
66.236 + </condition>
66.237 + <condition property="junit+testng.available">
66.238 + <and>
66.239 + <istrue value="${junit.available}"/>
66.240 + <istrue value="${testng.available}"/>
66.241 + </and>
66.242 + </condition>
66.243 + <condition else="testng" property="testng.mode" value="mixed">
66.244 + <istrue value="${junit+testng.available}"/>
66.245 + </condition>
66.246 + <condition else="" property="testng.debug.mode" value="-mixed">
66.247 + <istrue value="${junit+testng.available}"/>
66.248 + </condition>
66.249 + <property name="java.failonerror" value="true"/>
66.250 </target>
66.251 <target name="-post-init">
66.252 <!-- Empty placeholder for easier customization. -->
66.253 @@ -144,26 +308,152 @@
66.254 </sequential>
66.255 </macrodef>
66.256 </target>
66.257 - <target name="-init-macrodef-javac">
66.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
66.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
66.260 <attribute default="${src.dir}" name="srcdir"/>
66.261 <attribute default="${build.classes.dir}" name="destdir"/>
66.262 <attribute default="${javac.classpath}" name="classpath"/>
66.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
66.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
66.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
66.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
66.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
66.268 <attribute default="${includes}" name="includes"/>
66.269 <attribute default="${excludes}" name="excludes"/>
66.270 <attribute default="${javac.debug}" name="debug"/>
66.271 - <attribute default="" name="sourcepath"/>
66.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
66.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
66.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
66.275 <element name="customize" optional="true"/>
66.276 <sequential>
66.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
66.278 + <condition property="warn.excludes.internal">
66.279 + <and>
66.280 + <isset property="named.module.internal"/>
66.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
66.282 + </and>
66.283 + </condition>
66.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
66.285 + <property location="${build.dir}/empty" name="empty.dir"/>
66.286 + <mkdir dir="${empty.dir}"/>
66.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
66.288 + <condition property="processormodulepath.set">
66.289 + <resourcecount count="0" when="greater">
66.290 + <path>
66.291 + <pathelement path="@{processormodulepath}"/>
66.292 + </path>
66.293 + </resourcecount>
66.294 + </condition>
66.295 + <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}">
66.296 + <src>
66.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
66.298 + <include name="*"/>
66.299 + </dirset>
66.300 + </src>
66.301 <classpath>
66.302 <path path="@{classpath}"/>
66.303 </classpath>
66.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
66.305 + <modulepath>
66.306 + <path path="@{modulepath}"/>
66.307 + </modulepath>
66.308 + <upgrademodulepath>
66.309 + <path path="@{upgrademodulepath}"/>
66.310 + </upgrademodulepath>
66.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
66.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
66.313 + <compilerarg line="${javac.compilerargs}"/>
66.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
66.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
66.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
66.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
66.318 + <compilerarg line="${ap.processors.internal}"/>
66.319 + <compilerarg line="${annotation.processing.processor.options}"/>
66.320 + <compilerarg value="-s"/>
66.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
66.322 + <compilerarg line="${ap.proc.none.internal}"/>
66.323 <customize/>
66.324 </javac>
66.325 </sequential>
66.326 </macrodef>
66.327 + </target>
66.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
66.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
66.330 + <attribute default="${src.dir}" name="srcdir"/>
66.331 + <attribute default="${build.classes.dir}" name="destdir"/>
66.332 + <attribute default="${javac.classpath}" name="classpath"/>
66.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
66.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
66.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
66.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
66.337 + <attribute default="${includes}" name="includes"/>
66.338 + <attribute default="${excludes}" name="excludes"/>
66.339 + <attribute default="${javac.debug}" name="debug"/>
66.340 + <attribute default="${empty.dir}" name="sourcepath"/>
66.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
66.342 + <element name="customize" optional="true"/>
66.343 + <sequential>
66.344 + <property location="${build.dir}/empty" name="empty.dir"/>
66.345 + <mkdir dir="${empty.dir}"/>
66.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
66.347 + <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}">
66.348 + <src>
66.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
66.350 + <include name="*"/>
66.351 + </dirset>
66.352 + </src>
66.353 + <classpath>
66.354 + <path path="@{classpath}"/>
66.355 + </classpath>
66.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
66.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
66.358 + <compilerarg line="${javac.compilerargs}"/>
66.359 + <compilerarg value="-processorpath"/>
66.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
66.361 + <compilerarg line="${ap.processors.internal}"/>
66.362 + <compilerarg line="${annotation.processing.processor.options}"/>
66.363 + <compilerarg value="-s"/>
66.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
66.365 + <compilerarg line="${ap.proc.none.internal}"/>
66.366 + <customize/>
66.367 + </javac>
66.368 + </sequential>
66.369 + </macrodef>
66.370 + </target>
66.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
66.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
66.373 + <attribute default="${src.dir}" name="srcdir"/>
66.374 + <attribute default="${build.classes.dir}" name="destdir"/>
66.375 + <attribute default="${javac.classpath}" name="classpath"/>
66.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
66.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
66.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
66.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
66.380 + <attribute default="${includes}" name="includes"/>
66.381 + <attribute default="${excludes}" name="excludes"/>
66.382 + <attribute default="${javac.debug}" name="debug"/>
66.383 + <attribute default="${empty.dir}" name="sourcepath"/>
66.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
66.385 + <element name="customize" optional="true"/>
66.386 + <sequential>
66.387 + <property location="${build.dir}/empty" name="empty.dir"/>
66.388 + <mkdir dir="${empty.dir}"/>
66.389 + <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}">
66.390 + <src>
66.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
66.392 + <include name="*"/>
66.393 + </dirset>
66.394 + </src>
66.395 + <classpath>
66.396 + <path path="@{classpath}"/>
66.397 + </classpath>
66.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
66.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
66.400 + <compilerarg line="${javac.compilerargs}"/>
66.401 + <customize/>
66.402 + </javac>
66.403 + </sequential>
66.404 + </macrodef>
66.405 + </target>
66.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
66.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
66.408 <attribute default="${src.dir}" name="srcdir"/>
66.409 <attribute default="${build.classes.dir}" name="destdir"/>
66.410 @@ -180,51 +470,383 @@
66.411 <attribute default="${build.classes.dir}" name="destdir"/>
66.412 <sequential>
66.413 <fail unless="javac.includes">Must set javac.includes</fail>
66.414 - <pathconvert pathsep="," property="javac.includes.binary">
66.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
66.416 <path>
66.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
66.418 </path>
66.419 <globmapper from="*.java" to="*.class"/>
66.420 </pathconvert>
66.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
66.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
66.423 <delete>
66.424 - <files includes="${javac.includes.binary}"/>
66.425 + <files includesfile="${javac.includesfile.binary}"/>
66.426 + </delete>
66.427 + <delete>
66.428 + <fileset file="${javac.includesfile.binary}"/>
66.429 </delete>
66.430 </sequential>
66.431 </macrodef>
66.432 </target>
66.433 - <target name="-init-macrodef-junit">
66.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
66.435 + <condition else="false" property="nb.junit.batch" value="true">
66.436 + <and>
66.437 + <istrue value="${junit.available}"/>
66.438 + <not>
66.439 + <isset property="test.method"/>
66.440 + </not>
66.441 + </and>
66.442 + </condition>
66.443 + <condition else="false" property="nb.junit.single" value="true">
66.444 + <and>
66.445 + <istrue value="${junit.available}"/>
66.446 + <isset property="test.method"/>
66.447 + </and>
66.448 + </condition>
66.449 + </target>
66.450 + <target name="-init-test-properties">
66.451 + <property name="test.binaryincludes" value="<nothing>"/>
66.452 + <property name="test.binarytestincludes" value=""/>
66.453 + <property name="test.binaryexcludes" value=""/>
66.454 + </target>
66.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
66.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
66.457 + <attribute default="${includes}" name="includes"/>
66.458 + <attribute default="${excludes}" name="excludes"/>
66.459 + <element name="customizePrototype" optional="true"/>
66.460 + <sequential>
66.461 + <property name="junit.forkmode" value="perTest"/>
66.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
66.463 + <syspropertyset>
66.464 + <propertyref prefix="test-sys-prop."/>
66.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
66.466 + </syspropertyset>
66.467 + <classpath>
66.468 + <path path="${run.test.classpath}"/>
66.469 + </classpath>
66.470 + <modulepath>
66.471 + <path path="${run.test.modulepath}"/>
66.472 + </modulepath>
66.473 + <formatter type="brief" usefile="false"/>
66.474 + <formatter type="xml"/>
66.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
66.476 + <jvmarg value="-ea"/>
66.477 + <jvmarg line="${run.test.jvmargs}"/>
66.478 + <customizePrototype/>
66.479 + </junit>
66.480 + </sequential>
66.481 + </macrodef>
66.482 + </target>
66.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
66.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
66.485 + <attribute default="${includes}" name="includes"/>
66.486 + <attribute default="${excludes}" name="excludes"/>
66.487 + <element name="customizePrototype" optional="true"/>
66.488 + <sequential>
66.489 + <property name="junit.forkmode" value="perTest"/>
66.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
66.491 + <syspropertyset>
66.492 + <propertyref prefix="test-sys-prop."/>
66.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
66.494 + </syspropertyset>
66.495 + <classpath>
66.496 + <path path="${run.test.classpath}"/>
66.497 + </classpath>
66.498 + <formatter type="brief" usefile="false"/>
66.499 + <formatter type="xml"/>
66.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
66.501 + <jvmarg value="-ea"/>
66.502 + <customizePrototype/>
66.503 + </junit>
66.504 + </sequential>
66.505 + </macrodef>
66.506 + </target>
66.507 + <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}">
66.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
66.509 <attribute default="${includes}" name="includes"/>
66.510 <attribute default="${excludes}" name="excludes"/>
66.511 <attribute default="**" name="testincludes"/>
66.512 + <attribute default="" name="testmethods"/>
66.513 + <element name="customize" optional="true"/>
66.514 <sequential>
66.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
66.516 - <batchtest todir="${build.test.results.dir}">
66.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
66.518 - <filename name="@{testincludes}"/>
66.519 - </fileset>
66.520 - </batchtest>
66.521 + <j2seproject3:junit-prototype>
66.522 + <customizePrototype>
66.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
66.524 + <customize/>
66.525 + </customizePrototype>
66.526 + </j2seproject3:junit-prototype>
66.527 + </sequential>
66.528 + </macrodef>
66.529 + </target>
66.530 + <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}">
66.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
66.532 + <attribute default="${includes}" name="includes"/>
66.533 + <attribute default="${excludes}" name="excludes"/>
66.534 + <attribute default="**" name="testincludes"/>
66.535 + <attribute default="" name="testmethods"/>
66.536 + <element name="customize" optional="true"/>
66.537 + <sequential>
66.538 + <j2seproject3:junit-prototype>
66.539 + <customizePrototype>
66.540 + <batchtest todir="${build.test.results.dir}">
66.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
66.542 + <filename name="@{testincludes}"/>
66.543 + </fileset>
66.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
66.545 + <filename name="${test.binarytestincludes}"/>
66.546 + </fileset>
66.547 + </batchtest>
66.548 + <customize/>
66.549 + </customizePrototype>
66.550 + </j2seproject3:junit-prototype>
66.551 + </sequential>
66.552 + </macrodef>
66.553 + </target>
66.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
66.555 + <target if="${testng.available}" name="-init-macrodef-testng">
66.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
66.557 + <attribute default="${includes}" name="includes"/>
66.558 + <attribute default="${excludes}" name="excludes"/>
66.559 + <attribute default="**" name="testincludes"/>
66.560 + <attribute default="" name="testmethods"/>
66.561 + <element name="customize" optional="true"/>
66.562 + <sequential>
66.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
66.564 + <isset property="test.method"/>
66.565 + </condition>
66.566 + <union id="test.set">
66.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
66.568 + <filename name="@{testincludes}"/>
66.569 + </fileset>
66.570 + </union>
66.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
66.572 + <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="reentrant" testname="TestNG tests" workingDir="${work.dir}">
66.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
66.574 + <propertyset>
66.575 + <propertyref prefix="test-sys-prop."/>
66.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
66.577 + </propertyset>
66.578 <classpath>
66.579 <path path="${run.test.classpath}"/>
66.580 </classpath>
66.581 - <syspropertyset>
66.582 - <propertyref prefix="test-sys-prop."/>
66.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
66.584 - </syspropertyset>
66.585 - <formatter type="brief" usefile="false"/>
66.586 - <formatter type="xml"/>
66.587 - <jvmarg line="${run.jvmargs}"/>
66.588 - </junit>
66.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
66.590 + <customize/>
66.591 + </testng>
66.592 </sequential>
66.593 </macrodef>
66.594 </target>
66.595 - <target name="-init-macrodef-nbjpda">
66.596 + <target name="-init-macrodef-test-impl">
66.597 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
66.598 + <attribute default="${includes}" name="includes"/>
66.599 + <attribute default="${excludes}" name="excludes"/>
66.600 + <attribute default="**" name="testincludes"/>
66.601 + <attribute default="" name="testmethods"/>
66.602 + <element implicit="true" name="customize" optional="true"/>
66.603 + <sequential>
66.604 + <echo>No tests executed.</echo>
66.605 + </sequential>
66.606 + </macrodef>
66.607 + </target>
66.608 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
66.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
66.610 + <attribute default="${includes}" name="includes"/>
66.611 + <attribute default="${excludes}" name="excludes"/>
66.612 + <attribute default="**" name="testincludes"/>
66.613 + <attribute default="" name="testmethods"/>
66.614 + <element implicit="true" name="customize" optional="true"/>
66.615 + <sequential>
66.616 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
66.617 + <customize/>
66.618 + </j2seproject3:junit>
66.619 + </sequential>
66.620 + </macrodef>
66.621 + </target>
66.622 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
66.623 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
66.624 + <attribute default="${includes}" name="includes"/>
66.625 + <attribute default="${excludes}" name="excludes"/>
66.626 + <attribute default="**" name="testincludes"/>
66.627 + <attribute default="" name="testmethods"/>
66.628 + <element implicit="true" name="customize" optional="true"/>
66.629 + <sequential>
66.630 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
66.631 + <customize/>
66.632 + </j2seproject3:testng>
66.633 + </sequential>
66.634 + </macrodef>
66.635 + </target>
66.636 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
66.637 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
66.638 + <attribute default="${includes}" name="includes"/>
66.639 + <attribute default="${excludes}" name="excludes"/>
66.640 + <attribute default="**" name="testincludes"/>
66.641 + <attribute default="" name="testmethods"/>
66.642 + <sequential>
66.643 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
66.644 + <customize>
66.645 + <jvmarg line="${run.jvmargs}"/>
66.646 + <jvmarg line="${run.jvmargs.ide}"/>
66.647 + </customize>
66.648 + </j2seproject3:test-impl>
66.649 + </sequential>
66.650 + </macrodef>
66.651 + </target>
66.652 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
66.653 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
66.654 + <attribute default="${includes}" name="includes"/>
66.655 + <attribute default="${excludes}" name="excludes"/>
66.656 + <attribute default="**" name="testincludes"/>
66.657 + <attribute default="" name="testmethods"/>
66.658 + <element name="customizeDebuggee" optional="true"/>
66.659 + <sequential>
66.660 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
66.661 + <customize>
66.662 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
66.663 + <customizeDebuggee/>
66.664 + </customize>
66.665 + </j2seproject3:junit>
66.666 + </sequential>
66.667 + </macrodef>
66.668 + </target>
66.669 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
66.670 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
66.671 + <attribute default="${main.class}" name="testClass"/>
66.672 + <attribute default="" name="testMethod"/>
66.673 + <element name="customize2" optional="true"/>
66.674 + <sequential>
66.675 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
66.676 + <isset property="test.method"/>
66.677 + </condition>
66.678 + <condition else="-suitename reentrant -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
66.679 + <matches pattern=".*\.xml" string="@{testClass}"/>
66.680 + </condition>
66.681 + <delete dir="${build.test.results.dir}" quiet="true"/>
66.682 + <mkdir dir="${build.test.results.dir}"/>
66.683 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
66.684 + <customizeDebuggee>
66.685 + <customize2/>
66.686 + <jvmarg value="-ea"/>
66.687 + <arg line="${testng.debug.mode}"/>
66.688 + <arg line="-d ${build.test.results.dir}"/>
66.689 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
66.690 + <arg line="${testng.cmd.args}"/>
66.691 + </customizeDebuggee>
66.692 + </j2seproject3:debug>
66.693 + </sequential>
66.694 + </macrodef>
66.695 + </target>
66.696 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
66.697 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
66.698 + <attribute default="${main.class}" name="testClass"/>
66.699 + <attribute default="" name="testMethod"/>
66.700 + <element implicit="true" name="customize2" optional="true"/>
66.701 + <sequential>
66.702 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
66.703 + <customize2/>
66.704 + </j2seproject3:testng-debug>
66.705 + </sequential>
66.706 + </macrodef>
66.707 + </target>
66.708 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
66.709 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
66.710 + <attribute default="${includes}" name="includes"/>
66.711 + <attribute default="${excludes}" name="excludes"/>
66.712 + <attribute default="**" name="testincludes"/>
66.713 + <attribute default="" name="testmethods"/>
66.714 + <attribute default="${main.class}" name="testClass"/>
66.715 + <attribute default="" name="testMethod"/>
66.716 + <sequential>
66.717 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
66.718 + <customizeDebuggee>
66.719 + <jvmarg line="${run.jvmargs}"/>
66.720 + <jvmarg line="${run.jvmargs.ide}"/>
66.721 + </customizeDebuggee>
66.722 + </j2seproject3:test-debug-impl>
66.723 + </sequential>
66.724 + </macrodef>
66.725 + </target>
66.726 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
66.727 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
66.728 + <attribute default="${includes}" name="includes"/>
66.729 + <attribute default="${excludes}" name="excludes"/>
66.730 + <attribute default="**" name="testincludes"/>
66.731 + <attribute default="" name="testmethods"/>
66.732 + <attribute default="${main.class}" name="testClass"/>
66.733 + <attribute default="" name="testMethod"/>
66.734 + <sequential>
66.735 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
66.736 + <customize2>
66.737 + <syspropertyset>
66.738 + <propertyref prefix="test-sys-prop."/>
66.739 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
66.740 + </syspropertyset>
66.741 + </customize2>
66.742 + </j2seproject3:testng-debug-impl>
66.743 + </sequential>
66.744 + </macrodef>
66.745 + </target>
66.746 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
66.747 + <!--
66.748 + pre NB7.2 profiling section; consider it deprecated
66.749 + -->
66.750 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
66.751 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
66.752 + <!-- Empty placeholder for easier customization. -->
66.753 + <!-- You can override this target in the ../build.xml file. -->
66.754 + </target>
66.755 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
66.756 + <!-- Empty placeholder for easier customization. -->
66.757 + <!-- You can override this target in the ../build.xml file. -->
66.758 + </target>
66.759 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
66.760 + <macrodef name="resolve">
66.761 + <attribute name="name"/>
66.762 + <attribute name="value"/>
66.763 + <sequential>
66.764 + <property name="@{name}" value="${env.@{value}}"/>
66.765 + </sequential>
66.766 + </macrodef>
66.767 + <macrodef name="profile">
66.768 + <attribute default="${main.class}" name="classname"/>
66.769 + <element name="customize" optional="true"/>
66.770 + <sequential>
66.771 + <property environment="env"/>
66.772 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
66.773 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
66.774 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
66.775 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
66.776 + <jvmarg line="${profiler.info.jvmargs}"/>
66.777 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
66.778 + <arg line="${application.args}"/>
66.779 + <classpath>
66.780 + <path path="${run.classpath}"/>
66.781 + </classpath>
66.782 + <syspropertyset>
66.783 + <propertyref prefix="run-sys-prop."/>
66.784 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
66.785 + </syspropertyset>
66.786 + <customize/>
66.787 + </java>
66.788 + </sequential>
66.789 + </macrodef>
66.790 + </target>
66.791 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
66.792 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
66.793 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
66.794 + </target>
66.795 + <!--
66.796 + end of pre NB7.2 profiling section
66.797 + -->
66.798 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
66.799 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
66.800 <attribute default="${main.class}" name="name"/>
66.801 + <attribute default="${debug.modulepath}" name="modulepath"/>
66.802 <attribute default="${debug.classpath}" name="classpath"/>
66.803 <attribute default="" name="stopclassname"/>
66.804 <sequential>
66.805 - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
66.806 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
66.807 + <modulepath>
66.808 + <path path="@{modulepath}"/>
66.809 + </modulepath>
66.810 <classpath>
66.811 <path path="@{classpath}"/>
66.812 </classpath>
66.813 @@ -243,29 +865,112 @@
66.814 </macrodef>
66.815 </target>
66.816 <target name="-init-debug-args">
66.817 - <property name="version-output" value="java version "${ant.java.version}"/>
66.818 - <condition property="have-jdk-older-than-1.4">
66.819 - <or>
66.820 - <contains string="${version-output}" substring="java version "1.0"/>
66.821 - <contains string="${version-output}" substring="java version "1.1"/>
66.822 - <contains string="${version-output}" substring="java version "1.2"/>
66.823 - <contains string="${version-output}" substring="java version "1.3"/>
66.824 - </or>
66.825 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
66.826 + <os family="windows"/>
66.827 </condition>
66.828 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
66.829 - <istrue value="${have-jdk-older-than-1.4}"/>
66.830 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
66.831 + <isset property="debug.transport"/>
66.832 </condition>
66.833 </target>
66.834 <target depends="-init-debug-args" name="-init-macrodef-debug">
66.835 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
66.836 + <attribute default="${module.name}" name="modulename"/>
66.837 <attribute default="${main.class}" name="classname"/>
66.838 + <attribute default="${debug.modulepath}" name="modulepath"/>
66.839 <attribute default="${debug.classpath}" name="classpath"/>
66.840 + <element name="customizeDebuggee" optional="true"/>
66.841 + <sequential>
66.842 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
66.843 + <customize>
66.844 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
66.845 + <customizeDebuggee/>
66.846 + </customize>
66.847 + </j2seproject1:java>
66.848 + </sequential>
66.849 + </macrodef>
66.850 + </target>
66.851 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
66.852 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
66.853 + <attribute default="${module.name}" name="modulename"/>
66.854 + <attribute default="${main.class}" name="classname"/>
66.855 + <attribute default="${run.modulepath}" name="modulepath"/>
66.856 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
66.857 + <attribute default="${run.classpath}" name="classpath"/>
66.858 + <attribute default="jvm" name="jvm"/>
66.859 <element name="customize" optional="true"/>
66.860 <sequential>
66.861 - <java classname="@{classname}" dir="${work.dir}" fork="true">
66.862 - <jvmarg line="${debug-args-line}"/>
66.863 - <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
66.864 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
66.865 + <classpath>
66.866 + <path path="@{classpath}"/>
66.867 + </classpath>
66.868 + <modulepath>
66.869 + <pathelement path="@{modulepath}"/>
66.870 + <pathelement location="${module.build.classes.dir}"/>
66.871 + </modulepath>
66.872 + <upgrademodulepath>
66.873 + <path path="@{upgrademodulepath}"/>
66.874 + </upgrademodulepath>
66.875 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
66.876 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
66.877 <jvmarg line="${run.jvmargs}"/>
66.878 + <jvmarg line="${run.jvmargs.ide}"/>
66.879 + <syspropertyset>
66.880 + <propertyref prefix="run-sys-prop."/>
66.881 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
66.882 + </syspropertyset>
66.883 + <customize/>
66.884 + </java>
66.885 + </sequential>
66.886 + </macrodef>
66.887 + </target>
66.888 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
66.889 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
66.890 + <attribute default="" name="modulename"/>
66.891 + <attribute default="${main.class}" name="classname"/>
66.892 + <attribute default="${run.modulepath}" name="modulepath"/>
66.893 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
66.894 + <attribute default="${run.classpath}" name="classpath"/>
66.895 + <attribute default="jvm" name="jvm"/>
66.896 + <element name="customize" optional="true"/>
66.897 + <sequential>
66.898 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
66.899 + <classpath>
66.900 + <path path="@{classpath}"/>
66.901 + </classpath>
66.902 + <modulepath>
66.903 + <path path="@{modulepath}"/>
66.904 + </modulepath>
66.905 + <upgrademodulepath>
66.906 + <path path="@{upgrademodulepath}"/>
66.907 + </upgrademodulepath>
66.908 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
66.909 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
66.910 + <jvmarg line="${run.jvmargs}"/>
66.911 + <jvmarg line="${run.jvmargs.ide}"/>
66.912 + <syspropertyset>
66.913 + <propertyref prefix="run-sys-prop."/>
66.914 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
66.915 + </syspropertyset>
66.916 + <customize/>
66.917 + </java>
66.918 + </sequential>
66.919 + </macrodef>
66.920 + </target>
66.921 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
66.922 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
66.923 + <attribute default="" name="modulename"/>
66.924 + <attribute default="${main.class}" name="classname"/>
66.925 + <attribute default="" name="modulepath"/>
66.926 + <attribute default="${run.classpath}" name="classpath"/>
66.927 + <attribute default="jvm" name="jvm"/>
66.928 + <element name="customize" optional="true"/>
66.929 + <sequential>
66.930 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
66.931 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
66.932 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
66.933 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
66.934 + <jvmarg line="${run.jvmargs}"/>
66.935 + <jvmarg line="${run.jvmargs.ide}"/>
66.936 <classpath>
66.937 <path path="@{classpath}"/>
66.938 </classpath>
66.939 @@ -278,39 +983,100 @@
66.940 </sequential>
66.941 </macrodef>
66.942 </target>
66.943 - <target name="-init-macrodef-java">
66.944 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
66.945 - <attribute default="${main.class}" name="classname"/>
66.946 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
66.947 + <target name="-init-macrodef-copylibs">
66.948 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
66.949 + <attribute default="${manifest.file}" name="manifest"/>
66.950 <element name="customize" optional="true"/>
66.951 <sequential>
66.952 - <java classname="@{classname}" dir="${work.dir}" fork="true">
66.953 - <jvmarg line="${run.jvmargs}"/>
66.954 - <classpath>
66.955 - <path path="${run.classpath}"/>
66.956 - </classpath>
66.957 - <syspropertyset>
66.958 - <propertyref prefix="run-sys-prop."/>
66.959 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
66.960 - </syspropertyset>
66.961 - <customize/>
66.962 - </java>
66.963 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
66.964 + <pathconvert property="run.classpath.without.build.classes.dir">
66.965 + <path path="${run.classpath}"/>
66.966 + <map from="${build.classes.dir.resolved}" to=""/>
66.967 + </pathconvert>
66.968 + <pathconvert pathsep=" " property="jar.classpath">
66.969 + <path path="${run.classpath.without.build.classes.dir}"/>
66.970 + <chainedmapper>
66.971 + <flattenmapper/>
66.972 + <filtermapper>
66.973 + <replacestring from=" " to="%20"/>
66.974 + </filtermapper>
66.975 + <globmapper from="*" to="lib/*"/>
66.976 + </chainedmapper>
66.977 + </pathconvert>
66.978 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
66.979 + <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}">
66.980 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
66.981 + <manifest>
66.982 + <attribute name="Class-Path" value="${jar.classpath}"/>
66.983 + <customize/>
66.984 + </manifest>
66.985 + </copylibs>
66.986 </sequential>
66.987 </macrodef>
66.988 </target>
66.989 <target name="-init-presetdef-jar">
66.990 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
66.991 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
66.992 - <j2seproject1:fileset dir="${build.classes.dir}"/>
66.993 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
66.994 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
66.995 </jar>
66.996 </presetdef>
66.997 </target>
66.998 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
66.999 + <target name="-init-ap-cmdline-properties">
66.1000 + <property name="annotation.processing.enabled" value="true"/>
66.1001 + <property name="annotation.processing.processors.list" value=""/>
66.1002 + <property name="annotation.processing.processor.options" value=""/>
66.1003 + <property name="annotation.processing.run.all.processors" value="true"/>
66.1004 + <property name="javac.processorpath" value="${javac.classpath}"/>
66.1005 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
66.1006 + <condition property="ap.supported.internal" value="true">
66.1007 + <not>
66.1008 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
66.1009 + </not>
66.1010 + </condition>
66.1011 + </target>
66.1012 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
66.1013 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
66.1014 + <isfalse value="${annotation.processing.run.all.processors}"/>
66.1015 + </condition>
66.1016 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
66.1017 + <isfalse value="${annotation.processing.enabled}"/>
66.1018 + </condition>
66.1019 + </target>
66.1020 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
66.1021 + <property name="ap.cmd.line.internal" value=""/>
66.1022 + </target>
66.1023 + <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"/>
66.1024 <!--
66.1025 ===================
66.1026 COMPILATION SECTION
66.1027 ===================
66.1028 -->
66.1029 - <target depends="init" name="deps-jar" unless="no.deps"/>
66.1030 + <target name="-deps-jar-init" unless="built-jar.properties">
66.1031 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
66.1032 + <delete file="${built-jar.properties}" quiet="true"/>
66.1033 + </target>
66.1034 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
66.1035 + <echo level="warn" message="Cycle detected: reentrant was already built"/>
66.1036 + </target>
66.1037 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
66.1038 + <mkdir dir="${build.dir}"/>
66.1039 + <touch file="${built-jar.properties}" verbose="false"/>
66.1040 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
66.1041 + <antcall target="-warn-already-built-jar"/>
66.1042 + <propertyfile file="${built-jar.properties}">
66.1043 + <entry key="${basedir}" value=""/>
66.1044 + </propertyfile>
66.1045 + </target>
66.1046 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
66.1047 + <target depends="init" name="-check-automatic-build">
66.1048 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
66.1049 + </target>
66.1050 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
66.1051 + <antcall target="clean">
66.1052 + <param name="no.dependencies" value="true"/>
66.1053 + </antcall>
66.1054 + </target>
66.1055 <target depends="init,deps-jar" name="-pre-pre-compile">
66.1056 <mkdir dir="${build.classes.dir}"/>
66.1057 </target>
66.1058 @@ -319,19 +1085,30 @@
66.1059 <!-- You can override this target in the ../build.xml file. -->
66.1060 </target>
66.1061 <target if="do.depend.true" name="-compile-depend">
66.1062 - <j2seproject3:depend/>
66.1063 + <pathconvert property="build.generated.subdirs">
66.1064 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
66.1065 + <include name="*"/>
66.1066 + </dirset>
66.1067 + </pathconvert>
66.1068 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
66.1069 </target>
66.1070 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
66.1071 - <j2seproject3:javac/>
66.1072 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
66.1073 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
66.1074 <copy todir="${build.classes.dir}">
66.1075 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
66.1076 </copy>
66.1077 </target>
66.1078 + <target if="has.persistence.xml" name="-copy-persistence-xml">
66.1079 + <mkdir dir="${build.classes.dir}/META-INF"/>
66.1080 + <copy todir="${build.classes.dir}/META-INF">
66.1081 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
66.1082 + </copy>
66.1083 + </target>
66.1084 <target name="-post-compile">
66.1085 <!-- Empty placeholder for easier customization. -->
66.1086 <!-- You can override this target in the ../build.xml file. -->
66.1087 </target>
66.1088 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
66.1089 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
66.1090 <target name="-pre-compile-single">
66.1091 <!-- Empty placeholder for easier customization. -->
66.1092 <!-- You can override this target in the ../build.xml file. -->
66.1093 @@ -339,13 +1116,13 @@
66.1094 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
66.1095 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
66.1096 <j2seproject3:force-recompile/>
66.1097 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
66.1098 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
66.1099 </target>
66.1100 <target name="-post-compile-single">
66.1101 <!-- Empty placeholder for easier customization. -->
66.1102 <!-- You can override this target in the ../build.xml file. -->
66.1103 </target>
66.1104 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
66.1105 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
66.1106 <!--
66.1107 ====================
66.1108 JAR BUILDING SECTION
66.1109 @@ -359,57 +1136,191 @@
66.1110 <!-- Empty placeholder for easier customization. -->
66.1111 <!-- You can override this target in the ../build.xml file. -->
66.1112 </target>
66.1113 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
66.1114 - <j2seproject1:jar/>
66.1115 + <target depends="init,compile" name="-check-module-main-class">
66.1116 + <pathconvert property="main.class.file">
66.1117 + <string value="${main.class}"/>
66.1118 + <unpackagemapper from="*" to="*.class"/>
66.1119 + </pathconvert>
66.1120 + <condition property="do.module.main.class">
66.1121 + <and>
66.1122 + <isset property="main.class.available"/>
66.1123 + <available file="${build.classes.dir}/module-info.class"/>
66.1124 + <available file="${build.classes.dir}/${main.class.file}"/>
66.1125 + <isset property="libs.CopyLibs.classpath"/>
66.1126 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
66.1127 + </and>
66.1128 + </condition>
66.1129 </target>
66.1130 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
66.1131 - <j2seproject1:jar manifest="${manifest.file}"/>
66.1132 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
66.1133 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
66.1134 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
66.1135 </target>
66.1136 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
66.1137 - <j2seproject1:jar manifest="${manifest.file}">
66.1138 - <j2seproject1:manifest>
66.1139 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
66.1140 - </j2seproject1:manifest>
66.1141 - </j2seproject1:jar>
66.1142 - <echo>To run this application from the command line without Ant, try:</echo>
66.1143 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
66.1144 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
66.1145 + <touch file="${tmp.manifest.file}" verbose="false"/>
66.1146 + </target>
66.1147 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
66.1148 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
66.1149 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
66.1150 + </target>
66.1151 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
66.1152 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
66.1153 + <attribute name="Main-Class" value="${main.class}"/>
66.1154 + </manifest>
66.1155 + </target>
66.1156 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
66.1157 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
66.1158 + <attribute name="Profile" value="${javac.profile}"/>
66.1159 + </manifest>
66.1160 + </target>
66.1161 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
66.1162 + <basename file="${application.splash}" property="splashscreen.basename"/>
66.1163 + <mkdir dir="${build.classes.dir}/META-INF"/>
66.1164 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
66.1165 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
66.1166 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
66.1167 + </manifest>
66.1168 + </target>
66.1169 + <target depends="init,compile" name="-check-do-mkdist">
66.1170 + <condition property="do.mkdist">
66.1171 + <and>
66.1172 + <isset property="do.archive"/>
66.1173 + <isset property="libs.CopyLibs.classpath"/>
66.1174 + <not>
66.1175 + <istrue value="${mkdist.disabled}"/>
66.1176 + </not>
66.1177 + <not>
66.1178 + <available file="${build.classes.dir}/module-info.class"/>
66.1179 + </not>
66.1180 + </and>
66.1181 + </condition>
66.1182 + </target>
66.1183 + <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">
66.1184 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
66.1185 + <echo level="info">To run this application from the command line without Ant, try:</echo>
66.1186 + <property location="${dist.jar}" name="dist.jar.resolved"/>
66.1187 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
66.1188 + </target>
66.1189 + <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">
66.1190 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
66.1191 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
66.1192 <property location="${dist.jar}" name="dist.jar.resolved"/>
66.1193 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
66.1194 + <isset property="named.module.internal"/>
66.1195 + </condition>
66.1196 <pathconvert property="run.classpath.with.dist.jar">
66.1197 <path path="${run.classpath}"/>
66.1198 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
66.1199 + </pathconvert>
66.1200 + <pathconvert property="run.modulepath.with.dist.jar">
66.1201 + <path location="${dist.jar.resolved}"/>
66.1202 + <path path="${run.modulepath}"/>
66.1203 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
66.1204 </pathconvert>
66.1205 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
66.1206 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
66.1207 + <isset property="named.module.internal"/>
66.1208 + </condition>
66.1209 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
66.1210 + <and>
66.1211 + <isset property="modules.supported.internal"/>
66.1212 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
66.1213 + </and>
66.1214 + </condition>
66.1215 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
66.1216 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
66.1217 + </condition>
66.1218 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
66.1219 + <isset property="do.module.main.class"/>
66.1220 + </condition>
66.1221 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
66.1222 + <isset property="named.module.internal"/>
66.1223 + </condition>
66.1224 + <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}">
66.1225 + <isset property="main.class.available"/>
66.1226 + </condition>
66.1227 + <condition else="debug" property="jar.usage.level" value="info">
66.1228 + <isset property="main.class.available"/>
66.1229 + </condition>
66.1230 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
66.1231 </target>
66.1232 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
66.1233 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
66.1234 - <pathconvert property="run.classpath.without.build.classes.dir">
66.1235 - <path path="${run.classpath}"/>
66.1236 - <map from="${build.classes.dir.resolved}" to=""/>
66.1237 - </pathconvert>
66.1238 - <pathconvert pathsep=" " property="jar.classpath">
66.1239 - <path path="${run.classpath.without.build.classes.dir}"/>
66.1240 - <chainedmapper>
66.1241 - <flattenmapper/>
66.1242 - <globmapper from="*" to="lib/*"/>
66.1243 - </chainedmapper>
66.1244 - </pathconvert>
66.1245 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
66.1246 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
66.1247 - <fileset dir="${build.classes.dir}"/>
66.1248 - <manifest>
66.1249 - <attribute name="Main-Class" value="${main.class}"/>
66.1250 - <attribute name="Class-Path" value="${jar.classpath}"/>
66.1251 - </manifest>
66.1252 - </copylibs>
66.1253 - <echo>To run this application from the command line without Ant, try:</echo>
66.1254 - <property location="${dist.jar}" name="dist.jar.resolved"/>
66.1255 - <echo>java -jar "${dist.jar.resolved}"</echo>
66.1256 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
66.1257 + <delete>
66.1258 + <fileset file="${tmp.manifest.file}"/>
66.1259 + </delete>
66.1260 </target>
66.1261 + <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"/>
66.1262 + <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"/>
66.1263 <target name="-post-jar">
66.1264 <!-- Empty placeholder for easier customization. -->
66.1265 <!-- You can override this target in the ../build.xml file. -->
66.1266 </target>
66.1267 - <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"/>
66.1268 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
66.1269 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
66.1270 + <!--
66.1271 + =================
66.1272 + DEPLOY SECTION
66.1273 + =================
66.1274 + -->
66.1275 + <target name="-pre-deploy">
66.1276 + <!-- Empty placeholder for easier customization. -->
66.1277 + <!-- You can override this target in the ../build.xml file. -->
66.1278 + </target>
66.1279 + <target depends="init" name="-check-jlink">
66.1280 + <condition property="do.jlink.internal">
66.1281 + <and>
66.1282 + <istrue value="${do.jlink}"/>
66.1283 + <isset property="do.archive"/>
66.1284 + <isset property="named.module.internal"/>
66.1285 + </and>
66.1286 + </condition>
66.1287 + </target>
66.1288 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
66.1289 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
66.1290 + <property name="jlink.launcher.name" value="${application.title}"/>
66.1291 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
66.1292 + <and>
66.1293 + <isset property="jlink.additionalmodules"/>
66.1294 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
66.1295 + </and>
66.1296 + </condition>
66.1297 + <condition property="jlink.do.strip.internal">
66.1298 + <and>
66.1299 + <isset property="jlink.strip"/>
66.1300 + <istrue value="${jlink.strip}"/>
66.1301 + </and>
66.1302 + </condition>
66.1303 + <condition property="jlink.do.additionalparam.internal">
66.1304 + <and>
66.1305 + <isset property="jlink.additionalparam"/>
66.1306 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
66.1307 + </and>
66.1308 + </condition>
66.1309 + <condition property="jlink.do.launcher.internal">
66.1310 + <and>
66.1311 + <istrue value="${jlink.launcher}"/>
66.1312 + <isset property="main.class.available"/>
66.1313 + </and>
66.1314 + </condition>
66.1315 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
66.1316 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
66.1317 + <exec executable="${platform.jlink}">
66.1318 + <arg value="--module-path"/>
66.1319 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
66.1320 + <arg value="--add-modules"/>
66.1321 + <arg value="${jlink.add.modules}"/>
66.1322 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
66.1323 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
66.1324 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
66.1325 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
66.1326 + <arg value="--output"/>
66.1327 + <arg value="${dist.jlink.output}"/>
66.1328 + </exec>
66.1329 + </target>
66.1330 + <target name="-post-deploy">
66.1331 + <!-- Empty placeholder for easier customization. -->
66.1332 + <!-- You can override this target in the ../build.xml file. -->
66.1333 + </target>
66.1334 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
66.1335 <!--
66.1336 =================
66.1337 EXECUTION SECTION
66.1338 @@ -425,10 +1336,14 @@
66.1339 <target name="-do-not-recompile">
66.1340 <property name="javac.includes.binary" value=""/>
66.1341 </target>
66.1342 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
66.1343 + <target depends="init,compile-single" name="run-single">
66.1344 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
66.1345 <j2seproject1:java classname="${run.class}"/>
66.1346 </target>
66.1347 + <target depends="init,compile-test-single" name="run-test-with-main">
66.1348 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
66.1349 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
66.1350 + </target>
66.1351 <!--
66.1352 =================
66.1353 DEBUGGING SECTION
66.1354 @@ -437,11 +1352,14 @@
66.1355 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
66.1356 <j2seproject1:nbjpdastart name="${debug.class}"/>
66.1357 </target>
66.1358 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
66.1359 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
66.1360 + </target>
66.1361 <target depends="init,compile" name="-debug-start-debuggee">
66.1362 <j2seproject3:debug>
66.1363 - <customize>
66.1364 + <customizeDebuggee>
66.1365 <arg line="${application.args}"/>
66.1366 - </customize>
66.1367 + </customizeDebuggee>
66.1368 </j2seproject3:debug>
66.1369 </target>
66.1370 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
66.1371 @@ -453,7 +1371,12 @@
66.1372 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
66.1373 <j2seproject3:debug classname="${debug.class}"/>
66.1374 </target>
66.1375 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
66.1376 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
66.1377 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
66.1378 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
66.1379 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
66.1380 + </target>
66.1381 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
66.1382 <target depends="init" name="-pre-debug-fix">
66.1383 <fail unless="fix.includes">Must set fix.includes</fail>
66.1384 <property name="javac.includes" value="${fix.includes}.java"/>
66.1385 @@ -463,20 +1386,146 @@
66.1386 </target>
66.1387 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
66.1388 <!--
66.1389 + =================
66.1390 + PROFILING SECTION
66.1391 + =================
66.1392 + -->
66.1393 + <!--
66.1394 + pre NB7.2 profiler integration
66.1395 + -->
66.1396 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
66.1397 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
66.1398 + <nbprofiledirect>
66.1399 + <classpath>
66.1400 + <path path="${run.classpath}"/>
66.1401 + </classpath>
66.1402 + </nbprofiledirect>
66.1403 + <profile/>
66.1404 + </target>
66.1405 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
66.1406 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
66.1407 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
66.1408 + <nbprofiledirect>
66.1409 + <classpath>
66.1410 + <path path="${run.classpath}"/>
66.1411 + </classpath>
66.1412 + </nbprofiledirect>
66.1413 + <profile classname="${profile.class}"/>
66.1414 + </target>
66.1415 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
66.1416 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
66.1417 + <nbprofiledirect>
66.1418 + <classpath>
66.1419 + <path path="${run.classpath}"/>
66.1420 + </classpath>
66.1421 + </nbprofiledirect>
66.1422 + <profile classname="sun.applet.AppletViewer">
66.1423 + <customize>
66.1424 + <arg value="${applet.url}"/>
66.1425 + </customize>
66.1426 + </profile>
66.1427 + </target>
66.1428 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
66.1429 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
66.1430 + <nbprofiledirect>
66.1431 + <classpath>
66.1432 + <path path="${run.test.classpath}"/>
66.1433 + </classpath>
66.1434 + </nbprofiledirect>
66.1435 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
66.1436 + <customize>
66.1437 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
66.1438 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
66.1439 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
66.1440 + <jvmarg line="${profiler.info.jvmargs}"/>
66.1441 + <classpath>
66.1442 + <path path="${run.test.classpath}"/>
66.1443 + </classpath>
66.1444 + </customize>
66.1445 + </j2seproject3:junit>
66.1446 + </target>
66.1447 + <!--
66.1448 + end of pre NB72 profiling section
66.1449 + -->
66.1450 + <target if="netbeans.home" name="-profile-check">
66.1451 + <condition property="profiler.configured">
66.1452 + <or>
66.1453 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
66.1454 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
66.1455 + </or>
66.1456 + </condition>
66.1457 + </target>
66.1458 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
66.1459 + <startprofiler/>
66.1460 + <antcall target="run"/>
66.1461 + </target>
66.1462 + <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">
66.1463 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
66.1464 + <startprofiler/>
66.1465 + <antcall target="run-single"/>
66.1466 + </target>
66.1467 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
66.1468 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
66.1469 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
66.1470 + <startprofiler/>
66.1471 + <antcall target="test-single"/>
66.1472 + </target>
66.1473 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
66.1474 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
66.1475 + <startprofiler/>
66.1476 + <antcall target="run-test-with-main"/>
66.1477 + </target>
66.1478 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
66.1479 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
66.1480 + <startprofiler/>
66.1481 + <antcall target="run-applet"/>
66.1482 + </target>
66.1483 + <!--
66.1484 ===============
66.1485 JAVADOC SECTION
66.1486 ===============
66.1487 -->
66.1488 - <target depends="init" name="-javadoc-build">
66.1489 + <target depends="init" if="have.sources" name="-javadoc-build">
66.1490 <mkdir dir="${dist.javadoc.dir}"/>
66.1491 - <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}">
66.1492 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
66.1493 + <and>
66.1494 + <isset property="endorsed.classpath.cmd.line.arg"/>
66.1495 + <not>
66.1496 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
66.1497 + </not>
66.1498 + </and>
66.1499 + </condition>
66.1500 + <condition else="" property="bug5101868workaround" value="*.java">
66.1501 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
66.1502 + </condition>
66.1503 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
66.1504 + <and>
66.1505 + <isset property="javadoc.html5"/>
66.1506 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
66.1507 + </and>
66.1508 + </condition>
66.1509 + <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}">
66.1510 <classpath>
66.1511 <path path="${javac.classpath}"/>
66.1512 </classpath>
66.1513 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
66.1514 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
66.1515 <filename name="**/*.java"/>
66.1516 </fileset>
66.1517 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
66.1518 + <include name="**/*.java"/>
66.1519 + <exclude name="*.java"/>
66.1520 + </fileset>
66.1521 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
66.1522 + <arg line="${javadoc.html5.cmd.line.arg}"/>
66.1523 </javadoc>
66.1524 + <copy todir="${dist.javadoc.dir}">
66.1525 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
66.1526 + <filename name="**/doc-files/**"/>
66.1527 + </fileset>
66.1528 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
66.1529 + <include name="**/doc-files/**"/>
66.1530 + </fileset>
66.1531 + </copy>
66.1532 </target>
66.1533 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
66.1534 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
66.1535 @@ -484,7 +1533,7 @@
66.1536 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
66.1537 <!--
66.1538 =========================
66.1539 - JUNIT COMPILATION SECTION
66.1540 + TEST COMPILATION SECTION
66.1541 =========================
66.1542 -->
66.1543 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
66.1544 @@ -494,11 +1543,63 @@
66.1545 <!-- Empty placeholder for easier customization. -->
66.1546 <!-- You can override this target in the ../build.xml file. -->
66.1547 </target>
66.1548 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
66.1549 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
66.1550 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
66.1551 + <and>
66.1552 + <isset property="test.module.name"/>
66.1553 + <length length="0" string="${test.module.name}" when="greater"/>
66.1554 + </and>
66.1555 + </condition>
66.1556 + <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">
66.1557 + <and>
66.1558 + <isset property="test.module.name"/>
66.1559 + <length length="0" string="${test.module.name}" when="greater"/>
66.1560 + </and>
66.1561 + </condition>
66.1562 + </target>
66.1563 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
66.1564 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
66.1565 + <and>
66.1566 + <isset property="test.module.name"/>
66.1567 + <length length="0" string="${test.module.name}" when="greater"/>
66.1568 + </and>
66.1569 + </condition>
66.1570 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
66.1571 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
66.1572 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
66.1573 + <chainedmapper>
66.1574 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
66.1575 + <filtermapper>
66.1576 + <uniqfilter/>
66.1577 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
66.1578 + </filtermapper>
66.1579 + <cutdirsmapper dirs="1"/>
66.1580 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
66.1581 + </chainedmapper>
66.1582 + </pathconvert>
66.1583 + <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}">
66.1584 + <and>
66.1585 + <isset property="test.module.name"/>
66.1586 + <length length="0" string="${test.module.name}" when="greater"/>
66.1587 + </and>
66.1588 + </condition>
66.1589 + </target>
66.1590 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
66.1591 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
66.1592 + <property name="javac.test.compilerargs" value=""/>
66.1593 + <property name="run.test.jvmargs" value=""/>
66.1594 + </target>
66.1595 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
66.1596 <target if="do.depend.true" name="-compile-test-depend">
66.1597 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
66.1598 </target>
66.1599 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
66.1600 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
66.1601 + <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">
66.1602 + <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}">
66.1603 + <customize>
66.1604 + <compilerarg line="${javac.test.compilerargs}"/>
66.1605 + </customize>
66.1606 + </j2seproject3:javac>
66.1607 <copy todir="${build.test.classes.dir}">
66.1608 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
66.1609 </copy>
66.1610 @@ -512,10 +1613,14 @@
66.1611 <!-- Empty placeholder for easier customization. -->
66.1612 <!-- You can override this target in the ../build.xml file. -->
66.1613 </target>
66.1614 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
66.1615 + <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">
66.1616 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
66.1617 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
66.1618 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
66.1619 + <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}">
66.1620 + <customize>
66.1621 + <compilerarg line="${javac.test.compilerargs}"/>
66.1622 + </customize>
66.1623 + </j2seproject3:javac>
66.1624 <copy todir="${build.test.classes.dir}">
66.1625 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
66.1626 </copy>
66.1627 @@ -527,17 +1632,17 @@
66.1628 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
66.1629 <!--
66.1630 =======================
66.1631 - JUNIT EXECUTION SECTION
66.1632 + TEST EXECUTION SECTION
66.1633 =======================
66.1634 -->
66.1635 <target depends="init" if="have.tests" name="-pre-test-run">
66.1636 <mkdir dir="${build.test.results.dir}"/>
66.1637 </target>
66.1638 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
66.1639 - <j2seproject3:junit testincludes="**/*Test.java"/>
66.1640 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
66.1641 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
66.1642 </target>
66.1643 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
66.1644 - <fail if="tests.failed">Some tests failed; see details above.</fail>
66.1645 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
66.1646 </target>
66.1647 <target depends="init" if="have.tests" name="test-report"/>
66.1648 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
66.1649 @@ -545,41 +1650,42 @@
66.1650 <target depends="init" if="have.tests" name="-pre-test-run-single">
66.1651 <mkdir dir="${build.test.results.dir}"/>
66.1652 </target>
66.1653 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
66.1654 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
66.1655 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
66.1656 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
66.1657 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
66.1658 </target>
66.1659 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
66.1660 - <fail if="tests.failed">Some tests failed; see details above.</fail>
66.1661 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
66.1662 </target>
66.1663 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
66.1664 + <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"/>
66.1665 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
66.1666 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
66.1667 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
66.1668 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
66.1669 + </target>
66.1670 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
66.1671 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
66.1672 + </target>
66.1673 + <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"/>
66.1674 <!--
66.1675 =======================
66.1676 - JUNIT DEBUGGING SECTION
66.1677 + TEST DEBUGGING SECTION
66.1678 =======================
66.1679 -->
66.1680 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
66.1681 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
66.1682 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
66.1683 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
66.1684 - <delete file="${test.report.file}"/>
66.1685 - <mkdir dir="${build.test.results.dir}"/>
66.1686 - <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}">
66.1687 - <customize>
66.1688 - <syspropertyset>
66.1689 - <propertyref prefix="test-sys-prop."/>
66.1690 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
66.1691 - </syspropertyset>
66.1692 - <arg value="${test.class}"/>
66.1693 - <arg value="showoutput=true"/>
66.1694 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
66.1695 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
66.1696 - </customize>
66.1697 - </j2seproject3:debug>
66.1698 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
66.1699 + </target>
66.1700 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
66.1701 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
66.1702 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
66.1703 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
66.1704 </target>
66.1705 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
66.1706 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
66.1707 </target>
66.1708 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
66.1709 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
66.1710 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
66.1711 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
66.1712 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
66.1713 </target>
66.1714 @@ -605,9 +1711,9 @@
66.1715 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
66.1716 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
66.1717 <j2seproject3:debug classname="sun.applet.AppletViewer">
66.1718 - <customize>
66.1719 + <customizeDebuggee>
66.1720 <arg value="${applet.url}"/>
66.1721 - </customize>
66.1722 + </customizeDebuggee>
66.1723 </j2seproject3:debug>
66.1724 </target>
66.1725 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
66.1726 @@ -616,14 +1722,49 @@
66.1727 CLEANUP SECTION
66.1728 ===============
66.1729 -->
66.1730 - <target depends="init" name="deps-clean" unless="no.deps"/>
66.1731 + <target name="-deps-clean-init" unless="built-clean.properties">
66.1732 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
66.1733 + <delete file="${built-clean.properties}" quiet="true"/>
66.1734 + </target>
66.1735 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
66.1736 + <echo level="warn" message="Cycle detected: reentrant was already built"/>
66.1737 + </target>
66.1738 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
66.1739 + <mkdir dir="${build.dir}"/>
66.1740 + <touch file="${built-clean.properties}" verbose="false"/>
66.1741 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
66.1742 + <antcall target="-warn-already-built-clean"/>
66.1743 + <propertyfile file="${built-clean.properties}">
66.1744 + <entry key="${basedir}" value=""/>
66.1745 + </propertyfile>
66.1746 + </target>
66.1747 <target depends="init" name="-do-clean">
66.1748 <delete dir="${build.dir}"/>
66.1749 - <delete dir="${dist.dir}"/>
66.1750 + <delete dir="${dist.jlink.output}"/>
66.1751 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
66.1752 </target>
66.1753 <target name="-post-clean">
66.1754 <!-- Empty placeholder for easier customization. -->
66.1755 <!-- You can override this target in the ../build.xml file. -->
66.1756 </target>
66.1757 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
66.1758 + <target name="-check-call-dep">
66.1759 + <property file="${call.built.properties}" prefix="already.built."/>
66.1760 + <condition property="should.call.dep">
66.1761 + <and>
66.1762 + <not>
66.1763 + <isset property="already.built.${call.subproject}"/>
66.1764 + </not>
66.1765 + <available file="${call.script}"/>
66.1766 + </and>
66.1767 + </condition>
66.1768 + </target>
66.1769 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
66.1770 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
66.1771 + <propertyset>
66.1772 + <propertyref prefix="transfer."/>
66.1773 + <mapper from="transfer.*" to="*" type="glob"/>
66.1774 + </propertyset>
66.1775 + </ant>
66.1776 + </target>
66.1777 </project>
67.1 --- a/samples/reentrant/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
67.2 +++ b/samples/reentrant/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
67.3 @@ -1,8 +1,8 @@
67.4 build.xml.data.CRC32=bd3226d8
67.5 -build.xml.script.CRC32=b09f34e1
67.6 -build.xml.stylesheet.CRC32=be360661
67.7 +build.xml.script.CRC32=bed52f6e
67.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
67.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
67.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
67.11 nbproject/build-impl.xml.data.CRC32=bd3226d8
67.12 -nbproject/build-impl.xml.script.CRC32=f897b104
67.13 -nbproject/build-impl.xml.stylesheet.CRC32=487672f9
67.14 +nbproject/build-impl.xml.script.CRC32=69c53261
67.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
68.1 --- a/samples/reentrant/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
68.2 +++ b/samples/reentrant/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
68.3 @@ -5,14 +5,19 @@
68.4 # This directory is removed when the project is cleaned:
68.5 build.dir=build
68.6 build.generated.dir=${build.dir}/generated
68.7 +build.generated.sources.dir=${build.dir}/generated-sources
68.8 # Only compile against the classpath explicitly listed here:
68.9 build.sysclasspath=ignore
68.10 build.test.classes.dir=${build.dir}/test/classes
68.11 build.test.results.dir=${build.dir}/test/results
68.12 debug.classpath=\
68.13 ${run.classpath}
68.14 +debug.modulepath=\
68.15 + ${run.modulepath}
68.16 debug.test.classpath=\
68.17 ${run.test.classpath}
68.18 +debug.test.modulepath=\
68.19 + ${run.test.modulepath}
68.20 # This directory is removed when the project is cleaned:
68.21 dist.dir=dist
68.22 dist.jar=${dist.dir}/reentrant.jar
68.23 @@ -25,12 +30,16 @@
68.24 # Space-separated list of extra javac options
68.25 javac.compilerargs=
68.26 javac.deprecation=false
68.27 -javac.source=1.5
68.28 -javac.target=1.5
68.29 +javac.modulepath=
68.30 +javac.processormodulepath=
68.31 +javac.source=1.6
68.32 +javac.target=1.6
68.33 javac.test.classpath=\
68.34 ${javac.classpath}:\
68.35 ${build.classes.dir}:\
68.36 ${file.reference.junit-4.4.jar}
68.37 +javac.test.modulepath=\
68.38 + ${javac.modulepath}
68.39 javadoc.additionalparam=
68.40 javadoc.author=false
68.41 javadoc.encoding=${source.encoding}
68.42 @@ -51,9 +60,13 @@
68.43 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
68.44 # or test-sys-prop.name=value to set system properties for unit tests):
68.45 run.jvmargs=-ea
68.46 +run.modulepath=\
68.47 + ${javac.modulepath}
68.48 run.test.classpath=\
68.49 ${javac.test.classpath}:\
68.50 ${build.test.classes.dir}
68.51 +run.test.modulepath=\
68.52 + ${javac.test.modulepath}
68.53 source.encoding=UTF-8
68.54 src.dir=src
68.55 test.src.dir=test
69.1 --- a/samples/sidemeanings/build.xml Mon Nov 11 05:47:32 2019 +0100
69.2 +++ b/samples/sidemeanings/build.xml Mon Nov 11 13:17:34 2019 +0100
69.3 @@ -51,8 +51,7 @@
69.4 -init-macrodef-junit: defines macro for junit execution
69.5 -init-macrodef-debug: defines macro for class debugging
69.6 -init-macrodef-java: defines macro for class execution
69.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
69.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
69.9 + -do-jar: JAR building
69.10 run: execution of project
69.11 -javadoc-build: Javadoc generation
69.12 test-report: JUnit report generation
70.1 --- a/samples/sidemeanings/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
70.2 +++ b/samples/sidemeanings/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
70.3 @@ -12,18 +12,18 @@
70.4 - execution
70.5 - debugging
70.6 - javadoc
70.7 - - junit compilation
70.8 - - junit execution
70.9 - - junit debugging
70.10 + - test compilation
70.11 + - test execution
70.12 + - test debugging
70.13 - applet
70.14 - cleanup
70.15
70.16 -->
70.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="sidemeanings-impl">
70.18 - <fail message="Please build using Ant 1.7.1 or higher.">
70.19 +<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="sidemeanings-impl">
70.20 + <fail message="Please build using Ant 1.8.0 or higher.">
70.21 <condition>
70.22 <not>
70.23 - <antversion atleast="1.7.1"/>
70.24 + <antversion atleast="1.8.0"/>
70.25 </not>
70.26 </condition>
70.27 </fail>
70.28 @@ -46,15 +46,89 @@
70.29 <property file="${user.properties.file}"/>
70.30 <!-- The two properties below are usually overridden -->
70.31 <!-- by the active platform. Just a fallback. -->
70.32 - <property name="default.javac.source" value="1.4"/>
70.33 - <property name="default.javac.target" value="1.4"/>
70.34 + <property name="default.javac.source" value="1.6"/>
70.35 + <property name="default.javac.target" value="1.6"/>
70.36 </target>
70.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
70.38 <property file="nbproject/configs/${config}.properties"/>
70.39 <property file="nbproject/project.properties"/>
70.40 </target>
70.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
70.42 + <target name="-init-modules-supported">
70.43 + <condition property="modules.supported.internal" value="true">
70.44 + <not>
70.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
70.46 + </not>
70.47 + </condition>
70.48 + </target>
70.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
70.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
70.51 + <attribute name="property"/>
70.52 + <attribute name="sourcepath"/>
70.53 + <sequential>
70.54 + <loadresource property="@{property}" quiet="true">
70.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
70.56 + <filterchain>
70.57 + <stripjavacomments/>
70.58 + <linecontainsregexp>
70.59 + <regexp pattern="module .* \{"/>
70.60 + </linecontainsregexp>
70.61 + <tokenfilter>
70.62 + <linetokenizer/>
70.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
70.64 + </tokenfilter>
70.65 + <striplinebreaks/>
70.66 + </filterchain>
70.67 + </loadresource>
70.68 + </sequential>
70.69 + </macrodef>
70.70 + </target>
70.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
70.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
70.73 + <condition>
70.74 + <not>
70.75 + <antversion atleast="1.10.0"/>
70.76 + </not>
70.77 + </condition>
70.78 + </fail>
70.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
70.80 + <condition property="named.module.internal">
70.81 + <and>
70.82 + <isset property="module.name"/>
70.83 + <length length="0" string="${module.name}" when="greater"/>
70.84 + </and>
70.85 + </condition>
70.86 + <condition property="unnamed.module.internal">
70.87 + <not>
70.88 + <isset property="named.module.internal"/>
70.89 + </not>
70.90 + </condition>
70.91 + <property name="javac.modulepath" value=""/>
70.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
70.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
70.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
70.95 + <property name="javac.upgrademodulepath" value=""/>
70.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
70.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
70.98 + <and>
70.99 + <isset property="javac.systemmodulepath"/>
70.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
70.101 + </and>
70.102 + </condition>
70.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
70.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
70.105 + <property name="module.name" value=""/>
70.106 + </target>
70.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
70.108 + <property name="platform.java" value="${java.home}/bin/java"/>
70.109 <available file="${manifest.file}" property="manifest.available"/>
70.110 + <condition property="splashscreen.available">
70.111 + <and>
70.112 + <not>
70.113 + <equals arg1="${application.splash}" arg2="" trim="true"/>
70.114 + </not>
70.115 + <available file="${application.splash}"/>
70.116 + </and>
70.117 + </condition>
70.118 <condition property="main.class.available">
70.119 <and>
70.120 <isset property="main.class"/>
70.121 @@ -63,43 +137,46 @@
70.122 </not>
70.123 </and>
70.124 </condition>
70.125 - <condition property="manifest.available+main.class">
70.126 + <condition property="profile.available">
70.127 <and>
70.128 - <isset property="manifest.available"/>
70.129 - <isset property="main.class.available"/>
70.130 - </and>
70.131 - </condition>
70.132 - <condition property="do.mkdist">
70.133 - <and>
70.134 - <isset property="libs.CopyLibs.classpath"/>
70.135 + <isset property="javac.profile"/>
70.136 + <length length="0" string="${javac.profile}" when="greater"/>
70.137 <not>
70.138 - <istrue value="${mkdist.disabled}"/>
70.139 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
70.140 </not>
70.141 </and>
70.142 </condition>
70.143 - <condition property="manifest.available+main.class+mkdist.available">
70.144 + <condition property="do.archive">
70.145 + <or>
70.146 + <not>
70.147 + <istrue value="${jar.archive.disabled}"/>
70.148 + </not>
70.149 + <istrue value="${not.archive.disabled}"/>
70.150 + </or>
70.151 + </condition>
70.152 + <condition property="do.archive+manifest.available">
70.153 <and>
70.154 - <istrue value="${manifest.available+main.class}"/>
70.155 - <isset property="do.mkdist"/>
70.156 + <isset property="manifest.available"/>
70.157 + <istrue value="${do.archive}"/>
70.158 </and>
70.159 </condition>
70.160 - <condition property="manifest.available+mkdist.available">
70.161 + <condition property="do.archive+main.class.available">
70.162 <and>
70.163 - <istrue value="${manifest.available}"/>
70.164 - <isset property="do.mkdist"/>
70.165 + <isset property="main.class.available"/>
70.166 + <istrue value="${do.archive}"/>
70.167 </and>
70.168 </condition>
70.169 - <condition property="manifest.available-mkdist.available">
70.170 - <or>
70.171 - <istrue value="${manifest.available}"/>
70.172 - <isset property="do.mkdist"/>
70.173 - </or>
70.174 + <condition property="do.archive+splashscreen.available">
70.175 + <and>
70.176 + <isset property="splashscreen.available"/>
70.177 + <istrue value="${do.archive}"/>
70.178 + </and>
70.179 </condition>
70.180 - <condition property="manifest.available+main.class-mkdist.available">
70.181 - <or>
70.182 - <istrue value="${manifest.available+main.class}"/>
70.183 - <isset property="do.mkdist"/>
70.184 - </or>
70.185 + <condition property="do.archive+profile.available">
70.186 + <and>
70.187 + <isset property="profile.available"/>
70.188 + <istrue value="${do.archive}"/>
70.189 + </and>
70.190 </condition>
70.191 <condition property="have.tests">
70.192 <or>
70.193 @@ -124,6 +201,7 @@
70.194 </and>
70.195 </condition>
70.196 <property name="run.jvmargs" value=""/>
70.197 + <property name="run.jvmargs.ide" value=""/>
70.198 <property name="javac.compilerargs" value=""/>
70.199 <property name="work.dir" value="${basedir}"/>
70.200 <condition property="no.deps">
70.201 @@ -136,6 +214,7 @@
70.202 <property name="application.args" value=""/>
70.203 <property name="source.encoding" value="${file.encoding}"/>
70.204 <property name="runtime.encoding" value="${source.encoding}"/>
70.205 + <property name="manifest.encoding" value="${source.encoding}"/>
70.206 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
70.207 <and>
70.208 <isset property="javadoc.encoding"/>
70.209 @@ -153,9 +232,56 @@
70.210 </condition>
70.211 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
70.212 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
70.213 - <length length="0" string="${endorsed.classpath}" when="greater"/>
70.214 + <and>
70.215 + <isset property="endorsed.classpath"/>
70.216 + <not>
70.217 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
70.218 + </not>
70.219 + </and>
70.220 </condition>
70.221 - <property name="javac.fork" value="false"/>
70.222 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
70.223 + <isset property="profile.available"/>
70.224 + </condition>
70.225 + <condition else="false" property="jdkBug6558476">
70.226 + <and>
70.227 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
70.228 + <not>
70.229 + <os family="unix"/>
70.230 + </not>
70.231 + </and>
70.232 + </condition>
70.233 + <condition else="false" property="javac.fork">
70.234 + <or>
70.235 + <istrue value="${jdkBug6558476}"/>
70.236 + <istrue value="${javac.external.vm}"/>
70.237 + </or>
70.238 + </condition>
70.239 + <property name="jar.index" value="false"/>
70.240 + <property name="jar.index.metainf" value="${jar.index}"/>
70.241 + <property name="copylibs.rebase" value="true"/>
70.242 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
70.243 + <condition property="junit.available">
70.244 + <or>
70.245 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
70.246 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
70.247 + </or>
70.248 + </condition>
70.249 + <condition property="testng.available">
70.250 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
70.251 + </condition>
70.252 + <condition property="junit+testng.available">
70.253 + <and>
70.254 + <istrue value="${junit.available}"/>
70.255 + <istrue value="${testng.available}"/>
70.256 + </and>
70.257 + </condition>
70.258 + <condition else="testng" property="testng.mode" value="mixed">
70.259 + <istrue value="${junit+testng.available}"/>
70.260 + </condition>
70.261 + <condition else="" property="testng.debug.mode" value="-mixed">
70.262 + <istrue value="${junit+testng.available}"/>
70.263 + </condition>
70.264 + <property name="java.failonerror" value="true"/>
70.265 </target>
70.266 <target name="-post-init">
70.267 <!-- Empty placeholder for easier customization. -->
70.268 @@ -182,11 +308,125 @@
70.269 </sequential>
70.270 </macrodef>
70.271 </target>
70.272 - <target name="-init-macrodef-javac">
70.273 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
70.274 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
70.275 <attribute default="${src.dir}" name="srcdir"/>
70.276 <attribute default="${build.classes.dir}" name="destdir"/>
70.277 <attribute default="${javac.classpath}" name="classpath"/>
70.278 + <attribute default="${javac.modulepath}" name="modulepath"/>
70.279 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
70.280 + <attribute default="${javac.processorpath}" name="processorpath"/>
70.281 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
70.282 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
70.283 + <attribute default="${includes}" name="includes"/>
70.284 + <attribute default="${excludes}" name="excludes"/>
70.285 + <attribute default="${javac.debug}" name="debug"/>
70.286 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
70.287 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
70.288 + <attribute default="${empty.dir}" name="gensrcdir"/>
70.289 + <element name="customize" optional="true"/>
70.290 + <sequential>
70.291 + <condition property="warn.excludes.internal">
70.292 + <and>
70.293 + <isset property="named.module.internal"/>
70.294 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
70.295 + </and>
70.296 + </condition>
70.297 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
70.298 + <property location="${build.dir}/empty" name="empty.dir"/>
70.299 + <mkdir dir="${empty.dir}"/>
70.300 + <mkdir dir="@{apgeneratedsrcdir}"/>
70.301 + <condition property="processormodulepath.set">
70.302 + <resourcecount count="0" when="greater">
70.303 + <path>
70.304 + <pathelement path="@{processormodulepath}"/>
70.305 + </path>
70.306 + </resourcecount>
70.307 + </condition>
70.308 + <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}">
70.309 + <src>
70.310 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
70.311 + <include name="*"/>
70.312 + </dirset>
70.313 + </src>
70.314 + <classpath>
70.315 + <path path="@{classpath}"/>
70.316 + </classpath>
70.317 + <modulepath>
70.318 + <path path="@{modulepath}"/>
70.319 + </modulepath>
70.320 + <upgrademodulepath>
70.321 + <path path="@{upgrademodulepath}"/>
70.322 + </upgrademodulepath>
70.323 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
70.324 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
70.325 + <compilerarg line="${javac.compilerargs}"/>
70.326 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
70.327 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
70.328 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
70.329 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
70.330 + <compilerarg line="${ap.processors.internal}"/>
70.331 + <compilerarg line="${annotation.processing.processor.options}"/>
70.332 + <compilerarg value="-s"/>
70.333 + <compilerarg path="@{apgeneratedsrcdir}"/>
70.334 + <compilerarg line="${ap.proc.none.internal}"/>
70.335 + <customize/>
70.336 + </javac>
70.337 + </sequential>
70.338 + </macrodef>
70.339 + </target>
70.340 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
70.341 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
70.342 + <attribute default="${src.dir}" name="srcdir"/>
70.343 + <attribute default="${build.classes.dir}" name="destdir"/>
70.344 + <attribute default="${javac.classpath}" name="classpath"/>
70.345 + <attribute default="${javac.modulepath}" name="modulepath"/>
70.346 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
70.347 + <attribute default="${javac.processorpath}" name="processorpath"/>
70.348 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
70.349 + <attribute default="${includes}" name="includes"/>
70.350 + <attribute default="${excludes}" name="excludes"/>
70.351 + <attribute default="${javac.debug}" name="debug"/>
70.352 + <attribute default="${empty.dir}" name="sourcepath"/>
70.353 + <attribute default="${empty.dir}" name="gensrcdir"/>
70.354 + <element name="customize" optional="true"/>
70.355 + <sequential>
70.356 + <property location="${build.dir}/empty" name="empty.dir"/>
70.357 + <mkdir dir="${empty.dir}"/>
70.358 + <mkdir dir="@{apgeneratedsrcdir}"/>
70.359 + <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}">
70.360 + <src>
70.361 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
70.362 + <include name="*"/>
70.363 + </dirset>
70.364 + </src>
70.365 + <classpath>
70.366 + <path path="@{classpath}"/>
70.367 + </classpath>
70.368 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
70.369 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
70.370 + <compilerarg line="${javac.compilerargs}"/>
70.371 + <compilerarg value="-processorpath"/>
70.372 + <compilerarg path="@{processorpath}:${empty.dir}"/>
70.373 + <compilerarg line="${ap.processors.internal}"/>
70.374 + <compilerarg line="${annotation.processing.processor.options}"/>
70.375 + <compilerarg value="-s"/>
70.376 + <compilerarg path="@{apgeneratedsrcdir}"/>
70.377 + <compilerarg line="${ap.proc.none.internal}"/>
70.378 + <customize/>
70.379 + </javac>
70.380 + </sequential>
70.381 + </macrodef>
70.382 + </target>
70.383 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
70.384 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
70.385 + <attribute default="${src.dir}" name="srcdir"/>
70.386 + <attribute default="${build.classes.dir}" name="destdir"/>
70.387 + <attribute default="${javac.classpath}" name="classpath"/>
70.388 + <attribute default="${javac.modulepath}" name="modulepath"/>
70.389 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
70.390 + <attribute default="${javac.processorpath}" name="processorpath"/>
70.391 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
70.392 <attribute default="${includes}" name="includes"/>
70.393 <attribute default="${excludes}" name="excludes"/>
70.394 <attribute default="${javac.debug}" name="debug"/>
70.395 @@ -206,11 +446,14 @@
70.396 <path path="@{classpath}"/>
70.397 </classpath>
70.398 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
70.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
70.400 <compilerarg line="${javac.compilerargs}"/>
70.401 <customize/>
70.402 </javac>
70.403 </sequential>
70.404 </macrodef>
70.405 + </target>
70.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
70.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
70.408 <attribute default="${src.dir}" name="srcdir"/>
70.409 <attribute default="${build.classes.dir}" name="destdir"/>
70.410 @@ -227,52 +470,383 @@
70.411 <attribute default="${build.classes.dir}" name="destdir"/>
70.412 <sequential>
70.413 <fail unless="javac.includes">Must set javac.includes</fail>
70.414 - <pathconvert pathsep="," property="javac.includes.binary">
70.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
70.416 <path>
70.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
70.418 </path>
70.419 <globmapper from="*.java" to="*.class"/>
70.420 </pathconvert>
70.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
70.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
70.423 <delete>
70.424 - <files includes="${javac.includes.binary}"/>
70.425 + <files includesfile="${javac.includesfile.binary}"/>
70.426 + </delete>
70.427 + <delete>
70.428 + <fileset file="${javac.includesfile.binary}"/>
70.429 </delete>
70.430 </sequential>
70.431 </macrodef>
70.432 </target>
70.433 - <target name="-init-macrodef-junit">
70.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
70.435 + <condition else="false" property="nb.junit.batch" value="true">
70.436 + <and>
70.437 + <istrue value="${junit.available}"/>
70.438 + <not>
70.439 + <isset property="test.method"/>
70.440 + </not>
70.441 + </and>
70.442 + </condition>
70.443 + <condition else="false" property="nb.junit.single" value="true">
70.444 + <and>
70.445 + <istrue value="${junit.available}"/>
70.446 + <isset property="test.method"/>
70.447 + </and>
70.448 + </condition>
70.449 + </target>
70.450 + <target name="-init-test-properties">
70.451 + <property name="test.binaryincludes" value="<nothing>"/>
70.452 + <property name="test.binarytestincludes" value=""/>
70.453 + <property name="test.binaryexcludes" value=""/>
70.454 + </target>
70.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
70.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
70.457 + <attribute default="${includes}" name="includes"/>
70.458 + <attribute default="${excludes}" name="excludes"/>
70.459 + <element name="customizePrototype" optional="true"/>
70.460 + <sequential>
70.461 + <property name="junit.forkmode" value="perTest"/>
70.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
70.463 + <syspropertyset>
70.464 + <propertyref prefix="test-sys-prop."/>
70.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
70.466 + </syspropertyset>
70.467 + <classpath>
70.468 + <path path="${run.test.classpath}"/>
70.469 + </classpath>
70.470 + <modulepath>
70.471 + <path path="${run.test.modulepath}"/>
70.472 + </modulepath>
70.473 + <formatter type="brief" usefile="false"/>
70.474 + <formatter type="xml"/>
70.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.476 + <jvmarg value="-ea"/>
70.477 + <jvmarg line="${run.test.jvmargs}"/>
70.478 + <customizePrototype/>
70.479 + </junit>
70.480 + </sequential>
70.481 + </macrodef>
70.482 + </target>
70.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
70.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
70.485 + <attribute default="${includes}" name="includes"/>
70.486 + <attribute default="${excludes}" name="excludes"/>
70.487 + <element name="customizePrototype" optional="true"/>
70.488 + <sequential>
70.489 + <property name="junit.forkmode" value="perTest"/>
70.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
70.491 + <syspropertyset>
70.492 + <propertyref prefix="test-sys-prop."/>
70.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
70.494 + </syspropertyset>
70.495 + <classpath>
70.496 + <path path="${run.test.classpath}"/>
70.497 + </classpath>
70.498 + <formatter type="brief" usefile="false"/>
70.499 + <formatter type="xml"/>
70.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.501 + <jvmarg value="-ea"/>
70.502 + <customizePrototype/>
70.503 + </junit>
70.504 + </sequential>
70.505 + </macrodef>
70.506 + </target>
70.507 + <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}">
70.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
70.509 <attribute default="${includes}" name="includes"/>
70.510 <attribute default="${excludes}" name="excludes"/>
70.511 <attribute default="**" name="testincludes"/>
70.512 + <attribute default="" name="testmethods"/>
70.513 + <element name="customize" optional="true"/>
70.514 <sequential>
70.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
70.516 - <batchtest todir="${build.test.results.dir}">
70.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
70.518 - <filename name="@{testincludes}"/>
70.519 - </fileset>
70.520 - </batchtest>
70.521 + <j2seproject3:junit-prototype>
70.522 + <customizePrototype>
70.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
70.524 + <customize/>
70.525 + </customizePrototype>
70.526 + </j2seproject3:junit-prototype>
70.527 + </sequential>
70.528 + </macrodef>
70.529 + </target>
70.530 + <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}">
70.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
70.532 + <attribute default="${includes}" name="includes"/>
70.533 + <attribute default="${excludes}" name="excludes"/>
70.534 + <attribute default="**" name="testincludes"/>
70.535 + <attribute default="" name="testmethods"/>
70.536 + <element name="customize" optional="true"/>
70.537 + <sequential>
70.538 + <j2seproject3:junit-prototype>
70.539 + <customizePrototype>
70.540 + <batchtest todir="${build.test.results.dir}">
70.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
70.542 + <filename name="@{testincludes}"/>
70.543 + </fileset>
70.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
70.545 + <filename name="${test.binarytestincludes}"/>
70.546 + </fileset>
70.547 + </batchtest>
70.548 + <customize/>
70.549 + </customizePrototype>
70.550 + </j2seproject3:junit-prototype>
70.551 + </sequential>
70.552 + </macrodef>
70.553 + </target>
70.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
70.555 + <target if="${testng.available}" name="-init-macrodef-testng">
70.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
70.557 + <attribute default="${includes}" name="includes"/>
70.558 + <attribute default="${excludes}" name="excludes"/>
70.559 + <attribute default="**" name="testincludes"/>
70.560 + <attribute default="" name="testmethods"/>
70.561 + <element name="customize" optional="true"/>
70.562 + <sequential>
70.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
70.564 + <isset property="test.method"/>
70.565 + </condition>
70.566 + <union id="test.set">
70.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
70.568 + <filename name="@{testincludes}"/>
70.569 + </fileset>
70.570 + </union>
70.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
70.572 + <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="sidemeanings" testname="TestNG tests" workingDir="${work.dir}">
70.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
70.574 + <propertyset>
70.575 + <propertyref prefix="test-sys-prop."/>
70.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
70.577 + </propertyset>
70.578 <classpath>
70.579 <path path="${run.test.classpath}"/>
70.580 </classpath>
70.581 - <syspropertyset>
70.582 - <propertyref prefix="test-sys-prop."/>
70.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
70.584 - </syspropertyset>
70.585 - <formatter type="brief" usefile="false"/>
70.586 - <formatter type="xml"/>
70.587 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.588 - <jvmarg line="${run.jvmargs}"/>
70.589 - </junit>
70.590 + <customize/>
70.591 + </testng>
70.592 </sequential>
70.593 </macrodef>
70.594 </target>
70.595 + <target name="-init-macrodef-test-impl">
70.596 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
70.597 + <attribute default="${includes}" name="includes"/>
70.598 + <attribute default="${excludes}" name="excludes"/>
70.599 + <attribute default="**" name="testincludes"/>
70.600 + <attribute default="" name="testmethods"/>
70.601 + <element implicit="true" name="customize" optional="true"/>
70.602 + <sequential>
70.603 + <echo>No tests executed.</echo>
70.604 + </sequential>
70.605 + </macrodef>
70.606 + </target>
70.607 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
70.608 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
70.609 + <attribute default="${includes}" name="includes"/>
70.610 + <attribute default="${excludes}" name="excludes"/>
70.611 + <attribute default="**" name="testincludes"/>
70.612 + <attribute default="" name="testmethods"/>
70.613 + <element implicit="true" name="customize" optional="true"/>
70.614 + <sequential>
70.615 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
70.616 + <customize/>
70.617 + </j2seproject3:junit>
70.618 + </sequential>
70.619 + </macrodef>
70.620 + </target>
70.621 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
70.622 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
70.623 + <attribute default="${includes}" name="includes"/>
70.624 + <attribute default="${excludes}" name="excludes"/>
70.625 + <attribute default="**" name="testincludes"/>
70.626 + <attribute default="" name="testmethods"/>
70.627 + <element implicit="true" name="customize" optional="true"/>
70.628 + <sequential>
70.629 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
70.630 + <customize/>
70.631 + </j2seproject3:testng>
70.632 + </sequential>
70.633 + </macrodef>
70.634 + </target>
70.635 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
70.636 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
70.637 + <attribute default="${includes}" name="includes"/>
70.638 + <attribute default="${excludes}" name="excludes"/>
70.639 + <attribute default="**" name="testincludes"/>
70.640 + <attribute default="" name="testmethods"/>
70.641 + <sequential>
70.642 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
70.643 + <customize>
70.644 + <jvmarg line="${run.jvmargs}"/>
70.645 + <jvmarg line="${run.jvmargs.ide}"/>
70.646 + </customize>
70.647 + </j2seproject3:test-impl>
70.648 + </sequential>
70.649 + </macrodef>
70.650 + </target>
70.651 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
70.652 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
70.653 + <attribute default="${includes}" name="includes"/>
70.654 + <attribute default="${excludes}" name="excludes"/>
70.655 + <attribute default="**" name="testincludes"/>
70.656 + <attribute default="" name="testmethods"/>
70.657 + <element name="customizeDebuggee" optional="true"/>
70.658 + <sequential>
70.659 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
70.660 + <customize>
70.661 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
70.662 + <customizeDebuggee/>
70.663 + </customize>
70.664 + </j2seproject3:junit>
70.665 + </sequential>
70.666 + </macrodef>
70.667 + </target>
70.668 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
70.669 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
70.670 + <attribute default="${main.class}" name="testClass"/>
70.671 + <attribute default="" name="testMethod"/>
70.672 + <element name="customize2" optional="true"/>
70.673 + <sequential>
70.674 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
70.675 + <isset property="test.method"/>
70.676 + </condition>
70.677 + <condition else="-suitename sidemeanings -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
70.678 + <matches pattern=".*\.xml" string="@{testClass}"/>
70.679 + </condition>
70.680 + <delete dir="${build.test.results.dir}" quiet="true"/>
70.681 + <mkdir dir="${build.test.results.dir}"/>
70.682 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
70.683 + <customizeDebuggee>
70.684 + <customize2/>
70.685 + <jvmarg value="-ea"/>
70.686 + <arg line="${testng.debug.mode}"/>
70.687 + <arg line="-d ${build.test.results.dir}"/>
70.688 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
70.689 + <arg line="${testng.cmd.args}"/>
70.690 + </customizeDebuggee>
70.691 + </j2seproject3:debug>
70.692 + </sequential>
70.693 + </macrodef>
70.694 + </target>
70.695 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
70.696 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
70.697 + <attribute default="${main.class}" name="testClass"/>
70.698 + <attribute default="" name="testMethod"/>
70.699 + <element implicit="true" name="customize2" optional="true"/>
70.700 + <sequential>
70.701 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
70.702 + <customize2/>
70.703 + </j2seproject3:testng-debug>
70.704 + </sequential>
70.705 + </macrodef>
70.706 + </target>
70.707 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
70.708 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
70.709 + <attribute default="${includes}" name="includes"/>
70.710 + <attribute default="${excludes}" name="excludes"/>
70.711 + <attribute default="**" name="testincludes"/>
70.712 + <attribute default="" name="testmethods"/>
70.713 + <attribute default="${main.class}" name="testClass"/>
70.714 + <attribute default="" name="testMethod"/>
70.715 + <sequential>
70.716 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
70.717 + <customizeDebuggee>
70.718 + <jvmarg line="${run.jvmargs}"/>
70.719 + <jvmarg line="${run.jvmargs.ide}"/>
70.720 + </customizeDebuggee>
70.721 + </j2seproject3:test-debug-impl>
70.722 + </sequential>
70.723 + </macrodef>
70.724 + </target>
70.725 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
70.726 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
70.727 + <attribute default="${includes}" name="includes"/>
70.728 + <attribute default="${excludes}" name="excludes"/>
70.729 + <attribute default="**" name="testincludes"/>
70.730 + <attribute default="" name="testmethods"/>
70.731 + <attribute default="${main.class}" name="testClass"/>
70.732 + <attribute default="" name="testMethod"/>
70.733 + <sequential>
70.734 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
70.735 + <customize2>
70.736 + <syspropertyset>
70.737 + <propertyref prefix="test-sys-prop."/>
70.738 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
70.739 + </syspropertyset>
70.740 + </customize2>
70.741 + </j2seproject3:testng-debug-impl>
70.742 + </sequential>
70.743 + </macrodef>
70.744 + </target>
70.745 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
70.746 + <!--
70.747 + pre NB7.2 profiling section; consider it deprecated
70.748 + -->
70.749 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
70.750 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
70.751 + <!-- Empty placeholder for easier customization. -->
70.752 + <!-- You can override this target in the ../build.xml file. -->
70.753 + </target>
70.754 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
70.755 + <!-- Empty placeholder for easier customization. -->
70.756 + <!-- You can override this target in the ../build.xml file. -->
70.757 + </target>
70.758 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
70.759 + <macrodef name="resolve">
70.760 + <attribute name="name"/>
70.761 + <attribute name="value"/>
70.762 + <sequential>
70.763 + <property name="@{name}" value="${env.@{value}}"/>
70.764 + </sequential>
70.765 + </macrodef>
70.766 + <macrodef name="profile">
70.767 + <attribute default="${main.class}" name="classname"/>
70.768 + <element name="customize" optional="true"/>
70.769 + <sequential>
70.770 + <property environment="env"/>
70.771 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
70.772 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
70.773 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.774 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
70.775 + <jvmarg line="${profiler.info.jvmargs}"/>
70.776 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
70.777 + <arg line="${application.args}"/>
70.778 + <classpath>
70.779 + <path path="${run.classpath}"/>
70.780 + </classpath>
70.781 + <syspropertyset>
70.782 + <propertyref prefix="run-sys-prop."/>
70.783 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
70.784 + </syspropertyset>
70.785 + <customize/>
70.786 + </java>
70.787 + </sequential>
70.788 + </macrodef>
70.789 + </target>
70.790 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
70.791 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
70.792 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
70.793 + </target>
70.794 + <!--
70.795 + end of pre NB7.2 profiling section
70.796 + -->
70.797 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
70.798 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
70.799 <attribute default="${main.class}" name="name"/>
70.800 + <attribute default="${debug.modulepath}" name="modulepath"/>
70.801 <attribute default="${debug.classpath}" name="classpath"/>
70.802 <attribute default="" name="stopclassname"/>
70.803 <sequential>
70.804 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
70.805 + <modulepath>
70.806 + <path path="@{modulepath}"/>
70.807 + </modulepath>
70.808 <classpath>
70.809 <path path="@{classpath}"/>
70.810 </classpath>
70.811 @@ -291,18 +865,6 @@
70.812 </macrodef>
70.813 </target>
70.814 <target name="-init-debug-args">
70.815 - <property name="version-output" value="java version "${ant.java.version}"/>
70.816 - <condition property="have-jdk-older-than-1.4">
70.817 - <or>
70.818 - <contains string="${version-output}" substring="java version "1.0"/>
70.819 - <contains string="${version-output}" substring="java version "1.1"/>
70.820 - <contains string="${version-output}" substring="java version "1.2"/>
70.821 - <contains string="${version-output}" substring="java version "1.3"/>
70.822 - </or>
70.823 - </condition>
70.824 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
70.825 - <istrue value="${have-jdk-older-than-1.4}"/>
70.826 - </condition>
70.827 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
70.828 <os family="windows"/>
70.829 </condition>
70.830 @@ -312,17 +874,103 @@
70.831 </target>
70.832 <target depends="-init-debug-args" name="-init-macrodef-debug">
70.833 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
70.834 + <attribute default="${module.name}" name="modulename"/>
70.835 <attribute default="${main.class}" name="classname"/>
70.836 + <attribute default="${debug.modulepath}" name="modulepath"/>
70.837 <attribute default="${debug.classpath}" name="classpath"/>
70.838 + <element name="customizeDebuggee" optional="true"/>
70.839 + <sequential>
70.840 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
70.841 + <customize>
70.842 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
70.843 + <customizeDebuggee/>
70.844 + </customize>
70.845 + </j2seproject1:java>
70.846 + </sequential>
70.847 + </macrodef>
70.848 + </target>
70.849 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
70.850 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
70.851 + <attribute default="${module.name}" name="modulename"/>
70.852 + <attribute default="${main.class}" name="classname"/>
70.853 + <attribute default="${run.modulepath}" name="modulepath"/>
70.854 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
70.855 + <attribute default="${run.classpath}" name="classpath"/>
70.856 + <attribute default="jvm" name="jvm"/>
70.857 <element name="customize" optional="true"/>
70.858 <sequential>
70.859 - <java classname="@{classname}" dir="${work.dir}" fork="true">
70.860 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.861 - <jvmarg line="${debug-args-line}"/>
70.862 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
70.863 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
70.864 + <classpath>
70.865 + <path path="@{classpath}"/>
70.866 + </classpath>
70.867 + <modulepath>
70.868 + <pathelement path="@{modulepath}"/>
70.869 + <pathelement location="${module.build.classes.dir}"/>
70.870 + </modulepath>
70.871 + <upgrademodulepath>
70.872 + <path path="@{upgrademodulepath}"/>
70.873 + </upgrademodulepath>
70.874 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
70.875 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
70.876 <jvmarg line="${run.jvmargs}"/>
70.877 + <jvmarg line="${run.jvmargs.ide}"/>
70.878 + <syspropertyset>
70.879 + <propertyref prefix="run-sys-prop."/>
70.880 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
70.881 + </syspropertyset>
70.882 + <customize/>
70.883 + </java>
70.884 + </sequential>
70.885 + </macrodef>
70.886 + </target>
70.887 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
70.888 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
70.889 + <attribute default="" name="modulename"/>
70.890 + <attribute default="${main.class}" name="classname"/>
70.891 + <attribute default="${run.modulepath}" name="modulepath"/>
70.892 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
70.893 + <attribute default="${run.classpath}" name="classpath"/>
70.894 + <attribute default="jvm" name="jvm"/>
70.895 + <element name="customize" optional="true"/>
70.896 + <sequential>
70.897 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
70.898 + <classpath>
70.899 + <path path="@{classpath}"/>
70.900 + </classpath>
70.901 + <modulepath>
70.902 + <path path="@{modulepath}"/>
70.903 + </modulepath>
70.904 + <upgrademodulepath>
70.905 + <path path="@{upgrademodulepath}"/>
70.906 + </upgrademodulepath>
70.907 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
70.908 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
70.909 + <jvmarg line="${run.jvmargs}"/>
70.910 + <jvmarg line="${run.jvmargs.ide}"/>
70.911 + <syspropertyset>
70.912 + <propertyref prefix="run-sys-prop."/>
70.913 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
70.914 + </syspropertyset>
70.915 + <customize/>
70.916 + </java>
70.917 + </sequential>
70.918 + </macrodef>
70.919 + </target>
70.920 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
70.921 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
70.922 + <attribute default="" name="modulename"/>
70.923 + <attribute default="${main.class}" name="classname"/>
70.924 + <attribute default="" name="modulepath"/>
70.925 + <attribute default="${run.classpath}" name="classpath"/>
70.926 + <attribute default="jvm" name="jvm"/>
70.927 + <element name="customize" optional="true"/>
70.928 + <sequential>
70.929 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
70.930 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.931 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
70.932 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
70.933 + <jvmarg line="${run.jvmargs}"/>
70.934 + <jvmarg line="${run.jvmargs.ide}"/>
70.935 <classpath>
70.936 <path path="@{classpath}"/>
70.937 </classpath>
70.938 @@ -335,37 +983,70 @@
70.939 </sequential>
70.940 </macrodef>
70.941 </target>
70.942 - <target name="-init-macrodef-java">
70.943 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
70.944 - <attribute default="${main.class}" name="classname"/>
70.945 - <attribute default="${run.classpath}" name="classpath"/>
70.946 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
70.947 + <target name="-init-macrodef-copylibs">
70.948 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
70.949 + <attribute default="${manifest.file}" name="manifest"/>
70.950 <element name="customize" optional="true"/>
70.951 <sequential>
70.952 - <java classname="@{classname}" dir="${work.dir}" fork="true">
70.953 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
70.954 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
70.955 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
70.956 - <jvmarg line="${run.jvmargs}"/>
70.957 - <classpath>
70.958 - <path path="@{classpath}"/>
70.959 - </classpath>
70.960 - <syspropertyset>
70.961 - <propertyref prefix="run-sys-prop."/>
70.962 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
70.963 - </syspropertyset>
70.964 - <customize/>
70.965 - </java>
70.966 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
70.967 + <pathconvert property="run.classpath.without.build.classes.dir">
70.968 + <path path="${run.classpath}"/>
70.969 + <map from="${build.classes.dir.resolved}" to=""/>
70.970 + </pathconvert>
70.971 + <pathconvert pathsep=" " property="jar.classpath">
70.972 + <path path="${run.classpath.without.build.classes.dir}"/>
70.973 + <chainedmapper>
70.974 + <flattenmapper/>
70.975 + <filtermapper>
70.976 + <replacestring from=" " to="%20"/>
70.977 + </filtermapper>
70.978 + <globmapper from="*" to="lib/*"/>
70.979 + </chainedmapper>
70.980 + </pathconvert>
70.981 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
70.982 + <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}">
70.983 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
70.984 + <manifest>
70.985 + <attribute name="Class-Path" value="${jar.classpath}"/>
70.986 + <customize/>
70.987 + </manifest>
70.988 + </copylibs>
70.989 </sequential>
70.990 </macrodef>
70.991 </target>
70.992 <target name="-init-presetdef-jar">
70.993 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
70.994 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
70.995 - <j2seproject1:fileset dir="${build.classes.dir}"/>
70.996 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
70.997 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
70.998 </jar>
70.999 </presetdef>
70.1000 </target>
70.1001 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
70.1002 + <target name="-init-ap-cmdline-properties">
70.1003 + <property name="annotation.processing.enabled" value="true"/>
70.1004 + <property name="annotation.processing.processors.list" value=""/>
70.1005 + <property name="annotation.processing.processor.options" value=""/>
70.1006 + <property name="annotation.processing.run.all.processors" value="true"/>
70.1007 + <property name="javac.processorpath" value="${javac.classpath}"/>
70.1008 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
70.1009 + <condition property="ap.supported.internal" value="true">
70.1010 + <not>
70.1011 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
70.1012 + </not>
70.1013 + </condition>
70.1014 + </target>
70.1015 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
70.1016 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
70.1017 + <isfalse value="${annotation.processing.run.all.processors}"/>
70.1018 + </condition>
70.1019 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
70.1020 + <isfalse value="${annotation.processing.enabled}"/>
70.1021 + </condition>
70.1022 + </target>
70.1023 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
70.1024 + <property name="ap.cmd.line.internal" value=""/>
70.1025 + </target>
70.1026 + <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"/>
70.1027 <!--
70.1028 ===================
70.1029 COMPILATION SECTION
70.1030 @@ -392,7 +1073,9 @@
70.1031 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
70.1032 </target>
70.1033 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
70.1034 - <antcall target="clean"/>
70.1035 + <antcall target="clean">
70.1036 + <param name="no.dependencies" value="true"/>
70.1037 + </antcall>
70.1038 </target>
70.1039 <target depends="init,deps-jar" name="-pre-pre-compile">
70.1040 <mkdir dir="${build.classes.dir}"/>
70.1041 @@ -409,12 +1092,18 @@
70.1042 </pathconvert>
70.1043 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
70.1044 </target>
70.1045 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
70.1046 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
70.1047 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
70.1048 <copy todir="${build.classes.dir}">
70.1049 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
70.1050 </copy>
70.1051 </target>
70.1052 + <target if="has.persistence.xml" name="-copy-persistence-xml">
70.1053 + <mkdir dir="${build.classes.dir}/META-INF"/>
70.1054 + <copy todir="${build.classes.dir}/META-INF">
70.1055 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
70.1056 + </copy>
70.1057 + </target>
70.1058 <target name="-post-compile">
70.1059 <!-- Empty placeholder for easier customization. -->
70.1060 <!-- You can override this target in the ../build.xml file. -->
70.1061 @@ -427,7 +1116,7 @@
70.1062 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
70.1063 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
70.1064 <j2seproject3:force-recompile/>
70.1065 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
70.1066 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
70.1067 </target>
70.1068 <target name="-post-compile-single">
70.1069 <!-- Empty placeholder for easier customization. -->
70.1070 @@ -447,99 +1136,191 @@
70.1071 <!-- Empty placeholder for easier customization. -->
70.1072 <!-- You can override this target in the ../build.xml file. -->
70.1073 </target>
70.1074 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
70.1075 - <j2seproject1:jar/>
70.1076 + <target depends="init,compile" name="-check-module-main-class">
70.1077 + <pathconvert property="main.class.file">
70.1078 + <string value="${main.class}"/>
70.1079 + <unpackagemapper from="*" to="*.class"/>
70.1080 + </pathconvert>
70.1081 + <condition property="do.module.main.class">
70.1082 + <and>
70.1083 + <isset property="main.class.available"/>
70.1084 + <available file="${build.classes.dir}/module-info.class"/>
70.1085 + <available file="${build.classes.dir}/${main.class.file}"/>
70.1086 + <isset property="libs.CopyLibs.classpath"/>
70.1087 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
70.1088 + </and>
70.1089 + </condition>
70.1090 </target>
70.1091 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
70.1092 - <j2seproject1:jar manifest="${manifest.file}"/>
70.1093 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
70.1094 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
70.1095 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
70.1096 </target>
70.1097 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
70.1098 - <j2seproject1:jar manifest="${manifest.file}">
70.1099 - <j2seproject1:manifest>
70.1100 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
70.1101 - </j2seproject1:manifest>
70.1102 - </j2seproject1:jar>
70.1103 - <echo>To run this application from the command line without Ant, try:</echo>
70.1104 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
70.1105 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
70.1106 + <touch file="${tmp.manifest.file}" verbose="false"/>
70.1107 + </target>
70.1108 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
70.1109 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
70.1110 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
70.1111 + </target>
70.1112 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
70.1113 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
70.1114 + <attribute name="Main-Class" value="${main.class}"/>
70.1115 + </manifest>
70.1116 + </target>
70.1117 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
70.1118 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
70.1119 + <attribute name="Profile" value="${javac.profile}"/>
70.1120 + </manifest>
70.1121 + </target>
70.1122 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
70.1123 + <basename file="${application.splash}" property="splashscreen.basename"/>
70.1124 + <mkdir dir="${build.classes.dir}/META-INF"/>
70.1125 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
70.1126 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
70.1127 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
70.1128 + </manifest>
70.1129 + </target>
70.1130 + <target depends="init,compile" name="-check-do-mkdist">
70.1131 + <condition property="do.mkdist">
70.1132 + <and>
70.1133 + <isset property="do.archive"/>
70.1134 + <isset property="libs.CopyLibs.classpath"/>
70.1135 + <not>
70.1136 + <istrue value="${mkdist.disabled}"/>
70.1137 + </not>
70.1138 + <not>
70.1139 + <available file="${build.classes.dir}/module-info.class"/>
70.1140 + </not>
70.1141 + </and>
70.1142 + </condition>
70.1143 + </target>
70.1144 + <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">
70.1145 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
70.1146 + <echo level="info">To run this application from the command line without Ant, try:</echo>
70.1147 + <property location="${dist.jar}" name="dist.jar.resolved"/>
70.1148 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
70.1149 + </target>
70.1150 + <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">
70.1151 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
70.1152 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
70.1153 <property location="${dist.jar}" name="dist.jar.resolved"/>
70.1154 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
70.1155 + <isset property="named.module.internal"/>
70.1156 + </condition>
70.1157 <pathconvert property="run.classpath.with.dist.jar">
70.1158 <path path="${run.classpath}"/>
70.1159 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
70.1160 + </pathconvert>
70.1161 + <pathconvert property="run.modulepath.with.dist.jar">
70.1162 + <path location="${dist.jar.resolved}"/>
70.1163 + <path path="${run.modulepath}"/>
70.1164 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
70.1165 </pathconvert>
70.1166 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
70.1167 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
70.1168 + <isset property="named.module.internal"/>
70.1169 + </condition>
70.1170 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
70.1171 + <and>
70.1172 + <isset property="modules.supported.internal"/>
70.1173 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
70.1174 + </and>
70.1175 + </condition>
70.1176 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
70.1177 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
70.1178 + </condition>
70.1179 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
70.1180 + <isset property="do.module.main.class"/>
70.1181 + </condition>
70.1182 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
70.1183 + <isset property="named.module.internal"/>
70.1184 + </condition>
70.1185 + <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}">
70.1186 + <isset property="main.class.available"/>
70.1187 + </condition>
70.1188 + <condition else="debug" property="jar.usage.level" value="info">
70.1189 + <isset property="main.class.available"/>
70.1190 + </condition>
70.1191 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
70.1192 </target>
70.1193 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
70.1194 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
70.1195 - <pathconvert property="run.classpath.without.build.classes.dir">
70.1196 - <path path="${run.classpath}"/>
70.1197 - <map from="${build.classes.dir.resolved}" to=""/>
70.1198 - </pathconvert>
70.1199 - <pathconvert pathsep=" " property="jar.classpath">
70.1200 - <path path="${run.classpath.without.build.classes.dir}"/>
70.1201 - <chainedmapper>
70.1202 - <flattenmapper/>
70.1203 - <globmapper from="*" to="lib/*"/>
70.1204 - </chainedmapper>
70.1205 - </pathconvert>
70.1206 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
70.1207 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
70.1208 - <fileset dir="${build.classes.dir}"/>
70.1209 - <manifest>
70.1210 - <attribute name="Main-Class" value="${main.class}"/>
70.1211 - <attribute name="Class-Path" value="${jar.classpath}"/>
70.1212 - </manifest>
70.1213 - </copylibs>
70.1214 - <echo>To run this application from the command line without Ant, try:</echo>
70.1215 - <property location="${dist.jar}" name="dist.jar.resolved"/>
70.1216 - <echo>java -jar "${dist.jar.resolved}"</echo>
70.1217 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
70.1218 + <delete>
70.1219 + <fileset file="${tmp.manifest.file}"/>
70.1220 + </delete>
70.1221 </target>
70.1222 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
70.1223 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
70.1224 - <pathconvert property="run.classpath.without.build.classes.dir">
70.1225 - <path path="${run.classpath}"/>
70.1226 - <map from="${build.classes.dir.resolved}" to=""/>
70.1227 - </pathconvert>
70.1228 - <pathconvert pathsep=" " property="jar.classpath">
70.1229 - <path path="${run.classpath.without.build.classes.dir}"/>
70.1230 - <chainedmapper>
70.1231 - <flattenmapper/>
70.1232 - <globmapper from="*" to="lib/*"/>
70.1233 - </chainedmapper>
70.1234 - </pathconvert>
70.1235 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
70.1236 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
70.1237 - <fileset dir="${build.classes.dir}"/>
70.1238 - <manifest>
70.1239 - <attribute name="Class-Path" value="${jar.classpath}"/>
70.1240 - </manifest>
70.1241 - </copylibs>
70.1242 - </target>
70.1243 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
70.1244 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
70.1245 - <pathconvert property="run.classpath.without.build.classes.dir">
70.1246 - <path path="${run.classpath}"/>
70.1247 - <map from="${build.classes.dir.resolved}" to=""/>
70.1248 - </pathconvert>
70.1249 - <pathconvert pathsep=" " property="jar.classpath">
70.1250 - <path path="${run.classpath.without.build.classes.dir}"/>
70.1251 - <chainedmapper>
70.1252 - <flattenmapper/>
70.1253 - <globmapper from="*" to="lib/*"/>
70.1254 - </chainedmapper>
70.1255 - </pathconvert>
70.1256 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
70.1257 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
70.1258 - <fileset dir="${build.classes.dir}"/>
70.1259 - <manifest>
70.1260 - <attribute name="Class-Path" value="${jar.classpath}"/>
70.1261 - </manifest>
70.1262 - </copylibs>
70.1263 - </target>
70.1264 + <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"/>
70.1265 + <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"/>
70.1266 <target name="-post-jar">
70.1267 <!-- Empty placeholder for easier customization. -->
70.1268 <!-- You can override this target in the ../build.xml file. -->
70.1269 </target>
70.1270 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
70.1271 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
70.1272 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
70.1273 + <!--
70.1274 + =================
70.1275 + DEPLOY SECTION
70.1276 + =================
70.1277 + -->
70.1278 + <target name="-pre-deploy">
70.1279 + <!-- Empty placeholder for easier customization. -->
70.1280 + <!-- You can override this target in the ../build.xml file. -->
70.1281 + </target>
70.1282 + <target depends="init" name="-check-jlink">
70.1283 + <condition property="do.jlink.internal">
70.1284 + <and>
70.1285 + <istrue value="${do.jlink}"/>
70.1286 + <isset property="do.archive"/>
70.1287 + <isset property="named.module.internal"/>
70.1288 + </and>
70.1289 + </condition>
70.1290 + </target>
70.1291 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
70.1292 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
70.1293 + <property name="jlink.launcher.name" value="${application.title}"/>
70.1294 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
70.1295 + <and>
70.1296 + <isset property="jlink.additionalmodules"/>
70.1297 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
70.1298 + </and>
70.1299 + </condition>
70.1300 + <condition property="jlink.do.strip.internal">
70.1301 + <and>
70.1302 + <isset property="jlink.strip"/>
70.1303 + <istrue value="${jlink.strip}"/>
70.1304 + </and>
70.1305 + </condition>
70.1306 + <condition property="jlink.do.additionalparam.internal">
70.1307 + <and>
70.1308 + <isset property="jlink.additionalparam"/>
70.1309 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
70.1310 + </and>
70.1311 + </condition>
70.1312 + <condition property="jlink.do.launcher.internal">
70.1313 + <and>
70.1314 + <istrue value="${jlink.launcher}"/>
70.1315 + <isset property="main.class.available"/>
70.1316 + </and>
70.1317 + </condition>
70.1318 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
70.1319 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
70.1320 + <exec executable="${platform.jlink}">
70.1321 + <arg value="--module-path"/>
70.1322 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
70.1323 + <arg value="--add-modules"/>
70.1324 + <arg value="${jlink.add.modules}"/>
70.1325 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
70.1326 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
70.1327 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
70.1328 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
70.1329 + <arg value="--output"/>
70.1330 + <arg value="${dist.jlink.output}"/>
70.1331 + </exec>
70.1332 + </target>
70.1333 + <target name="-post-deploy">
70.1334 + <!-- Empty placeholder for easier customization. -->
70.1335 + <!-- You can override this target in the ../build.xml file. -->
70.1336 + </target>
70.1337 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
70.1338 <!--
70.1339 =================
70.1340 EXECUTION SECTION
70.1341 @@ -576,9 +1357,9 @@
70.1342 </target>
70.1343 <target depends="init,compile" name="-debug-start-debuggee">
70.1344 <j2seproject3:debug>
70.1345 - <customize>
70.1346 + <customizeDebuggee>
70.1347 <arg line="${application.args}"/>
70.1348 - </customize>
70.1349 + </customizeDebuggee>
70.1350 </j2seproject3:debug>
70.1351 </target>
70.1352 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
70.1353 @@ -605,23 +1386,146 @@
70.1354 </target>
70.1355 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
70.1356 <!--
70.1357 + =================
70.1358 + PROFILING SECTION
70.1359 + =================
70.1360 + -->
70.1361 + <!--
70.1362 + pre NB7.2 profiler integration
70.1363 + -->
70.1364 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
70.1365 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
70.1366 + <nbprofiledirect>
70.1367 + <classpath>
70.1368 + <path path="${run.classpath}"/>
70.1369 + </classpath>
70.1370 + </nbprofiledirect>
70.1371 + <profile/>
70.1372 + </target>
70.1373 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
70.1374 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
70.1375 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
70.1376 + <nbprofiledirect>
70.1377 + <classpath>
70.1378 + <path path="${run.classpath}"/>
70.1379 + </classpath>
70.1380 + </nbprofiledirect>
70.1381 + <profile classname="${profile.class}"/>
70.1382 + </target>
70.1383 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
70.1384 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
70.1385 + <nbprofiledirect>
70.1386 + <classpath>
70.1387 + <path path="${run.classpath}"/>
70.1388 + </classpath>
70.1389 + </nbprofiledirect>
70.1390 + <profile classname="sun.applet.AppletViewer">
70.1391 + <customize>
70.1392 + <arg value="${applet.url}"/>
70.1393 + </customize>
70.1394 + </profile>
70.1395 + </target>
70.1396 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
70.1397 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
70.1398 + <nbprofiledirect>
70.1399 + <classpath>
70.1400 + <path path="${run.test.classpath}"/>
70.1401 + </classpath>
70.1402 + </nbprofiledirect>
70.1403 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
70.1404 + <customize>
70.1405 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
70.1406 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
70.1407 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
70.1408 + <jvmarg line="${profiler.info.jvmargs}"/>
70.1409 + <classpath>
70.1410 + <path path="${run.test.classpath}"/>
70.1411 + </classpath>
70.1412 + </customize>
70.1413 + </j2seproject3:junit>
70.1414 + </target>
70.1415 + <!--
70.1416 + end of pre NB72 profiling section
70.1417 + -->
70.1418 + <target if="netbeans.home" name="-profile-check">
70.1419 + <condition property="profiler.configured">
70.1420 + <or>
70.1421 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
70.1422 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
70.1423 + </or>
70.1424 + </condition>
70.1425 + </target>
70.1426 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
70.1427 + <startprofiler/>
70.1428 + <antcall target="run"/>
70.1429 + </target>
70.1430 + <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">
70.1431 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
70.1432 + <startprofiler/>
70.1433 + <antcall target="run-single"/>
70.1434 + </target>
70.1435 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
70.1436 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
70.1437 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
70.1438 + <startprofiler/>
70.1439 + <antcall target="test-single"/>
70.1440 + </target>
70.1441 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
70.1442 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
70.1443 + <startprofiler/>
70.1444 + <antcall target="run-test-with-main"/>
70.1445 + </target>
70.1446 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
70.1447 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
70.1448 + <startprofiler/>
70.1449 + <antcall target="run-applet"/>
70.1450 + </target>
70.1451 + <!--
70.1452 ===============
70.1453 JAVADOC SECTION
70.1454 ===============
70.1455 -->
70.1456 - <target depends="init" name="-javadoc-build">
70.1457 + <target depends="init" if="have.sources" name="-javadoc-build">
70.1458 <mkdir dir="${dist.javadoc.dir}"/>
70.1459 - <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}">
70.1460 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
70.1461 + <and>
70.1462 + <isset property="endorsed.classpath.cmd.line.arg"/>
70.1463 + <not>
70.1464 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
70.1465 + </not>
70.1466 + </and>
70.1467 + </condition>
70.1468 + <condition else="" property="bug5101868workaround" value="*.java">
70.1469 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
70.1470 + </condition>
70.1471 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
70.1472 + <and>
70.1473 + <isset property="javadoc.html5"/>
70.1474 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
70.1475 + </and>
70.1476 + </condition>
70.1477 + <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}">
70.1478 <classpath>
70.1479 <path path="${javac.classpath}"/>
70.1480 </classpath>
70.1481 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
70.1482 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
70.1483 <filename name="**/*.java"/>
70.1484 </fileset>
70.1485 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
70.1486 <include name="**/*.java"/>
70.1487 + <exclude name="*.java"/>
70.1488 </fileset>
70.1489 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
70.1490 + <arg line="${javadoc.html5.cmd.line.arg}"/>
70.1491 </javadoc>
70.1492 + <copy todir="${dist.javadoc.dir}">
70.1493 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
70.1494 + <filename name="**/doc-files/**"/>
70.1495 + </fileset>
70.1496 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
70.1497 + <include name="**/doc-files/**"/>
70.1498 + </fileset>
70.1499 + </copy>
70.1500 </target>
70.1501 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
70.1502 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
70.1503 @@ -629,7 +1533,7 @@
70.1504 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
70.1505 <!--
70.1506 =========================
70.1507 - JUNIT COMPILATION SECTION
70.1508 + TEST COMPILATION SECTION
70.1509 =========================
70.1510 -->
70.1511 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
70.1512 @@ -639,11 +1543,63 @@
70.1513 <!-- Empty placeholder for easier customization. -->
70.1514 <!-- You can override this target in the ../build.xml file. -->
70.1515 </target>
70.1516 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
70.1517 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
70.1518 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
70.1519 + <and>
70.1520 + <isset property="test.module.name"/>
70.1521 + <length length="0" string="${test.module.name}" when="greater"/>
70.1522 + </and>
70.1523 + </condition>
70.1524 + <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">
70.1525 + <and>
70.1526 + <isset property="test.module.name"/>
70.1527 + <length length="0" string="${test.module.name}" when="greater"/>
70.1528 + </and>
70.1529 + </condition>
70.1530 + </target>
70.1531 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
70.1532 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
70.1533 + <and>
70.1534 + <isset property="test.module.name"/>
70.1535 + <length length="0" string="${test.module.name}" when="greater"/>
70.1536 + </and>
70.1537 + </condition>
70.1538 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
70.1539 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
70.1540 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
70.1541 + <chainedmapper>
70.1542 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
70.1543 + <filtermapper>
70.1544 + <uniqfilter/>
70.1545 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
70.1546 + </filtermapper>
70.1547 + <cutdirsmapper dirs="1"/>
70.1548 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
70.1549 + </chainedmapper>
70.1550 + </pathconvert>
70.1551 + <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}">
70.1552 + <and>
70.1553 + <isset property="test.module.name"/>
70.1554 + <length length="0" string="${test.module.name}" when="greater"/>
70.1555 + </and>
70.1556 + </condition>
70.1557 + </target>
70.1558 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
70.1559 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
70.1560 + <property name="javac.test.compilerargs" value=""/>
70.1561 + <property name="run.test.jvmargs" value=""/>
70.1562 + </target>
70.1563 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
70.1564 <target if="do.depend.true" name="-compile-test-depend">
70.1565 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
70.1566 </target>
70.1567 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
70.1568 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
70.1569 + <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">
70.1570 + <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}">
70.1571 + <customize>
70.1572 + <compilerarg line="${javac.test.compilerargs}"/>
70.1573 + </customize>
70.1574 + </j2seproject3:javac>
70.1575 <copy todir="${build.test.classes.dir}">
70.1576 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
70.1577 </copy>
70.1578 @@ -657,10 +1613,14 @@
70.1579 <!-- Empty placeholder for easier customization. -->
70.1580 <!-- You can override this target in the ../build.xml file. -->
70.1581 </target>
70.1582 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
70.1583 + <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">
70.1584 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
70.1585 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
70.1586 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
70.1587 + <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}">
70.1588 + <customize>
70.1589 + <compilerarg line="${javac.test.compilerargs}"/>
70.1590 + </customize>
70.1591 + </j2seproject3:javac>
70.1592 <copy todir="${build.test.classes.dir}">
70.1593 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
70.1594 </copy>
70.1595 @@ -672,14 +1632,14 @@
70.1596 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
70.1597 <!--
70.1598 =======================
70.1599 - JUNIT EXECUTION SECTION
70.1600 + TEST EXECUTION SECTION
70.1601 =======================
70.1602 -->
70.1603 <target depends="init" if="have.tests" name="-pre-test-run">
70.1604 <mkdir dir="${build.test.results.dir}"/>
70.1605 </target>
70.1606 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
70.1607 - <j2seproject3:junit testincludes="**/*Test.java"/>
70.1608 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
70.1609 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
70.1610 </target>
70.1611 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
70.1612 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
70.1613 @@ -690,41 +1650,42 @@
70.1614 <target depends="init" if="have.tests" name="-pre-test-run-single">
70.1615 <mkdir dir="${build.test.results.dir}"/>
70.1616 </target>
70.1617 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
70.1618 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
70.1619 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
70.1620 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
70.1621 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
70.1622 </target>
70.1623 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
70.1624 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
70.1625 </target>
70.1626 - <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"/>
70.1627 + <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"/>
70.1628 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
70.1629 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
70.1630 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
70.1631 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
70.1632 + </target>
70.1633 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
70.1634 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
70.1635 + </target>
70.1636 + <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"/>
70.1637 <!--
70.1638 =======================
70.1639 - JUNIT DEBUGGING SECTION
70.1640 + TEST DEBUGGING SECTION
70.1641 =======================
70.1642 -->
70.1643 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
70.1644 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
70.1645 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
70.1646 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
70.1647 - <delete file="${test.report.file}"/>
70.1648 - <mkdir dir="${build.test.results.dir}"/>
70.1649 - <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}">
70.1650 - <customize>
70.1651 - <syspropertyset>
70.1652 - <propertyref prefix="test-sys-prop."/>
70.1653 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
70.1654 - </syspropertyset>
70.1655 - <arg value="${test.class}"/>
70.1656 - <arg value="showoutput=true"/>
70.1657 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
70.1658 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
70.1659 - </customize>
70.1660 - </j2seproject3:debug>
70.1661 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
70.1662 + </target>
70.1663 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
70.1664 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
70.1665 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
70.1666 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
70.1667 </target>
70.1668 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
70.1669 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
70.1670 </target>
70.1671 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
70.1672 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
70.1673 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
70.1674 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
70.1675 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
70.1676 </target>
70.1677 @@ -750,9 +1711,9 @@
70.1678 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
70.1679 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
70.1680 <j2seproject3:debug classname="sun.applet.AppletViewer">
70.1681 - <customize>
70.1682 + <customizeDebuggee>
70.1683 <arg value="${applet.url}"/>
70.1684 - </customize>
70.1685 + </customizeDebuggee>
70.1686 </j2seproject3:debug>
70.1687 </target>
70.1688 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
70.1689 @@ -779,7 +1740,8 @@
70.1690 </target>
70.1691 <target depends="init" name="-do-clean">
70.1692 <delete dir="${build.dir}"/>
70.1693 - <delete dir="${dist.dir}"/>
70.1694 + <delete dir="${dist.jlink.output}"/>
70.1695 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
70.1696 </target>
70.1697 <target name="-post-clean">
70.1698 <!-- Empty placeholder for easier customization. -->
70.1699 @@ -789,9 +1751,12 @@
70.1700 <target name="-check-call-dep">
70.1701 <property file="${call.built.properties}" prefix="already.built."/>
70.1702 <condition property="should.call.dep">
70.1703 - <not>
70.1704 - <isset property="already.built.${call.subproject}"/>
70.1705 - </not>
70.1706 + <and>
70.1707 + <not>
70.1708 + <isset property="already.built.${call.subproject}"/>
70.1709 + </not>
70.1710 + <available file="${call.script}"/>
70.1711 + </and>
70.1712 </condition>
70.1713 </target>
70.1714 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
71.1 --- a/samples/sidemeanings/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
71.2 +++ b/samples/sidemeanings/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
71.3 @@ -1,8 +1,8 @@
71.4 build.xml.data.CRC32=ff1f72f4
71.5 -build.xml.script.CRC32=c38b508c
71.6 -build.xml.stylesheet.CRC32=958a1d3e@1.32.0.45
71.7 +build.xml.script.CRC32=cee23366
71.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
71.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
71.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
71.11 nbproject/build-impl.xml.data.CRC32=ff1f72f4
71.12 -nbproject/build-impl.xml.script.CRC32=a5ebb2f7
71.13 -nbproject/build-impl.xml.stylesheet.CRC32=43814ccb@1.32.0.45
71.14 +nbproject/build-impl.xml.script.CRC32=55245701
71.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
72.1 --- a/samples/sidemeanings/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
72.2 +++ b/samples/sidemeanings/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
72.3 @@ -1,61 +1,57 @@
72.4 +#Mon Nov 11 13:15:52 CET 2019
72.5 +excludes=
72.6 +javac.deprecation=false
72.7 +build.test.results.dir=${build.dir}/test/results
72.8 +run.classpath=${javac.classpath}\:${build.classes.dir}
72.9 +javadoc.nonavbar=false
72.10 +javac.test.modulepath=${javac.modulepath}
72.11 +run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
72.12 +javac.target=1.6
72.13 +javadoc.noindex=false
72.14 +javac.processormodulepath=
72.15 +javadoc.additionalparam=
72.16 +includes=**
72.17 build.classes.dir=${build.dir}/classes
72.18 +source.encoding=UTF-8
72.19 +javadoc.author=false
72.20 +test.src.dir=test
72.21 +build.dir=build
72.22 +build.test.classes.dir=${build.dir}/test/classes
72.23 +run.modulepath=${javac.modulepath}
72.24 +platform.active=default_platform
72.25 +javac.compilerargs=
72.26 +dist.jar=${dist.dir}/sidemeanings.jar
72.27 +javadoc.use=true
72.28 +build.sysclasspath=ignore
72.29 +debug.test.classpath=${run.test.classpath}
72.30 +dist.dir=dist
72.31 build.classes.excludes=**/*.java,**/*.form
72.32 -# This directory is removed when the project is cleaned:
72.33 -build.dir=build
72.34 +javadoc.splitindex=true
72.35 +javadoc.encoding=${source.encoding}
72.36 +javac.source=1.6
72.37 +javac.modulepath=
72.38 +junit.selected.version=3
72.39 +file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
72.40 +debug.classpath=${run.classpath}
72.41 +run.jvmargs=
72.42 +run.test.modulepath=${javac.test.modulepath}
72.43 +jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
72.44 build.generated.dir=${build.dir}/generated
72.45 -build.generated.sources.dir=${build.dir}/generated-sources
72.46 -# Only compile against the classpath explicitly listed here:
72.47 -build.sysclasspath=ignore
72.48 -build.test.classes.dir=${build.dir}/test/classes
72.49 -build.test.results.dir=${build.dir}/test/results
72.50 -debug.classpath=\
72.51 - ${run.classpath}
72.52 -debug.test.classpath=\
72.53 - ${run.test.classpath}
72.54 -# This directory is removed when the project is cleaned:
72.55 -dist.dir=dist
72.56 -dist.jar=${dist.dir}/sidemeanings.jar
72.57 -dist.javadoc.dir=${dist.dir}/javadoc
72.58 -excludes=
72.59 -file.reference.junit-4.4.jar=../libs/dist/junit-4.4.jar
72.60 -includes=**
72.61 jar.compress=false
72.62 -javac.classpath=
72.63 -# Space-separated list of extra javac options
72.64 -javac.compilerargs=
72.65 -javac.deprecation=false
72.66 -javac.source=1.5
72.67 -javac.target=1.5
72.68 javac.test.classpath=\
72.69 ${javac.classpath}:\
72.70 ${build.classes.dir}:\
72.71 - ${libs.junit.classpath}:\
72.72 ${libs.junit_4.classpath}:\
72.73 - ${file.reference.junit-4.4.jar}
72.74 -javadoc.additionalparam=
72.75 -javadoc.author=false
72.76 -javadoc.encoding=${source.encoding}
72.77 -javadoc.noindex=false
72.78 -javadoc.nonavbar=false
72.79 -javadoc.notree=false
72.80 + ${file.reference.junit-4.4.jar}:\
72.81 + ${libs.hamcrest.classpath}
72.82 javadoc.private=false
72.83 -javadoc.splitindex=true
72.84 -javadoc.use=true
72.85 +debug.test.modulepath=${run.test.modulepath}
72.86 +meta.inf.dir=${src.dir}/META-INF
72.87 +dist.javadoc.dir=${dist.dir}/javadoc
72.88 +src.dir=src
72.89 +debug.modulepath=${run.modulepath}
72.90 +javac.classpath=
72.91 +build.generated.sources.dir=${build.dir}/generated-sources
72.92 javadoc.version=false
72.93 javadoc.windowtitle=
72.94 -jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
72.95 -meta.inf.dir=${src.dir}/META-INF
72.96 -platform.active=default_platform
72.97 -run.classpath=\
72.98 - ${javac.classpath}:\
72.99 - ${build.classes.dir}
72.100 -# Space-separated list of JVM arguments used when running the project
72.101 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
72.102 -# or test-sys-prop.name=value to set system properties for unit tests):
72.103 -run.jvmargs=
72.104 -run.test.classpath=\
72.105 - ${javac.test.classpath}:\
72.106 - ${build.test.classes.dir}
72.107 -source.encoding=UTF-8
72.108 -src.dir=src
72.109 -test.src.dir=test
72.110 +javadoc.notree=false
73.1 --- a/samples/singletons/build.xml Mon Nov 11 05:47:32 2019 +0100
73.2 +++ b/samples/singletons/build.xml Mon Nov 11 13:17:34 2019 +0100
73.3 @@ -51,8 +51,7 @@
73.4 -init-macrodef-junit: defines macro for junit execution
73.5 -init-macrodef-debug: defines macro for class debugging
73.6 -init-macrodef-java: defines macro for class execution
73.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
73.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
73.9 + -do-jar: JAR building
73.10 run: execution of project
73.11 -javadoc-build: Javadoc generation
73.12 test-report: JUnit report generation
74.1 --- a/samples/singletons/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
74.2 +++ b/samples/singletons/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
74.3 @@ -12,18 +12,18 @@
74.4 - execution
74.5 - debugging
74.6 - javadoc
74.7 - - junit compilation
74.8 - - junit execution
74.9 - - junit debugging
74.10 + - test compilation
74.11 + - test execution
74.12 + - test debugging
74.13 - applet
74.14 - cleanup
74.15
74.16 -->
74.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="singletons-impl">
74.18 - <fail message="Please build using Ant 1.7.1 or higher.">
74.19 +<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="singletons-impl">
74.20 + <fail message="Please build using Ant 1.8.0 or higher.">
74.21 <condition>
74.22 <not>
74.23 - <antversion atleast="1.7.1"/>
74.24 + <antversion atleast="1.8.0"/>
74.25 </not>
74.26 </condition>
74.27 </fail>
74.28 @@ -46,15 +46,89 @@
74.29 <property file="${user.properties.file}"/>
74.30 <!-- The two properties below are usually overridden -->
74.31 <!-- by the active platform. Just a fallback. -->
74.32 - <property name="default.javac.source" value="1.4"/>
74.33 - <property name="default.javac.target" value="1.4"/>
74.34 + <property name="default.javac.source" value="1.6"/>
74.35 + <property name="default.javac.target" value="1.6"/>
74.36 </target>
74.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
74.38 <property file="nbproject/configs/${config}.properties"/>
74.39 <property file="nbproject/project.properties"/>
74.40 </target>
74.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
74.42 + <target name="-init-modules-supported">
74.43 + <condition property="modules.supported.internal" value="true">
74.44 + <not>
74.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
74.46 + </not>
74.47 + </condition>
74.48 + </target>
74.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
74.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
74.51 + <attribute name="property"/>
74.52 + <attribute name="sourcepath"/>
74.53 + <sequential>
74.54 + <loadresource property="@{property}" quiet="true">
74.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
74.56 + <filterchain>
74.57 + <stripjavacomments/>
74.58 + <linecontainsregexp>
74.59 + <regexp pattern="module .* \{"/>
74.60 + </linecontainsregexp>
74.61 + <tokenfilter>
74.62 + <linetokenizer/>
74.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
74.64 + </tokenfilter>
74.65 + <striplinebreaks/>
74.66 + </filterchain>
74.67 + </loadresource>
74.68 + </sequential>
74.69 + </macrodef>
74.70 + </target>
74.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
74.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
74.73 + <condition>
74.74 + <not>
74.75 + <antversion atleast="1.10.0"/>
74.76 + </not>
74.77 + </condition>
74.78 + </fail>
74.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
74.80 + <condition property="named.module.internal">
74.81 + <and>
74.82 + <isset property="module.name"/>
74.83 + <length length="0" string="${module.name}" when="greater"/>
74.84 + </and>
74.85 + </condition>
74.86 + <condition property="unnamed.module.internal">
74.87 + <not>
74.88 + <isset property="named.module.internal"/>
74.89 + </not>
74.90 + </condition>
74.91 + <property name="javac.modulepath" value=""/>
74.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
74.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
74.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
74.95 + <property name="javac.upgrademodulepath" value=""/>
74.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
74.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
74.98 + <and>
74.99 + <isset property="javac.systemmodulepath"/>
74.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
74.101 + </and>
74.102 + </condition>
74.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
74.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
74.105 + <property name="module.name" value=""/>
74.106 + </target>
74.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
74.108 + <property name="platform.java" value="${java.home}/bin/java"/>
74.109 <available file="${manifest.file}" property="manifest.available"/>
74.110 + <condition property="splashscreen.available">
74.111 + <and>
74.112 + <not>
74.113 + <equals arg1="${application.splash}" arg2="" trim="true"/>
74.114 + </not>
74.115 + <available file="${application.splash}"/>
74.116 + </and>
74.117 + </condition>
74.118 <condition property="main.class.available">
74.119 <and>
74.120 <isset property="main.class"/>
74.121 @@ -63,43 +137,46 @@
74.122 </not>
74.123 </and>
74.124 </condition>
74.125 - <condition property="manifest.available+main.class">
74.126 + <condition property="profile.available">
74.127 <and>
74.128 - <isset property="manifest.available"/>
74.129 - <isset property="main.class.available"/>
74.130 - </and>
74.131 - </condition>
74.132 - <condition property="do.mkdist">
74.133 - <and>
74.134 - <isset property="libs.CopyLibs.classpath"/>
74.135 + <isset property="javac.profile"/>
74.136 + <length length="0" string="${javac.profile}" when="greater"/>
74.137 <not>
74.138 - <istrue value="${mkdist.disabled}"/>
74.139 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
74.140 </not>
74.141 </and>
74.142 </condition>
74.143 - <condition property="manifest.available+main.class+mkdist.available">
74.144 + <condition property="do.archive">
74.145 + <or>
74.146 + <not>
74.147 + <istrue value="${jar.archive.disabled}"/>
74.148 + </not>
74.149 + <istrue value="${not.archive.disabled}"/>
74.150 + </or>
74.151 + </condition>
74.152 + <condition property="do.archive+manifest.available">
74.153 <and>
74.154 - <istrue value="${manifest.available+main.class}"/>
74.155 - <isset property="do.mkdist"/>
74.156 + <isset property="manifest.available"/>
74.157 + <istrue value="${do.archive}"/>
74.158 </and>
74.159 </condition>
74.160 - <condition property="manifest.available+mkdist.available">
74.161 + <condition property="do.archive+main.class.available">
74.162 <and>
74.163 - <istrue value="${manifest.available}"/>
74.164 - <isset property="do.mkdist"/>
74.165 + <isset property="main.class.available"/>
74.166 + <istrue value="${do.archive}"/>
74.167 </and>
74.168 </condition>
74.169 - <condition property="manifest.available-mkdist.available">
74.170 - <or>
74.171 - <istrue value="${manifest.available}"/>
74.172 - <isset property="do.mkdist"/>
74.173 - </or>
74.174 + <condition property="do.archive+splashscreen.available">
74.175 + <and>
74.176 + <isset property="splashscreen.available"/>
74.177 + <istrue value="${do.archive}"/>
74.178 + </and>
74.179 </condition>
74.180 - <condition property="manifest.available+main.class-mkdist.available">
74.181 - <or>
74.182 - <istrue value="${manifest.available+main.class}"/>
74.183 - <isset property="do.mkdist"/>
74.184 - </or>
74.185 + <condition property="do.archive+profile.available">
74.186 + <and>
74.187 + <isset property="profile.available"/>
74.188 + <istrue value="${do.archive}"/>
74.189 + </and>
74.190 </condition>
74.191 <condition property="have.tests">
74.192 <or>
74.193 @@ -124,6 +201,7 @@
74.194 </and>
74.195 </condition>
74.196 <property name="run.jvmargs" value=""/>
74.197 + <property name="run.jvmargs.ide" value=""/>
74.198 <property name="javac.compilerargs" value=""/>
74.199 <property name="work.dir" value="${basedir}"/>
74.200 <condition property="no.deps">
74.201 @@ -136,6 +214,7 @@
74.202 <property name="application.args" value=""/>
74.203 <property name="source.encoding" value="${file.encoding}"/>
74.204 <property name="runtime.encoding" value="${source.encoding}"/>
74.205 + <property name="manifest.encoding" value="${source.encoding}"/>
74.206 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
74.207 <and>
74.208 <isset property="javadoc.encoding"/>
74.209 @@ -153,9 +232,56 @@
74.210 </condition>
74.211 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
74.212 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
74.213 - <length length="0" string="${endorsed.classpath}" when="greater"/>
74.214 + <and>
74.215 + <isset property="endorsed.classpath"/>
74.216 + <not>
74.217 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
74.218 + </not>
74.219 + </and>
74.220 </condition>
74.221 - <property name="javac.fork" value="false"/>
74.222 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
74.223 + <isset property="profile.available"/>
74.224 + </condition>
74.225 + <condition else="false" property="jdkBug6558476">
74.226 + <and>
74.227 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
74.228 + <not>
74.229 + <os family="unix"/>
74.230 + </not>
74.231 + </and>
74.232 + </condition>
74.233 + <condition else="false" property="javac.fork">
74.234 + <or>
74.235 + <istrue value="${jdkBug6558476}"/>
74.236 + <istrue value="${javac.external.vm}"/>
74.237 + </or>
74.238 + </condition>
74.239 + <property name="jar.index" value="false"/>
74.240 + <property name="jar.index.metainf" value="${jar.index}"/>
74.241 + <property name="copylibs.rebase" value="true"/>
74.242 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
74.243 + <condition property="junit.available">
74.244 + <or>
74.245 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
74.246 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
74.247 + </or>
74.248 + </condition>
74.249 + <condition property="testng.available">
74.250 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
74.251 + </condition>
74.252 + <condition property="junit+testng.available">
74.253 + <and>
74.254 + <istrue value="${junit.available}"/>
74.255 + <istrue value="${testng.available}"/>
74.256 + </and>
74.257 + </condition>
74.258 + <condition else="testng" property="testng.mode" value="mixed">
74.259 + <istrue value="${junit+testng.available}"/>
74.260 + </condition>
74.261 + <condition else="" property="testng.debug.mode" value="-mixed">
74.262 + <istrue value="${junit+testng.available}"/>
74.263 + </condition>
74.264 + <property name="java.failonerror" value="true"/>
74.265 </target>
74.266 <target name="-post-init">
74.267 <!-- Empty placeholder for easier customization. -->
74.268 @@ -182,11 +308,125 @@
74.269 </sequential>
74.270 </macrodef>
74.271 </target>
74.272 - <target name="-init-macrodef-javac">
74.273 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
74.274 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
74.275 <attribute default="${src.dir}" name="srcdir"/>
74.276 <attribute default="${build.classes.dir}" name="destdir"/>
74.277 <attribute default="${javac.classpath}" name="classpath"/>
74.278 + <attribute default="${javac.modulepath}" name="modulepath"/>
74.279 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
74.280 + <attribute default="${javac.processorpath}" name="processorpath"/>
74.281 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
74.282 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
74.283 + <attribute default="${includes}" name="includes"/>
74.284 + <attribute default="${excludes}" name="excludes"/>
74.285 + <attribute default="${javac.debug}" name="debug"/>
74.286 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
74.287 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
74.288 + <attribute default="${empty.dir}" name="gensrcdir"/>
74.289 + <element name="customize" optional="true"/>
74.290 + <sequential>
74.291 + <condition property="warn.excludes.internal">
74.292 + <and>
74.293 + <isset property="named.module.internal"/>
74.294 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
74.295 + </and>
74.296 + </condition>
74.297 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
74.298 + <property location="${build.dir}/empty" name="empty.dir"/>
74.299 + <mkdir dir="${empty.dir}"/>
74.300 + <mkdir dir="@{apgeneratedsrcdir}"/>
74.301 + <condition property="processormodulepath.set">
74.302 + <resourcecount count="0" when="greater">
74.303 + <path>
74.304 + <pathelement path="@{processormodulepath}"/>
74.305 + </path>
74.306 + </resourcecount>
74.307 + </condition>
74.308 + <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}">
74.309 + <src>
74.310 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
74.311 + <include name="*"/>
74.312 + </dirset>
74.313 + </src>
74.314 + <classpath>
74.315 + <path path="@{classpath}"/>
74.316 + </classpath>
74.317 + <modulepath>
74.318 + <path path="@{modulepath}"/>
74.319 + </modulepath>
74.320 + <upgrademodulepath>
74.321 + <path path="@{upgrademodulepath}"/>
74.322 + </upgrademodulepath>
74.323 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
74.324 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
74.325 + <compilerarg line="${javac.compilerargs}"/>
74.326 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
74.327 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
74.328 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
74.329 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
74.330 + <compilerarg line="${ap.processors.internal}"/>
74.331 + <compilerarg line="${annotation.processing.processor.options}"/>
74.332 + <compilerarg value="-s"/>
74.333 + <compilerarg path="@{apgeneratedsrcdir}"/>
74.334 + <compilerarg line="${ap.proc.none.internal}"/>
74.335 + <customize/>
74.336 + </javac>
74.337 + </sequential>
74.338 + </macrodef>
74.339 + </target>
74.340 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
74.341 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
74.342 + <attribute default="${src.dir}" name="srcdir"/>
74.343 + <attribute default="${build.classes.dir}" name="destdir"/>
74.344 + <attribute default="${javac.classpath}" name="classpath"/>
74.345 + <attribute default="${javac.modulepath}" name="modulepath"/>
74.346 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
74.347 + <attribute default="${javac.processorpath}" name="processorpath"/>
74.348 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
74.349 + <attribute default="${includes}" name="includes"/>
74.350 + <attribute default="${excludes}" name="excludes"/>
74.351 + <attribute default="${javac.debug}" name="debug"/>
74.352 + <attribute default="${empty.dir}" name="sourcepath"/>
74.353 + <attribute default="${empty.dir}" name="gensrcdir"/>
74.354 + <element name="customize" optional="true"/>
74.355 + <sequential>
74.356 + <property location="${build.dir}/empty" name="empty.dir"/>
74.357 + <mkdir dir="${empty.dir}"/>
74.358 + <mkdir dir="@{apgeneratedsrcdir}"/>
74.359 + <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}">
74.360 + <src>
74.361 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
74.362 + <include name="*"/>
74.363 + </dirset>
74.364 + </src>
74.365 + <classpath>
74.366 + <path path="@{classpath}"/>
74.367 + </classpath>
74.368 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
74.369 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
74.370 + <compilerarg line="${javac.compilerargs}"/>
74.371 + <compilerarg value="-processorpath"/>
74.372 + <compilerarg path="@{processorpath}:${empty.dir}"/>
74.373 + <compilerarg line="${ap.processors.internal}"/>
74.374 + <compilerarg line="${annotation.processing.processor.options}"/>
74.375 + <compilerarg value="-s"/>
74.376 + <compilerarg path="@{apgeneratedsrcdir}"/>
74.377 + <compilerarg line="${ap.proc.none.internal}"/>
74.378 + <customize/>
74.379 + </javac>
74.380 + </sequential>
74.381 + </macrodef>
74.382 + </target>
74.383 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
74.384 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
74.385 + <attribute default="${src.dir}" name="srcdir"/>
74.386 + <attribute default="${build.classes.dir}" name="destdir"/>
74.387 + <attribute default="${javac.classpath}" name="classpath"/>
74.388 + <attribute default="${javac.modulepath}" name="modulepath"/>
74.389 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
74.390 + <attribute default="${javac.processorpath}" name="processorpath"/>
74.391 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
74.392 <attribute default="${includes}" name="includes"/>
74.393 <attribute default="${excludes}" name="excludes"/>
74.394 <attribute default="${javac.debug}" name="debug"/>
74.395 @@ -206,11 +446,14 @@
74.396 <path path="@{classpath}"/>
74.397 </classpath>
74.398 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
74.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
74.400 <compilerarg line="${javac.compilerargs}"/>
74.401 <customize/>
74.402 </javac>
74.403 </sequential>
74.404 </macrodef>
74.405 + </target>
74.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
74.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
74.408 <attribute default="${src.dir}" name="srcdir"/>
74.409 <attribute default="${build.classes.dir}" name="destdir"/>
74.410 @@ -227,52 +470,383 @@
74.411 <attribute default="${build.classes.dir}" name="destdir"/>
74.412 <sequential>
74.413 <fail unless="javac.includes">Must set javac.includes</fail>
74.414 - <pathconvert pathsep="," property="javac.includes.binary">
74.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
74.416 <path>
74.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
74.418 </path>
74.419 <globmapper from="*.java" to="*.class"/>
74.420 </pathconvert>
74.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
74.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
74.423 <delete>
74.424 - <files includes="${javac.includes.binary}"/>
74.425 + <files includesfile="${javac.includesfile.binary}"/>
74.426 + </delete>
74.427 + <delete>
74.428 + <fileset file="${javac.includesfile.binary}"/>
74.429 </delete>
74.430 </sequential>
74.431 </macrodef>
74.432 </target>
74.433 - <target name="-init-macrodef-junit">
74.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
74.435 + <condition else="false" property="nb.junit.batch" value="true">
74.436 + <and>
74.437 + <istrue value="${junit.available}"/>
74.438 + <not>
74.439 + <isset property="test.method"/>
74.440 + </not>
74.441 + </and>
74.442 + </condition>
74.443 + <condition else="false" property="nb.junit.single" value="true">
74.444 + <and>
74.445 + <istrue value="${junit.available}"/>
74.446 + <isset property="test.method"/>
74.447 + </and>
74.448 + </condition>
74.449 + </target>
74.450 + <target name="-init-test-properties">
74.451 + <property name="test.binaryincludes" value="<nothing>"/>
74.452 + <property name="test.binarytestincludes" value=""/>
74.453 + <property name="test.binaryexcludes" value=""/>
74.454 + </target>
74.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
74.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
74.457 + <attribute default="${includes}" name="includes"/>
74.458 + <attribute default="${excludes}" name="excludes"/>
74.459 + <element name="customizePrototype" optional="true"/>
74.460 + <sequential>
74.461 + <property name="junit.forkmode" value="perTest"/>
74.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
74.463 + <syspropertyset>
74.464 + <propertyref prefix="test-sys-prop."/>
74.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
74.466 + </syspropertyset>
74.467 + <classpath>
74.468 + <path path="${run.test.classpath}"/>
74.469 + </classpath>
74.470 + <modulepath>
74.471 + <path path="${run.test.modulepath}"/>
74.472 + </modulepath>
74.473 + <formatter type="brief" usefile="false"/>
74.474 + <formatter type="xml"/>
74.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.476 + <jvmarg value="-ea"/>
74.477 + <jvmarg line="${run.test.jvmargs}"/>
74.478 + <customizePrototype/>
74.479 + </junit>
74.480 + </sequential>
74.481 + </macrodef>
74.482 + </target>
74.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
74.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
74.485 + <attribute default="${includes}" name="includes"/>
74.486 + <attribute default="${excludes}" name="excludes"/>
74.487 + <element name="customizePrototype" optional="true"/>
74.488 + <sequential>
74.489 + <property name="junit.forkmode" value="perTest"/>
74.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
74.491 + <syspropertyset>
74.492 + <propertyref prefix="test-sys-prop."/>
74.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
74.494 + </syspropertyset>
74.495 + <classpath>
74.496 + <path path="${run.test.classpath}"/>
74.497 + </classpath>
74.498 + <formatter type="brief" usefile="false"/>
74.499 + <formatter type="xml"/>
74.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.501 + <jvmarg value="-ea"/>
74.502 + <customizePrototype/>
74.503 + </junit>
74.504 + </sequential>
74.505 + </macrodef>
74.506 + </target>
74.507 + <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}">
74.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
74.509 <attribute default="${includes}" name="includes"/>
74.510 <attribute default="${excludes}" name="excludes"/>
74.511 <attribute default="**" name="testincludes"/>
74.512 + <attribute default="" name="testmethods"/>
74.513 + <element name="customize" optional="true"/>
74.514 <sequential>
74.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
74.516 - <batchtest todir="${build.test.results.dir}">
74.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
74.518 - <filename name="@{testincludes}"/>
74.519 - </fileset>
74.520 - </batchtest>
74.521 + <j2seproject3:junit-prototype>
74.522 + <customizePrototype>
74.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
74.524 + <customize/>
74.525 + </customizePrototype>
74.526 + </j2seproject3:junit-prototype>
74.527 + </sequential>
74.528 + </macrodef>
74.529 + </target>
74.530 + <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}">
74.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
74.532 + <attribute default="${includes}" name="includes"/>
74.533 + <attribute default="${excludes}" name="excludes"/>
74.534 + <attribute default="**" name="testincludes"/>
74.535 + <attribute default="" name="testmethods"/>
74.536 + <element name="customize" optional="true"/>
74.537 + <sequential>
74.538 + <j2seproject3:junit-prototype>
74.539 + <customizePrototype>
74.540 + <batchtest todir="${build.test.results.dir}">
74.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
74.542 + <filename name="@{testincludes}"/>
74.543 + </fileset>
74.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
74.545 + <filename name="${test.binarytestincludes}"/>
74.546 + </fileset>
74.547 + </batchtest>
74.548 + <customize/>
74.549 + </customizePrototype>
74.550 + </j2seproject3:junit-prototype>
74.551 + </sequential>
74.552 + </macrodef>
74.553 + </target>
74.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
74.555 + <target if="${testng.available}" name="-init-macrodef-testng">
74.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
74.557 + <attribute default="${includes}" name="includes"/>
74.558 + <attribute default="${excludes}" name="excludes"/>
74.559 + <attribute default="**" name="testincludes"/>
74.560 + <attribute default="" name="testmethods"/>
74.561 + <element name="customize" optional="true"/>
74.562 + <sequential>
74.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
74.564 + <isset property="test.method"/>
74.565 + </condition>
74.566 + <union id="test.set">
74.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
74.568 + <filename name="@{testincludes}"/>
74.569 + </fileset>
74.570 + </union>
74.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
74.572 + <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="singletons" testname="TestNG tests" workingDir="${work.dir}">
74.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
74.574 + <propertyset>
74.575 + <propertyref prefix="test-sys-prop."/>
74.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
74.577 + </propertyset>
74.578 <classpath>
74.579 <path path="${run.test.classpath}"/>
74.580 </classpath>
74.581 - <syspropertyset>
74.582 - <propertyref prefix="test-sys-prop."/>
74.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
74.584 - </syspropertyset>
74.585 - <formatter type="brief" usefile="false"/>
74.586 - <formatter type="xml"/>
74.587 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.588 - <jvmarg line="${run.jvmargs}"/>
74.589 - </junit>
74.590 + <customize/>
74.591 + </testng>
74.592 </sequential>
74.593 </macrodef>
74.594 </target>
74.595 + <target name="-init-macrodef-test-impl">
74.596 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
74.597 + <attribute default="${includes}" name="includes"/>
74.598 + <attribute default="${excludes}" name="excludes"/>
74.599 + <attribute default="**" name="testincludes"/>
74.600 + <attribute default="" name="testmethods"/>
74.601 + <element implicit="true" name="customize" optional="true"/>
74.602 + <sequential>
74.603 + <echo>No tests executed.</echo>
74.604 + </sequential>
74.605 + </macrodef>
74.606 + </target>
74.607 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
74.608 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
74.609 + <attribute default="${includes}" name="includes"/>
74.610 + <attribute default="${excludes}" name="excludes"/>
74.611 + <attribute default="**" name="testincludes"/>
74.612 + <attribute default="" name="testmethods"/>
74.613 + <element implicit="true" name="customize" optional="true"/>
74.614 + <sequential>
74.615 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
74.616 + <customize/>
74.617 + </j2seproject3:junit>
74.618 + </sequential>
74.619 + </macrodef>
74.620 + </target>
74.621 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
74.622 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
74.623 + <attribute default="${includes}" name="includes"/>
74.624 + <attribute default="${excludes}" name="excludes"/>
74.625 + <attribute default="**" name="testincludes"/>
74.626 + <attribute default="" name="testmethods"/>
74.627 + <element implicit="true" name="customize" optional="true"/>
74.628 + <sequential>
74.629 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
74.630 + <customize/>
74.631 + </j2seproject3:testng>
74.632 + </sequential>
74.633 + </macrodef>
74.634 + </target>
74.635 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
74.636 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
74.637 + <attribute default="${includes}" name="includes"/>
74.638 + <attribute default="${excludes}" name="excludes"/>
74.639 + <attribute default="**" name="testincludes"/>
74.640 + <attribute default="" name="testmethods"/>
74.641 + <sequential>
74.642 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
74.643 + <customize>
74.644 + <jvmarg line="${run.jvmargs}"/>
74.645 + <jvmarg line="${run.jvmargs.ide}"/>
74.646 + </customize>
74.647 + </j2seproject3:test-impl>
74.648 + </sequential>
74.649 + </macrodef>
74.650 + </target>
74.651 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
74.652 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
74.653 + <attribute default="${includes}" name="includes"/>
74.654 + <attribute default="${excludes}" name="excludes"/>
74.655 + <attribute default="**" name="testincludes"/>
74.656 + <attribute default="" name="testmethods"/>
74.657 + <element name="customizeDebuggee" optional="true"/>
74.658 + <sequential>
74.659 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
74.660 + <customize>
74.661 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
74.662 + <customizeDebuggee/>
74.663 + </customize>
74.664 + </j2seproject3:junit>
74.665 + </sequential>
74.666 + </macrodef>
74.667 + </target>
74.668 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
74.669 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
74.670 + <attribute default="${main.class}" name="testClass"/>
74.671 + <attribute default="" name="testMethod"/>
74.672 + <element name="customize2" optional="true"/>
74.673 + <sequential>
74.674 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
74.675 + <isset property="test.method"/>
74.676 + </condition>
74.677 + <condition else="-suitename singletons -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
74.678 + <matches pattern=".*\.xml" string="@{testClass}"/>
74.679 + </condition>
74.680 + <delete dir="${build.test.results.dir}" quiet="true"/>
74.681 + <mkdir dir="${build.test.results.dir}"/>
74.682 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
74.683 + <customizeDebuggee>
74.684 + <customize2/>
74.685 + <jvmarg value="-ea"/>
74.686 + <arg line="${testng.debug.mode}"/>
74.687 + <arg line="-d ${build.test.results.dir}"/>
74.688 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
74.689 + <arg line="${testng.cmd.args}"/>
74.690 + </customizeDebuggee>
74.691 + </j2seproject3:debug>
74.692 + </sequential>
74.693 + </macrodef>
74.694 + </target>
74.695 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
74.696 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
74.697 + <attribute default="${main.class}" name="testClass"/>
74.698 + <attribute default="" name="testMethod"/>
74.699 + <element implicit="true" name="customize2" optional="true"/>
74.700 + <sequential>
74.701 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
74.702 + <customize2/>
74.703 + </j2seproject3:testng-debug>
74.704 + </sequential>
74.705 + </macrodef>
74.706 + </target>
74.707 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
74.708 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
74.709 + <attribute default="${includes}" name="includes"/>
74.710 + <attribute default="${excludes}" name="excludes"/>
74.711 + <attribute default="**" name="testincludes"/>
74.712 + <attribute default="" name="testmethods"/>
74.713 + <attribute default="${main.class}" name="testClass"/>
74.714 + <attribute default="" name="testMethod"/>
74.715 + <sequential>
74.716 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
74.717 + <customizeDebuggee>
74.718 + <jvmarg line="${run.jvmargs}"/>
74.719 + <jvmarg line="${run.jvmargs.ide}"/>
74.720 + </customizeDebuggee>
74.721 + </j2seproject3:test-debug-impl>
74.722 + </sequential>
74.723 + </macrodef>
74.724 + </target>
74.725 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
74.726 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
74.727 + <attribute default="${includes}" name="includes"/>
74.728 + <attribute default="${excludes}" name="excludes"/>
74.729 + <attribute default="**" name="testincludes"/>
74.730 + <attribute default="" name="testmethods"/>
74.731 + <attribute default="${main.class}" name="testClass"/>
74.732 + <attribute default="" name="testMethod"/>
74.733 + <sequential>
74.734 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
74.735 + <customize2>
74.736 + <syspropertyset>
74.737 + <propertyref prefix="test-sys-prop."/>
74.738 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
74.739 + </syspropertyset>
74.740 + </customize2>
74.741 + </j2seproject3:testng-debug-impl>
74.742 + </sequential>
74.743 + </macrodef>
74.744 + </target>
74.745 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
74.746 + <!--
74.747 + pre NB7.2 profiling section; consider it deprecated
74.748 + -->
74.749 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
74.750 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
74.751 + <!-- Empty placeholder for easier customization. -->
74.752 + <!-- You can override this target in the ../build.xml file. -->
74.753 + </target>
74.754 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
74.755 + <!-- Empty placeholder for easier customization. -->
74.756 + <!-- You can override this target in the ../build.xml file. -->
74.757 + </target>
74.758 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
74.759 + <macrodef name="resolve">
74.760 + <attribute name="name"/>
74.761 + <attribute name="value"/>
74.762 + <sequential>
74.763 + <property name="@{name}" value="${env.@{value}}"/>
74.764 + </sequential>
74.765 + </macrodef>
74.766 + <macrodef name="profile">
74.767 + <attribute default="${main.class}" name="classname"/>
74.768 + <element name="customize" optional="true"/>
74.769 + <sequential>
74.770 + <property environment="env"/>
74.771 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
74.772 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
74.773 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.774 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
74.775 + <jvmarg line="${profiler.info.jvmargs}"/>
74.776 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
74.777 + <arg line="${application.args}"/>
74.778 + <classpath>
74.779 + <path path="${run.classpath}"/>
74.780 + </classpath>
74.781 + <syspropertyset>
74.782 + <propertyref prefix="run-sys-prop."/>
74.783 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
74.784 + </syspropertyset>
74.785 + <customize/>
74.786 + </java>
74.787 + </sequential>
74.788 + </macrodef>
74.789 + </target>
74.790 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
74.791 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
74.792 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
74.793 + </target>
74.794 + <!--
74.795 + end of pre NB7.2 profiling section
74.796 + -->
74.797 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
74.798 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
74.799 <attribute default="${main.class}" name="name"/>
74.800 + <attribute default="${debug.modulepath}" name="modulepath"/>
74.801 <attribute default="${debug.classpath}" name="classpath"/>
74.802 <attribute default="" name="stopclassname"/>
74.803 <sequential>
74.804 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
74.805 + <modulepath>
74.806 + <path path="@{modulepath}"/>
74.807 + </modulepath>
74.808 <classpath>
74.809 <path path="@{classpath}"/>
74.810 </classpath>
74.811 @@ -291,18 +865,6 @@
74.812 </macrodef>
74.813 </target>
74.814 <target name="-init-debug-args">
74.815 - <property name="version-output" value="java version "${ant.java.version}"/>
74.816 - <condition property="have-jdk-older-than-1.4">
74.817 - <or>
74.818 - <contains string="${version-output}" substring="java version "1.0"/>
74.819 - <contains string="${version-output}" substring="java version "1.1"/>
74.820 - <contains string="${version-output}" substring="java version "1.2"/>
74.821 - <contains string="${version-output}" substring="java version "1.3"/>
74.822 - </or>
74.823 - </condition>
74.824 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
74.825 - <istrue value="${have-jdk-older-than-1.4}"/>
74.826 - </condition>
74.827 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
74.828 <os family="windows"/>
74.829 </condition>
74.830 @@ -312,17 +874,103 @@
74.831 </target>
74.832 <target depends="-init-debug-args" name="-init-macrodef-debug">
74.833 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
74.834 + <attribute default="${module.name}" name="modulename"/>
74.835 <attribute default="${main.class}" name="classname"/>
74.836 + <attribute default="${debug.modulepath}" name="modulepath"/>
74.837 <attribute default="${debug.classpath}" name="classpath"/>
74.838 + <element name="customizeDebuggee" optional="true"/>
74.839 + <sequential>
74.840 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
74.841 + <customize>
74.842 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
74.843 + <customizeDebuggee/>
74.844 + </customize>
74.845 + </j2seproject1:java>
74.846 + </sequential>
74.847 + </macrodef>
74.848 + </target>
74.849 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
74.850 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
74.851 + <attribute default="${module.name}" name="modulename"/>
74.852 + <attribute default="${main.class}" name="classname"/>
74.853 + <attribute default="${run.modulepath}" name="modulepath"/>
74.854 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
74.855 + <attribute default="${run.classpath}" name="classpath"/>
74.856 + <attribute default="jvm" name="jvm"/>
74.857 <element name="customize" optional="true"/>
74.858 <sequential>
74.859 - <java classname="@{classname}" dir="${work.dir}" fork="true">
74.860 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.861 - <jvmarg line="${debug-args-line}"/>
74.862 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
74.863 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
74.864 + <classpath>
74.865 + <path path="@{classpath}"/>
74.866 + </classpath>
74.867 + <modulepath>
74.868 + <pathelement path="@{modulepath}"/>
74.869 + <pathelement location="${module.build.classes.dir}"/>
74.870 + </modulepath>
74.871 + <upgrademodulepath>
74.872 + <path path="@{upgrademodulepath}"/>
74.873 + </upgrademodulepath>
74.874 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
74.875 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
74.876 <jvmarg line="${run.jvmargs}"/>
74.877 + <jvmarg line="${run.jvmargs.ide}"/>
74.878 + <syspropertyset>
74.879 + <propertyref prefix="run-sys-prop."/>
74.880 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
74.881 + </syspropertyset>
74.882 + <customize/>
74.883 + </java>
74.884 + </sequential>
74.885 + </macrodef>
74.886 + </target>
74.887 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
74.888 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
74.889 + <attribute default="" name="modulename"/>
74.890 + <attribute default="${main.class}" name="classname"/>
74.891 + <attribute default="${run.modulepath}" name="modulepath"/>
74.892 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
74.893 + <attribute default="${run.classpath}" name="classpath"/>
74.894 + <attribute default="jvm" name="jvm"/>
74.895 + <element name="customize" optional="true"/>
74.896 + <sequential>
74.897 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
74.898 + <classpath>
74.899 + <path path="@{classpath}"/>
74.900 + </classpath>
74.901 + <modulepath>
74.902 + <path path="@{modulepath}"/>
74.903 + </modulepath>
74.904 + <upgrademodulepath>
74.905 + <path path="@{upgrademodulepath}"/>
74.906 + </upgrademodulepath>
74.907 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
74.908 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
74.909 + <jvmarg line="${run.jvmargs}"/>
74.910 + <jvmarg line="${run.jvmargs.ide}"/>
74.911 + <syspropertyset>
74.912 + <propertyref prefix="run-sys-prop."/>
74.913 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
74.914 + </syspropertyset>
74.915 + <customize/>
74.916 + </java>
74.917 + </sequential>
74.918 + </macrodef>
74.919 + </target>
74.920 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
74.921 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
74.922 + <attribute default="" name="modulename"/>
74.923 + <attribute default="${main.class}" name="classname"/>
74.924 + <attribute default="" name="modulepath"/>
74.925 + <attribute default="${run.classpath}" name="classpath"/>
74.926 + <attribute default="jvm" name="jvm"/>
74.927 + <element name="customize" optional="true"/>
74.928 + <sequential>
74.929 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
74.930 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.931 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
74.932 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
74.933 + <jvmarg line="${run.jvmargs}"/>
74.934 + <jvmarg line="${run.jvmargs.ide}"/>
74.935 <classpath>
74.936 <path path="@{classpath}"/>
74.937 </classpath>
74.938 @@ -335,37 +983,70 @@
74.939 </sequential>
74.940 </macrodef>
74.941 </target>
74.942 - <target name="-init-macrodef-java">
74.943 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
74.944 - <attribute default="${main.class}" name="classname"/>
74.945 - <attribute default="${run.classpath}" name="classpath"/>
74.946 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
74.947 + <target name="-init-macrodef-copylibs">
74.948 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
74.949 + <attribute default="${manifest.file}" name="manifest"/>
74.950 <element name="customize" optional="true"/>
74.951 <sequential>
74.952 - <java classname="@{classname}" dir="${work.dir}" fork="true">
74.953 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
74.954 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
74.955 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
74.956 - <jvmarg line="${run.jvmargs}"/>
74.957 - <classpath>
74.958 - <path path="@{classpath}"/>
74.959 - </classpath>
74.960 - <syspropertyset>
74.961 - <propertyref prefix="run-sys-prop."/>
74.962 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
74.963 - </syspropertyset>
74.964 - <customize/>
74.965 - </java>
74.966 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
74.967 + <pathconvert property="run.classpath.without.build.classes.dir">
74.968 + <path path="${run.classpath}"/>
74.969 + <map from="${build.classes.dir.resolved}" to=""/>
74.970 + </pathconvert>
74.971 + <pathconvert pathsep=" " property="jar.classpath">
74.972 + <path path="${run.classpath.without.build.classes.dir}"/>
74.973 + <chainedmapper>
74.974 + <flattenmapper/>
74.975 + <filtermapper>
74.976 + <replacestring from=" " to="%20"/>
74.977 + </filtermapper>
74.978 + <globmapper from="*" to="lib/*"/>
74.979 + </chainedmapper>
74.980 + </pathconvert>
74.981 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
74.982 + <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}">
74.983 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
74.984 + <manifest>
74.985 + <attribute name="Class-Path" value="${jar.classpath}"/>
74.986 + <customize/>
74.987 + </manifest>
74.988 + </copylibs>
74.989 </sequential>
74.990 </macrodef>
74.991 </target>
74.992 <target name="-init-presetdef-jar">
74.993 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
74.994 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
74.995 - <j2seproject1:fileset dir="${build.classes.dir}"/>
74.996 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
74.997 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
74.998 </jar>
74.999 </presetdef>
74.1000 </target>
74.1001 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
74.1002 + <target name="-init-ap-cmdline-properties">
74.1003 + <property name="annotation.processing.enabled" value="true"/>
74.1004 + <property name="annotation.processing.processors.list" value=""/>
74.1005 + <property name="annotation.processing.processor.options" value=""/>
74.1006 + <property name="annotation.processing.run.all.processors" value="true"/>
74.1007 + <property name="javac.processorpath" value="${javac.classpath}"/>
74.1008 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
74.1009 + <condition property="ap.supported.internal" value="true">
74.1010 + <not>
74.1011 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
74.1012 + </not>
74.1013 + </condition>
74.1014 + </target>
74.1015 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
74.1016 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
74.1017 + <isfalse value="${annotation.processing.run.all.processors}"/>
74.1018 + </condition>
74.1019 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
74.1020 + <isfalse value="${annotation.processing.enabled}"/>
74.1021 + </condition>
74.1022 + </target>
74.1023 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
74.1024 + <property name="ap.cmd.line.internal" value=""/>
74.1025 + </target>
74.1026 + <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"/>
74.1027 <!--
74.1028 ===================
74.1029 COMPILATION SECTION
74.1030 @@ -392,7 +1073,9 @@
74.1031 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
74.1032 </target>
74.1033 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
74.1034 - <antcall target="clean"/>
74.1035 + <antcall target="clean">
74.1036 + <param name="no.dependencies" value="true"/>
74.1037 + </antcall>
74.1038 </target>
74.1039 <target depends="init,deps-jar" name="-pre-pre-compile">
74.1040 <mkdir dir="${build.classes.dir}"/>
74.1041 @@ -409,12 +1092,18 @@
74.1042 </pathconvert>
74.1043 <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
74.1044 </target>
74.1045 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
74.1046 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
74.1047 <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
74.1048 <copy todir="${build.classes.dir}">
74.1049 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
74.1050 </copy>
74.1051 </target>
74.1052 + <target if="has.persistence.xml" name="-copy-persistence-xml">
74.1053 + <mkdir dir="${build.classes.dir}/META-INF"/>
74.1054 + <copy todir="${build.classes.dir}/META-INF">
74.1055 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
74.1056 + </copy>
74.1057 + </target>
74.1058 <target name="-post-compile">
74.1059 <!-- Empty placeholder for easier customization. -->
74.1060 <!-- You can override this target in the ../build.xml file. -->
74.1061 @@ -427,7 +1116,7 @@
74.1062 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
74.1063 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
74.1064 <j2seproject3:force-recompile/>
74.1065 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
74.1066 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
74.1067 </target>
74.1068 <target name="-post-compile-single">
74.1069 <!-- Empty placeholder for easier customization. -->
74.1070 @@ -447,99 +1136,191 @@
74.1071 <!-- Empty placeholder for easier customization. -->
74.1072 <!-- You can override this target in the ../build.xml file. -->
74.1073 </target>
74.1074 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
74.1075 - <j2seproject1:jar/>
74.1076 + <target depends="init,compile" name="-check-module-main-class">
74.1077 + <pathconvert property="main.class.file">
74.1078 + <string value="${main.class}"/>
74.1079 + <unpackagemapper from="*" to="*.class"/>
74.1080 + </pathconvert>
74.1081 + <condition property="do.module.main.class">
74.1082 + <and>
74.1083 + <isset property="main.class.available"/>
74.1084 + <available file="${build.classes.dir}/module-info.class"/>
74.1085 + <available file="${build.classes.dir}/${main.class.file}"/>
74.1086 + <isset property="libs.CopyLibs.classpath"/>
74.1087 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
74.1088 + </and>
74.1089 + </condition>
74.1090 </target>
74.1091 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
74.1092 - <j2seproject1:jar manifest="${manifest.file}"/>
74.1093 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
74.1094 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
74.1095 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
74.1096 </target>
74.1097 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
74.1098 - <j2seproject1:jar manifest="${manifest.file}">
74.1099 - <j2seproject1:manifest>
74.1100 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
74.1101 - </j2seproject1:manifest>
74.1102 - </j2seproject1:jar>
74.1103 - <echo>To run this application from the command line without Ant, try:</echo>
74.1104 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
74.1105 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
74.1106 + <touch file="${tmp.manifest.file}" verbose="false"/>
74.1107 + </target>
74.1108 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
74.1109 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
74.1110 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
74.1111 + </target>
74.1112 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
74.1113 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
74.1114 + <attribute name="Main-Class" value="${main.class}"/>
74.1115 + </manifest>
74.1116 + </target>
74.1117 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
74.1118 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
74.1119 + <attribute name="Profile" value="${javac.profile}"/>
74.1120 + </manifest>
74.1121 + </target>
74.1122 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
74.1123 + <basename file="${application.splash}" property="splashscreen.basename"/>
74.1124 + <mkdir dir="${build.classes.dir}/META-INF"/>
74.1125 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
74.1126 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
74.1127 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
74.1128 + </manifest>
74.1129 + </target>
74.1130 + <target depends="init,compile" name="-check-do-mkdist">
74.1131 + <condition property="do.mkdist">
74.1132 + <and>
74.1133 + <isset property="do.archive"/>
74.1134 + <isset property="libs.CopyLibs.classpath"/>
74.1135 + <not>
74.1136 + <istrue value="${mkdist.disabled}"/>
74.1137 + </not>
74.1138 + <not>
74.1139 + <available file="${build.classes.dir}/module-info.class"/>
74.1140 + </not>
74.1141 + </and>
74.1142 + </condition>
74.1143 + </target>
74.1144 + <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">
74.1145 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
74.1146 + <echo level="info">To run this application from the command line without Ant, try:</echo>
74.1147 + <property location="${dist.jar}" name="dist.jar.resolved"/>
74.1148 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
74.1149 + </target>
74.1150 + <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">
74.1151 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
74.1152 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
74.1153 <property location="${dist.jar}" name="dist.jar.resolved"/>
74.1154 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
74.1155 + <isset property="named.module.internal"/>
74.1156 + </condition>
74.1157 <pathconvert property="run.classpath.with.dist.jar">
74.1158 <path path="${run.classpath}"/>
74.1159 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
74.1160 + </pathconvert>
74.1161 + <pathconvert property="run.modulepath.with.dist.jar">
74.1162 + <path location="${dist.jar.resolved}"/>
74.1163 + <path path="${run.modulepath}"/>
74.1164 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
74.1165 </pathconvert>
74.1166 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
74.1167 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
74.1168 + <isset property="named.module.internal"/>
74.1169 + </condition>
74.1170 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
74.1171 + <and>
74.1172 + <isset property="modules.supported.internal"/>
74.1173 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
74.1174 + </and>
74.1175 + </condition>
74.1176 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
74.1177 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
74.1178 + </condition>
74.1179 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
74.1180 + <isset property="do.module.main.class"/>
74.1181 + </condition>
74.1182 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
74.1183 + <isset property="named.module.internal"/>
74.1184 + </condition>
74.1185 + <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}">
74.1186 + <isset property="main.class.available"/>
74.1187 + </condition>
74.1188 + <condition else="debug" property="jar.usage.level" value="info">
74.1189 + <isset property="main.class.available"/>
74.1190 + </condition>
74.1191 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
74.1192 </target>
74.1193 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
74.1194 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
74.1195 - <pathconvert property="run.classpath.without.build.classes.dir">
74.1196 - <path path="${run.classpath}"/>
74.1197 - <map from="${build.classes.dir.resolved}" to=""/>
74.1198 - </pathconvert>
74.1199 - <pathconvert pathsep=" " property="jar.classpath">
74.1200 - <path path="${run.classpath.without.build.classes.dir}"/>
74.1201 - <chainedmapper>
74.1202 - <flattenmapper/>
74.1203 - <globmapper from="*" to="lib/*"/>
74.1204 - </chainedmapper>
74.1205 - </pathconvert>
74.1206 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
74.1207 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
74.1208 - <fileset dir="${build.classes.dir}"/>
74.1209 - <manifest>
74.1210 - <attribute name="Main-Class" value="${main.class}"/>
74.1211 - <attribute name="Class-Path" value="${jar.classpath}"/>
74.1212 - </manifest>
74.1213 - </copylibs>
74.1214 - <echo>To run this application from the command line without Ant, try:</echo>
74.1215 - <property location="${dist.jar}" name="dist.jar.resolved"/>
74.1216 - <echo>java -jar "${dist.jar.resolved}"</echo>
74.1217 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
74.1218 + <delete>
74.1219 + <fileset file="${tmp.manifest.file}"/>
74.1220 + </delete>
74.1221 </target>
74.1222 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
74.1223 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
74.1224 - <pathconvert property="run.classpath.without.build.classes.dir">
74.1225 - <path path="${run.classpath}"/>
74.1226 - <map from="${build.classes.dir.resolved}" to=""/>
74.1227 - </pathconvert>
74.1228 - <pathconvert pathsep=" " property="jar.classpath">
74.1229 - <path path="${run.classpath.without.build.classes.dir}"/>
74.1230 - <chainedmapper>
74.1231 - <flattenmapper/>
74.1232 - <globmapper from="*" to="lib/*"/>
74.1233 - </chainedmapper>
74.1234 - </pathconvert>
74.1235 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
74.1236 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
74.1237 - <fileset dir="${build.classes.dir}"/>
74.1238 - <manifest>
74.1239 - <attribute name="Class-Path" value="${jar.classpath}"/>
74.1240 - </manifest>
74.1241 - </copylibs>
74.1242 - </target>
74.1243 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
74.1244 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
74.1245 - <pathconvert property="run.classpath.without.build.classes.dir">
74.1246 - <path path="${run.classpath}"/>
74.1247 - <map from="${build.classes.dir.resolved}" to=""/>
74.1248 - </pathconvert>
74.1249 - <pathconvert pathsep=" " property="jar.classpath">
74.1250 - <path path="${run.classpath.without.build.classes.dir}"/>
74.1251 - <chainedmapper>
74.1252 - <flattenmapper/>
74.1253 - <globmapper from="*" to="lib/*"/>
74.1254 - </chainedmapper>
74.1255 - </pathconvert>
74.1256 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
74.1257 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
74.1258 - <fileset dir="${build.classes.dir}"/>
74.1259 - <manifest>
74.1260 - <attribute name="Class-Path" value="${jar.classpath}"/>
74.1261 - </manifest>
74.1262 - </copylibs>
74.1263 - </target>
74.1264 + <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"/>
74.1265 + <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"/>
74.1266 <target name="-post-jar">
74.1267 <!-- Empty placeholder for easier customization. -->
74.1268 <!-- You can override this target in the ../build.xml file. -->
74.1269 </target>
74.1270 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
74.1271 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
74.1272 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
74.1273 + <!--
74.1274 + =================
74.1275 + DEPLOY SECTION
74.1276 + =================
74.1277 + -->
74.1278 + <target name="-pre-deploy">
74.1279 + <!-- Empty placeholder for easier customization. -->
74.1280 + <!-- You can override this target in the ../build.xml file. -->
74.1281 + </target>
74.1282 + <target depends="init" name="-check-jlink">
74.1283 + <condition property="do.jlink.internal">
74.1284 + <and>
74.1285 + <istrue value="${do.jlink}"/>
74.1286 + <isset property="do.archive"/>
74.1287 + <isset property="named.module.internal"/>
74.1288 + </and>
74.1289 + </condition>
74.1290 + </target>
74.1291 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
74.1292 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
74.1293 + <property name="jlink.launcher.name" value="${application.title}"/>
74.1294 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
74.1295 + <and>
74.1296 + <isset property="jlink.additionalmodules"/>
74.1297 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
74.1298 + </and>
74.1299 + </condition>
74.1300 + <condition property="jlink.do.strip.internal">
74.1301 + <and>
74.1302 + <isset property="jlink.strip"/>
74.1303 + <istrue value="${jlink.strip}"/>
74.1304 + </and>
74.1305 + </condition>
74.1306 + <condition property="jlink.do.additionalparam.internal">
74.1307 + <and>
74.1308 + <isset property="jlink.additionalparam"/>
74.1309 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
74.1310 + </and>
74.1311 + </condition>
74.1312 + <condition property="jlink.do.launcher.internal">
74.1313 + <and>
74.1314 + <istrue value="${jlink.launcher}"/>
74.1315 + <isset property="main.class.available"/>
74.1316 + </and>
74.1317 + </condition>
74.1318 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
74.1319 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
74.1320 + <exec executable="${platform.jlink}">
74.1321 + <arg value="--module-path"/>
74.1322 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
74.1323 + <arg value="--add-modules"/>
74.1324 + <arg value="${jlink.add.modules}"/>
74.1325 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
74.1326 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
74.1327 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
74.1328 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
74.1329 + <arg value="--output"/>
74.1330 + <arg value="${dist.jlink.output}"/>
74.1331 + </exec>
74.1332 + </target>
74.1333 + <target name="-post-deploy">
74.1334 + <!-- Empty placeholder for easier customization. -->
74.1335 + <!-- You can override this target in the ../build.xml file. -->
74.1336 + </target>
74.1337 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
74.1338 <!--
74.1339 =================
74.1340 EXECUTION SECTION
74.1341 @@ -576,9 +1357,9 @@
74.1342 </target>
74.1343 <target depends="init,compile" name="-debug-start-debuggee">
74.1344 <j2seproject3:debug>
74.1345 - <customize>
74.1346 + <customizeDebuggee>
74.1347 <arg line="${application.args}"/>
74.1348 - </customize>
74.1349 + </customizeDebuggee>
74.1350 </j2seproject3:debug>
74.1351 </target>
74.1352 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
74.1353 @@ -605,23 +1386,146 @@
74.1354 </target>
74.1355 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
74.1356 <!--
74.1357 + =================
74.1358 + PROFILING SECTION
74.1359 + =================
74.1360 + -->
74.1361 + <!--
74.1362 + pre NB7.2 profiler integration
74.1363 + -->
74.1364 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
74.1365 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
74.1366 + <nbprofiledirect>
74.1367 + <classpath>
74.1368 + <path path="${run.classpath}"/>
74.1369 + </classpath>
74.1370 + </nbprofiledirect>
74.1371 + <profile/>
74.1372 + </target>
74.1373 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
74.1374 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
74.1375 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
74.1376 + <nbprofiledirect>
74.1377 + <classpath>
74.1378 + <path path="${run.classpath}"/>
74.1379 + </classpath>
74.1380 + </nbprofiledirect>
74.1381 + <profile classname="${profile.class}"/>
74.1382 + </target>
74.1383 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
74.1384 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
74.1385 + <nbprofiledirect>
74.1386 + <classpath>
74.1387 + <path path="${run.classpath}"/>
74.1388 + </classpath>
74.1389 + </nbprofiledirect>
74.1390 + <profile classname="sun.applet.AppletViewer">
74.1391 + <customize>
74.1392 + <arg value="${applet.url}"/>
74.1393 + </customize>
74.1394 + </profile>
74.1395 + </target>
74.1396 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
74.1397 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
74.1398 + <nbprofiledirect>
74.1399 + <classpath>
74.1400 + <path path="${run.test.classpath}"/>
74.1401 + </classpath>
74.1402 + </nbprofiledirect>
74.1403 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
74.1404 + <customize>
74.1405 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
74.1406 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
74.1407 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
74.1408 + <jvmarg line="${profiler.info.jvmargs}"/>
74.1409 + <classpath>
74.1410 + <path path="${run.test.classpath}"/>
74.1411 + </classpath>
74.1412 + </customize>
74.1413 + </j2seproject3:junit>
74.1414 + </target>
74.1415 + <!--
74.1416 + end of pre NB72 profiling section
74.1417 + -->
74.1418 + <target if="netbeans.home" name="-profile-check">
74.1419 + <condition property="profiler.configured">
74.1420 + <or>
74.1421 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
74.1422 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
74.1423 + </or>
74.1424 + </condition>
74.1425 + </target>
74.1426 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
74.1427 + <startprofiler/>
74.1428 + <antcall target="run"/>
74.1429 + </target>
74.1430 + <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">
74.1431 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
74.1432 + <startprofiler/>
74.1433 + <antcall target="run-single"/>
74.1434 + </target>
74.1435 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
74.1436 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
74.1437 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
74.1438 + <startprofiler/>
74.1439 + <antcall target="test-single"/>
74.1440 + </target>
74.1441 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
74.1442 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
74.1443 + <startprofiler/>
74.1444 + <antcall target="run-test-with-main"/>
74.1445 + </target>
74.1446 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
74.1447 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
74.1448 + <startprofiler/>
74.1449 + <antcall target="run-applet"/>
74.1450 + </target>
74.1451 + <!--
74.1452 ===============
74.1453 JAVADOC SECTION
74.1454 ===============
74.1455 -->
74.1456 - <target depends="init" name="-javadoc-build">
74.1457 + <target depends="init" if="have.sources" name="-javadoc-build">
74.1458 <mkdir dir="${dist.javadoc.dir}"/>
74.1459 - <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}">
74.1460 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
74.1461 + <and>
74.1462 + <isset property="endorsed.classpath.cmd.line.arg"/>
74.1463 + <not>
74.1464 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
74.1465 + </not>
74.1466 + </and>
74.1467 + </condition>
74.1468 + <condition else="" property="bug5101868workaround" value="*.java">
74.1469 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
74.1470 + </condition>
74.1471 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
74.1472 + <and>
74.1473 + <isset property="javadoc.html5"/>
74.1474 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
74.1475 + </and>
74.1476 + </condition>
74.1477 + <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}">
74.1478 <classpath>
74.1479 <path path="${javac.classpath}"/>
74.1480 </classpath>
74.1481 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
74.1482 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
74.1483 <filename name="**/*.java"/>
74.1484 </fileset>
74.1485 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
74.1486 <include name="**/*.java"/>
74.1487 + <exclude name="*.java"/>
74.1488 </fileset>
74.1489 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
74.1490 + <arg line="${javadoc.html5.cmd.line.arg}"/>
74.1491 </javadoc>
74.1492 + <copy todir="${dist.javadoc.dir}">
74.1493 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
74.1494 + <filename name="**/doc-files/**"/>
74.1495 + </fileset>
74.1496 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
74.1497 + <include name="**/doc-files/**"/>
74.1498 + </fileset>
74.1499 + </copy>
74.1500 </target>
74.1501 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
74.1502 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
74.1503 @@ -629,7 +1533,7 @@
74.1504 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
74.1505 <!--
74.1506 =========================
74.1507 - JUNIT COMPILATION SECTION
74.1508 + TEST COMPILATION SECTION
74.1509 =========================
74.1510 -->
74.1511 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
74.1512 @@ -639,11 +1543,63 @@
74.1513 <!-- Empty placeholder for easier customization. -->
74.1514 <!-- You can override this target in the ../build.xml file. -->
74.1515 </target>
74.1516 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
74.1517 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
74.1518 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
74.1519 + <and>
74.1520 + <isset property="test.module.name"/>
74.1521 + <length length="0" string="${test.module.name}" when="greater"/>
74.1522 + </and>
74.1523 + </condition>
74.1524 + <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">
74.1525 + <and>
74.1526 + <isset property="test.module.name"/>
74.1527 + <length length="0" string="${test.module.name}" when="greater"/>
74.1528 + </and>
74.1529 + </condition>
74.1530 + </target>
74.1531 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
74.1532 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
74.1533 + <and>
74.1534 + <isset property="test.module.name"/>
74.1535 + <length length="0" string="${test.module.name}" when="greater"/>
74.1536 + </and>
74.1537 + </condition>
74.1538 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
74.1539 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
74.1540 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
74.1541 + <chainedmapper>
74.1542 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
74.1543 + <filtermapper>
74.1544 + <uniqfilter/>
74.1545 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
74.1546 + </filtermapper>
74.1547 + <cutdirsmapper dirs="1"/>
74.1548 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
74.1549 + </chainedmapper>
74.1550 + </pathconvert>
74.1551 + <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}">
74.1552 + <and>
74.1553 + <isset property="test.module.name"/>
74.1554 + <length length="0" string="${test.module.name}" when="greater"/>
74.1555 + </and>
74.1556 + </condition>
74.1557 + </target>
74.1558 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
74.1559 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
74.1560 + <property name="javac.test.compilerargs" value=""/>
74.1561 + <property name="run.test.jvmargs" value=""/>
74.1562 + </target>
74.1563 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
74.1564 <target if="do.depend.true" name="-compile-test-depend">
74.1565 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
74.1566 </target>
74.1567 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
74.1568 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
74.1569 + <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">
74.1570 + <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}">
74.1571 + <customize>
74.1572 + <compilerarg line="${javac.test.compilerargs}"/>
74.1573 + </customize>
74.1574 + </j2seproject3:javac>
74.1575 <copy todir="${build.test.classes.dir}">
74.1576 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
74.1577 </copy>
74.1578 @@ -657,10 +1613,14 @@
74.1579 <!-- Empty placeholder for easier customization. -->
74.1580 <!-- You can override this target in the ../build.xml file. -->
74.1581 </target>
74.1582 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
74.1583 + <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">
74.1584 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
74.1585 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
74.1586 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
74.1587 + <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}">
74.1588 + <customize>
74.1589 + <compilerarg line="${javac.test.compilerargs}"/>
74.1590 + </customize>
74.1591 + </j2seproject3:javac>
74.1592 <copy todir="${build.test.classes.dir}">
74.1593 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
74.1594 </copy>
74.1595 @@ -672,14 +1632,14 @@
74.1596 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
74.1597 <!--
74.1598 =======================
74.1599 - JUNIT EXECUTION SECTION
74.1600 + TEST EXECUTION SECTION
74.1601 =======================
74.1602 -->
74.1603 <target depends="init" if="have.tests" name="-pre-test-run">
74.1604 <mkdir dir="${build.test.results.dir}"/>
74.1605 </target>
74.1606 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
74.1607 - <j2seproject3:junit testincludes="**/*Test.java"/>
74.1608 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
74.1609 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
74.1610 </target>
74.1611 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
74.1612 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
74.1613 @@ -690,41 +1650,42 @@
74.1614 <target depends="init" if="have.tests" name="-pre-test-run-single">
74.1615 <mkdir dir="${build.test.results.dir}"/>
74.1616 </target>
74.1617 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
74.1618 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
74.1619 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
74.1620 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
74.1621 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
74.1622 </target>
74.1623 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
74.1624 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
74.1625 </target>
74.1626 - <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"/>
74.1627 + <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"/>
74.1628 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
74.1629 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
74.1630 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
74.1631 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
74.1632 + </target>
74.1633 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
74.1634 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
74.1635 + </target>
74.1636 + <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"/>
74.1637 <!--
74.1638 =======================
74.1639 - JUNIT DEBUGGING SECTION
74.1640 + TEST DEBUGGING SECTION
74.1641 =======================
74.1642 -->
74.1643 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
74.1644 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
74.1645 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
74.1646 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
74.1647 - <delete file="${test.report.file}"/>
74.1648 - <mkdir dir="${build.test.results.dir}"/>
74.1649 - <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}">
74.1650 - <customize>
74.1651 - <syspropertyset>
74.1652 - <propertyref prefix="test-sys-prop."/>
74.1653 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
74.1654 - </syspropertyset>
74.1655 - <arg value="${test.class}"/>
74.1656 - <arg value="showoutput=true"/>
74.1657 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
74.1658 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
74.1659 - </customize>
74.1660 - </j2seproject3:debug>
74.1661 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
74.1662 + </target>
74.1663 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
74.1664 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
74.1665 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
74.1666 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
74.1667 </target>
74.1668 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
74.1669 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
74.1670 </target>
74.1671 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
74.1672 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
74.1673 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
74.1674 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
74.1675 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
74.1676 </target>
74.1677 @@ -750,9 +1711,9 @@
74.1678 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
74.1679 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
74.1680 <j2seproject3:debug classname="sun.applet.AppletViewer">
74.1681 - <customize>
74.1682 + <customizeDebuggee>
74.1683 <arg value="${applet.url}"/>
74.1684 - </customize>
74.1685 + </customizeDebuggee>
74.1686 </j2seproject3:debug>
74.1687 </target>
74.1688 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
74.1689 @@ -779,6 +1740,7 @@
74.1690 </target>
74.1691 <target depends="init" name="-do-clean">
74.1692 <delete dir="${build.dir}"/>
74.1693 + <delete dir="${dist.jlink.output}"/>
74.1694 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
74.1695 </target>
74.1696 <target name="-post-clean">
74.1697 @@ -789,9 +1751,12 @@
74.1698 <target name="-check-call-dep">
74.1699 <property file="${call.built.properties}" prefix="already.built."/>
74.1700 <condition property="should.call.dep">
74.1701 - <not>
74.1702 - <isset property="already.built.${call.subproject}"/>
74.1703 - </not>
74.1704 + <and>
74.1705 + <not>
74.1706 + <isset property="already.built.${call.subproject}"/>
74.1707 + </not>
74.1708 + <available file="${call.script}"/>
74.1709 + </and>
74.1710 </condition>
74.1711 </target>
74.1712 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
75.1 --- a/samples/singletons/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
75.2 +++ b/samples/singletons/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
75.3 @@ -1,8 +1,8 @@
75.4 build.xml.data.CRC32=5a9b3034
75.5 -build.xml.script.CRC32=28fad8e6
75.6 -build.xml.stylesheet.CRC32=958a1d3e@1.34.0.45
75.7 +build.xml.script.CRC32=1167db85
75.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
75.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
75.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
75.11 nbproject/build-impl.xml.data.CRC32=5a9b3034
75.12 -nbproject/build-impl.xml.script.CRC32=a0976efa
75.13 -nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.34.0.45
75.14 +nbproject/build-impl.xml.script.CRC32=5af552b8
75.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
76.1 --- a/samples/singletons/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
76.2 +++ b/samples/singletons/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
76.3 @@ -12,8 +12,12 @@
76.4 #debug.transport=dt_socket
76.5 debug.classpath=\
76.6 ${run.classpath}
76.7 +debug.modulepath=\
76.8 + ${run.modulepath}
76.9 debug.test.classpath=\
76.10 ${run.test.classpath}
76.11 +debug.test.modulepath=\
76.12 + ${run.test.modulepath}
76.13 # This directory is removed when the project is cleaned:
76.14 dist.dir=dist
76.15 dist.jar=${dist.dir}/singletons.jar
76.16 @@ -30,14 +34,18 @@
76.17 # Space-separated list of extra javac options
76.18 javac.compilerargs=
76.19 javac.deprecation=false
76.20 -javac.source=1.5
76.21 -javac.target=1.5
76.22 +javac.modulepath=
76.23 +javac.processormodulepath=
76.24 +javac.source=1.6
76.25 +javac.target=1.6
76.26 javac.test.classpath=\
76.27 ${javac.classpath}:\
76.28 ${build.classes.dir}:\
76.29 ${file.reference.org-netbeans-insane.jar}:\
76.30 ${file.reference.org-netbeans-modules-nbjunit.jar}:\
76.31 ${file.reference.junit-4.4.jar}
76.32 +javac.test.modulepath=\
76.33 + ${javac.modulepath}
76.34 javadoc.additionalparam=
76.35 javadoc.author=false
76.36 javadoc.encoding=${source.encoding}
76.37 @@ -59,9 +67,13 @@
76.38 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
76.39 # or test-sys-prop.name=value to set system properties for unit tests):
76.40 run.jvmargs=
76.41 +run.modulepath=\
76.42 + ${javac.modulepath}
76.43 run.test.classpath=\
76.44 ${javac.test.classpath}:\
76.45 ${build.test.classes.dir}
76.46 +run.test.modulepath=\
76.47 + ${javac.test.modulepath}
76.48 source.encoding=UTF-8
76.49 src.dir=src
76.50 test.src.dir=test
77.1 --- a/samples/stateful/build.xml Mon Nov 11 05:47:32 2019 +0100
77.2 +++ b/samples/stateful/build.xml Mon Nov 11 13:17:34 2019 +0100
77.3 @@ -51,8 +51,7 @@
77.4 -init-macrodef-junit: defines macro for junit execution
77.5 -init-macrodef-debug: defines macro for class debugging
77.6 -init-macrodef-java: defines macro for class execution
77.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
77.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
77.9 + -do-jar: JAR building
77.10 run: execution of project
77.11 -javadoc-build: Javadoc generation
77.12 test-report: JUnit report generation
78.1 --- a/samples/stateful/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
78.2 +++ b/samples/stateful/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
78.3 @@ -12,18 +12,18 @@
78.4 - execution
78.5 - debugging
78.6 - javadoc
78.7 - - junit compilation
78.8 - - junit execution
78.9 - - junit debugging
78.10 + - test compilation
78.11 + - test execution
78.12 + - test debugging
78.13 - applet
78.14 - cleanup
78.15
78.16 -->
78.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="stateful-impl">
78.18 - <fail message="Please build using Ant 1.7.1 or higher.">
78.19 +<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="stateful-impl">
78.20 + <fail message="Please build using Ant 1.8.0 or higher.">
78.21 <condition>
78.22 <not>
78.23 - <antversion atleast="1.7.1"/>
78.24 + <antversion atleast="1.8.0"/>
78.25 </not>
78.26 </condition>
78.27 </fail>
78.28 @@ -46,16 +46,89 @@
78.29 <property file="${user.properties.file}"/>
78.30 <!-- The two properties below are usually overridden -->
78.31 <!-- by the active platform. Just a fallback. -->
78.32 - <property name="default.javac.source" value="1.4"/>
78.33 - <property name="default.javac.target" value="1.4"/>
78.34 + <property name="default.javac.source" value="1.6"/>
78.35 + <property name="default.javac.target" value="1.6"/>
78.36 </target>
78.37 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
78.38 <property file="nbproject/configs/${config}.properties"/>
78.39 <property file="nbproject/project.properties"/>
78.40 </target>
78.41 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
78.42 + <target name="-init-modules-supported">
78.43 + <condition property="modules.supported.internal" value="true">
78.44 + <not>
78.45 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
78.46 + </not>
78.47 + </condition>
78.48 + </target>
78.49 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
78.50 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
78.51 + <attribute name="property"/>
78.52 + <attribute name="sourcepath"/>
78.53 + <sequential>
78.54 + <loadresource property="@{property}" quiet="true">
78.55 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
78.56 + <filterchain>
78.57 + <stripjavacomments/>
78.58 + <linecontainsregexp>
78.59 + <regexp pattern="module .* \{"/>
78.60 + </linecontainsregexp>
78.61 + <tokenfilter>
78.62 + <linetokenizer/>
78.63 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
78.64 + </tokenfilter>
78.65 + <striplinebreaks/>
78.66 + </filterchain>
78.67 + </loadresource>
78.68 + </sequential>
78.69 + </macrodef>
78.70 + </target>
78.71 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
78.72 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
78.73 + <condition>
78.74 + <not>
78.75 + <antversion atleast="1.10.0"/>
78.76 + </not>
78.77 + </condition>
78.78 + </fail>
78.79 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
78.80 + <condition property="named.module.internal">
78.81 + <and>
78.82 + <isset property="module.name"/>
78.83 + <length length="0" string="${module.name}" when="greater"/>
78.84 + </and>
78.85 + </condition>
78.86 + <condition property="unnamed.module.internal">
78.87 + <not>
78.88 + <isset property="named.module.internal"/>
78.89 + </not>
78.90 + </condition>
78.91 + <property name="javac.modulepath" value=""/>
78.92 + <property name="run.modulepath" value="${javac.modulepath}"/>
78.93 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
78.94 + <property name="debug.modulepath" value="${run.modulepath}"/>
78.95 + <property name="javac.upgrademodulepath" value=""/>
78.96 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
78.97 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
78.98 + <and>
78.99 + <isset property="javac.systemmodulepath"/>
78.100 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
78.101 + </and>
78.102 + </condition>
78.103 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
78.104 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
78.105 + <property name="module.name" value=""/>
78.106 + </target>
78.107 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
78.108 + <property name="platform.java" value="${java.home}/bin/java"/>
78.109 <available file="${manifest.file}" property="manifest.available"/>
78.110 - <available file="${application.splash}" property="splashscreen.available"/>
78.111 + <condition property="splashscreen.available">
78.112 + <and>
78.113 + <not>
78.114 + <equals arg1="${application.splash}" arg2="" trim="true"/>
78.115 + </not>
78.116 + <available file="${application.splash}"/>
78.117 + </and>
78.118 + </condition>
78.119 <condition property="main.class.available">
78.120 <and>
78.121 <isset property="main.class"/>
78.122 @@ -64,36 +137,22 @@
78.123 </not>
78.124 </and>
78.125 </condition>
78.126 - <condition property="manifest.available+main.class">
78.127 + <condition property="profile.available">
78.128 <and>
78.129 - <isset property="manifest.available"/>
78.130 - <isset property="main.class.available"/>
78.131 - </and>
78.132 - </condition>
78.133 - <condition property="do.mkdist">
78.134 - <and>
78.135 - <isset property="libs.CopyLibs.classpath"/>
78.136 + <isset property="javac.profile"/>
78.137 + <length length="0" string="${javac.profile}" when="greater"/>
78.138 <not>
78.139 - <istrue value="${mkdist.disabled}"/>
78.140 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
78.141 </not>
78.142 </and>
78.143 </condition>
78.144 - <condition property="manifest.available+main.class+mkdist.available">
78.145 - <and>
78.146 - <istrue value="${manifest.available+main.class}"/>
78.147 - <isset property="do.mkdist"/>
78.148 - </and>
78.149 - </condition>
78.150 - <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
78.151 - <and>
78.152 - <istrue value="${manifest.available+main.class+mkdist.available}"/>
78.153 - <istrue value="${splashscreen.available}"/>
78.154 - </and>
78.155 - </condition>
78.156 <condition property="do.archive">
78.157 - <not>
78.158 - <istrue value="${jar.archive.disabled}"/>
78.159 - </not>
78.160 + <or>
78.161 + <not>
78.162 + <istrue value="${jar.archive.disabled}"/>
78.163 + </not>
78.164 + <istrue value="${not.archive.disabled}"/>
78.165 + </or>
78.166 </condition>
78.167 <condition property="do.archive+manifest.available">
78.168 <and>
78.169 @@ -101,21 +160,21 @@
78.170 <istrue value="${do.archive}"/>
78.171 </and>
78.172 </condition>
78.173 - <condition property="do.archive+manifest.available+main.class">
78.174 + <condition property="do.archive+main.class.available">
78.175 <and>
78.176 - <istrue value="${manifest.available+main.class}"/>
78.177 + <isset property="main.class.available"/>
78.178 <istrue value="${do.archive}"/>
78.179 </and>
78.180 </condition>
78.181 - <condition property="do.archive+manifest.available+main.class+mkdist.available">
78.182 + <condition property="do.archive+splashscreen.available">
78.183 <and>
78.184 - <istrue value="${manifest.available+main.class+mkdist.available}"/>
78.185 + <isset property="splashscreen.available"/>
78.186 <istrue value="${do.archive}"/>
78.187 </and>
78.188 </condition>
78.189 - <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
78.190 + <condition property="do.archive+profile.available">
78.191 <and>
78.192 - <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
78.193 + <isset property="profile.available"/>
78.194 <istrue value="${do.archive}"/>
78.195 </and>
78.196 </condition>
78.197 @@ -142,6 +201,7 @@
78.198 </and>
78.199 </condition>
78.200 <property name="run.jvmargs" value=""/>
78.201 + <property name="run.jvmargs.ide" value=""/>
78.202 <property name="javac.compilerargs" value=""/>
78.203 <property name="work.dir" value="${basedir}"/>
78.204 <condition property="no.deps">
78.205 @@ -154,6 +214,7 @@
78.206 <property name="application.args" value=""/>
78.207 <property name="source.encoding" value="${file.encoding}"/>
78.208 <property name="runtime.encoding" value="${source.encoding}"/>
78.209 + <property name="manifest.encoding" value="${source.encoding}"/>
78.210 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
78.211 <and>
78.212 <isset property="javadoc.encoding"/>
78.213 @@ -171,11 +232,56 @@
78.214 </condition>
78.215 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
78.216 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
78.217 - <length length="0" string="${endorsed.classpath}" when="greater"/>
78.218 + <and>
78.219 + <isset property="endorsed.classpath"/>
78.220 + <not>
78.221 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
78.222 + </not>
78.223 + </and>
78.224 </condition>
78.225 - <property name="javac.fork" value="false"/>
78.226 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
78.227 + <isset property="profile.available"/>
78.228 + </condition>
78.229 + <condition else="false" property="jdkBug6558476">
78.230 + <and>
78.231 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
78.232 + <not>
78.233 + <os family="unix"/>
78.234 + </not>
78.235 + </and>
78.236 + </condition>
78.237 + <condition else="false" property="javac.fork">
78.238 + <or>
78.239 + <istrue value="${jdkBug6558476}"/>
78.240 + <istrue value="${javac.external.vm}"/>
78.241 + </or>
78.242 + </condition>
78.243 <property name="jar.index" value="false"/>
78.244 + <property name="jar.index.metainf" value="${jar.index}"/>
78.245 + <property name="copylibs.rebase" value="true"/>
78.246 <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
78.247 + <condition property="junit.available">
78.248 + <or>
78.249 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
78.250 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
78.251 + </or>
78.252 + </condition>
78.253 + <condition property="testng.available">
78.254 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
78.255 + </condition>
78.256 + <condition property="junit+testng.available">
78.257 + <and>
78.258 + <istrue value="${junit.available}"/>
78.259 + <istrue value="${testng.available}"/>
78.260 + </and>
78.261 + </condition>
78.262 + <condition else="testng" property="testng.mode" value="mixed">
78.263 + <istrue value="${junit+testng.available}"/>
78.264 + </condition>
78.265 + <condition else="" property="testng.debug.mode" value="-mixed">
78.266 + <istrue value="${junit+testng.available}"/>
78.267 + </condition>
78.268 + <property name="java.failonerror" value="true"/>
78.269 </target>
78.270 <target name="-post-init">
78.271 <!-- Empty placeholder for easier customization. -->
78.272 @@ -202,11 +308,80 @@
78.273 </sequential>
78.274 </macrodef>
78.275 </target>
78.276 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
78.277 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
78.278 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
78.279 <attribute default="${src.dir}" name="srcdir"/>
78.280 <attribute default="${build.classes.dir}" name="destdir"/>
78.281 <attribute default="${javac.classpath}" name="classpath"/>
78.282 + <attribute default="${javac.modulepath}" name="modulepath"/>
78.283 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
78.284 + <attribute default="${javac.processorpath}" name="processorpath"/>
78.285 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
78.286 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
78.287 + <attribute default="${includes}" name="includes"/>
78.288 + <attribute default="${excludes}" name="excludes"/>
78.289 + <attribute default="${javac.debug}" name="debug"/>
78.290 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
78.291 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
78.292 + <attribute default="${empty.dir}" name="gensrcdir"/>
78.293 + <element name="customize" optional="true"/>
78.294 + <sequential>
78.295 + <condition property="warn.excludes.internal">
78.296 + <and>
78.297 + <isset property="named.module.internal"/>
78.298 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
78.299 + </and>
78.300 + </condition>
78.301 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
78.302 + <property location="${build.dir}/empty" name="empty.dir"/>
78.303 + <mkdir dir="${empty.dir}"/>
78.304 + <mkdir dir="@{apgeneratedsrcdir}"/>
78.305 + <condition property="processormodulepath.set">
78.306 + <resourcecount count="0" when="greater">
78.307 + <path>
78.308 + <pathelement path="@{processormodulepath}"/>
78.309 + </path>
78.310 + </resourcecount>
78.311 + </condition>
78.312 + <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}">
78.313 + <src>
78.314 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
78.315 + <include name="*"/>
78.316 + </dirset>
78.317 + </src>
78.318 + <classpath>
78.319 + <path path="@{classpath}"/>
78.320 + </classpath>
78.321 + <modulepath>
78.322 + <path path="@{modulepath}"/>
78.323 + </modulepath>
78.324 + <upgrademodulepath>
78.325 + <path path="@{upgrademodulepath}"/>
78.326 + </upgrademodulepath>
78.327 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
78.328 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
78.329 + <compilerarg line="${javac.compilerargs}"/>
78.330 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
78.331 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
78.332 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
78.333 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
78.334 + <compilerarg line="${ap.processors.internal}"/>
78.335 + <compilerarg line="${annotation.processing.processor.options}"/>
78.336 + <compilerarg value="-s"/>
78.337 + <compilerarg path="@{apgeneratedsrcdir}"/>
78.338 + <compilerarg line="${ap.proc.none.internal}"/>
78.339 + <customize/>
78.340 + </javac>
78.341 + </sequential>
78.342 + </macrodef>
78.343 + </target>
78.344 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
78.345 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
78.346 + <attribute default="${src.dir}" name="srcdir"/>
78.347 + <attribute default="${build.classes.dir}" name="destdir"/>
78.348 + <attribute default="${javac.classpath}" name="classpath"/>
78.349 + <attribute default="${javac.modulepath}" name="modulepath"/>
78.350 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
78.351 <attribute default="${javac.processorpath}" name="processorpath"/>
78.352 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
78.353 <attribute default="${includes}" name="includes"/>
78.354 @@ -229,9 +404,10 @@
78.355 <path path="@{classpath}"/>
78.356 </classpath>
78.357 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
78.358 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
78.359 <compilerarg line="${javac.compilerargs}"/>
78.360 <compilerarg value="-processorpath"/>
78.361 - <compilerarg path="@{processorpath}"/>
78.362 + <compilerarg path="@{processorpath}:${empty.dir}"/>
78.363 <compilerarg line="${ap.processors.internal}"/>
78.364 <compilerarg line="${annotation.processing.processor.options}"/>
78.365 <compilerarg value="-s"/>
78.366 @@ -242,11 +418,13 @@
78.367 </sequential>
78.368 </macrodef>
78.369 </target>
78.370 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
78.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
78.372 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
78.373 <attribute default="${src.dir}" name="srcdir"/>
78.374 <attribute default="${build.classes.dir}" name="destdir"/>
78.375 <attribute default="${javac.classpath}" name="classpath"/>
78.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
78.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
78.378 <attribute default="${javac.processorpath}" name="processorpath"/>
78.379 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
78.380 <attribute default="${includes}" name="includes"/>
78.381 @@ -268,13 +446,14 @@
78.382 <path path="@{classpath}"/>
78.383 </classpath>
78.384 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
78.385 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
78.386 <compilerarg line="${javac.compilerargs}"/>
78.387 <customize/>
78.388 </javac>
78.389 </sequential>
78.390 </macrodef>
78.391 </target>
78.392 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
78.393 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
78.394 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
78.395 <attribute default="${src.dir}" name="srcdir"/>
78.396 <attribute default="${build.classes.dir}" name="destdir"/>
78.397 @@ -291,52 +470,383 @@
78.398 <attribute default="${build.classes.dir}" name="destdir"/>
78.399 <sequential>
78.400 <fail unless="javac.includes">Must set javac.includes</fail>
78.401 - <pathconvert pathsep="," property="javac.includes.binary">
78.402 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
78.403 <path>
78.404 <filelist dir="@{destdir}" files="${javac.includes}"/>
78.405 </path>
78.406 <globmapper from="*.java" to="*.class"/>
78.407 </pathconvert>
78.408 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
78.409 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
78.410 <delete>
78.411 - <files includes="${javac.includes.binary}"/>
78.412 + <files includesfile="${javac.includesfile.binary}"/>
78.413 + </delete>
78.414 + <delete>
78.415 + <fileset file="${javac.includesfile.binary}"/>
78.416 </delete>
78.417 </sequential>
78.418 </macrodef>
78.419 </target>
78.420 - <target name="-init-macrodef-junit">
78.421 + <target if="${junit.available}" name="-init-macrodef-junit-init">
78.422 + <condition else="false" property="nb.junit.batch" value="true">
78.423 + <and>
78.424 + <istrue value="${junit.available}"/>
78.425 + <not>
78.426 + <isset property="test.method"/>
78.427 + </not>
78.428 + </and>
78.429 + </condition>
78.430 + <condition else="false" property="nb.junit.single" value="true">
78.431 + <and>
78.432 + <istrue value="${junit.available}"/>
78.433 + <isset property="test.method"/>
78.434 + </and>
78.435 + </condition>
78.436 + </target>
78.437 + <target name="-init-test-properties">
78.438 + <property name="test.binaryincludes" value="<nothing>"/>
78.439 + <property name="test.binarytestincludes" value=""/>
78.440 + <property name="test.binaryexcludes" value=""/>
78.441 + </target>
78.442 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
78.443 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
78.444 + <attribute default="${includes}" name="includes"/>
78.445 + <attribute default="${excludes}" name="excludes"/>
78.446 + <element name="customizePrototype" optional="true"/>
78.447 + <sequential>
78.448 + <property name="junit.forkmode" value="perTest"/>
78.449 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
78.450 + <syspropertyset>
78.451 + <propertyref prefix="test-sys-prop."/>
78.452 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
78.453 + </syspropertyset>
78.454 + <classpath>
78.455 + <path path="${run.test.classpath}"/>
78.456 + </classpath>
78.457 + <modulepath>
78.458 + <path path="${run.test.modulepath}"/>
78.459 + </modulepath>
78.460 + <formatter type="brief" usefile="false"/>
78.461 + <formatter type="xml"/>
78.462 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.463 + <jvmarg value="-ea"/>
78.464 + <jvmarg line="${run.test.jvmargs}"/>
78.465 + <customizePrototype/>
78.466 + </junit>
78.467 + </sequential>
78.468 + </macrodef>
78.469 + </target>
78.470 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
78.471 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
78.472 + <attribute default="${includes}" name="includes"/>
78.473 + <attribute default="${excludes}" name="excludes"/>
78.474 + <element name="customizePrototype" optional="true"/>
78.475 + <sequential>
78.476 + <property name="junit.forkmode" value="perTest"/>
78.477 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
78.478 + <syspropertyset>
78.479 + <propertyref prefix="test-sys-prop."/>
78.480 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
78.481 + </syspropertyset>
78.482 + <classpath>
78.483 + <path path="${run.test.classpath}"/>
78.484 + </classpath>
78.485 + <formatter type="brief" usefile="false"/>
78.486 + <formatter type="xml"/>
78.487 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.488 + <jvmarg value="-ea"/>
78.489 + <customizePrototype/>
78.490 + </junit>
78.491 + </sequential>
78.492 + </macrodef>
78.493 + </target>
78.494 + <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}">
78.495 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
78.496 <attribute default="${includes}" name="includes"/>
78.497 <attribute default="${excludes}" name="excludes"/>
78.498 <attribute default="**" name="testincludes"/>
78.499 + <attribute default="" name="testmethods"/>
78.500 + <element name="customize" optional="true"/>
78.501 <sequential>
78.502 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
78.503 - <batchtest todir="${build.test.results.dir}">
78.504 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
78.505 - <filename name="@{testincludes}"/>
78.506 - </fileset>
78.507 - </batchtest>
78.508 + <j2seproject3:junit-prototype>
78.509 + <customizePrototype>
78.510 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
78.511 + <customize/>
78.512 + </customizePrototype>
78.513 + </j2seproject3:junit-prototype>
78.514 + </sequential>
78.515 + </macrodef>
78.516 + </target>
78.517 + <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}">
78.518 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
78.519 + <attribute default="${includes}" name="includes"/>
78.520 + <attribute default="${excludes}" name="excludes"/>
78.521 + <attribute default="**" name="testincludes"/>
78.522 + <attribute default="" name="testmethods"/>
78.523 + <element name="customize" optional="true"/>
78.524 + <sequential>
78.525 + <j2seproject3:junit-prototype>
78.526 + <customizePrototype>
78.527 + <batchtest todir="${build.test.results.dir}">
78.528 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
78.529 + <filename name="@{testincludes}"/>
78.530 + </fileset>
78.531 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
78.532 + <filename name="${test.binarytestincludes}"/>
78.533 + </fileset>
78.534 + </batchtest>
78.535 + <customize/>
78.536 + </customizePrototype>
78.537 + </j2seproject3:junit-prototype>
78.538 + </sequential>
78.539 + </macrodef>
78.540 + </target>
78.541 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
78.542 + <target if="${testng.available}" name="-init-macrodef-testng">
78.543 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
78.544 + <attribute default="${includes}" name="includes"/>
78.545 + <attribute default="${excludes}" name="excludes"/>
78.546 + <attribute default="**" name="testincludes"/>
78.547 + <attribute default="" name="testmethods"/>
78.548 + <element name="customize" optional="true"/>
78.549 + <sequential>
78.550 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
78.551 + <isset property="test.method"/>
78.552 + </condition>
78.553 + <union id="test.set">
78.554 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
78.555 + <filename name="@{testincludes}"/>
78.556 + </fileset>
78.557 + </union>
78.558 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
78.559 + <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="stateful" testname="TestNG tests" workingDir="${work.dir}">
78.560 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
78.561 + <propertyset>
78.562 + <propertyref prefix="test-sys-prop."/>
78.563 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
78.564 + </propertyset>
78.565 <classpath>
78.566 <path path="${run.test.classpath}"/>
78.567 </classpath>
78.568 - <syspropertyset>
78.569 - <propertyref prefix="test-sys-prop."/>
78.570 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
78.571 - </syspropertyset>
78.572 - <formatter type="brief" usefile="false"/>
78.573 - <formatter type="xml"/>
78.574 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.575 - <jvmarg line="${run.jvmargs}"/>
78.576 - </junit>
78.577 + <customize/>
78.578 + </testng>
78.579 </sequential>
78.580 </macrodef>
78.581 </target>
78.582 + <target name="-init-macrodef-test-impl">
78.583 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
78.584 + <attribute default="${includes}" name="includes"/>
78.585 + <attribute default="${excludes}" name="excludes"/>
78.586 + <attribute default="**" name="testincludes"/>
78.587 + <attribute default="" name="testmethods"/>
78.588 + <element implicit="true" name="customize" optional="true"/>
78.589 + <sequential>
78.590 + <echo>No tests executed.</echo>
78.591 + </sequential>
78.592 + </macrodef>
78.593 + </target>
78.594 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
78.595 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
78.596 + <attribute default="${includes}" name="includes"/>
78.597 + <attribute default="${excludes}" name="excludes"/>
78.598 + <attribute default="**" name="testincludes"/>
78.599 + <attribute default="" name="testmethods"/>
78.600 + <element implicit="true" name="customize" optional="true"/>
78.601 + <sequential>
78.602 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
78.603 + <customize/>
78.604 + </j2seproject3:junit>
78.605 + </sequential>
78.606 + </macrodef>
78.607 + </target>
78.608 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
78.609 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
78.610 + <attribute default="${includes}" name="includes"/>
78.611 + <attribute default="${excludes}" name="excludes"/>
78.612 + <attribute default="**" name="testincludes"/>
78.613 + <attribute default="" name="testmethods"/>
78.614 + <element implicit="true" name="customize" optional="true"/>
78.615 + <sequential>
78.616 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
78.617 + <customize/>
78.618 + </j2seproject3:testng>
78.619 + </sequential>
78.620 + </macrodef>
78.621 + </target>
78.622 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
78.623 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
78.624 + <attribute default="${includes}" name="includes"/>
78.625 + <attribute default="${excludes}" name="excludes"/>
78.626 + <attribute default="**" name="testincludes"/>
78.627 + <attribute default="" name="testmethods"/>
78.628 + <sequential>
78.629 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
78.630 + <customize>
78.631 + <jvmarg line="${run.jvmargs}"/>
78.632 + <jvmarg line="${run.jvmargs.ide}"/>
78.633 + </customize>
78.634 + </j2seproject3:test-impl>
78.635 + </sequential>
78.636 + </macrodef>
78.637 + </target>
78.638 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
78.639 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
78.640 + <attribute default="${includes}" name="includes"/>
78.641 + <attribute default="${excludes}" name="excludes"/>
78.642 + <attribute default="**" name="testincludes"/>
78.643 + <attribute default="" name="testmethods"/>
78.644 + <element name="customizeDebuggee" optional="true"/>
78.645 + <sequential>
78.646 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
78.647 + <customize>
78.648 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
78.649 + <customizeDebuggee/>
78.650 + </customize>
78.651 + </j2seproject3:junit>
78.652 + </sequential>
78.653 + </macrodef>
78.654 + </target>
78.655 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
78.656 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
78.657 + <attribute default="${main.class}" name="testClass"/>
78.658 + <attribute default="" name="testMethod"/>
78.659 + <element name="customize2" optional="true"/>
78.660 + <sequential>
78.661 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
78.662 + <isset property="test.method"/>
78.663 + </condition>
78.664 + <condition else="-suitename stateful -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
78.665 + <matches pattern=".*\.xml" string="@{testClass}"/>
78.666 + </condition>
78.667 + <delete dir="${build.test.results.dir}" quiet="true"/>
78.668 + <mkdir dir="${build.test.results.dir}"/>
78.669 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
78.670 + <customizeDebuggee>
78.671 + <customize2/>
78.672 + <jvmarg value="-ea"/>
78.673 + <arg line="${testng.debug.mode}"/>
78.674 + <arg line="-d ${build.test.results.dir}"/>
78.675 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
78.676 + <arg line="${testng.cmd.args}"/>
78.677 + </customizeDebuggee>
78.678 + </j2seproject3:debug>
78.679 + </sequential>
78.680 + </macrodef>
78.681 + </target>
78.682 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
78.683 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
78.684 + <attribute default="${main.class}" name="testClass"/>
78.685 + <attribute default="" name="testMethod"/>
78.686 + <element implicit="true" name="customize2" optional="true"/>
78.687 + <sequential>
78.688 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
78.689 + <customize2/>
78.690 + </j2seproject3:testng-debug>
78.691 + </sequential>
78.692 + </macrodef>
78.693 + </target>
78.694 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
78.695 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
78.696 + <attribute default="${includes}" name="includes"/>
78.697 + <attribute default="${excludes}" name="excludes"/>
78.698 + <attribute default="**" name="testincludes"/>
78.699 + <attribute default="" name="testmethods"/>
78.700 + <attribute default="${main.class}" name="testClass"/>
78.701 + <attribute default="" name="testMethod"/>
78.702 + <sequential>
78.703 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
78.704 + <customizeDebuggee>
78.705 + <jvmarg line="${run.jvmargs}"/>
78.706 + <jvmarg line="${run.jvmargs.ide}"/>
78.707 + </customizeDebuggee>
78.708 + </j2seproject3:test-debug-impl>
78.709 + </sequential>
78.710 + </macrodef>
78.711 + </target>
78.712 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
78.713 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
78.714 + <attribute default="${includes}" name="includes"/>
78.715 + <attribute default="${excludes}" name="excludes"/>
78.716 + <attribute default="**" name="testincludes"/>
78.717 + <attribute default="" name="testmethods"/>
78.718 + <attribute default="${main.class}" name="testClass"/>
78.719 + <attribute default="" name="testMethod"/>
78.720 + <sequential>
78.721 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
78.722 + <customize2>
78.723 + <syspropertyset>
78.724 + <propertyref prefix="test-sys-prop."/>
78.725 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
78.726 + </syspropertyset>
78.727 + </customize2>
78.728 + </j2seproject3:testng-debug-impl>
78.729 + </sequential>
78.730 + </macrodef>
78.731 + </target>
78.732 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
78.733 + <!--
78.734 + pre NB7.2 profiling section; consider it deprecated
78.735 + -->
78.736 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
78.737 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
78.738 + <!-- Empty placeholder for easier customization. -->
78.739 + <!-- You can override this target in the ../build.xml file. -->
78.740 + </target>
78.741 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
78.742 + <!-- Empty placeholder for easier customization. -->
78.743 + <!-- You can override this target in the ../build.xml file. -->
78.744 + </target>
78.745 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
78.746 + <macrodef name="resolve">
78.747 + <attribute name="name"/>
78.748 + <attribute name="value"/>
78.749 + <sequential>
78.750 + <property name="@{name}" value="${env.@{value}}"/>
78.751 + </sequential>
78.752 + </macrodef>
78.753 + <macrodef name="profile">
78.754 + <attribute default="${main.class}" name="classname"/>
78.755 + <element name="customize" optional="true"/>
78.756 + <sequential>
78.757 + <property environment="env"/>
78.758 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
78.759 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
78.760 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.761 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
78.762 + <jvmarg line="${profiler.info.jvmargs}"/>
78.763 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
78.764 + <arg line="${application.args}"/>
78.765 + <classpath>
78.766 + <path path="${run.classpath}"/>
78.767 + </classpath>
78.768 + <syspropertyset>
78.769 + <propertyref prefix="run-sys-prop."/>
78.770 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
78.771 + </syspropertyset>
78.772 + <customize/>
78.773 + </java>
78.774 + </sequential>
78.775 + </macrodef>
78.776 + </target>
78.777 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
78.778 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
78.779 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
78.780 + </target>
78.781 + <!--
78.782 + end of pre NB7.2 profiling section
78.783 + -->
78.784 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
78.785 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
78.786 <attribute default="${main.class}" name="name"/>
78.787 + <attribute default="${debug.modulepath}" name="modulepath"/>
78.788 <attribute default="${debug.classpath}" name="classpath"/>
78.789 <attribute default="" name="stopclassname"/>
78.790 <sequential>
78.791 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
78.792 + <modulepath>
78.793 + <path path="@{modulepath}"/>
78.794 + </modulepath>
78.795 <classpath>
78.796 <path path="@{classpath}"/>
78.797 </classpath>
78.798 @@ -355,18 +865,6 @@
78.799 </macrodef>
78.800 </target>
78.801 <target name="-init-debug-args">
78.802 - <property name="version-output" value="java version "${ant.java.version}"/>
78.803 - <condition property="have-jdk-older-than-1.4">
78.804 - <or>
78.805 - <contains string="${version-output}" substring="java version "1.0"/>
78.806 - <contains string="${version-output}" substring="java version "1.1"/>
78.807 - <contains string="${version-output}" substring="java version "1.2"/>
78.808 - <contains string="${version-output}" substring="java version "1.3"/>
78.809 - </or>
78.810 - </condition>
78.811 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
78.812 - <istrue value="${have-jdk-older-than-1.4}"/>
78.813 - </condition>
78.814 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
78.815 <os family="windows"/>
78.816 </condition>
78.817 @@ -376,17 +874,103 @@
78.818 </target>
78.819 <target depends="-init-debug-args" name="-init-macrodef-debug">
78.820 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
78.821 + <attribute default="${module.name}" name="modulename"/>
78.822 <attribute default="${main.class}" name="classname"/>
78.823 + <attribute default="${debug.modulepath}" name="modulepath"/>
78.824 <attribute default="${debug.classpath}" name="classpath"/>
78.825 + <element name="customizeDebuggee" optional="true"/>
78.826 + <sequential>
78.827 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
78.828 + <customize>
78.829 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
78.830 + <customizeDebuggee/>
78.831 + </customize>
78.832 + </j2seproject1:java>
78.833 + </sequential>
78.834 + </macrodef>
78.835 + </target>
78.836 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
78.837 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
78.838 + <attribute default="${module.name}" name="modulename"/>
78.839 + <attribute default="${main.class}" name="classname"/>
78.840 + <attribute default="${run.modulepath}" name="modulepath"/>
78.841 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
78.842 + <attribute default="${run.classpath}" name="classpath"/>
78.843 + <attribute default="jvm" name="jvm"/>
78.844 <element name="customize" optional="true"/>
78.845 <sequential>
78.846 - <java classname="@{classname}" dir="${work.dir}" fork="true">
78.847 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.848 - <jvmarg line="${debug-args-line}"/>
78.849 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
78.850 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
78.851 + <classpath>
78.852 + <path path="@{classpath}"/>
78.853 + </classpath>
78.854 + <modulepath>
78.855 + <pathelement path="@{modulepath}"/>
78.856 + <pathelement location="${module.build.classes.dir}"/>
78.857 + </modulepath>
78.858 + <upgrademodulepath>
78.859 + <path path="@{upgrademodulepath}"/>
78.860 + </upgrademodulepath>
78.861 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
78.862 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
78.863 <jvmarg line="${run.jvmargs}"/>
78.864 + <jvmarg line="${run.jvmargs.ide}"/>
78.865 + <syspropertyset>
78.866 + <propertyref prefix="run-sys-prop."/>
78.867 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
78.868 + </syspropertyset>
78.869 + <customize/>
78.870 + </java>
78.871 + </sequential>
78.872 + </macrodef>
78.873 + </target>
78.874 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
78.875 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
78.876 + <attribute default="" name="modulename"/>
78.877 + <attribute default="${main.class}" name="classname"/>
78.878 + <attribute default="${run.modulepath}" name="modulepath"/>
78.879 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
78.880 + <attribute default="${run.classpath}" name="classpath"/>
78.881 + <attribute default="jvm" name="jvm"/>
78.882 + <element name="customize" optional="true"/>
78.883 + <sequential>
78.884 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
78.885 + <classpath>
78.886 + <path path="@{classpath}"/>
78.887 + </classpath>
78.888 + <modulepath>
78.889 + <path path="@{modulepath}"/>
78.890 + </modulepath>
78.891 + <upgrademodulepath>
78.892 + <path path="@{upgrademodulepath}"/>
78.893 + </upgrademodulepath>
78.894 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
78.895 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
78.896 + <jvmarg line="${run.jvmargs}"/>
78.897 + <jvmarg line="${run.jvmargs.ide}"/>
78.898 + <syspropertyset>
78.899 + <propertyref prefix="run-sys-prop."/>
78.900 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
78.901 + </syspropertyset>
78.902 + <customize/>
78.903 + </java>
78.904 + </sequential>
78.905 + </macrodef>
78.906 + </target>
78.907 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
78.908 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
78.909 + <attribute default="" name="modulename"/>
78.910 + <attribute default="${main.class}" name="classname"/>
78.911 + <attribute default="" name="modulepath"/>
78.912 + <attribute default="${run.classpath}" name="classpath"/>
78.913 + <attribute default="jvm" name="jvm"/>
78.914 + <element name="customize" optional="true"/>
78.915 + <sequential>
78.916 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
78.917 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.918 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
78.919 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
78.920 + <jvmarg line="${run.jvmargs}"/>
78.921 + <jvmarg line="${run.jvmargs.ide}"/>
78.922 <classpath>
78.923 <path path="@{classpath}"/>
78.924 </classpath>
78.925 @@ -399,31 +983,10 @@
78.926 </sequential>
78.927 </macrodef>
78.928 </target>
78.929 - <target name="-init-macrodef-java">
78.930 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
78.931 - <attribute default="${main.class}" name="classname"/>
78.932 - <attribute default="${run.classpath}" name="classpath"/>
78.933 - <element name="customize" optional="true"/>
78.934 - <sequential>
78.935 - <java classname="@{classname}" dir="${work.dir}" fork="true">
78.936 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
78.937 - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
78.938 - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
78.939 - <jvmarg line="${run.jvmargs}"/>
78.940 - <classpath>
78.941 - <path path="@{classpath}"/>
78.942 - </classpath>
78.943 - <syspropertyset>
78.944 - <propertyref prefix="run-sys-prop."/>
78.945 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
78.946 - </syspropertyset>
78.947 - <customize/>
78.948 - </java>
78.949 - </sequential>
78.950 - </macrodef>
78.951 - </target>
78.952 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
78.953 <target name="-init-macrodef-copylibs">
78.954 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
78.955 + <attribute default="${manifest.file}" name="manifest"/>
78.956 <element name="customize" optional="true"/>
78.957 <sequential>
78.958 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
78.959 @@ -435,12 +998,15 @@
78.960 <path path="${run.classpath.without.build.classes.dir}"/>
78.961 <chainedmapper>
78.962 <flattenmapper/>
78.963 + <filtermapper>
78.964 + <replacestring from=" " to="%20"/>
78.965 + </filtermapper>
78.966 <globmapper from="*" to="lib/*"/>
78.967 </chainedmapper>
78.968 </pathconvert>
78.969 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
78.970 - <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
78.971 - <fileset dir="${build.classes.dir}"/>
78.972 + <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}">
78.973 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
78.974 <manifest>
78.975 <attribute name="Class-Path" value="${jar.classpath}"/>
78.976 <customize/>
78.977 @@ -451,8 +1017,8 @@
78.978 </target>
78.979 <target name="-init-presetdef-jar">
78.980 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
78.981 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
78.982 - <j2seproject1:fileset dir="${build.classes.dir}"/>
78.983 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
78.984 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
78.985 </jar>
78.986 </presetdef>
78.987 </target>
78.988 @@ -480,7 +1046,7 @@
78.989 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
78.990 <property name="ap.cmd.line.internal" value=""/>
78.991 </target>
78.992 - <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"/>
78.993 + <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"/>
78.994 <!--
78.995 ===================
78.996 COMPILATION SECTION
78.997 @@ -507,7 +1073,9 @@
78.998 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
78.999 </target>
78.1000 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
78.1001 - <antcall target="clean"/>
78.1002 + <antcall target="clean">
78.1003 + <param name="no.dependencies" value="true"/>
78.1004 + </antcall>
78.1005 </target>
78.1006 <target depends="init,deps-jar" name="-pre-pre-compile">
78.1007 <mkdir dir="${build.classes.dir}"/>
78.1008 @@ -533,7 +1101,7 @@
78.1009 <target if="has.persistence.xml" name="-copy-persistence-xml">
78.1010 <mkdir dir="${build.classes.dir}/META-INF"/>
78.1011 <copy todir="${build.classes.dir}/META-INF">
78.1012 - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
78.1013 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
78.1014 </copy>
78.1015 </target>
78.1016 <target name="-post-compile">
78.1017 @@ -548,7 +1116,7 @@
78.1018 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
78.1019 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
78.1020 <j2seproject3:force-recompile/>
78.1021 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
78.1022 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
78.1023 </target>
78.1024 <target name="-post-compile-single">
78.1025 <!-- Empty placeholder for easier customization. -->
78.1026 @@ -568,56 +1136,191 @@
78.1027 <!-- Empty placeholder for easier customization. -->
78.1028 <!-- You can override this target in the ../build.xml file. -->
78.1029 </target>
78.1030 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
78.1031 - <j2seproject1:jar/>
78.1032 + <target depends="init,compile" name="-check-module-main-class">
78.1033 + <pathconvert property="main.class.file">
78.1034 + <string value="${main.class}"/>
78.1035 + <unpackagemapper from="*" to="*.class"/>
78.1036 + </pathconvert>
78.1037 + <condition property="do.module.main.class">
78.1038 + <and>
78.1039 + <isset property="main.class.available"/>
78.1040 + <available file="${build.classes.dir}/module-info.class"/>
78.1041 + <available file="${build.classes.dir}/${main.class.file}"/>
78.1042 + <isset property="libs.CopyLibs.classpath"/>
78.1043 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
78.1044 + </and>
78.1045 + </condition>
78.1046 </target>
78.1047 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
78.1048 - <j2seproject1:jar manifest="${manifest.file}"/>
78.1049 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
78.1050 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
78.1051 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
78.1052 </target>
78.1053 - <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">
78.1054 - <j2seproject1:jar manifest="${manifest.file}">
78.1055 - <j2seproject1:manifest>
78.1056 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
78.1057 - </j2seproject1:manifest>
78.1058 - </j2seproject1:jar>
78.1059 - <echo>To run this application from the command line without Ant, try:</echo>
78.1060 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
78.1061 - <property location="${dist.jar}" name="dist.jar.resolved"/>
78.1062 - <pathconvert property="run.classpath.with.dist.jar">
78.1063 - <path path="${run.classpath}"/>
78.1064 - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
78.1065 - </pathconvert>
78.1066 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
78.1067 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
78.1068 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
78.1069 + <touch file="${tmp.manifest.file}" verbose="false"/>
78.1070 </target>
78.1071 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
78.1072 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
78.1073 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
78.1074 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
78.1075 + </target>
78.1076 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
78.1077 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
78.1078 + <attribute name="Main-Class" value="${main.class}"/>
78.1079 + </manifest>
78.1080 + </target>
78.1081 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
78.1082 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
78.1083 + <attribute name="Profile" value="${javac.profile}"/>
78.1084 + </manifest>
78.1085 + </target>
78.1086 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
78.1087 <basename file="${application.splash}" property="splashscreen.basename"/>
78.1088 <mkdir dir="${build.classes.dir}/META-INF"/>
78.1089 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
78.1090 - <j2seproject3:copylibs>
78.1091 - <customize>
78.1092 - <attribute name="Main-Class" value="${main.class}"/>
78.1093 - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
78.1094 - </customize>
78.1095 - </j2seproject3:copylibs>
78.1096 - <echo>To run this application from the command line without Ant, try:</echo>
78.1097 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
78.1098 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
78.1099 + </manifest>
78.1100 + </target>
78.1101 + <target depends="init,compile" name="-check-do-mkdist">
78.1102 + <condition property="do.mkdist">
78.1103 + <and>
78.1104 + <isset property="do.archive"/>
78.1105 + <isset property="libs.CopyLibs.classpath"/>
78.1106 + <not>
78.1107 + <istrue value="${mkdist.disabled}"/>
78.1108 + </not>
78.1109 + <not>
78.1110 + <available file="${build.classes.dir}/module-info.class"/>
78.1111 + </not>
78.1112 + </and>
78.1113 + </condition>
78.1114 + </target>
78.1115 + <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">
78.1116 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
78.1117 + <echo level="info">To run this application from the command line without Ant, try:</echo>
78.1118 <property location="${dist.jar}" name="dist.jar.resolved"/>
78.1119 - <echo>java -jar "${dist.jar.resolved}"</echo>
78.1120 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
78.1121 </target>
78.1122 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
78.1123 - <j2seproject3:copylibs>
78.1124 - <customize>
78.1125 - <attribute name="Main-Class" value="${main.class}"/>
78.1126 - </customize>
78.1127 - </j2seproject3:copylibs>
78.1128 - <echo>To run this application from the command line without Ant, try:</echo>
78.1129 + <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">
78.1130 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
78.1131 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
78.1132 <property location="${dist.jar}" name="dist.jar.resolved"/>
78.1133 - <echo>java -jar "${dist.jar.resolved}"</echo>
78.1134 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
78.1135 + <isset property="named.module.internal"/>
78.1136 + </condition>
78.1137 + <pathconvert property="run.classpath.with.dist.jar">
78.1138 + <path path="${run.classpath}"/>
78.1139 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
78.1140 + </pathconvert>
78.1141 + <pathconvert property="run.modulepath.with.dist.jar">
78.1142 + <path location="${dist.jar.resolved}"/>
78.1143 + <path path="${run.modulepath}"/>
78.1144 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
78.1145 + </pathconvert>
78.1146 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
78.1147 + <isset property="named.module.internal"/>
78.1148 + </condition>
78.1149 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
78.1150 + <and>
78.1151 + <isset property="modules.supported.internal"/>
78.1152 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
78.1153 + </and>
78.1154 + </condition>
78.1155 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
78.1156 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
78.1157 + </condition>
78.1158 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
78.1159 + <isset property="do.module.main.class"/>
78.1160 + </condition>
78.1161 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
78.1162 + <isset property="named.module.internal"/>
78.1163 + </condition>
78.1164 + <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}">
78.1165 + <isset property="main.class.available"/>
78.1166 + </condition>
78.1167 + <condition else="debug" property="jar.usage.level" value="info">
78.1168 + <isset property="main.class.available"/>
78.1169 + </condition>
78.1170 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
78.1171 </target>
78.1172 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
78.1173 + <delete>
78.1174 + <fileset file="${tmp.manifest.file}"/>
78.1175 + </delete>
78.1176 + </target>
78.1177 + <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"/>
78.1178 + <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"/>
78.1179 <target name="-post-jar">
78.1180 <!-- Empty placeholder for easier customization. -->
78.1181 <!-- You can override this target in the ../build.xml file. -->
78.1182 </target>
78.1183 - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
78.1184 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
78.1185 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
78.1186 + <!--
78.1187 + =================
78.1188 + DEPLOY SECTION
78.1189 + =================
78.1190 + -->
78.1191 + <target name="-pre-deploy">
78.1192 + <!-- Empty placeholder for easier customization. -->
78.1193 + <!-- You can override this target in the ../build.xml file. -->
78.1194 + </target>
78.1195 + <target depends="init" name="-check-jlink">
78.1196 + <condition property="do.jlink.internal">
78.1197 + <and>
78.1198 + <istrue value="${do.jlink}"/>
78.1199 + <isset property="do.archive"/>
78.1200 + <isset property="named.module.internal"/>
78.1201 + </and>
78.1202 + </condition>
78.1203 + </target>
78.1204 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
78.1205 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
78.1206 + <property name="jlink.launcher.name" value="${application.title}"/>
78.1207 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
78.1208 + <and>
78.1209 + <isset property="jlink.additionalmodules"/>
78.1210 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
78.1211 + </and>
78.1212 + </condition>
78.1213 + <condition property="jlink.do.strip.internal">
78.1214 + <and>
78.1215 + <isset property="jlink.strip"/>
78.1216 + <istrue value="${jlink.strip}"/>
78.1217 + </and>
78.1218 + </condition>
78.1219 + <condition property="jlink.do.additionalparam.internal">
78.1220 + <and>
78.1221 + <isset property="jlink.additionalparam"/>
78.1222 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
78.1223 + </and>
78.1224 + </condition>
78.1225 + <condition property="jlink.do.launcher.internal">
78.1226 + <and>
78.1227 + <istrue value="${jlink.launcher}"/>
78.1228 + <isset property="main.class.available"/>
78.1229 + </and>
78.1230 + </condition>
78.1231 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
78.1232 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
78.1233 + <exec executable="${platform.jlink}">
78.1234 + <arg value="--module-path"/>
78.1235 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
78.1236 + <arg value="--add-modules"/>
78.1237 + <arg value="${jlink.add.modules}"/>
78.1238 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
78.1239 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
78.1240 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
78.1241 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
78.1242 + <arg value="--output"/>
78.1243 + <arg value="${dist.jlink.output}"/>
78.1244 + </exec>
78.1245 + </target>
78.1246 + <target name="-post-deploy">
78.1247 + <!-- Empty placeholder for easier customization. -->
78.1248 + <!-- You can override this target in the ../build.xml file. -->
78.1249 + </target>
78.1250 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
78.1251 <!--
78.1252 =================
78.1253 EXECUTION SECTION
78.1254 @@ -654,9 +1357,9 @@
78.1255 </target>
78.1256 <target depends="init,compile" name="-debug-start-debuggee">
78.1257 <j2seproject3:debug>
78.1258 - <customize>
78.1259 + <customizeDebuggee>
78.1260 <arg line="${application.args}"/>
78.1261 - </customize>
78.1262 + </customizeDebuggee>
78.1263 </j2seproject3:debug>
78.1264 </target>
78.1265 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
78.1266 @@ -683,23 +1386,146 @@
78.1267 </target>
78.1268 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
78.1269 <!--
78.1270 + =================
78.1271 + PROFILING SECTION
78.1272 + =================
78.1273 + -->
78.1274 + <!--
78.1275 + pre NB7.2 profiler integration
78.1276 + -->
78.1277 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
78.1278 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
78.1279 + <nbprofiledirect>
78.1280 + <classpath>
78.1281 + <path path="${run.classpath}"/>
78.1282 + </classpath>
78.1283 + </nbprofiledirect>
78.1284 + <profile/>
78.1285 + </target>
78.1286 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
78.1287 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
78.1288 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
78.1289 + <nbprofiledirect>
78.1290 + <classpath>
78.1291 + <path path="${run.classpath}"/>
78.1292 + </classpath>
78.1293 + </nbprofiledirect>
78.1294 + <profile classname="${profile.class}"/>
78.1295 + </target>
78.1296 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
78.1297 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
78.1298 + <nbprofiledirect>
78.1299 + <classpath>
78.1300 + <path path="${run.classpath}"/>
78.1301 + </classpath>
78.1302 + </nbprofiledirect>
78.1303 + <profile classname="sun.applet.AppletViewer">
78.1304 + <customize>
78.1305 + <arg value="${applet.url}"/>
78.1306 + </customize>
78.1307 + </profile>
78.1308 + </target>
78.1309 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
78.1310 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
78.1311 + <nbprofiledirect>
78.1312 + <classpath>
78.1313 + <path path="${run.test.classpath}"/>
78.1314 + </classpath>
78.1315 + </nbprofiledirect>
78.1316 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
78.1317 + <customize>
78.1318 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
78.1319 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
78.1320 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
78.1321 + <jvmarg line="${profiler.info.jvmargs}"/>
78.1322 + <classpath>
78.1323 + <path path="${run.test.classpath}"/>
78.1324 + </classpath>
78.1325 + </customize>
78.1326 + </j2seproject3:junit>
78.1327 + </target>
78.1328 + <!--
78.1329 + end of pre NB72 profiling section
78.1330 + -->
78.1331 + <target if="netbeans.home" name="-profile-check">
78.1332 + <condition property="profiler.configured">
78.1333 + <or>
78.1334 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
78.1335 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
78.1336 + </or>
78.1337 + </condition>
78.1338 + </target>
78.1339 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
78.1340 + <startprofiler/>
78.1341 + <antcall target="run"/>
78.1342 + </target>
78.1343 + <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">
78.1344 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
78.1345 + <startprofiler/>
78.1346 + <antcall target="run-single"/>
78.1347 + </target>
78.1348 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
78.1349 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
78.1350 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
78.1351 + <startprofiler/>
78.1352 + <antcall target="test-single"/>
78.1353 + </target>
78.1354 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
78.1355 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
78.1356 + <startprofiler/>
78.1357 + <antcall target="run-test-with-main"/>
78.1358 + </target>
78.1359 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
78.1360 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
78.1361 + <startprofiler/>
78.1362 + <antcall target="run-applet"/>
78.1363 + </target>
78.1364 + <!--
78.1365 ===============
78.1366 JAVADOC SECTION
78.1367 ===============
78.1368 -->
78.1369 <target depends="init" if="have.sources" name="-javadoc-build">
78.1370 <mkdir dir="${dist.javadoc.dir}"/>
78.1371 - <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}">
78.1372 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
78.1373 + <and>
78.1374 + <isset property="endorsed.classpath.cmd.line.arg"/>
78.1375 + <not>
78.1376 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
78.1377 + </not>
78.1378 + </and>
78.1379 + </condition>
78.1380 + <condition else="" property="bug5101868workaround" value="*.java">
78.1381 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
78.1382 + </condition>
78.1383 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
78.1384 + <and>
78.1385 + <isset property="javadoc.html5"/>
78.1386 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
78.1387 + </and>
78.1388 + </condition>
78.1389 + <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}">
78.1390 <classpath>
78.1391 <path path="${javac.classpath}"/>
78.1392 </classpath>
78.1393 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
78.1394 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
78.1395 <filename name="**/*.java"/>
78.1396 </fileset>
78.1397 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
78.1398 <include name="**/*.java"/>
78.1399 + <exclude name="*.java"/>
78.1400 </fileset>
78.1401 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
78.1402 + <arg line="${javadoc.html5.cmd.line.arg}"/>
78.1403 </javadoc>
78.1404 + <copy todir="${dist.javadoc.dir}">
78.1405 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
78.1406 + <filename name="**/doc-files/**"/>
78.1407 + </fileset>
78.1408 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
78.1409 + <include name="**/doc-files/**"/>
78.1410 + </fileset>
78.1411 + </copy>
78.1412 </target>
78.1413 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
78.1414 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
78.1415 @@ -707,7 +1533,7 @@
78.1416 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
78.1417 <!--
78.1418 =========================
78.1419 - JUNIT COMPILATION SECTION
78.1420 + TEST COMPILATION SECTION
78.1421 =========================
78.1422 -->
78.1423 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
78.1424 @@ -717,11 +1543,63 @@
78.1425 <!-- Empty placeholder for easier customization. -->
78.1426 <!-- You can override this target in the ../build.xml file. -->
78.1427 </target>
78.1428 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
78.1429 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
78.1430 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
78.1431 + <and>
78.1432 + <isset property="test.module.name"/>
78.1433 + <length length="0" string="${test.module.name}" when="greater"/>
78.1434 + </and>
78.1435 + </condition>
78.1436 + <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">
78.1437 + <and>
78.1438 + <isset property="test.module.name"/>
78.1439 + <length length="0" string="${test.module.name}" when="greater"/>
78.1440 + </and>
78.1441 + </condition>
78.1442 + </target>
78.1443 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
78.1444 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
78.1445 + <and>
78.1446 + <isset property="test.module.name"/>
78.1447 + <length length="0" string="${test.module.name}" when="greater"/>
78.1448 + </and>
78.1449 + </condition>
78.1450 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
78.1451 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
78.1452 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
78.1453 + <chainedmapper>
78.1454 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
78.1455 + <filtermapper>
78.1456 + <uniqfilter/>
78.1457 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
78.1458 + </filtermapper>
78.1459 + <cutdirsmapper dirs="1"/>
78.1460 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
78.1461 + </chainedmapper>
78.1462 + </pathconvert>
78.1463 + <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}">
78.1464 + <and>
78.1465 + <isset property="test.module.name"/>
78.1466 + <length length="0" string="${test.module.name}" when="greater"/>
78.1467 + </and>
78.1468 + </condition>
78.1469 + </target>
78.1470 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
78.1471 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
78.1472 + <property name="javac.test.compilerargs" value=""/>
78.1473 + <property name="run.test.jvmargs" value=""/>
78.1474 + </target>
78.1475 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
78.1476 <target if="do.depend.true" name="-compile-test-depend">
78.1477 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
78.1478 </target>
78.1479 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
78.1480 - <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}"/>
78.1481 + <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">
78.1482 + <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}">
78.1483 + <customize>
78.1484 + <compilerarg line="${javac.test.compilerargs}"/>
78.1485 + </customize>
78.1486 + </j2seproject3:javac>
78.1487 <copy todir="${build.test.classes.dir}">
78.1488 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
78.1489 </copy>
78.1490 @@ -735,10 +1613,14 @@
78.1491 <!-- Empty placeholder for easier customization. -->
78.1492 <!-- You can override this target in the ../build.xml file. -->
78.1493 </target>
78.1494 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
78.1495 + <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">
78.1496 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
78.1497 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
78.1498 - <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}"/>
78.1499 + <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}">
78.1500 + <customize>
78.1501 + <compilerarg line="${javac.test.compilerargs}"/>
78.1502 + </customize>
78.1503 + </j2seproject3:javac>
78.1504 <copy todir="${build.test.classes.dir}">
78.1505 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
78.1506 </copy>
78.1507 @@ -750,14 +1632,14 @@
78.1508 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
78.1509 <!--
78.1510 =======================
78.1511 - JUNIT EXECUTION SECTION
78.1512 + TEST EXECUTION SECTION
78.1513 =======================
78.1514 -->
78.1515 <target depends="init" if="have.tests" name="-pre-test-run">
78.1516 <mkdir dir="${build.test.results.dir}"/>
78.1517 </target>
78.1518 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
78.1519 - <j2seproject3:junit testincludes="**/*Test.java"/>
78.1520 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
78.1521 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
78.1522 </target>
78.1523 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
78.1524 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
78.1525 @@ -768,41 +1650,42 @@
78.1526 <target depends="init" if="have.tests" name="-pre-test-run-single">
78.1527 <mkdir dir="${build.test.results.dir}"/>
78.1528 </target>
78.1529 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
78.1530 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
78.1531 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
78.1532 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
78.1533 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
78.1534 </target>
78.1535 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
78.1536 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
78.1537 </target>
78.1538 - <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"/>
78.1539 + <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"/>
78.1540 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
78.1541 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
78.1542 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
78.1543 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
78.1544 + </target>
78.1545 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
78.1546 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
78.1547 + </target>
78.1548 + <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"/>
78.1549 <!--
78.1550 =======================
78.1551 - JUNIT DEBUGGING SECTION
78.1552 + TEST DEBUGGING SECTION
78.1553 =======================
78.1554 -->
78.1555 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
78.1556 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
78.1557 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
78.1558 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
78.1559 - <delete file="${test.report.file}"/>
78.1560 - <mkdir dir="${build.test.results.dir}"/>
78.1561 - <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}">
78.1562 - <customize>
78.1563 - <syspropertyset>
78.1564 - <propertyref prefix="test-sys-prop."/>
78.1565 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
78.1566 - </syspropertyset>
78.1567 - <arg value="${test.class}"/>
78.1568 - <arg value="showoutput=true"/>
78.1569 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
78.1570 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
78.1571 - </customize>
78.1572 - </j2seproject3:debug>
78.1573 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
78.1574 + </target>
78.1575 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
78.1576 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
78.1577 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
78.1578 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
78.1579 </target>
78.1580 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
78.1581 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
78.1582 </target>
78.1583 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
78.1584 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
78.1585 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
78.1586 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
78.1587 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
78.1588 </target>
78.1589 @@ -828,9 +1711,9 @@
78.1590 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
78.1591 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
78.1592 <j2seproject3:debug classname="sun.applet.AppletViewer">
78.1593 - <customize>
78.1594 + <customizeDebuggee>
78.1595 <arg value="${applet.url}"/>
78.1596 - </customize>
78.1597 + </customizeDebuggee>
78.1598 </j2seproject3:debug>
78.1599 </target>
78.1600 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
78.1601 @@ -857,6 +1740,7 @@
78.1602 </target>
78.1603 <target depends="init" name="-do-clean">
78.1604 <delete dir="${build.dir}"/>
78.1605 + <delete dir="${dist.jlink.output}"/>
78.1606 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
78.1607 </target>
78.1608 <target name="-post-clean">
78.1609 @@ -867,9 +1751,12 @@
78.1610 <target name="-check-call-dep">
78.1611 <property file="${call.built.properties}" prefix="already.built."/>
78.1612 <condition property="should.call.dep">
78.1613 - <not>
78.1614 - <isset property="already.built.${call.subproject}"/>
78.1615 - </not>
78.1616 + <and>
78.1617 + <not>
78.1618 + <isset property="already.built.${call.subproject}"/>
78.1619 + </not>
78.1620 + <available file="${call.script}"/>
78.1621 + </and>
78.1622 </condition>
78.1623 </target>
78.1624 <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
79.1 --- a/samples/stateful/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
79.2 +++ b/samples/stateful/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
79.3 @@ -1,8 +1,8 @@
79.4 build.xml.data.CRC32=0a6260c2
79.5 -build.xml.script.CRC32=de1f9cb3
79.6 -build.xml.stylesheet.CRC32=958a1d3e@1.38.0.45
79.7 +build.xml.script.CRC32=85182d8d
79.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
79.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
79.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
79.11 nbproject/build-impl.xml.data.CRC32=0a6260c2
79.12 -nbproject/build-impl.xml.script.CRC32=6711875f
79.13 -nbproject/build-impl.xml.stylesheet.CRC32=c75ce636@1.38.0.45
79.14 +nbproject/build-impl.xml.script.CRC32=d42c4a81
79.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
80.1 --- a/samples/stateful/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
80.2 +++ b/samples/stateful/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
80.3 @@ -18,8 +18,12 @@
80.4 #debug.transport=dt_socket
80.5 debug.classpath=\
80.6 ${run.classpath}
80.7 +debug.modulepath=\
80.8 + ${run.modulepath}
80.9 debug.test.classpath=\
80.10 ${run.test.classpath}
80.11 +debug.test.modulepath=\
80.12 + ${run.test.modulepath}
80.13 # This directory is removed when the project is cleaned:
80.14 dist.dir=dist
80.15 dist.jar=${dist.dir}/stateful.jar
80.16 @@ -33,14 +37,18 @@
80.17 # Space-separated list of extra javac options
80.18 javac.compilerargs=
80.19 javac.deprecation=false
80.20 +javac.modulepath=
80.21 +javac.processormodulepath=
80.22 javac.processorpath=\
80.23 ${javac.classpath}
80.24 -javac.source=1.5
80.25 -javac.target=1.5
80.26 +javac.source=1.6
80.27 +javac.target=1.6
80.28 javac.test.classpath=\
80.29 ${javac.classpath}:\
80.30 ${build.classes.dir}:\
80.31 ${file.reference.junit-4.4.jar}
80.32 +javac.test.modulepath=\
80.33 + ${javac.modulepath}
80.34 javac.test.processorpath=\
80.35 ${javac.test.classpath}
80.36 javadoc.additionalparam=
80.37 @@ -64,9 +72,13 @@
80.38 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
80.39 # or test-sys-prop.name=value to set system properties for unit tests):
80.40 run.jvmargs=
80.41 +run.modulepath=\
80.42 + ${javac.modulepath}
80.43 run.test.classpath=\
80.44 ${javac.test.classpath}:\
80.45 ${build.test.classes.dir}
80.46 +run.test.modulepath=\
80.47 + ${javac.test.modulepath}
80.48 source.encoding=UTF-8
80.49 src.dir=src
80.50 test.src.dir=test
81.1 --- a/samples/trycatchredo/build.xml Mon Nov 11 05:47:32 2019 +0100
81.2 +++ b/samples/trycatchredo/build.xml Mon Nov 11 13:17:34 2019 +0100
81.3 @@ -51,8 +51,7 @@
81.4 -init-macrodef-junit: defines macro for junit execution
81.5 -init-macrodef-debug: defines macro for class debugging
81.6 -init-macrodef-java: defines macro for class execution
81.7 - -do-jar-with-manifest: JAR building (if you are using a manifest)
81.8 - -do-jar-without-manifest: JAR building (if you are not using a manifest)
81.9 + -do-jar: JAR building
81.10 run: execution of project
81.11 -javadoc-build: Javadoc generation
81.12 test-report: JUnit report generation
82.1 --- a/samples/trycatchredo/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
82.2 +++ b/samples/trycatchredo/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
82.3 @@ -12,14 +12,21 @@
82.4 - execution
82.5 - debugging
82.6 - javadoc
82.7 - - junit compilation
82.8 - - junit execution
82.9 - - junit debugging
82.10 + - test compilation
82.11 + - test execution
82.12 + - test debugging
82.13 - applet
82.14 - cleanup
82.15
82.16 -->
82.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="trycatchredo-impl">
82.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="trycatchredo-impl">
82.19 + <fail message="Please build using Ant 1.8.0 or higher.">
82.20 + <condition>
82.21 + <not>
82.22 + <antversion atleast="1.8.0"/>
82.23 + </not>
82.24 + </condition>
82.25 + </fail>
82.26 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
82.27 <!--
82.28 ======================
82.29 @@ -39,28 +46,136 @@
82.30 <property file="${user.properties.file}"/>
82.31 <!-- The two properties below are usually overridden -->
82.32 <!-- by the active platform. Just a fallback. -->
82.33 - <property name="default.javac.source" value="1.4"/>
82.34 - <property name="default.javac.target" value="1.4"/>
82.35 + <property name="default.javac.source" value="1.6"/>
82.36 + <property name="default.javac.target" value="1.6"/>
82.37 </target>
82.38 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
82.39 <property file="nbproject/configs/${config}.properties"/>
82.40 <property file="nbproject/project.properties"/>
82.41 </target>
82.42 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
82.43 + <target name="-init-modules-supported">
82.44 + <condition property="modules.supported.internal" value="true">
82.45 + <not>
82.46 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
82.47 + </not>
82.48 + </condition>
82.49 + </target>
82.50 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
82.51 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
82.52 + <attribute name="property"/>
82.53 + <attribute name="sourcepath"/>
82.54 + <sequential>
82.55 + <loadresource property="@{property}" quiet="true">
82.56 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
82.57 + <filterchain>
82.58 + <stripjavacomments/>
82.59 + <linecontainsregexp>
82.60 + <regexp pattern="module .* \{"/>
82.61 + </linecontainsregexp>
82.62 + <tokenfilter>
82.63 + <linetokenizer/>
82.64 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
82.65 + </tokenfilter>
82.66 + <striplinebreaks/>
82.67 + </filterchain>
82.68 + </loadresource>
82.69 + </sequential>
82.70 + </macrodef>
82.71 + </target>
82.72 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
82.73 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
82.74 + <condition>
82.75 + <not>
82.76 + <antversion atleast="1.10.0"/>
82.77 + </not>
82.78 + </condition>
82.79 + </fail>
82.80 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
82.81 + <condition property="named.module.internal">
82.82 + <and>
82.83 + <isset property="module.name"/>
82.84 + <length length="0" string="${module.name}" when="greater"/>
82.85 + </and>
82.86 + </condition>
82.87 + <condition property="unnamed.module.internal">
82.88 + <not>
82.89 + <isset property="named.module.internal"/>
82.90 + </not>
82.91 + </condition>
82.92 + <property name="javac.modulepath" value=""/>
82.93 + <property name="run.modulepath" value="${javac.modulepath}"/>
82.94 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
82.95 + <property name="debug.modulepath" value="${run.modulepath}"/>
82.96 + <property name="javac.upgrademodulepath" value=""/>
82.97 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
82.98 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
82.99 + <and>
82.100 + <isset property="javac.systemmodulepath"/>
82.101 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
82.102 + </and>
82.103 + </condition>
82.104 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
82.105 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
82.106 + <property name="module.name" value=""/>
82.107 + </target>
82.108 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
82.109 + <property name="platform.java" value="${java.home}/bin/java"/>
82.110 <available file="${manifest.file}" property="manifest.available"/>
82.111 - <condition property="manifest.available+main.class">
82.112 + <condition property="splashscreen.available">
82.113 <and>
82.114 - <isset property="manifest.available"/>
82.115 + <not>
82.116 + <equals arg1="${application.splash}" arg2="" trim="true"/>
82.117 + </not>
82.118 + <available file="${application.splash}"/>
82.119 + </and>
82.120 + </condition>
82.121 + <condition property="main.class.available">
82.122 + <and>
82.123 <isset property="main.class"/>
82.124 <not>
82.125 <equals arg1="${main.class}" arg2="" trim="true"/>
82.126 </not>
82.127 </and>
82.128 </condition>
82.129 - <condition property="manifest.available+main.class+mkdist.available">
82.130 + <condition property="profile.available">
82.131 <and>
82.132 - <istrue value="${manifest.available+main.class}"/>
82.133 - <isset property="libs.CopyLibs.classpath"/>
82.134 + <isset property="javac.profile"/>
82.135 + <length length="0" string="${javac.profile}" when="greater"/>
82.136 + <not>
82.137 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
82.138 + </not>
82.139 + </and>
82.140 + </condition>
82.141 + <condition property="do.archive">
82.142 + <or>
82.143 + <not>
82.144 + <istrue value="${jar.archive.disabled}"/>
82.145 + </not>
82.146 + <istrue value="${not.archive.disabled}"/>
82.147 + </or>
82.148 + </condition>
82.149 + <condition property="do.archive+manifest.available">
82.150 + <and>
82.151 + <isset property="manifest.available"/>
82.152 + <istrue value="${do.archive}"/>
82.153 + </and>
82.154 + </condition>
82.155 + <condition property="do.archive+main.class.available">
82.156 + <and>
82.157 + <isset property="main.class.available"/>
82.158 + <istrue value="${do.archive}"/>
82.159 + </and>
82.160 + </condition>
82.161 + <condition property="do.archive+splashscreen.available">
82.162 + <and>
82.163 + <isset property="splashscreen.available"/>
82.164 + <istrue value="${do.archive}"/>
82.165 + </and>
82.166 + </condition>
82.167 + <condition property="do.archive+profile.available">
82.168 + <and>
82.169 + <isset property="profile.available"/>
82.170 + <istrue value="${do.archive}"/>
82.171 </and>
82.172 </condition>
82.173 <condition property="have.tests">
82.174 @@ -86,6 +201,7 @@
82.175 </and>
82.176 </condition>
82.177 <property name="run.jvmargs" value=""/>
82.178 + <property name="run.jvmargs.ide" value=""/>
82.179 <property name="javac.compilerargs" value=""/>
82.180 <property name="work.dir" value="${basedir}"/>
82.181 <condition property="no.deps">
82.182 @@ -97,6 +213,8 @@
82.183 <property name="javadoc.preview" value="true"/>
82.184 <property name="application.args" value=""/>
82.185 <property name="source.encoding" value="${file.encoding}"/>
82.186 + <property name="runtime.encoding" value="${source.encoding}"/>
82.187 + <property name="manifest.encoding" value="${source.encoding}"/>
82.188 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
82.189 <and>
82.190 <isset property="javadoc.encoding"/>
82.191 @@ -112,12 +230,58 @@
82.192 <condition property="do.depend.true">
82.193 <istrue value="${do.depend}"/>
82.194 </condition>
82.195 - <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
82.196 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
82.197 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
82.198 <and>
82.199 - <isset property="jaxws.endorsed.dir"/>
82.200 - <available file="nbproject/jaxws-build.xml"/>
82.201 + <isset property="endorsed.classpath"/>
82.202 + <not>
82.203 + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
82.204 + </not>
82.205 </and>
82.206 </condition>
82.207 + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
82.208 + <isset property="profile.available"/>
82.209 + </condition>
82.210 + <condition else="false" property="jdkBug6558476">
82.211 + <and>
82.212 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
82.213 + <not>
82.214 + <os family="unix"/>
82.215 + </not>
82.216 + </and>
82.217 + </condition>
82.218 + <condition else="false" property="javac.fork">
82.219 + <or>
82.220 + <istrue value="${jdkBug6558476}"/>
82.221 + <istrue value="${javac.external.vm}"/>
82.222 + </or>
82.223 + </condition>
82.224 + <property name="jar.index" value="false"/>
82.225 + <property name="jar.index.metainf" value="${jar.index}"/>
82.226 + <property name="copylibs.rebase" value="true"/>
82.227 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
82.228 + <condition property="junit.available">
82.229 + <or>
82.230 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
82.231 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
82.232 + </or>
82.233 + </condition>
82.234 + <condition property="testng.available">
82.235 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
82.236 + </condition>
82.237 + <condition property="junit+testng.available">
82.238 + <and>
82.239 + <istrue value="${junit.available}"/>
82.240 + <istrue value="${testng.available}"/>
82.241 + </and>
82.242 + </condition>
82.243 + <condition else="testng" property="testng.mode" value="mixed">
82.244 + <istrue value="${junit+testng.available}"/>
82.245 + </condition>
82.246 + <condition else="" property="testng.debug.mode" value="-mixed">
82.247 + <istrue value="${junit+testng.available}"/>
82.248 + </condition>
82.249 + <property name="java.failonerror" value="true"/>
82.250 </target>
82.251 <target name="-post-init">
82.252 <!-- Empty placeholder for easier customization. -->
82.253 @@ -144,26 +308,152 @@
82.254 </sequential>
82.255 </macrodef>
82.256 </target>
82.257 - <target name="-init-macrodef-javac">
82.258 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
82.259 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
82.260 <attribute default="${src.dir}" name="srcdir"/>
82.261 <attribute default="${build.classes.dir}" name="destdir"/>
82.262 <attribute default="${javac.classpath}" name="classpath"/>
82.263 + <attribute default="${javac.modulepath}" name="modulepath"/>
82.264 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
82.265 + <attribute default="${javac.processorpath}" name="processorpath"/>
82.266 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
82.267 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
82.268 <attribute default="${includes}" name="includes"/>
82.269 <attribute default="${excludes}" name="excludes"/>
82.270 <attribute default="${javac.debug}" name="debug"/>
82.271 - <attribute default="" name="sourcepath"/>
82.272 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
82.273 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
82.274 + <attribute default="${empty.dir}" name="gensrcdir"/>
82.275 <element name="customize" optional="true"/>
82.276 <sequential>
82.277 - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
82.278 + <condition property="warn.excludes.internal">
82.279 + <and>
82.280 + <isset property="named.module.internal"/>
82.281 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
82.282 + </and>
82.283 + </condition>
82.284 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
82.285 + <property location="${build.dir}/empty" name="empty.dir"/>
82.286 + <mkdir dir="${empty.dir}"/>
82.287 + <mkdir dir="@{apgeneratedsrcdir}"/>
82.288 + <condition property="processormodulepath.set">
82.289 + <resourcecount count="0" when="greater">
82.290 + <path>
82.291 + <pathelement path="@{processormodulepath}"/>
82.292 + </path>
82.293 + </resourcecount>
82.294 + </condition>
82.295 + <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}">
82.296 + <src>
82.297 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
82.298 + <include name="*"/>
82.299 + </dirset>
82.300 + </src>
82.301 <classpath>
82.302 <path path="@{classpath}"/>
82.303 </classpath>
82.304 - <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
82.305 + <modulepath>
82.306 + <path path="@{modulepath}"/>
82.307 + </modulepath>
82.308 + <upgrademodulepath>
82.309 + <path path="@{upgrademodulepath}"/>
82.310 + </upgrademodulepath>
82.311 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
82.312 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
82.313 + <compilerarg line="${javac.compilerargs}"/>
82.314 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
82.315 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
82.316 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
82.317 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
82.318 + <compilerarg line="${ap.processors.internal}"/>
82.319 + <compilerarg line="${annotation.processing.processor.options}"/>
82.320 + <compilerarg value="-s"/>
82.321 + <compilerarg path="@{apgeneratedsrcdir}"/>
82.322 + <compilerarg line="${ap.proc.none.internal}"/>
82.323 <customize/>
82.324 </javac>
82.325 </sequential>
82.326 </macrodef>
82.327 + </target>
82.328 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
82.329 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
82.330 + <attribute default="${src.dir}" name="srcdir"/>
82.331 + <attribute default="${build.classes.dir}" name="destdir"/>
82.332 + <attribute default="${javac.classpath}" name="classpath"/>
82.333 + <attribute default="${javac.modulepath}" name="modulepath"/>
82.334 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
82.335 + <attribute default="${javac.processorpath}" name="processorpath"/>
82.336 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
82.337 + <attribute default="${includes}" name="includes"/>
82.338 + <attribute default="${excludes}" name="excludes"/>
82.339 + <attribute default="${javac.debug}" name="debug"/>
82.340 + <attribute default="${empty.dir}" name="sourcepath"/>
82.341 + <attribute default="${empty.dir}" name="gensrcdir"/>
82.342 + <element name="customize" optional="true"/>
82.343 + <sequential>
82.344 + <property location="${build.dir}/empty" name="empty.dir"/>
82.345 + <mkdir dir="${empty.dir}"/>
82.346 + <mkdir dir="@{apgeneratedsrcdir}"/>
82.347 + <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}">
82.348 + <src>
82.349 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
82.350 + <include name="*"/>
82.351 + </dirset>
82.352 + </src>
82.353 + <classpath>
82.354 + <path path="@{classpath}"/>
82.355 + </classpath>
82.356 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
82.357 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
82.358 + <compilerarg line="${javac.compilerargs}"/>
82.359 + <compilerarg value="-processorpath"/>
82.360 + <compilerarg path="@{processorpath}:${empty.dir}"/>
82.361 + <compilerarg line="${ap.processors.internal}"/>
82.362 + <compilerarg line="${annotation.processing.processor.options}"/>
82.363 + <compilerarg value="-s"/>
82.364 + <compilerarg path="@{apgeneratedsrcdir}"/>
82.365 + <compilerarg line="${ap.proc.none.internal}"/>
82.366 + <customize/>
82.367 + </javac>
82.368 + </sequential>
82.369 + </macrodef>
82.370 + </target>
82.371 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
82.372 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
82.373 + <attribute default="${src.dir}" name="srcdir"/>
82.374 + <attribute default="${build.classes.dir}" name="destdir"/>
82.375 + <attribute default="${javac.classpath}" name="classpath"/>
82.376 + <attribute default="${javac.modulepath}" name="modulepath"/>
82.377 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
82.378 + <attribute default="${javac.processorpath}" name="processorpath"/>
82.379 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
82.380 + <attribute default="${includes}" name="includes"/>
82.381 + <attribute default="${excludes}" name="excludes"/>
82.382 + <attribute default="${javac.debug}" name="debug"/>
82.383 + <attribute default="${empty.dir}" name="sourcepath"/>
82.384 + <attribute default="${empty.dir}" name="gensrcdir"/>
82.385 + <element name="customize" optional="true"/>
82.386 + <sequential>
82.387 + <property location="${build.dir}/empty" name="empty.dir"/>
82.388 + <mkdir dir="${empty.dir}"/>
82.389 + <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}">
82.390 + <src>
82.391 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
82.392 + <include name="*"/>
82.393 + </dirset>
82.394 + </src>
82.395 + <classpath>
82.396 + <path path="@{classpath}"/>
82.397 + </classpath>
82.398 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
82.399 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
82.400 + <compilerarg line="${javac.compilerargs}"/>
82.401 + <customize/>
82.402 + </javac>
82.403 + </sequential>
82.404 + </macrodef>
82.405 + </target>
82.406 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
82.407 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
82.408 <attribute default="${src.dir}" name="srcdir"/>
82.409 <attribute default="${build.classes.dir}" name="destdir"/>
82.410 @@ -180,51 +470,383 @@
82.411 <attribute default="${build.classes.dir}" name="destdir"/>
82.412 <sequential>
82.413 <fail unless="javac.includes">Must set javac.includes</fail>
82.414 - <pathconvert pathsep="," property="javac.includes.binary">
82.415 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
82.416 <path>
82.417 <filelist dir="@{destdir}" files="${javac.includes}"/>
82.418 </path>
82.419 <globmapper from="*.java" to="*.class"/>
82.420 </pathconvert>
82.421 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
82.422 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
82.423 <delete>
82.424 - <files includes="${javac.includes.binary}"/>
82.425 + <files includesfile="${javac.includesfile.binary}"/>
82.426 + </delete>
82.427 + <delete>
82.428 + <fileset file="${javac.includesfile.binary}"/>
82.429 </delete>
82.430 </sequential>
82.431 </macrodef>
82.432 </target>
82.433 - <target name="-init-macrodef-junit">
82.434 + <target if="${junit.available}" name="-init-macrodef-junit-init">
82.435 + <condition else="false" property="nb.junit.batch" value="true">
82.436 + <and>
82.437 + <istrue value="${junit.available}"/>
82.438 + <not>
82.439 + <isset property="test.method"/>
82.440 + </not>
82.441 + </and>
82.442 + </condition>
82.443 + <condition else="false" property="nb.junit.single" value="true">
82.444 + <and>
82.445 + <istrue value="${junit.available}"/>
82.446 + <isset property="test.method"/>
82.447 + </and>
82.448 + </condition>
82.449 + </target>
82.450 + <target name="-init-test-properties">
82.451 + <property name="test.binaryincludes" value="<nothing>"/>
82.452 + <property name="test.binarytestincludes" value=""/>
82.453 + <property name="test.binaryexcludes" value=""/>
82.454 + </target>
82.455 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
82.456 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
82.457 + <attribute default="${includes}" name="includes"/>
82.458 + <attribute default="${excludes}" name="excludes"/>
82.459 + <element name="customizePrototype" optional="true"/>
82.460 + <sequential>
82.461 + <property name="junit.forkmode" value="perTest"/>
82.462 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
82.463 + <syspropertyset>
82.464 + <propertyref prefix="test-sys-prop."/>
82.465 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
82.466 + </syspropertyset>
82.467 + <classpath>
82.468 + <path path="${run.test.classpath}"/>
82.469 + </classpath>
82.470 + <modulepath>
82.471 + <path path="${run.test.modulepath}"/>
82.472 + </modulepath>
82.473 + <formatter type="brief" usefile="false"/>
82.474 + <formatter type="xml"/>
82.475 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
82.476 + <jvmarg value="-ea"/>
82.477 + <jvmarg line="${run.test.jvmargs}"/>
82.478 + <customizePrototype/>
82.479 + </junit>
82.480 + </sequential>
82.481 + </macrodef>
82.482 + </target>
82.483 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
82.484 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
82.485 + <attribute default="${includes}" name="includes"/>
82.486 + <attribute default="${excludes}" name="excludes"/>
82.487 + <element name="customizePrototype" optional="true"/>
82.488 + <sequential>
82.489 + <property name="junit.forkmode" value="perTest"/>
82.490 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
82.491 + <syspropertyset>
82.492 + <propertyref prefix="test-sys-prop."/>
82.493 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
82.494 + </syspropertyset>
82.495 + <classpath>
82.496 + <path path="${run.test.classpath}"/>
82.497 + </classpath>
82.498 + <formatter type="brief" usefile="false"/>
82.499 + <formatter type="xml"/>
82.500 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
82.501 + <jvmarg value="-ea"/>
82.502 + <customizePrototype/>
82.503 + </junit>
82.504 + </sequential>
82.505 + </macrodef>
82.506 + </target>
82.507 + <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}">
82.508 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
82.509 <attribute default="${includes}" name="includes"/>
82.510 <attribute default="${excludes}" name="excludes"/>
82.511 <attribute default="**" name="testincludes"/>
82.512 + <attribute default="" name="testmethods"/>
82.513 + <element name="customize" optional="true"/>
82.514 <sequential>
82.515 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
82.516 - <batchtest todir="${build.test.results.dir}">
82.517 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
82.518 - <filename name="@{testincludes}"/>
82.519 - </fileset>
82.520 - </batchtest>
82.521 + <j2seproject3:junit-prototype>
82.522 + <customizePrototype>
82.523 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
82.524 + <customize/>
82.525 + </customizePrototype>
82.526 + </j2seproject3:junit-prototype>
82.527 + </sequential>
82.528 + </macrodef>
82.529 + </target>
82.530 + <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}">
82.531 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
82.532 + <attribute default="${includes}" name="includes"/>
82.533 + <attribute default="${excludes}" name="excludes"/>
82.534 + <attribute default="**" name="testincludes"/>
82.535 + <attribute default="" name="testmethods"/>
82.536 + <element name="customize" optional="true"/>
82.537 + <sequential>
82.538 + <j2seproject3:junit-prototype>
82.539 + <customizePrototype>
82.540 + <batchtest todir="${build.test.results.dir}">
82.541 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
82.542 + <filename name="@{testincludes}"/>
82.543 + </fileset>
82.544 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
82.545 + <filename name="${test.binarytestincludes}"/>
82.546 + </fileset>
82.547 + </batchtest>
82.548 + <customize/>
82.549 + </customizePrototype>
82.550 + </j2seproject3:junit-prototype>
82.551 + </sequential>
82.552 + </macrodef>
82.553 + </target>
82.554 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
82.555 + <target if="${testng.available}" name="-init-macrodef-testng">
82.556 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
82.557 + <attribute default="${includes}" name="includes"/>
82.558 + <attribute default="${excludes}" name="excludes"/>
82.559 + <attribute default="**" name="testincludes"/>
82.560 + <attribute default="" name="testmethods"/>
82.561 + <element name="customize" optional="true"/>
82.562 + <sequential>
82.563 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
82.564 + <isset property="test.method"/>
82.565 + </condition>
82.566 + <union id="test.set">
82.567 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
82.568 + <filename name="@{testincludes}"/>
82.569 + </fileset>
82.570 + </union>
82.571 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
82.572 + <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="trycatchredo" testname="TestNG tests" workingDir="${work.dir}">
82.573 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
82.574 + <propertyset>
82.575 + <propertyref prefix="test-sys-prop."/>
82.576 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
82.577 + </propertyset>
82.578 <classpath>
82.579 <path path="${run.test.classpath}"/>
82.580 </classpath>
82.581 - <syspropertyset>
82.582 - <propertyref prefix="test-sys-prop."/>
82.583 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
82.584 - </syspropertyset>
82.585 - <formatter type="brief" usefile="false"/>
82.586 - <formatter type="xml"/>
82.587 - <jvmarg line="${run.jvmargs}"/>
82.588 - </junit>
82.589 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
82.590 + <customize/>
82.591 + </testng>
82.592 </sequential>
82.593 </macrodef>
82.594 </target>
82.595 + <target name="-init-macrodef-test-impl">
82.596 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
82.597 + <attribute default="${includes}" name="includes"/>
82.598 + <attribute default="${excludes}" name="excludes"/>
82.599 + <attribute default="**" name="testincludes"/>
82.600 + <attribute default="" name="testmethods"/>
82.601 + <element implicit="true" name="customize" optional="true"/>
82.602 + <sequential>
82.603 + <echo>No tests executed.</echo>
82.604 + </sequential>
82.605 + </macrodef>
82.606 + </target>
82.607 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
82.608 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
82.609 + <attribute default="${includes}" name="includes"/>
82.610 + <attribute default="${excludes}" name="excludes"/>
82.611 + <attribute default="**" name="testincludes"/>
82.612 + <attribute default="" name="testmethods"/>
82.613 + <element implicit="true" name="customize" optional="true"/>
82.614 + <sequential>
82.615 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
82.616 + <customize/>
82.617 + </j2seproject3:junit>
82.618 + </sequential>
82.619 + </macrodef>
82.620 + </target>
82.621 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
82.622 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
82.623 + <attribute default="${includes}" name="includes"/>
82.624 + <attribute default="${excludes}" name="excludes"/>
82.625 + <attribute default="**" name="testincludes"/>
82.626 + <attribute default="" name="testmethods"/>
82.627 + <element implicit="true" name="customize" optional="true"/>
82.628 + <sequential>
82.629 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
82.630 + <customize/>
82.631 + </j2seproject3:testng>
82.632 + </sequential>
82.633 + </macrodef>
82.634 + </target>
82.635 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
82.636 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
82.637 + <attribute default="${includes}" name="includes"/>
82.638 + <attribute default="${excludes}" name="excludes"/>
82.639 + <attribute default="**" name="testincludes"/>
82.640 + <attribute default="" name="testmethods"/>
82.641 + <sequential>
82.642 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
82.643 + <customize>
82.644 + <jvmarg line="${run.jvmargs}"/>
82.645 + <jvmarg line="${run.jvmargs.ide}"/>
82.646 + </customize>
82.647 + </j2seproject3:test-impl>
82.648 + </sequential>
82.649 + </macrodef>
82.650 + </target>
82.651 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
82.652 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
82.653 + <attribute default="${includes}" name="includes"/>
82.654 + <attribute default="${excludes}" name="excludes"/>
82.655 + <attribute default="**" name="testincludes"/>
82.656 + <attribute default="" name="testmethods"/>
82.657 + <element name="customizeDebuggee" optional="true"/>
82.658 + <sequential>
82.659 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
82.660 + <customize>
82.661 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
82.662 + <customizeDebuggee/>
82.663 + </customize>
82.664 + </j2seproject3:junit>
82.665 + </sequential>
82.666 + </macrodef>
82.667 + </target>
82.668 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
82.669 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
82.670 + <attribute default="${main.class}" name="testClass"/>
82.671 + <attribute default="" name="testMethod"/>
82.672 + <element name="customize2" optional="true"/>
82.673 + <sequential>
82.674 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
82.675 + <isset property="test.method"/>
82.676 + </condition>
82.677 + <condition else="-suitename trycatchredo -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
82.678 + <matches pattern=".*\.xml" string="@{testClass}"/>
82.679 + </condition>
82.680 + <delete dir="${build.test.results.dir}" quiet="true"/>
82.681 + <mkdir dir="${build.test.results.dir}"/>
82.682 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
82.683 + <customizeDebuggee>
82.684 + <customize2/>
82.685 + <jvmarg value="-ea"/>
82.686 + <arg line="${testng.debug.mode}"/>
82.687 + <arg line="-d ${build.test.results.dir}"/>
82.688 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
82.689 + <arg line="${testng.cmd.args}"/>
82.690 + </customizeDebuggee>
82.691 + </j2seproject3:debug>
82.692 + </sequential>
82.693 + </macrodef>
82.694 + </target>
82.695 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
82.696 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
82.697 + <attribute default="${main.class}" name="testClass"/>
82.698 + <attribute default="" name="testMethod"/>
82.699 + <element implicit="true" name="customize2" optional="true"/>
82.700 + <sequential>
82.701 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
82.702 + <customize2/>
82.703 + </j2seproject3:testng-debug>
82.704 + </sequential>
82.705 + </macrodef>
82.706 + </target>
82.707 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
82.708 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
82.709 + <attribute default="${includes}" name="includes"/>
82.710 + <attribute default="${excludes}" name="excludes"/>
82.711 + <attribute default="**" name="testincludes"/>
82.712 + <attribute default="" name="testmethods"/>
82.713 + <attribute default="${main.class}" name="testClass"/>
82.714 + <attribute default="" name="testMethod"/>
82.715 + <sequential>
82.716 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
82.717 + <customizeDebuggee>
82.718 + <jvmarg line="${run.jvmargs}"/>
82.719 + <jvmarg line="${run.jvmargs.ide}"/>
82.720 + </customizeDebuggee>
82.721 + </j2seproject3:test-debug-impl>
82.722 + </sequential>
82.723 + </macrodef>
82.724 + </target>
82.725 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
82.726 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
82.727 + <attribute default="${includes}" name="includes"/>
82.728 + <attribute default="${excludes}" name="excludes"/>
82.729 + <attribute default="**" name="testincludes"/>
82.730 + <attribute default="" name="testmethods"/>
82.731 + <attribute default="${main.class}" name="testClass"/>
82.732 + <attribute default="" name="testMethod"/>
82.733 + <sequential>
82.734 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
82.735 + <customize2>
82.736 + <syspropertyset>
82.737 + <propertyref prefix="test-sys-prop."/>
82.738 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
82.739 + </syspropertyset>
82.740 + </customize2>
82.741 + </j2seproject3:testng-debug-impl>
82.742 + </sequential>
82.743 + </macrodef>
82.744 + </target>
82.745 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
82.746 + <!--
82.747 + pre NB7.2 profiling section; consider it deprecated
82.748 + -->
82.749 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
82.750 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
82.751 + <!-- Empty placeholder for easier customization. -->
82.752 + <!-- You can override this target in the ../build.xml file. -->
82.753 + </target>
82.754 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
82.755 + <!-- Empty placeholder for easier customization. -->
82.756 + <!-- You can override this target in the ../build.xml file. -->
82.757 + </target>
82.758 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
82.759 + <macrodef name="resolve">
82.760 + <attribute name="name"/>
82.761 + <attribute name="value"/>
82.762 + <sequential>
82.763 + <property name="@{name}" value="${env.@{value}}"/>
82.764 + </sequential>
82.765 + </macrodef>
82.766 + <macrodef name="profile">
82.767 + <attribute default="${main.class}" name="classname"/>
82.768 + <element name="customize" optional="true"/>
82.769 + <sequential>
82.770 + <property environment="env"/>
82.771 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
82.772 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
82.773 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
82.774 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
82.775 + <jvmarg line="${profiler.info.jvmargs}"/>
82.776 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
82.777 + <arg line="${application.args}"/>
82.778 + <classpath>
82.779 + <path path="${run.classpath}"/>
82.780 + </classpath>
82.781 + <syspropertyset>
82.782 + <propertyref prefix="run-sys-prop."/>
82.783 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
82.784 + </syspropertyset>
82.785 + <customize/>
82.786 + </java>
82.787 + </sequential>
82.788 + </macrodef>
82.789 + </target>
82.790 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
82.791 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
82.792 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
82.793 + </target>
82.794 + <!--
82.795 + end of pre NB7.2 profiling section
82.796 + -->
82.797 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
82.798 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
82.799 <attribute default="${main.class}" name="name"/>
82.800 + <attribute default="${debug.modulepath}" name="modulepath"/>
82.801 <attribute default="${debug.classpath}" name="classpath"/>
82.802 <attribute default="" name="stopclassname"/>
82.803 <sequential>
82.804 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
82.805 + <modulepath>
82.806 + <path path="@{modulepath}"/>
82.807 + </modulepath>
82.808 <classpath>
82.809 <path path="@{classpath}"/>
82.810 </classpath>
82.811 @@ -243,18 +865,6 @@
82.812 </macrodef>
82.813 </target>
82.814 <target name="-init-debug-args">
82.815 - <property name="version-output" value="java version "${ant.java.version}"/>
82.816 - <condition property="have-jdk-older-than-1.4">
82.817 - <or>
82.818 - <contains string="${version-output}" substring="java version "1.0"/>
82.819 - <contains string="${version-output}" substring="java version "1.1"/>
82.820 - <contains string="${version-output}" substring="java version "1.2"/>
82.821 - <contains string="${version-output}" substring="java version "1.3"/>
82.822 - </or>
82.823 - </condition>
82.824 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
82.825 - <istrue value="${have-jdk-older-than-1.4}"/>
82.826 - </condition>
82.827 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
82.828 <os family="windows"/>
82.829 </condition>
82.830 @@ -264,14 +874,103 @@
82.831 </target>
82.832 <target depends="-init-debug-args" name="-init-macrodef-debug">
82.833 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
82.834 + <attribute default="${module.name}" name="modulename"/>
82.835 <attribute default="${main.class}" name="classname"/>
82.836 + <attribute default="${debug.modulepath}" name="modulepath"/>
82.837 <attribute default="${debug.classpath}" name="classpath"/>
82.838 + <element name="customizeDebuggee" optional="true"/>
82.839 + <sequential>
82.840 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
82.841 + <customize>
82.842 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
82.843 + <customizeDebuggee/>
82.844 + </customize>
82.845 + </j2seproject1:java>
82.846 + </sequential>
82.847 + </macrodef>
82.848 + </target>
82.849 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
82.850 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
82.851 + <attribute default="${module.name}" name="modulename"/>
82.852 + <attribute default="${main.class}" name="classname"/>
82.853 + <attribute default="${run.modulepath}" name="modulepath"/>
82.854 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
82.855 + <attribute default="${run.classpath}" name="classpath"/>
82.856 + <attribute default="jvm" name="jvm"/>
82.857 <element name="customize" optional="true"/>
82.858 <sequential>
82.859 - <java classname="@{classname}" dir="${work.dir}" fork="true">
82.860 - <jvmarg line="${debug-args-line}"/>
82.861 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
82.862 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
82.863 + <classpath>
82.864 + <path path="@{classpath}"/>
82.865 + </classpath>
82.866 + <modulepath>
82.867 + <pathelement path="@{modulepath}"/>
82.868 + <pathelement location="${module.build.classes.dir}"/>
82.869 + </modulepath>
82.870 + <upgrademodulepath>
82.871 + <path path="@{upgrademodulepath}"/>
82.872 + </upgrademodulepath>
82.873 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
82.874 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
82.875 <jvmarg line="${run.jvmargs}"/>
82.876 + <jvmarg line="${run.jvmargs.ide}"/>
82.877 + <syspropertyset>
82.878 + <propertyref prefix="run-sys-prop."/>
82.879 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
82.880 + </syspropertyset>
82.881 + <customize/>
82.882 + </java>
82.883 + </sequential>
82.884 + </macrodef>
82.885 + </target>
82.886 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
82.887 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
82.888 + <attribute default="" name="modulename"/>
82.889 + <attribute default="${main.class}" name="classname"/>
82.890 + <attribute default="${run.modulepath}" name="modulepath"/>
82.891 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
82.892 + <attribute default="${run.classpath}" name="classpath"/>
82.893 + <attribute default="jvm" name="jvm"/>
82.894 + <element name="customize" optional="true"/>
82.895 + <sequential>
82.896 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
82.897 + <classpath>
82.898 + <path path="@{classpath}"/>
82.899 + </classpath>
82.900 + <modulepath>
82.901 + <path path="@{modulepath}"/>
82.902 + </modulepath>
82.903 + <upgrademodulepath>
82.904 + <path path="@{upgrademodulepath}"/>
82.905 + </upgrademodulepath>
82.906 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
82.907 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
82.908 + <jvmarg line="${run.jvmargs}"/>
82.909 + <jvmarg line="${run.jvmargs.ide}"/>
82.910 + <syspropertyset>
82.911 + <propertyref prefix="run-sys-prop."/>
82.912 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
82.913 + </syspropertyset>
82.914 + <customize/>
82.915 + </java>
82.916 + </sequential>
82.917 + </macrodef>
82.918 + </target>
82.919 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
82.920 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
82.921 + <attribute default="" name="modulename"/>
82.922 + <attribute default="${main.class}" name="classname"/>
82.923 + <attribute default="" name="modulepath"/>
82.924 + <attribute default="${run.classpath}" name="classpath"/>
82.925 + <attribute default="jvm" name="jvm"/>
82.926 + <element name="customize" optional="true"/>
82.927 + <sequential>
82.928 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
82.929 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
82.930 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
82.931 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
82.932 + <jvmarg line="${run.jvmargs}"/>
82.933 + <jvmarg line="${run.jvmargs.ide}"/>
82.934 <classpath>
82.935 <path path="@{classpath}"/>
82.936 </classpath>
82.937 @@ -284,45 +983,99 @@
82.938 </sequential>
82.939 </macrodef>
82.940 </target>
82.941 - <target name="-init-macrodef-java">
82.942 - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
82.943 - <attribute default="${main.class}" name="classname"/>
82.944 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
82.945 + <target name="-init-macrodef-copylibs">
82.946 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
82.947 + <attribute default="${manifest.file}" name="manifest"/>
82.948 <element name="customize" optional="true"/>
82.949 <sequential>
82.950 - <java classname="@{classname}" dir="${work.dir}" fork="true">
82.951 - <jvmarg line="${run.jvmargs}"/>
82.952 - <classpath>
82.953 - <path path="${run.classpath}"/>
82.954 - </classpath>
82.955 - <syspropertyset>
82.956 - <propertyref prefix="run-sys-prop."/>
82.957 - <mapper from="run-sys-prop.*" to="*" type="glob"/>
82.958 - </syspropertyset>
82.959 - <customize/>
82.960 - </java>
82.961 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
82.962 + <pathconvert property="run.classpath.without.build.classes.dir">
82.963 + <path path="${run.classpath}"/>
82.964 + <map from="${build.classes.dir.resolved}" to=""/>
82.965 + </pathconvert>
82.966 + <pathconvert pathsep=" " property="jar.classpath">
82.967 + <path path="${run.classpath.without.build.classes.dir}"/>
82.968 + <chainedmapper>
82.969 + <flattenmapper/>
82.970 + <filtermapper>
82.971 + <replacestring from=" " to="%20"/>
82.972 + </filtermapper>
82.973 + <globmapper from="*" to="lib/*"/>
82.974 + </chainedmapper>
82.975 + </pathconvert>
82.976 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
82.977 + <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}">
82.978 + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
82.979 + <manifest>
82.980 + <attribute name="Class-Path" value="${jar.classpath}"/>
82.981 + <customize/>
82.982 + </manifest>
82.983 + </copylibs>
82.984 </sequential>
82.985 </macrodef>
82.986 </target>
82.987 <target name="-init-presetdef-jar">
82.988 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
82.989 - <jar compress="${jar.compress}" jarfile="${dist.jar}">
82.990 - <j2seproject1:fileset dir="${build.classes.dir}"/>
82.991 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
82.992 + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
82.993 </jar>
82.994 </presetdef>
82.995 </target>
82.996 - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
82.997 + <target name="-init-ap-cmdline-properties">
82.998 + <property name="annotation.processing.enabled" value="true"/>
82.999 + <property name="annotation.processing.processors.list" value=""/>
82.1000 + <property name="annotation.processing.processor.options" value=""/>
82.1001 + <property name="annotation.processing.run.all.processors" value="true"/>
82.1002 + <property name="javac.processorpath" value="${javac.classpath}"/>
82.1003 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
82.1004 + <condition property="ap.supported.internal" value="true">
82.1005 + <not>
82.1006 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
82.1007 + </not>
82.1008 + </condition>
82.1009 + </target>
82.1010 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
82.1011 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
82.1012 + <isfalse value="${annotation.processing.run.all.processors}"/>
82.1013 + </condition>
82.1014 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
82.1015 + <isfalse value="${annotation.processing.enabled}"/>
82.1016 + </condition>
82.1017 + </target>
82.1018 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
82.1019 + <property name="ap.cmd.line.internal" value=""/>
82.1020 + </target>
82.1021 + <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"/>
82.1022 <!--
82.1023 ===================
82.1024 COMPILATION SECTION
82.1025 ===================
82.1026 -->
82.1027 - <target depends="init" name="deps-jar" unless="no.deps"/>
82.1028 + <target name="-deps-jar-init" unless="built-jar.properties">
82.1029 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
82.1030 + <delete file="${built-jar.properties}" quiet="true"/>
82.1031 + </target>
82.1032 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
82.1033 + <echo level="warn" message="Cycle detected: trycatchredo was already built"/>
82.1034 + </target>
82.1035 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
82.1036 + <mkdir dir="${build.dir}"/>
82.1037 + <touch file="${built-jar.properties}" verbose="false"/>
82.1038 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
82.1039 + <antcall target="-warn-already-built-jar"/>
82.1040 + <propertyfile file="${built-jar.properties}">
82.1041 + <entry key="${basedir}" value=""/>
82.1042 + </propertyfile>
82.1043 + </target>
82.1044 <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
82.1045 <target depends="init" name="-check-automatic-build">
82.1046 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
82.1047 </target>
82.1048 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
82.1049 - <antcall target="clean"/>
82.1050 + <antcall target="clean">
82.1051 + <param name="no.dependencies" value="true"/>
82.1052 + </antcall>
82.1053 </target>
82.1054 <target depends="init,deps-jar" name="-pre-pre-compile">
82.1055 <mkdir dir="${build.classes.dir}"/>
82.1056 @@ -332,14 +1085,25 @@
82.1057 <!-- You can override this target in the ../build.xml file. -->
82.1058 </target>
82.1059 <target if="do.depend.true" name="-compile-depend">
82.1060 - <j2seproject3:depend/>
82.1061 + <pathconvert property="build.generated.subdirs">
82.1062 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
82.1063 + <include name="*"/>
82.1064 + </dirset>
82.1065 + </pathconvert>
82.1066 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
82.1067 </target>
82.1068 - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
82.1069 - <j2seproject3:javac/>
82.1070 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
82.1071 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
82.1072 <copy todir="${build.classes.dir}">
82.1073 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
82.1074 </copy>
82.1075 </target>
82.1076 + <target if="has.persistence.xml" name="-copy-persistence-xml">
82.1077 + <mkdir dir="${build.classes.dir}/META-INF"/>
82.1078 + <copy todir="${build.classes.dir}/META-INF">
82.1079 + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
82.1080 + </copy>
82.1081 + </target>
82.1082 <target name="-post-compile">
82.1083 <!-- Empty placeholder for easier customization. -->
82.1084 <!-- You can override this target in the ../build.xml file. -->
82.1085 @@ -352,7 +1116,7 @@
82.1086 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
82.1087 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
82.1088 <j2seproject3:force-recompile/>
82.1089 - <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
82.1090 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
82.1091 </target>
82.1092 <target name="-post-compile-single">
82.1093 <!-- Empty placeholder for easier customization. -->
82.1094 @@ -372,57 +1136,191 @@
82.1095 <!-- Empty placeholder for easier customization. -->
82.1096 <!-- You can override this target in the ../build.xml file. -->
82.1097 </target>
82.1098 - <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
82.1099 - <j2seproject1:jar/>
82.1100 + <target depends="init,compile" name="-check-module-main-class">
82.1101 + <pathconvert property="main.class.file">
82.1102 + <string value="${main.class}"/>
82.1103 + <unpackagemapper from="*" to="*.class"/>
82.1104 + </pathconvert>
82.1105 + <condition property="do.module.main.class">
82.1106 + <and>
82.1107 + <isset property="main.class.available"/>
82.1108 + <available file="${build.classes.dir}/module-info.class"/>
82.1109 + <available file="${build.classes.dir}/${main.class.file}"/>
82.1110 + <isset property="libs.CopyLibs.classpath"/>
82.1111 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
82.1112 + </and>
82.1113 + </condition>
82.1114 </target>
82.1115 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
82.1116 - <j2seproject1:jar manifest="${manifest.file}"/>
82.1117 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
82.1118 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
82.1119 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
82.1120 </target>
82.1121 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
82.1122 - <j2seproject1:jar manifest="${manifest.file}">
82.1123 - <j2seproject1:manifest>
82.1124 - <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
82.1125 - </j2seproject1:manifest>
82.1126 - </j2seproject1:jar>
82.1127 - <echo>To run this application from the command line without Ant, try:</echo>
82.1128 + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
82.1129 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
82.1130 + <touch file="${tmp.manifest.file}" verbose="false"/>
82.1131 + </target>
82.1132 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
82.1133 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
82.1134 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
82.1135 + </target>
82.1136 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
82.1137 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
82.1138 + <attribute name="Main-Class" value="${main.class}"/>
82.1139 + </manifest>
82.1140 + </target>
82.1141 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
82.1142 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
82.1143 + <attribute name="Profile" value="${javac.profile}"/>
82.1144 + </manifest>
82.1145 + </target>
82.1146 + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
82.1147 + <basename file="${application.splash}" property="splashscreen.basename"/>
82.1148 + <mkdir dir="${build.classes.dir}/META-INF"/>
82.1149 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
82.1150 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
82.1151 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
82.1152 + </manifest>
82.1153 + </target>
82.1154 + <target depends="init,compile" name="-check-do-mkdist">
82.1155 + <condition property="do.mkdist">
82.1156 + <and>
82.1157 + <isset property="do.archive"/>
82.1158 + <isset property="libs.CopyLibs.classpath"/>
82.1159 + <not>
82.1160 + <istrue value="${mkdist.disabled}"/>
82.1161 + </not>
82.1162 + <not>
82.1163 + <available file="${build.classes.dir}/module-info.class"/>
82.1164 + </not>
82.1165 + </and>
82.1166 + </condition>
82.1167 + </target>
82.1168 + <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">
82.1169 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
82.1170 + <echo level="info">To run this application from the command line without Ant, try:</echo>
82.1171 + <property location="${dist.jar}" name="dist.jar.resolved"/>
82.1172 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
82.1173 + </target>
82.1174 + <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">
82.1175 + <j2seproject1:jar manifest="${tmp.manifest.file}"/>
82.1176 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
82.1177 <property location="${dist.jar}" name="dist.jar.resolved"/>
82.1178 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
82.1179 + <isset property="named.module.internal"/>
82.1180 + </condition>
82.1181 <pathconvert property="run.classpath.with.dist.jar">
82.1182 <path path="${run.classpath}"/>
82.1183 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
82.1184 + </pathconvert>
82.1185 + <pathconvert property="run.modulepath.with.dist.jar">
82.1186 + <path location="${dist.jar.resolved}"/>
82.1187 + <path path="${run.modulepath}"/>
82.1188 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
82.1189 </pathconvert>
82.1190 - <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
82.1191 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
82.1192 + <isset property="named.module.internal"/>
82.1193 + </condition>
82.1194 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
82.1195 + <and>
82.1196 + <isset property="modules.supported.internal"/>
82.1197 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
82.1198 + </and>
82.1199 + </condition>
82.1200 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
82.1201 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
82.1202 + </condition>
82.1203 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
82.1204 + <isset property="do.module.main.class"/>
82.1205 + </condition>
82.1206 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
82.1207 + <isset property="named.module.internal"/>
82.1208 + </condition>
82.1209 + <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}">
82.1210 + <isset property="main.class.available"/>
82.1211 + </condition>
82.1212 + <condition else="debug" property="jar.usage.level" value="info">
82.1213 + <isset property="main.class.available"/>
82.1214 + </condition>
82.1215 + <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
82.1216 </target>
82.1217 - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
82.1218 - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
82.1219 - <pathconvert property="run.classpath.without.build.classes.dir">
82.1220 - <path path="${run.classpath}"/>
82.1221 - <map from="${build.classes.dir.resolved}" to=""/>
82.1222 - </pathconvert>
82.1223 - <pathconvert pathsep=" " property="jar.classpath">
82.1224 - <path path="${run.classpath.without.build.classes.dir}"/>
82.1225 - <chainedmapper>
82.1226 - <flattenmapper/>
82.1227 - <globmapper from="*" to="lib/*"/>
82.1228 - </chainedmapper>
82.1229 - </pathconvert>
82.1230 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
82.1231 - <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
82.1232 - <fileset dir="${build.classes.dir}"/>
82.1233 - <manifest>
82.1234 - <attribute name="Main-Class" value="${main.class}"/>
82.1235 - <attribute name="Class-Path" value="${jar.classpath}"/>
82.1236 - </manifest>
82.1237 - </copylibs>
82.1238 - <echo>To run this application from the command line without Ant, try:</echo>
82.1239 - <property location="${dist.jar}" name="dist.jar.resolved"/>
82.1240 - <echo>java -jar "${dist.jar.resolved}"</echo>
82.1241 + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
82.1242 + <delete>
82.1243 + <fileset file="${tmp.manifest.file}"/>
82.1244 + </delete>
82.1245 </target>
82.1246 + <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"/>
82.1247 + <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"/>
82.1248 <target name="-post-jar">
82.1249 <!-- Empty placeholder for easier customization. -->
82.1250 <!-- You can override this target in the ../build.xml file. -->
82.1251 </target>
82.1252 - <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"/>
82.1253 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
82.1254 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
82.1255 + <!--
82.1256 + =================
82.1257 + DEPLOY SECTION
82.1258 + =================
82.1259 + -->
82.1260 + <target name="-pre-deploy">
82.1261 + <!-- Empty placeholder for easier customization. -->
82.1262 + <!-- You can override this target in the ../build.xml file. -->
82.1263 + </target>
82.1264 + <target depends="init" name="-check-jlink">
82.1265 + <condition property="do.jlink.internal">
82.1266 + <and>
82.1267 + <istrue value="${do.jlink}"/>
82.1268 + <isset property="do.archive"/>
82.1269 + <isset property="named.module.internal"/>
82.1270 + </and>
82.1271 + </condition>
82.1272 + </target>
82.1273 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
82.1274 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
82.1275 + <property name="jlink.launcher.name" value="${application.title}"/>
82.1276 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
82.1277 + <and>
82.1278 + <isset property="jlink.additionalmodules"/>
82.1279 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
82.1280 + </and>
82.1281 + </condition>
82.1282 + <condition property="jlink.do.strip.internal">
82.1283 + <and>
82.1284 + <isset property="jlink.strip"/>
82.1285 + <istrue value="${jlink.strip}"/>
82.1286 + </and>
82.1287 + </condition>
82.1288 + <condition property="jlink.do.additionalparam.internal">
82.1289 + <and>
82.1290 + <isset property="jlink.additionalparam"/>
82.1291 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
82.1292 + </and>
82.1293 + </condition>
82.1294 + <condition property="jlink.do.launcher.internal">
82.1295 + <and>
82.1296 + <istrue value="${jlink.launcher}"/>
82.1297 + <isset property="main.class.available"/>
82.1298 + </and>
82.1299 + </condition>
82.1300 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
82.1301 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
82.1302 + <exec executable="${platform.jlink}">
82.1303 + <arg value="--module-path"/>
82.1304 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
82.1305 + <arg value="--add-modules"/>
82.1306 + <arg value="${jlink.add.modules}"/>
82.1307 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
82.1308 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
82.1309 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
82.1310 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
82.1311 + <arg value="--output"/>
82.1312 + <arg value="${dist.jlink.output}"/>
82.1313 + </exec>
82.1314 + </target>
82.1315 + <target name="-post-deploy">
82.1316 + <!-- Empty placeholder for easier customization. -->
82.1317 + <!-- You can override this target in the ../build.xml file. -->
82.1318 + </target>
82.1319 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
82.1320 <!--
82.1321 =================
82.1322 EXECUTION SECTION
82.1323 @@ -438,10 +1336,14 @@
82.1324 <target name="-do-not-recompile">
82.1325 <property name="javac.includes.binary" value=""/>
82.1326 </target>
82.1327 - <target depends="init,-do-not-recompile,compile-single" name="run-single">
82.1328 + <target depends="init,compile-single" name="run-single">
82.1329 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
82.1330 <j2seproject1:java classname="${run.class}"/>
82.1331 </target>
82.1332 + <target depends="init,compile-test-single" name="run-test-with-main">
82.1333 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
82.1334 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
82.1335 + </target>
82.1336 <!--
82.1337 =================
82.1338 DEBUGGING SECTION
82.1339 @@ -450,11 +1352,14 @@
82.1340 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
82.1341 <j2seproject1:nbjpdastart name="${debug.class}"/>
82.1342 </target>
82.1343 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
82.1344 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
82.1345 + </target>
82.1346 <target depends="init,compile" name="-debug-start-debuggee">
82.1347 <j2seproject3:debug>
82.1348 - <customize>
82.1349 + <customizeDebuggee>
82.1350 <arg line="${application.args}"/>
82.1351 - </customize>
82.1352 + </customizeDebuggee>
82.1353 </j2seproject3:debug>
82.1354 </target>
82.1355 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
82.1356 @@ -466,7 +1371,12 @@
82.1357 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
82.1358 <j2seproject3:debug classname="${debug.class}"/>
82.1359 </target>
82.1360 - <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
82.1361 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
82.1362 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
82.1363 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
82.1364 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
82.1365 + </target>
82.1366 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
82.1367 <target depends="init" name="-pre-debug-fix">
82.1368 <fail unless="fix.includes">Must set fix.includes</fail>
82.1369 <property name="javac.includes" value="${fix.includes}.java"/>
82.1370 @@ -476,20 +1386,146 @@
82.1371 </target>
82.1372 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
82.1373 <!--
82.1374 + =================
82.1375 + PROFILING SECTION
82.1376 + =================
82.1377 + -->
82.1378 + <!--
82.1379 + pre NB7.2 profiler integration
82.1380 + -->
82.1381 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
82.1382 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
82.1383 + <nbprofiledirect>
82.1384 + <classpath>
82.1385 + <path path="${run.classpath}"/>
82.1386 + </classpath>
82.1387 + </nbprofiledirect>
82.1388 + <profile/>
82.1389 + </target>
82.1390 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
82.1391 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
82.1392 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
82.1393 + <nbprofiledirect>
82.1394 + <classpath>
82.1395 + <path path="${run.classpath}"/>
82.1396 + </classpath>
82.1397 + </nbprofiledirect>
82.1398 + <profile classname="${profile.class}"/>
82.1399 + </target>
82.1400 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
82.1401 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
82.1402 + <nbprofiledirect>
82.1403 + <classpath>
82.1404 + <path path="${run.classpath}"/>
82.1405 + </classpath>
82.1406 + </nbprofiledirect>
82.1407 + <profile classname="sun.applet.AppletViewer">
82.1408 + <customize>
82.1409 + <arg value="${applet.url}"/>
82.1410 + </customize>
82.1411 + </profile>
82.1412 + </target>
82.1413 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
82.1414 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
82.1415 + <nbprofiledirect>
82.1416 + <classpath>
82.1417 + <path path="${run.test.classpath}"/>
82.1418 + </classpath>
82.1419 + </nbprofiledirect>
82.1420 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
82.1421 + <customize>
82.1422 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
82.1423 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
82.1424 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
82.1425 + <jvmarg line="${profiler.info.jvmargs}"/>
82.1426 + <classpath>
82.1427 + <path path="${run.test.classpath}"/>
82.1428 + </classpath>
82.1429 + </customize>
82.1430 + </j2seproject3:junit>
82.1431 + </target>
82.1432 + <!--
82.1433 + end of pre NB72 profiling section
82.1434 + -->
82.1435 + <target if="netbeans.home" name="-profile-check">
82.1436 + <condition property="profiler.configured">
82.1437 + <or>
82.1438 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
82.1439 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
82.1440 + </or>
82.1441 + </condition>
82.1442 + </target>
82.1443 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
82.1444 + <startprofiler/>
82.1445 + <antcall target="run"/>
82.1446 + </target>
82.1447 + <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">
82.1448 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
82.1449 + <startprofiler/>
82.1450 + <antcall target="run-single"/>
82.1451 + </target>
82.1452 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
82.1453 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
82.1454 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
82.1455 + <startprofiler/>
82.1456 + <antcall target="test-single"/>
82.1457 + </target>
82.1458 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
82.1459 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
82.1460 + <startprofiler/>
82.1461 + <antcall target="run-test-with-main"/>
82.1462 + </target>
82.1463 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
82.1464 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
82.1465 + <startprofiler/>
82.1466 + <antcall target="run-applet"/>
82.1467 + </target>
82.1468 + <!--
82.1469 ===============
82.1470 JAVADOC SECTION
82.1471 ===============
82.1472 -->
82.1473 - <target depends="init" name="-javadoc-build">
82.1474 + <target depends="init" if="have.sources" name="-javadoc-build">
82.1475 <mkdir dir="${dist.javadoc.dir}"/>
82.1476 - <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}">
82.1477 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
82.1478 + <and>
82.1479 + <isset property="endorsed.classpath.cmd.line.arg"/>
82.1480 + <not>
82.1481 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
82.1482 + </not>
82.1483 + </and>
82.1484 + </condition>
82.1485 + <condition else="" property="bug5101868workaround" value="*.java">
82.1486 + <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
82.1487 + </condition>
82.1488 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
82.1489 + <and>
82.1490 + <isset property="javadoc.html5"/>
82.1491 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
82.1492 + </and>
82.1493 + </condition>
82.1494 + <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}">
82.1495 <classpath>
82.1496 <path path="${javac.classpath}"/>
82.1497 </classpath>
82.1498 - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
82.1499 + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
82.1500 <filename name="**/*.java"/>
82.1501 </fileset>
82.1502 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
82.1503 + <include name="**/*.java"/>
82.1504 + <exclude name="*.java"/>
82.1505 + </fileset>
82.1506 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
82.1507 + <arg line="${javadoc.html5.cmd.line.arg}"/>
82.1508 </javadoc>
82.1509 + <copy todir="${dist.javadoc.dir}">
82.1510 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
82.1511 + <filename name="**/doc-files/**"/>
82.1512 + </fileset>
82.1513 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
82.1514 + <include name="**/doc-files/**"/>
82.1515 + </fileset>
82.1516 + </copy>
82.1517 </target>
82.1518 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
82.1519 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
82.1520 @@ -497,7 +1533,7 @@
82.1521 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
82.1522 <!--
82.1523 =========================
82.1524 - JUNIT COMPILATION SECTION
82.1525 + TEST COMPILATION SECTION
82.1526 =========================
82.1527 -->
82.1528 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
82.1529 @@ -507,11 +1543,63 @@
82.1530 <!-- Empty placeholder for easier customization. -->
82.1531 <!-- You can override this target in the ../build.xml file. -->
82.1532 </target>
82.1533 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
82.1534 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
82.1535 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
82.1536 + <and>
82.1537 + <isset property="test.module.name"/>
82.1538 + <length length="0" string="${test.module.name}" when="greater"/>
82.1539 + </and>
82.1540 + </condition>
82.1541 + <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">
82.1542 + <and>
82.1543 + <isset property="test.module.name"/>
82.1544 + <length length="0" string="${test.module.name}" when="greater"/>
82.1545 + </and>
82.1546 + </condition>
82.1547 + </target>
82.1548 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
82.1549 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
82.1550 + <and>
82.1551 + <isset property="test.module.name"/>
82.1552 + <length length="0" string="${test.module.name}" when="greater"/>
82.1553 + </and>
82.1554 + </condition>
82.1555 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
82.1556 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
82.1557 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
82.1558 + <chainedmapper>
82.1559 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
82.1560 + <filtermapper>
82.1561 + <uniqfilter/>
82.1562 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
82.1563 + </filtermapper>
82.1564 + <cutdirsmapper dirs="1"/>
82.1565 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
82.1566 + </chainedmapper>
82.1567 + </pathconvert>
82.1568 + <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}">
82.1569 + <and>
82.1570 + <isset property="test.module.name"/>
82.1571 + <length length="0" string="${test.module.name}" when="greater"/>
82.1572 + </and>
82.1573 + </condition>
82.1574 + </target>
82.1575 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
82.1576 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
82.1577 + <property name="javac.test.compilerargs" value=""/>
82.1578 + <property name="run.test.jvmargs" value=""/>
82.1579 + </target>
82.1580 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
82.1581 <target if="do.depend.true" name="-compile-test-depend">
82.1582 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
82.1583 </target>
82.1584 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
82.1585 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
82.1586 + <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">
82.1587 + <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}">
82.1588 + <customize>
82.1589 + <compilerarg line="${javac.test.compilerargs}"/>
82.1590 + </customize>
82.1591 + </j2seproject3:javac>
82.1592 <copy todir="${build.test.classes.dir}">
82.1593 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
82.1594 </copy>
82.1595 @@ -525,10 +1613,14 @@
82.1596 <!-- Empty placeholder for easier customization. -->
82.1597 <!-- You can override this target in the ../build.xml file. -->
82.1598 </target>
82.1599 - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
82.1600 + <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">
82.1601 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
82.1602 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
82.1603 - <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
82.1604 + <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}">
82.1605 + <customize>
82.1606 + <compilerarg line="${javac.test.compilerargs}"/>
82.1607 + </customize>
82.1608 + </j2seproject3:javac>
82.1609 <copy todir="${build.test.classes.dir}">
82.1610 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
82.1611 </copy>
82.1612 @@ -540,17 +1632,17 @@
82.1613 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
82.1614 <!--
82.1615 =======================
82.1616 - JUNIT EXECUTION SECTION
82.1617 + TEST EXECUTION SECTION
82.1618 =======================
82.1619 -->
82.1620 <target depends="init" if="have.tests" name="-pre-test-run">
82.1621 <mkdir dir="${build.test.results.dir}"/>
82.1622 </target>
82.1623 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
82.1624 - <j2seproject3:junit testincludes="**/*Test.java"/>
82.1625 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
82.1626 + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
82.1627 </target>
82.1628 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
82.1629 - <fail if="tests.failed">Some tests failed; see details above.</fail>
82.1630 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
82.1631 </target>
82.1632 <target depends="init" if="have.tests" name="test-report"/>
82.1633 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
82.1634 @@ -558,41 +1650,42 @@
82.1635 <target depends="init" if="have.tests" name="-pre-test-run-single">
82.1636 <mkdir dir="${build.test.results.dir}"/>
82.1637 </target>
82.1638 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
82.1639 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
82.1640 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
82.1641 - <j2seproject3:junit excludes="" includes="${test.includes}"/>
82.1642 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
82.1643 </target>
82.1644 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
82.1645 - <fail if="tests.failed">Some tests failed; see details above.</fail>
82.1646 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
82.1647 </target>
82.1648 - <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
82.1649 + <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"/>
82.1650 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
82.1651 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
82.1652 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
82.1653 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
82.1654 + </target>
82.1655 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
82.1656 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
82.1657 + </target>
82.1658 + <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"/>
82.1659 <!--
82.1660 =======================
82.1661 - JUNIT DEBUGGING SECTION
82.1662 + TEST DEBUGGING SECTION
82.1663 =======================
82.1664 -->
82.1665 - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
82.1666 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
82.1667 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
82.1668 - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
82.1669 - <delete file="${test.report.file}"/>
82.1670 - <mkdir dir="${build.test.results.dir}"/>
82.1671 - <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}">
82.1672 - <customize>
82.1673 - <syspropertyset>
82.1674 - <propertyref prefix="test-sys-prop."/>
82.1675 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
82.1676 - </syspropertyset>
82.1677 - <arg value="${test.class}"/>
82.1678 - <arg value="showoutput=true"/>
82.1679 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
82.1680 - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
82.1681 - </customize>
82.1682 - </j2seproject3:debug>
82.1683 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
82.1684 + </target>
82.1685 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
82.1686 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
82.1687 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
82.1688 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
82.1689 </target>
82.1690 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
82.1691 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
82.1692 </target>
82.1693 - <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
82.1694 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
82.1695 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
82.1696 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
82.1697 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
82.1698 </target>
82.1699 @@ -618,9 +1711,9 @@
82.1700 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
82.1701 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
82.1702 <j2seproject3:debug classname="sun.applet.AppletViewer">
82.1703 - <customize>
82.1704 + <customizeDebuggee>
82.1705 <arg value="${applet.url}"/>
82.1706 - </customize>
82.1707 + </customizeDebuggee>
82.1708 </j2seproject3:debug>
82.1709 </target>
82.1710 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
82.1711 @@ -629,14 +1722,49 @@
82.1712 CLEANUP SECTION
82.1713 ===============
82.1714 -->
82.1715 - <target depends="init" name="deps-clean" unless="no.deps"/>
82.1716 + <target name="-deps-clean-init" unless="built-clean.properties">
82.1717 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
82.1718 + <delete file="${built-clean.properties}" quiet="true"/>
82.1719 + </target>
82.1720 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
82.1721 + <echo level="warn" message="Cycle detected: trycatchredo was already built"/>
82.1722 + </target>
82.1723 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
82.1724 + <mkdir dir="${build.dir}"/>
82.1725 + <touch file="${built-clean.properties}" verbose="false"/>
82.1726 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
82.1727 + <antcall target="-warn-already-built-clean"/>
82.1728 + <propertyfile file="${built-clean.properties}">
82.1729 + <entry key="${basedir}" value=""/>
82.1730 + </propertyfile>
82.1731 + </target>
82.1732 <target depends="init" name="-do-clean">
82.1733 <delete dir="${build.dir}"/>
82.1734 - <delete dir="${dist.dir}"/>
82.1735 + <delete dir="${dist.jlink.output}"/>
82.1736 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
82.1737 </target>
82.1738 <target name="-post-clean">
82.1739 <!-- Empty placeholder for easier customization. -->
82.1740 <!-- You can override this target in the ../build.xml file. -->
82.1741 </target>
82.1742 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
82.1743 + <target name="-check-call-dep">
82.1744 + <property file="${call.built.properties}" prefix="already.built."/>
82.1745 + <condition property="should.call.dep">
82.1746 + <and>
82.1747 + <not>
82.1748 + <isset property="already.built.${call.subproject}"/>
82.1749 + </not>
82.1750 + <available file="${call.script}"/>
82.1751 + </and>
82.1752 + </condition>
82.1753 + </target>
82.1754 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
82.1755 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
82.1756 + <propertyset>
82.1757 + <propertyref prefix="transfer."/>
82.1758 + <mapper from="transfer.*" to="*" type="glob"/>
82.1759 + </propertyset>
82.1760 + </ant>
82.1761 + </target>
82.1762 </project>
83.1 --- a/samples/trycatchredo/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
83.2 +++ b/samples/trycatchredo/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
83.3 @@ -1,8 +1,8 @@
83.4 build.xml.data.CRC32=5d238722
83.5 -build.xml.script.CRC32=43ec1e0f
83.6 -build.xml.stylesheet.CRC32=958a1d3e
83.7 +build.xml.script.CRC32=d68a6cea
83.8 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
83.9 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
83.10 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
83.11 nbproject/build-impl.xml.data.CRC32=5d238722
83.12 -nbproject/build-impl.xml.script.CRC32=10047cb8
83.13 -nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5
83.14 +nbproject/build-impl.xml.script.CRC32=9eec4b80
83.15 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
84.1 --- a/samples/trycatchredo/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
84.2 +++ b/samples/trycatchredo/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
84.3 @@ -3,14 +3,19 @@
84.4 # This directory is removed when the project is cleaned:
84.5 build.dir=build
84.6 build.generated.dir=${build.dir}/generated
84.7 +build.generated.sources.dir=${build.dir}/generated-sources
84.8 # Only compile against the classpath explicitly listed here:
84.9 build.sysclasspath=ignore
84.10 build.test.classes.dir=${build.dir}/test/classes
84.11 build.test.results.dir=${build.dir}/test/results
84.12 debug.classpath=\
84.13 ${run.classpath}
84.14 +debug.modulepath=\
84.15 + ${run.modulepath}
84.16 debug.test.classpath=\
84.17 ${run.test.classpath}
84.18 +debug.test.modulepath=\
84.19 + ${run.test.modulepath}
84.20 # This directory is removed when the project is cleaned:
84.21 dist.dir=dist
84.22 dist.jar=${dist.dir}/trycatchredo.jar
84.23 @@ -23,12 +28,16 @@
84.24 # Space-separated list of extra javac options
84.25 javac.compilerargs=
84.26 javac.deprecation=false
84.27 -javac.source=1.5
84.28 -javac.target=1.5
84.29 +javac.modulepath=
84.30 +javac.processormodulepath=
84.31 +javac.source=1.6
84.32 +javac.target=1.6
84.33 javac.test.classpath=\
84.34 ${javac.classpath}:\
84.35 ${build.classes.dir}:\
84.36 ${file.reference.junit-4.4.jar}
84.37 +javac.test.modulepath=\
84.38 + ${javac.modulepath}
84.39 javadoc.additionalparam=
84.40 javadoc.author=false
84.41 javadoc.encoding=${source.encoding}
84.42 @@ -50,9 +59,13 @@
84.43 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
84.44 # or test-sys-prop.name=value to set system properties for unit tests):
84.45 run.jvmargs=
84.46 +run.modulepath=\
84.47 + ${javac.modulepath}
84.48 run.test.classpath=\
84.49 ${javac.test.classpath}:\
84.50 ${build.test.classes.dir}
84.51 +run.test.modulepath=\
84.52 + ${javac.test.modulepath}
84.53 source.encoding=UTF-8
84.54 src.dir=src
84.55 test.src.dir=test
85.1 --- a/samples/unionfs/nbproject/build-impl.xml Mon Nov 11 05:47:32 2019 +0100
85.2 +++ b/samples/unionfs/nbproject/build-impl.xml Mon Nov 11 13:17:34 2019 +0100
85.3 @@ -19,7 +19,7 @@
85.4 - cleanup
85.5
85.6 -->
85.7 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="unionfs-impl">
85.8 +<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="unionfs-impl">
85.9 <fail message="Please build using Ant 1.8.0 or higher.">
85.10 <condition>
85.11 <not>
85.12 @@ -46,14 +46,79 @@
85.13 <property file="${user.properties.file}"/>
85.14 <!-- The two properties below are usually overridden -->
85.15 <!-- by the active platform. Just a fallback. -->
85.16 - <property name="default.javac.source" value="1.4"/>
85.17 - <property name="default.javac.target" value="1.4"/>
85.18 + <property name="default.javac.source" value="1.6"/>
85.19 + <property name="default.javac.target" value="1.6"/>
85.20 </target>
85.21 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
85.22 <property file="nbproject/configs/${config}.properties"/>
85.23 <property file="nbproject/project.properties"/>
85.24 </target>
85.25 - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
85.26 + <target name="-init-modules-supported">
85.27 + <condition property="modules.supported.internal" value="true">
85.28 + <not>
85.29 + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
85.30 + </not>
85.31 + </condition>
85.32 + </target>
85.33 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
85.34 + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
85.35 + <attribute name="property"/>
85.36 + <attribute name="sourcepath"/>
85.37 + <sequential>
85.38 + <loadresource property="@{property}" quiet="true">
85.39 + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
85.40 + <filterchain>
85.41 + <stripjavacomments/>
85.42 + <linecontainsregexp>
85.43 + <regexp pattern="module .* \{"/>
85.44 + </linecontainsregexp>
85.45 + <tokenfilter>
85.46 + <linetokenizer/>
85.47 + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
85.48 + </tokenfilter>
85.49 + <striplinebreaks/>
85.50 + </filterchain>
85.51 + </loadresource>
85.52 + </sequential>
85.53 + </macrodef>
85.54 + </target>
85.55 + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
85.56 + <fail message="Java 9 support requires Ant 1.10.0 or higher.">
85.57 + <condition>
85.58 + <not>
85.59 + <antversion atleast="1.10.0"/>
85.60 + </not>
85.61 + </condition>
85.62 + </fail>
85.63 + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
85.64 + <condition property="named.module.internal">
85.65 + <and>
85.66 + <isset property="module.name"/>
85.67 + <length length="0" string="${module.name}" when="greater"/>
85.68 + </and>
85.69 + </condition>
85.70 + <condition property="unnamed.module.internal">
85.71 + <not>
85.72 + <isset property="named.module.internal"/>
85.73 + </not>
85.74 + </condition>
85.75 + <property name="javac.modulepath" value=""/>
85.76 + <property name="run.modulepath" value="${javac.modulepath}"/>
85.77 + <property name="module.build.classes.dir" value="${build.classes.dir}"/>
85.78 + <property name="debug.modulepath" value="${run.modulepath}"/>
85.79 + <property name="javac.upgrademodulepath" value=""/>
85.80 + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
85.81 + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
85.82 + <and>
85.83 + <isset property="javac.systemmodulepath"/>
85.84 + <length length="0" string="${javac.systemmodulepath}" when="greater"/>
85.85 + </and>
85.86 + </condition>
85.87 + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
85.88 + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
85.89 + <property name="module.name" value=""/>
85.90 + </target>
85.91 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
85.92 <property name="platform.java" value="${java.home}/bin/java"/>
85.93 <available file="${manifest.file}" property="manifest.available"/>
85.94 <condition property="splashscreen.available">
85.95 @@ -76,7 +141,9 @@
85.96 <and>
85.97 <isset property="javac.profile"/>
85.98 <length length="0" string="${javac.profile}" when="greater"/>
85.99 - <matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
85.100 + <not>
85.101 + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
85.102 + </not>
85.103 </and>
85.104 </condition>
85.105 <condition property="do.archive">
85.106 @@ -87,15 +154,6 @@
85.107 <istrue value="${not.archive.disabled}"/>
85.108 </or>
85.109 </condition>
85.110 - <condition property="do.mkdist">
85.111 - <and>
85.112 - <isset property="do.archive"/>
85.113 - <isset property="libs.CopyLibs.classpath"/>
85.114 - <not>
85.115 - <istrue value="${mkdist.disabled}"/>
85.116 - </not>
85.117 - </and>
85.118 - </condition>
85.119 <condition property="do.archive+manifest.available">
85.120 <and>
85.121 <isset property="manifest.available"/>
85.122 @@ -156,6 +214,7 @@
85.123 <property name="application.args" value=""/>
85.124 <property name="source.encoding" value="${file.encoding}"/>
85.125 <property name="runtime.encoding" value="${source.encoding}"/>
85.126 + <property name="manifest.encoding" value="${source.encoding}"/>
85.127 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
85.128 <and>
85.129 <isset property="javadoc.encoding"/>
85.130 @@ -191,7 +250,12 @@
85.131 </not>
85.132 </and>
85.133 </condition>
85.134 - <property name="javac.fork" value="${jdkBug6558476}"/>
85.135 + <condition else="false" property="javac.fork">
85.136 + <or>
85.137 + <istrue value="${jdkBug6558476}"/>
85.138 + <istrue value="${javac.external.vm}"/>
85.139 + </or>
85.140 + </condition>
85.141 <property name="jar.index" value="false"/>
85.142 <property name="jar.index.metainf" value="${jar.index}"/>
85.143 <property name="copylibs.rebase" value="true"/>
85.144 @@ -217,6 +281,7 @@
85.145 <condition else="" property="testng.debug.mode" value="-mixed">
85.146 <istrue value="${junit+testng.available}"/>
85.147 </condition>
85.148 + <property name="java.failonerror" value="true"/>
85.149 </target>
85.150 <target name="-post-init">
85.151 <!-- Empty placeholder for easier customization. -->
85.152 @@ -243,11 +308,80 @@
85.153 </sequential>
85.154 </macrodef>
85.155 </target>
85.156 - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
85.157 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
85.158 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
85.159 <attribute default="${src.dir}" name="srcdir"/>
85.160 <attribute default="${build.classes.dir}" name="destdir"/>
85.161 <attribute default="${javac.classpath}" name="classpath"/>
85.162 + <attribute default="${javac.modulepath}" name="modulepath"/>
85.163 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
85.164 + <attribute default="${javac.processorpath}" name="processorpath"/>
85.165 + <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
85.166 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
85.167 + <attribute default="${includes}" name="includes"/>
85.168 + <attribute default="${excludes}" name="excludes"/>
85.169 + <attribute default="${javac.debug}" name="debug"/>
85.170 + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
85.171 + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
85.172 + <attribute default="${empty.dir}" name="gensrcdir"/>
85.173 + <element name="customize" optional="true"/>
85.174 + <sequential>
85.175 + <condition property="warn.excludes.internal">
85.176 + <and>
85.177 + <isset property="named.module.internal"/>
85.178 + <length length="0" string="@{excludes}" trim="true" when="greater"/>
85.179 + </and>
85.180 + </condition>
85.181 + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
85.182 + <property location="${build.dir}/empty" name="empty.dir"/>
85.183 + <mkdir dir="${empty.dir}"/>
85.184 + <mkdir dir="@{apgeneratedsrcdir}"/>
85.185 + <condition property="processormodulepath.set">
85.186 + <resourcecount count="0" when="greater">
85.187 + <path>
85.188 + <pathelement path="@{processormodulepath}"/>
85.189 + </path>
85.190 + </resourcecount>
85.191 + </condition>
85.192 + <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}">
85.193 + <src>
85.194 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
85.195 + <include name="*"/>
85.196 + </dirset>
85.197 + </src>
85.198 + <classpath>
85.199 + <path path="@{classpath}"/>
85.200 + </classpath>
85.201 + <modulepath>
85.202 + <path path="@{modulepath}"/>
85.203 + </modulepath>
85.204 + <upgrademodulepath>
85.205 + <path path="@{upgrademodulepath}"/>
85.206 + </upgrademodulepath>
85.207 + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
85.208 + <compilerarg line="${javac.profile.cmd.line.arg}"/>
85.209 + <compilerarg line="${javac.compilerargs}"/>
85.210 + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
85.211 + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
85.212 + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
85.213 + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
85.214 + <compilerarg line="${ap.processors.internal}"/>
85.215 + <compilerarg line="${annotation.processing.processor.options}"/>
85.216 + <compilerarg value="-s"/>
85.217 + <compilerarg path="@{apgeneratedsrcdir}"/>
85.218 + <compilerarg line="${ap.proc.none.internal}"/>
85.219 + <customize/>
85.220 + </javac>
85.221 + </sequential>
85.222 + </macrodef>
85.223 + </target>
85.224 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
85.225 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
85.226 + <attribute default="${src.dir}" name="srcdir"/>
85.227 + <attribute default="${build.classes.dir}" name="destdir"/>
85.228 + <attribute default="${javac.classpath}" name="classpath"/>
85.229 + <attribute default="${javac.modulepath}" name="modulepath"/>
85.230 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
85.231 <attribute default="${javac.processorpath}" name="processorpath"/>
85.232 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
85.233 <attribute default="${includes}" name="includes"/>
85.234 @@ -284,11 +418,13 @@
85.235 </sequential>
85.236 </macrodef>
85.237 </target>
85.238 - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
85.239 + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
85.240 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
85.241 <attribute default="${src.dir}" name="srcdir"/>
85.242 <attribute default="${build.classes.dir}" name="destdir"/>
85.243 <attribute default="${javac.classpath}" name="classpath"/>
85.244 + <attribute default="${javac.modulepath}" name="modulepath"/>
85.245 + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
85.246 <attribute default="${javac.processorpath}" name="processorpath"/>
85.247 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
85.248 <attribute default="${includes}" name="includes"/>
85.249 @@ -317,7 +453,7 @@
85.250 </sequential>
85.251 </macrodef>
85.252 </target>
85.253 - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
85.254 + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
85.255 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
85.256 <attribute default="${src.dir}" name="srcdir"/>
85.257 <attribute default="${build.classes.dir}" name="destdir"/>
85.258 @@ -372,7 +508,59 @@
85.259 <property name="test.binarytestincludes" value=""/>
85.260 <property name="test.binaryexcludes" value=""/>
85.261 </target>
85.262 - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
85.263 + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
85.264 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
85.265 + <attribute default="${includes}" name="includes"/>
85.266 + <attribute default="${excludes}" name="excludes"/>
85.267 + <element name="customizePrototype" optional="true"/>
85.268 + <sequential>
85.269 + <property name="junit.forkmode" value="perTest"/>
85.270 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
85.271 + <syspropertyset>
85.272 + <propertyref prefix="test-sys-prop."/>
85.273 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.274 + </syspropertyset>
85.275 + <classpath>
85.276 + <path path="${run.test.classpath}"/>
85.277 + </classpath>
85.278 + <modulepath>
85.279 + <path path="${run.test.modulepath}"/>
85.280 + </modulepath>
85.281 + <formatter type="brief" usefile="false"/>
85.282 + <formatter type="xml"/>
85.283 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.284 + <jvmarg value="-ea"/>
85.285 + <jvmarg line="${run.test.jvmargs}"/>
85.286 + <customizePrototype/>
85.287 + </junit>
85.288 + </sequential>
85.289 + </macrodef>
85.290 + </target>
85.291 + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
85.292 + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
85.293 + <attribute default="${includes}" name="includes"/>
85.294 + <attribute default="${excludes}" name="excludes"/>
85.295 + <element name="customizePrototype" optional="true"/>
85.296 + <sequential>
85.297 + <property name="junit.forkmode" value="perTest"/>
85.298 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
85.299 + <syspropertyset>
85.300 + <propertyref prefix="test-sys-prop."/>
85.301 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.302 + </syspropertyset>
85.303 + <classpath>
85.304 + <path path="${run.test.classpath}"/>
85.305 + </classpath>
85.306 + <formatter type="brief" usefile="false"/>
85.307 + <formatter type="xml"/>
85.308 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.309 + <jvmarg value="-ea"/>
85.310 + <customizePrototype/>
85.311 + </junit>
85.312 + </sequential>
85.313 + </macrodef>
85.314 + </target>
85.315 + <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}">
85.316 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
85.317 <attribute default="${includes}" name="includes"/>
85.318 <attribute default="${excludes}" name="excludes"/>
85.319 @@ -380,22 +568,16 @@
85.320 <attribute default="" name="testmethods"/>
85.321 <element name="customize" optional="true"/>
85.322 <sequential>
85.323 - <property name="junit.forkmode" value="perTest"/>
85.324 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
85.325 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
85.326 - <syspropertyset>
85.327 - <propertyref prefix="test-sys-prop."/>
85.328 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.329 - </syspropertyset>
85.330 - <formatter type="brief" usefile="false"/>
85.331 - <formatter type="xml"/>
85.332 - <jvmarg value="-ea"/>
85.333 - <customize/>
85.334 - </junit>
85.335 + <j2seproject3:junit-prototype>
85.336 + <customizePrototype>
85.337 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
85.338 + <customize/>
85.339 + </customizePrototype>
85.340 + </j2seproject3:junit-prototype>
85.341 </sequential>
85.342 </macrodef>
85.343 </target>
85.344 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
85.345 + <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}">
85.346 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
85.347 <attribute default="${includes}" name="includes"/>
85.348 <attribute default="${excludes}" name="excludes"/>
85.349 @@ -403,25 +585,19 @@
85.350 <attribute default="" name="testmethods"/>
85.351 <element name="customize" optional="true"/>
85.352 <sequential>
85.353 - <property name="junit.forkmode" value="perTest"/>
85.354 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
85.355 - <batchtest todir="${build.test.results.dir}">
85.356 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
85.357 - <filename name="@{testincludes}"/>
85.358 - </fileset>
85.359 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
85.360 - <filename name="${test.binarytestincludes}"/>
85.361 - </fileset>
85.362 - </batchtest>
85.363 - <syspropertyset>
85.364 - <propertyref prefix="test-sys-prop."/>
85.365 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.366 - </syspropertyset>
85.367 - <formatter type="brief" usefile="false"/>
85.368 - <formatter type="xml"/>
85.369 - <jvmarg value="-ea"/>
85.370 - <customize/>
85.371 - </junit>
85.372 + <j2seproject3:junit-prototype>
85.373 + <customizePrototype>
85.374 + <batchtest todir="${build.test.results.dir}">
85.375 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
85.376 + <filename name="@{testincludes}"/>
85.377 + </fileset>
85.378 + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
85.379 + <filename name="${test.binarytestincludes}"/>
85.380 + </fileset>
85.381 + </batchtest>
85.382 + <customize/>
85.383 + </customizePrototype>
85.384 + </j2seproject3:junit-prototype>
85.385 </sequential>
85.386 </macrodef>
85.387 </target>
85.388 @@ -449,6 +625,10 @@
85.389 <propertyref prefix="test-sys-prop."/>
85.390 <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.391 </propertyset>
85.392 + <classpath>
85.393 + <path path="${run.test.classpath}"/>
85.394 + </classpath>
85.395 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.396 <customize/>
85.397 </testng>
85.398 </sequential>
85.399 @@ -503,10 +683,6 @@
85.400 <sequential>
85.401 <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
85.402 <customize>
85.403 - <classpath>
85.404 - <path path="${run.test.classpath}"/>
85.405 - </classpath>
85.406 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.407 <jvmarg line="${run.jvmargs}"/>
85.408 <jvmarg line="${run.jvmargs.ide}"/>
85.409 </customize>
85.410 @@ -514,74 +690,20 @@
85.411 </sequential>
85.412 </macrodef>
85.413 </target>
85.414 - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
85.415 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
85.416 - <attribute default="${includes}" name="includes"/>
85.417 - <attribute default="${excludes}" name="excludes"/>
85.418 - <attribute default="**" name="testincludes"/>
85.419 - <attribute default="" name="testmethods"/>
85.420 - <element name="customize" optional="true"/>
85.421 - <sequential>
85.422 - <property name="junit.forkmode" value="perTest"/>
85.423 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
85.424 - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
85.425 - <syspropertyset>
85.426 - <propertyref prefix="test-sys-prop."/>
85.427 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.428 - </syspropertyset>
85.429 - <formatter type="brief" usefile="false"/>
85.430 - <formatter type="xml"/>
85.431 - <jvmarg value="-ea"/>
85.432 - <jvmarg line="${debug-args-line}"/>
85.433 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
85.434 - <customize/>
85.435 - </junit>
85.436 - </sequential>
85.437 - </macrodef>
85.438 - </target>
85.439 - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
85.440 - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
85.441 - <attribute default="${includes}" name="includes"/>
85.442 - <attribute default="${excludes}" name="excludes"/>
85.443 - <attribute default="**" name="testincludes"/>
85.444 - <attribute default="" name="testmethods"/>
85.445 - <element name="customize" optional="true"/>
85.446 - <sequential>
85.447 - <property name="junit.forkmode" value="perTest"/>
85.448 - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
85.449 - <batchtest todir="${build.test.results.dir}">
85.450 - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
85.451 - <filename name="@{testincludes}"/>
85.452 - </fileset>
85.453 - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
85.454 - <filename name="${test.binarytestincludes}"/>
85.455 - </fileset>
85.456 - </batchtest>
85.457 - <syspropertyset>
85.458 - <propertyref prefix="test-sys-prop."/>
85.459 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.460 - </syspropertyset>
85.461 - <formatter type="brief" usefile="false"/>
85.462 - <formatter type="xml"/>
85.463 - <jvmarg value="-ea"/>
85.464 - <jvmarg line="${debug-args-line}"/>
85.465 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
85.466 - <customize/>
85.467 - </junit>
85.468 - </sequential>
85.469 - </macrodef>
85.470 - </target>
85.471 - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
85.472 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
85.473 <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
85.474 <attribute default="${includes}" name="includes"/>
85.475 <attribute default="${excludes}" name="excludes"/>
85.476 <attribute default="**" name="testincludes"/>
85.477 <attribute default="" name="testmethods"/>
85.478 - <element implicit="true" name="customize" optional="true"/>
85.479 + <element name="customizeDebuggee" optional="true"/>
85.480 <sequential>
85.481 - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
85.482 - <customize/>
85.483 - </j2seproject3:junit-debug>
85.484 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
85.485 + <customize>
85.486 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
85.487 + <customizeDebuggee/>
85.488 + </customize>
85.489 + </j2seproject3:junit>
85.490 </sequential>
85.491 </macrodef>
85.492 </target>
85.493 @@ -600,14 +722,14 @@
85.494 <delete dir="${build.test.results.dir}" quiet="true"/>
85.495 <mkdir dir="${build.test.results.dir}"/>
85.496 <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
85.497 - <customize>
85.498 + <customizeDebuggee>
85.499 <customize2/>
85.500 <jvmarg value="-ea"/>
85.501 <arg line="${testng.debug.mode}"/>
85.502 <arg line="-d ${build.test.results.dir}"/>
85.503 <arg line="-listener org.testng.reporters.VerboseReporter"/>
85.504 <arg line="${testng.cmd.args}"/>
85.505 - </customize>
85.506 + </customizeDebuggee>
85.507 </j2seproject3:debug>
85.508 </sequential>
85.509 </macrodef>
85.510 @@ -634,14 +756,10 @@
85.511 <attribute default="" name="testMethod"/>
85.512 <sequential>
85.513 <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
85.514 - <customize>
85.515 - <classpath>
85.516 - <path path="${run.test.classpath}"/>
85.517 - </classpath>
85.518 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.519 + <customizeDebuggee>
85.520 <jvmarg line="${run.jvmargs}"/>
85.521 <jvmarg line="${run.jvmargs.ide}"/>
85.522 - </customize>
85.523 + </customizeDebuggee>
85.524 </j2seproject3:test-debug-impl>
85.525 </sequential>
85.526 </macrodef>
85.527 @@ -693,7 +811,7 @@
85.528 <sequential>
85.529 <property environment="env"/>
85.530 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
85.531 - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
85.532 + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
85.533 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.534 <jvmarg value="${profiler.info.jvmargs.agent}"/>
85.535 <jvmarg line="${profiler.info.jvmargs}"/>
85.536 @@ -721,10 +839,14 @@
85.537 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
85.538 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
85.539 <attribute default="${main.class}" name="name"/>
85.540 + <attribute default="${debug.modulepath}" name="modulepath"/>
85.541 <attribute default="${debug.classpath}" name="classpath"/>
85.542 <attribute default="" name="stopclassname"/>
85.543 <sequential>
85.544 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
85.545 + <modulepath>
85.546 + <path path="@{modulepath}"/>
85.547 + </modulepath>
85.548 <classpath>
85.549 <path path="@{classpath}"/>
85.550 </classpath>
85.551 @@ -743,18 +865,6 @@
85.552 </macrodef>
85.553 </target>
85.554 <target name="-init-debug-args">
85.555 - <property name="version-output" value="java version "${ant.java.version}"/>
85.556 - <condition property="have-jdk-older-than-1.4">
85.557 - <or>
85.558 - <contains string="${version-output}" substring="java version "1.0"/>
85.559 - <contains string="${version-output}" substring="java version "1.1"/>
85.560 - <contains string="${version-output}" substring="java version "1.2"/>
85.561 - <contains string="${version-output}" substring="java version "1.3"/>
85.562 - </or>
85.563 - </condition>
85.564 - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
85.565 - <istrue value="${have-jdk-older-than-1.4}"/>
85.566 - </condition>
85.567 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
85.568 <os family="windows"/>
85.569 </condition>
85.570 @@ -764,21 +874,46 @@
85.571 </target>
85.572 <target depends="-init-debug-args" name="-init-macrodef-debug">
85.573 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
85.574 + <attribute default="${module.name}" name="modulename"/>
85.575 <attribute default="${main.class}" name="classname"/>
85.576 + <attribute default="${debug.modulepath}" name="modulepath"/>
85.577 <attribute default="${debug.classpath}" name="classpath"/>
85.578 + <element name="customizeDebuggee" optional="true"/>
85.579 + <sequential>
85.580 + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
85.581 + <customize>
85.582 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
85.583 + <customizeDebuggee/>
85.584 + </customize>
85.585 + </j2seproject1:java>
85.586 + </sequential>
85.587 + </macrodef>
85.588 + </target>
85.589 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
85.590 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
85.591 + <attribute default="${module.name}" name="modulename"/>
85.592 + <attribute default="${main.class}" name="classname"/>
85.593 + <attribute default="${run.modulepath}" name="modulepath"/>
85.594 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
85.595 + <attribute default="${run.classpath}" name="classpath"/>
85.596 + <attribute default="jvm" name="jvm"/>
85.597 <element name="customize" optional="true"/>
85.598 <sequential>
85.599 - <java classname="@{classname}" dir="${work.dir}" fork="true">
85.600 - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.601 - <jvmarg line="${debug-args-line}"/>
85.602 - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
85.603 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
85.604 + <classpath>
85.605 + <path path="@{classpath}"/>
85.606 + </classpath>
85.607 + <modulepath>
85.608 + <pathelement path="@{modulepath}"/>
85.609 + <pathelement location="${module.build.classes.dir}"/>
85.610 + </modulepath>
85.611 + <upgrademodulepath>
85.612 + <path path="@{upgrademodulepath}"/>
85.613 + </upgrademodulepath>
85.614 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
85.615 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
85.616 <jvmarg line="${run.jvmargs}"/>
85.617 <jvmarg line="${run.jvmargs.ide}"/>
85.618 - <classpath>
85.619 - <path path="@{classpath}"/>
85.620 - </classpath>
85.621 <syspropertyset>
85.622 <propertyref prefix="run-sys-prop."/>
85.623 <mapper from="run-sys-prop.*" to="*" type="glob"/>
85.624 @@ -788,14 +923,49 @@
85.625 </sequential>
85.626 </macrodef>
85.627 </target>
85.628 - <target name="-init-macrodef-java">
85.629 + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
85.630 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
85.631 + <attribute default="" name="modulename"/>
85.632 <attribute default="${main.class}" name="classname"/>
85.633 + <attribute default="${run.modulepath}" name="modulepath"/>
85.634 + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
85.635 <attribute default="${run.classpath}" name="classpath"/>
85.636 <attribute default="jvm" name="jvm"/>
85.637 <element name="customize" optional="true"/>
85.638 <sequential>
85.639 - <java classname="@{classname}" dir="${work.dir}" fork="true">
85.640 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
85.641 + <classpath>
85.642 + <path path="@{classpath}"/>
85.643 + </classpath>
85.644 + <modulepath>
85.645 + <path path="@{modulepath}"/>
85.646 + </modulepath>
85.647 + <upgrademodulepath>
85.648 + <path path="@{upgrademodulepath}"/>
85.649 + </upgrademodulepath>
85.650 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
85.651 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
85.652 + <jvmarg line="${run.jvmargs}"/>
85.653 + <jvmarg line="${run.jvmargs.ide}"/>
85.654 + <syspropertyset>
85.655 + <propertyref prefix="run-sys-prop."/>
85.656 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
85.657 + </syspropertyset>
85.658 + <customize/>
85.659 + </java>
85.660 + </sequential>
85.661 + </macrodef>
85.662 + </target>
85.663 + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
85.664 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
85.665 + <attribute default="" name="modulename"/>
85.666 + <attribute default="${main.class}" name="classname"/>
85.667 + <attribute default="" name="modulepath"/>
85.668 + <attribute default="${run.classpath}" name="classpath"/>
85.669 + <attribute default="jvm" name="jvm"/>
85.670 + <element name="customize" optional="true"/>
85.671 + <sequential>
85.672 + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
85.673 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
85.674 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
85.675 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
85.676 @@ -813,6 +983,7 @@
85.677 </sequential>
85.678 </macrodef>
85.679 </target>
85.680 + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
85.681 <target name="-init-macrodef-copylibs">
85.682 <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
85.683 <attribute default="${manifest.file}" name="manifest"/>
85.684 @@ -834,7 +1005,7 @@
85.685 </chainedmapper>
85.686 </pathconvert>
85.687 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
85.688 - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
85.689 + <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}">
85.690 <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
85.691 <manifest>
85.692 <attribute name="Class-Path" value="${jar.classpath}"/>
85.693 @@ -846,7 +1017,7 @@
85.694 </target>
85.695 <target name="-init-presetdef-jar">
85.696 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
85.697 - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
85.698 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
85.699 <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
85.700 </jar>
85.701 </presetdef>
85.702 @@ -902,7 +1073,9 @@
85.703 <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
85.704 </target>
85.705 <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
85.706 - <antcall target="clean"/>
85.707 + <antcall target="clean">
85.708 + <param name="no.dependencies" value="true"/>
85.709 + </antcall>
85.710 </target>
85.711 <target depends="init,deps-jar" name="-pre-pre-compile">
85.712 <mkdir dir="${build.classes.dir}"/>
85.713 @@ -943,7 +1116,7 @@
85.714 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
85.715 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
85.716 <j2seproject3:force-recompile/>
85.717 - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
85.718 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
85.719 </target>
85.720 <target name="-post-compile-single">
85.721 <!-- Empty placeholder for easier customization. -->
85.722 @@ -963,21 +1136,40 @@
85.723 <!-- Empty placeholder for easier customization. -->
85.724 <!-- You can override this target in the ../build.xml file. -->
85.725 </target>
85.726 + <target depends="init,compile" name="-check-module-main-class">
85.727 + <pathconvert property="main.class.file">
85.728 + <string value="${main.class}"/>
85.729 + <unpackagemapper from="*" to="*.class"/>
85.730 + </pathconvert>
85.731 + <condition property="do.module.main.class">
85.732 + <and>
85.733 + <isset property="main.class.available"/>
85.734 + <available file="${build.classes.dir}/module-info.class"/>
85.735 + <available file="${build.classes.dir}/${main.class.file}"/>
85.736 + <isset property="libs.CopyLibs.classpath"/>
85.737 + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
85.738 + </and>
85.739 + </condition>
85.740 + </target>
85.741 + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
85.742 + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
85.743 + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
85.744 + </target>
85.745 <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
85.746 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
85.747 <touch file="${tmp.manifest.file}" verbose="false"/>
85.748 </target>
85.749 <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
85.750 <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
85.751 - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
85.752 + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
85.753 </target>
85.754 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
85.755 - <manifest file="${tmp.manifest.file}" mode="update">
85.756 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
85.757 <attribute name="Main-Class" value="${main.class}"/>
85.758 </manifest>
85.759 </target>
85.760 <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
85.761 - <manifest file="${tmp.manifest.file}" mode="update">
85.762 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
85.763 <attribute name="Profile" value="${javac.profile}"/>
85.764 </manifest>
85.765 </target>
85.766 @@ -985,25 +1177,65 @@
85.767 <basename file="${application.splash}" property="splashscreen.basename"/>
85.768 <mkdir dir="${build.classes.dir}/META-INF"/>
85.769 <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
85.770 - <manifest file="${tmp.manifest.file}" mode="update">
85.771 + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
85.772 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
85.773 </manifest>
85.774 </target>
85.775 - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
85.776 + <target depends="init,compile" name="-check-do-mkdist">
85.777 + <condition property="do.mkdist">
85.778 + <and>
85.779 + <isset property="do.archive"/>
85.780 + <isset property="libs.CopyLibs.classpath"/>
85.781 + <not>
85.782 + <istrue value="${mkdist.disabled}"/>
85.783 + </not>
85.784 + <not>
85.785 + <available file="${build.classes.dir}/module-info.class"/>
85.786 + </not>
85.787 + </and>
85.788 + </condition>
85.789 + </target>
85.790 + <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">
85.791 <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
85.792 <echo level="info">To run this application from the command line without Ant, try:</echo>
85.793 <property location="${dist.jar}" name="dist.jar.resolved"/>
85.794 <echo level="info">java -jar "${dist.jar.resolved}"</echo>
85.795 </target>
85.796 - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
85.797 + <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">
85.798 <j2seproject1:jar manifest="${tmp.manifest.file}"/>
85.799 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
85.800 <property location="${dist.jar}" name="dist.jar.resolved"/>
85.801 + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
85.802 + <isset property="named.module.internal"/>
85.803 + </condition>
85.804 <pathconvert property="run.classpath.with.dist.jar">
85.805 <path path="${run.classpath}"/>
85.806 + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
85.807 + </pathconvert>
85.808 + <pathconvert property="run.modulepath.with.dist.jar">
85.809 + <path location="${dist.jar.resolved}"/>
85.810 + <path path="${run.modulepath}"/>
85.811 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
85.812 </pathconvert>
85.813 - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
85.814 + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
85.815 + <isset property="named.module.internal"/>
85.816 + </condition>
85.817 + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
85.818 + <and>
85.819 + <isset property="modules.supported.internal"/>
85.820 + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
85.821 + </and>
85.822 + </condition>
85.823 + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
85.824 + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
85.825 + </condition>
85.826 + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
85.827 + <isset property="do.module.main.class"/>
85.828 + </condition>
85.829 + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
85.830 + <isset property="named.module.internal"/>
85.831 + </condition>
85.832 + <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}">
85.833 <isset property="main.class.available"/>
85.834 </condition>
85.835 <condition else="debug" property="jar.usage.level" value="info">
85.836 @@ -1022,8 +1254,73 @@
85.837 <!-- Empty placeholder for easier customization. -->
85.838 <!-- You can override this target in the ../build.xml file. -->
85.839 </target>
85.840 - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
85.841 - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
85.842 + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
85.843 + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
85.844 + <!--
85.845 + =================
85.846 + DEPLOY SECTION
85.847 + =================
85.848 + -->
85.849 + <target name="-pre-deploy">
85.850 + <!-- Empty placeholder for easier customization. -->
85.851 + <!-- You can override this target in the ../build.xml file. -->
85.852 + </target>
85.853 + <target depends="init" name="-check-jlink">
85.854 + <condition property="do.jlink.internal">
85.855 + <and>
85.856 + <istrue value="${do.jlink}"/>
85.857 + <isset property="do.archive"/>
85.858 + <isset property="named.module.internal"/>
85.859 + </and>
85.860 + </condition>
85.861 + </target>
85.862 + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
85.863 + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
85.864 + <property name="jlink.launcher.name" value="${application.title}"/>
85.865 + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
85.866 + <and>
85.867 + <isset property="jlink.additionalmodules"/>
85.868 + <length length="0" string="${jlink.additionalmodules}" when="greater"/>
85.869 + </and>
85.870 + </condition>
85.871 + <condition property="jlink.do.strip.internal">
85.872 + <and>
85.873 + <isset property="jlink.strip"/>
85.874 + <istrue value="${jlink.strip}"/>
85.875 + </and>
85.876 + </condition>
85.877 + <condition property="jlink.do.additionalparam.internal">
85.878 + <and>
85.879 + <isset property="jlink.additionalparam"/>
85.880 + <length length="0" string="${jlink.additionalparam}" when="greater"/>
85.881 + </and>
85.882 + </condition>
85.883 + <condition property="jlink.do.launcher.internal">
85.884 + <and>
85.885 + <istrue value="${jlink.launcher}"/>
85.886 + <isset property="main.class.available"/>
85.887 + </and>
85.888 + </condition>
85.889 + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
85.890 + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
85.891 + <exec executable="${platform.jlink}">
85.892 + <arg value="--module-path"/>
85.893 + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
85.894 + <arg value="--add-modules"/>
85.895 + <arg value="${jlink.add.modules}"/>
85.896 + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
85.897 + <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
85.898 + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
85.899 + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
85.900 + <arg value="--output"/>
85.901 + <arg value="${dist.jlink.output}"/>
85.902 + </exec>
85.903 + </target>
85.904 + <target name="-post-deploy">
85.905 + <!-- Empty placeholder for easier customization. -->
85.906 + <!-- You can override this target in the ../build.xml file. -->
85.907 + </target>
85.908 + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
85.909 <!--
85.910 =================
85.911 EXECUTION SECTION
85.912 @@ -1060,9 +1357,9 @@
85.913 </target>
85.914 <target depends="init,compile" name="-debug-start-debuggee">
85.915 <j2seproject3:debug>
85.916 - <customize>
85.917 + <customizeDebuggee>
85.918 <arg line="${application.args}"/>
85.919 - </customize>
85.920 + </customizeDebuggee>
85.921 </j2seproject3:debug>
85.922 </target>
85.923 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
85.924 @@ -1128,28 +1425,24 @@
85.925 </customize>
85.926 </profile>
85.927 </target>
85.928 - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
85.929 + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
85.930 <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
85.931 <nbprofiledirect>
85.932 <classpath>
85.933 <path path="${run.test.classpath}"/>
85.934 </classpath>
85.935 </nbprofiledirect>
85.936 - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
85.937 - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
85.938 - <jvmarg value="${profiler.info.jvmargs.agent}"/>
85.939 - <jvmarg line="${profiler.info.jvmargs}"/>
85.940 - <test name="${profile.class}"/>
85.941 - <classpath>
85.942 - <path path="${run.test.classpath}"/>
85.943 - </classpath>
85.944 - <syspropertyset>
85.945 - <propertyref prefix="test-sys-prop."/>
85.946 - <mapper from="test-sys-prop.*" to="*" type="glob"/>
85.947 - </syspropertyset>
85.948 - <formatter type="brief" usefile="false"/>
85.949 - <formatter type="xml"/>
85.950 - </junit>
85.951 + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
85.952 + <customize>
85.953 + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
85.954 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
85.955 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
85.956 + <jvmarg line="${profiler.info.jvmargs}"/>
85.957 + <classpath>
85.958 + <path path="${run.test.classpath}"/>
85.959 + </classpath>
85.960 + </customize>
85.961 + </j2seproject3:junit>
85.962 </target>
85.963 <!--
85.964 end of pre NB72 profiling section
85.965 @@ -1180,7 +1473,7 @@
85.966 <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
85.967 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
85.968 <startprofiler/>
85.969 - <antcal target="run-test-with-main"/>
85.970 + <antcall target="run-test-with-main"/>
85.971 </target>
85.972 <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
85.973 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
85.974 @@ -1205,6 +1498,12 @@
85.975 <condition else="" property="bug5101868workaround" value="*.java">
85.976 <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
85.977 </condition>
85.978 + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
85.979 + <and>
85.980 + <isset property="javadoc.html5"/>
85.981 + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
85.982 + </and>
85.983 + </condition>
85.984 <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}">
85.985 <classpath>
85.986 <path path="${javac.classpath}"/>
85.987 @@ -1217,6 +1516,7 @@
85.988 <exclude name="*.java"/>
85.989 </fileset>
85.990 <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
85.991 + <arg line="${javadoc.html5.cmd.line.arg}"/>
85.992 </javadoc>
85.993 <copy todir="${dist.javadoc.dir}">
85.994 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
85.995 @@ -1243,11 +1543,63 @@
85.996 <!-- Empty placeholder for easier customization. -->
85.997 <!-- You can override this target in the ../build.xml file. -->
85.998 </target>
85.999 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
85.1000 + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
85.1001 + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
85.1002 + <and>
85.1003 + <isset property="test.module.name"/>
85.1004 + <length length="0" string="${test.module.name}" when="greater"/>
85.1005 + </and>
85.1006 + </condition>
85.1007 + <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">
85.1008 + <and>
85.1009 + <isset property="test.module.name"/>
85.1010 + <length length="0" string="${test.module.name}" when="greater"/>
85.1011 + </and>
85.1012 + </condition>
85.1013 + </target>
85.1014 + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
85.1015 + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
85.1016 + <and>
85.1017 + <isset property="test.module.name"/>
85.1018 + <length length="0" string="${test.module.name}" when="greater"/>
85.1019 + </and>
85.1020 + </condition>
85.1021 + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
85.1022 + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
85.1023 + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
85.1024 + <chainedmapper>
85.1025 + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
85.1026 + <filtermapper>
85.1027 + <uniqfilter/>
85.1028 + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
85.1029 + </filtermapper>
85.1030 + <cutdirsmapper dirs="1"/>
85.1031 + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
85.1032 + </chainedmapper>
85.1033 + </pathconvert>
85.1034 + <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}">
85.1035 + <and>
85.1036 + <isset property="test.module.name"/>
85.1037 + <length length="0" string="${test.module.name}" when="greater"/>
85.1038 + </and>
85.1039 + </condition>
85.1040 + </target>
85.1041 + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
85.1042 + <property name="javac.test.sourcepath" value="${empty.dir}"/>
85.1043 + <property name="javac.test.compilerargs" value=""/>
85.1044 + <property name="run.test.jvmargs" value=""/>
85.1045 + </target>
85.1046 + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
85.1047 <target if="do.depend.true" name="-compile-test-depend">
85.1048 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
85.1049 </target>
85.1050 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
85.1051 - <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}"/>
85.1052 + <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">
85.1053 + <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}">
85.1054 + <customize>
85.1055 + <compilerarg line="${javac.test.compilerargs}"/>
85.1056 + </customize>
85.1057 + </j2seproject3:javac>
85.1058 <copy todir="${build.test.classes.dir}">
85.1059 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
85.1060 </copy>
85.1061 @@ -1261,10 +1613,14 @@
85.1062 <!-- Empty placeholder for easier customization. -->
85.1063 <!-- You can override this target in the ../build.xml file. -->
85.1064 </target>
85.1065 - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
85.1066 + <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">
85.1067 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
85.1068 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
85.1069 - <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}"/>
85.1070 + <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}">
85.1071 + <customize>
85.1072 + <compilerarg line="${javac.test.compilerargs}"/>
85.1073 + </customize>
85.1074 + </j2seproject3:javac>
85.1075 <copy todir="${build.test.classes.dir}">
85.1076 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
85.1077 </copy>
85.1078 @@ -1282,7 +1638,7 @@
85.1079 <target depends="init" if="have.tests" name="-pre-test-run">
85.1080 <mkdir dir="${build.test.results.dir}"/>
85.1081 </target>
85.1082 - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
85.1083 + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
85.1084 <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
85.1085 </target>
85.1086 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
85.1087 @@ -1294,14 +1650,14 @@
85.1088 <target depends="init" if="have.tests" name="-pre-test-run-single">
85.1089 <mkdir dir="${build.test.results.dir}"/>
85.1090 </target>
85.1091 - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
85.1092 + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
85.1093 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
85.1094 <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
85.1095 </target>
85.1096 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
85.1097 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
85.1098 </target>
85.1099 - <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"/>
85.1100 + <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"/>
85.1101 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
85.1102 <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
85.1103 <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
85.1104 @@ -1310,7 +1666,7 @@
85.1105 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
85.1106 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
85.1107 </target>
85.1108 - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
85.1109 + <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"/>
85.1110 <!--
85.1111 =======================
85.1112 TEST DEBUGGING SECTION
85.1113 @@ -1328,8 +1684,8 @@
85.1114 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
85.1115 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
85.1116 </target>
85.1117 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
85.1118 - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
85.1119 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
85.1120 + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
85.1121 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
85.1122 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
85.1123 </target>
85.1124 @@ -1355,9 +1711,9 @@
85.1125 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
85.1126 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
85.1127 <j2seproject3:debug classname="sun.applet.AppletViewer">
85.1128 - <customize>
85.1129 + <customizeDebuggee>
85.1130 <arg value="${applet.url}"/>
85.1131 - </customize>
85.1132 + </customizeDebuggee>
85.1133 </j2seproject3:debug>
85.1134 </target>
85.1135 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
85.1136 @@ -1384,6 +1740,7 @@
85.1137 </target>
85.1138 <target depends="init" name="-do-clean">
85.1139 <delete dir="${build.dir}"/>
85.1140 + <delete dir="${dist.jlink.output}"/>
85.1141 <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
85.1142 </target>
85.1143 <target name="-post-clean">
86.1 --- a/samples/unionfs/nbproject/genfiles.properties Mon Nov 11 05:47:32 2019 +0100
86.2 +++ b/samples/unionfs/nbproject/genfiles.properties Mon Nov 11 13:17:34 2019 +0100
86.3 @@ -1,8 +1,8 @@
86.4 build.xml.data.CRC32=31076a65
86.5 build.xml.script.CRC32=c8e917b3
86.6 -build.xml.stylesheet.CRC32=8064a381@1.75.2.48
86.7 +build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
86.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
86.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
86.10 nbproject/build-impl.xml.data.CRC32=31076a65
86.11 -nbproject/build-impl.xml.script.CRC32=2b5267d2
86.12 -nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
86.13 +nbproject/build-impl.xml.script.CRC32=faf2b20f
86.14 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
87.1 --- a/samples/unionfs/nbproject/project.properties Mon Nov 11 05:47:32 2019 +0100
87.2 +++ b/samples/unionfs/nbproject/project.properties Mon Nov 11 13:17:34 2019 +0100
87.3 @@ -12,8 +12,12 @@
87.4 build.test.results.dir=${build.dir}/test/results
87.5 debug.classpath=\
87.6 ${run.classpath}
87.7 +debug.modulepath=\
87.8 + ${run.modulepath}
87.9 debug.test.classpath=\
87.10 ${run.test.classpath}
87.11 +debug.test.modulepath=\
87.12 + ${run.test.modulepath}
87.13 # This directory is removed when the project is cleaned:
87.14 dist.dir=dist
87.15 dist.jar=${dist.dir}/unionfs.jar
87.16 @@ -32,12 +36,16 @@
87.17 # Space-separated list of extra javac options
87.18 javac.compilerargs=
87.19 javac.deprecation=false
87.20 -javac.source=1.5
87.21 -javac.target=1.5
87.22 +javac.modulepath=
87.23 +javac.processormodulepath=
87.24 +javac.source=1.6
87.25 +javac.target=1.6
87.26 javac.test.classpath=\
87.27 ${javac.classpath}:\
87.28 ${build.classes.dir}:\
87.29 ${file.reference.junit-4.4.jar}
87.30 +javac.test.modulepath=\
87.31 + ${javac.modulepath}
87.32 javadoc.additionalparam=
87.33 javadoc.author=false
87.34 javadoc.encoding=${source.encoding}
87.35 @@ -59,9 +67,13 @@
87.36 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
87.37 # or test-sys-prop.name=value to set system properties for unit tests):
87.38 run.jvmargs=
87.39 +run.modulepath=\
87.40 + ${javac.modulepath}
87.41 run.test.classpath=\
87.42 ${javac.test.classpath}:\
87.43 ${build.test.classes.dir}
87.44 +run.test.modulepath=\
87.45 + ${javac.test.modulepath}
87.46 source.encoding=UTF-8
87.47 src.dir=src
87.48 test.src.dir=test