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