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