1.1 --- a/samples/apifest1/day1/subclassingsolution/nbproject/build-impl.xml Sat Jun 14 09:52:45 2008 +0200
1.2 +++ b/samples/apifest1/day1/subclassingsolution/nbproject/build-impl.xml Sat Jun 14 09:52:47 2008 +0200
1.3 @@ -18,32 +18,35 @@
1.4 - applet
1.5 - cleanup
1.6
1.7 --->
1.8 -<project name="subclassingsolution-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1">
1.9 - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
1.10 + -->
1.11 +<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="subclassingsolution-impl">
1.12 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
1.13 <!--
1.14 - ======================
1.15 - INITIALIZATION SECTION
1.16 - ======================
1.17 - -->
1.18 + ======================
1.19 + INITIALIZATION SECTION
1.20 + ======================
1.21 + -->
1.22 <target name="-pre-init">
1.23 <!-- Empty placeholder for easier customization. -->
1.24 <!-- You can override this target in the ../build.xml file. -->
1.25 </target>
1.26 - <target name="-init-private" depends="-pre-init">
1.27 + <target depends="-pre-init" name="-init-private">
1.28 + <property file="nbproject/private/config.properties"/>
1.29 + <property file="nbproject/private/configs/${config}.properties"/>
1.30 <property file="nbproject/private/private.properties"/>
1.31 </target>
1.32 - <target name="-init-user" depends="-pre-init,-init-private">
1.33 + <target depends="-pre-init,-init-private" name="-init-user">
1.34 <property file="${user.properties.file}"/>
1.35 <!-- The two properties below are usually overridden -->
1.36 <!-- by the active platform. Just a fallback. -->
1.37 <property name="default.javac.source" value="1.4"/>
1.38 <property name="default.javac.target" value="1.4"/>
1.39 </target>
1.40 - <target name="-init-project" depends="-pre-init,-init-private,-init-user">
1.41 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
1.42 + <property file="nbproject/configs/${config}.properties"/>
1.43 <property file="nbproject/project.properties"/>
1.44 </target>
1.45 - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
1.46 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
1.47 <available file="${manifest.file}" property="manifest.available"/>
1.48 <condition property="manifest.available+main.class">
1.49 <and>
1.50 @@ -77,7 +80,10 @@
1.51 </and>
1.52 </condition>
1.53 <condition property="no.javadoc.preview">
1.54 - <isfalse value="${javadoc.preview}"/>
1.55 + <and>
1.56 + <isset property="javadoc.preview"/>
1.57 + <isfalse value="${javadoc.preview}"/>
1.58 + </and>
1.59 </condition>
1.60 <property name="run.jvmargs" value=""/>
1.61 <property name="javac.compilerargs" value=""/>
1.62 @@ -90,12 +96,34 @@
1.63 <property name="javac.debug" value="true"/>
1.64 <property name="javadoc.preview" value="true"/>
1.65 <property name="application.args" value=""/>
1.66 + <property name="source.encoding" value="${file.encoding}"/>
1.67 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
1.68 + <and>
1.69 + <isset property="javadoc.encoding"/>
1.70 + <not>
1.71 + <equals arg1="${javadoc.encoding}" arg2=""/>
1.72 + </not>
1.73 + </and>
1.74 + </condition>
1.75 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
1.76 + <property name="includes" value="**"/>
1.77 + <property name="excludes" value=""/>
1.78 + <property name="do.depend" value="false"/>
1.79 + <condition property="do.depend.true">
1.80 + <istrue value="${do.depend}"/>
1.81 + </condition>
1.82 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
1.83 + <and>
1.84 + <isset property="jaxws.endorsed.dir"/>
1.85 + <available file="nbproject/jaxws-build.xml"/>
1.86 + </and>
1.87 + </condition>
1.88 </target>
1.89 <target name="-post-init">
1.90 <!-- Empty placeholder for easier customization. -->
1.91 <!-- You can override this target in the ../build.xml file. -->
1.92 </target>
1.93 - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
1.94 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
1.95 <fail unless="src.dir">Must set src.dir</fail>
1.96 <fail unless="test.src.dir">Must set test.src.dir</fail>
1.97 <fail unless="build.dir">Must set build.dir</fail>
1.98 @@ -118,41 +146,70 @@
1.99 </target>
1.100 <target name="-init-macrodef-javac">
1.101 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
1.102 - <attribute name="srcdir" default="${src.dir}"/>
1.103 - <attribute name="destdir" default="${build.classes.dir}"/>
1.104 - <attribute name="classpath" default="${javac.classpath}"/>
1.105 - <attribute name="debug" default="${javac.debug}"/>
1.106 + <attribute default="${src.dir}" name="srcdir"/>
1.107 + <attribute default="${build.classes.dir}" name="destdir"/>
1.108 + <attribute default="${javac.classpath}" name="classpath"/>
1.109 + <attribute default="${includes}" name="includes"/>
1.110 + <attribute default="${excludes}" name="excludes"/>
1.111 + <attribute default="${javac.debug}" name="debug"/>
1.112 + <attribute default="" name="sourcepath"/>
1.113 <element name="customize" optional="true"/>
1.114 <sequential>
1.115 - <depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
1.116 + <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.117 + <classpath>
1.118 + <path path="@{classpath}"/>
1.119 + </classpath>
1.120 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
1.121 + <customize/>
1.122 + </javac>
1.123 + </sequential>
1.124 + </macrodef>
1.125 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
1.126 + <attribute default="${src.dir}" name="srcdir"/>
1.127 + <attribute default="${build.classes.dir}" name="destdir"/>
1.128 + <attribute default="${javac.classpath}" name="classpath"/>
1.129 + <sequential>
1.130 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
1.131 <classpath>
1.132 <path path="@{classpath}"/>
1.133 </classpath>
1.134 </depend>
1.135 - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
1.136 - <classpath>
1.137 - <path path="@{classpath}"/>
1.138 - </classpath>
1.139 - <compilerarg line="${javac.compilerargs}"/>
1.140 - <customize/>
1.141 - </javac>
1.142 + </sequential>
1.143 + </macrodef>
1.144 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
1.145 + <attribute default="${build.classes.dir}" name="destdir"/>
1.146 + <sequential>
1.147 + <fail unless="javac.includes">Must set javac.includes</fail>
1.148 + <pathconvert pathsep="," property="javac.includes.binary">
1.149 + <path>
1.150 + <filelist dir="@{destdir}" files="${javac.includes}"/>
1.151 + </path>
1.152 + <globmapper from="*.java" to="*.class"/>
1.153 + </pathconvert>
1.154 + <delete>
1.155 + <files includes="${javac.includes.binary}"/>
1.156 + </delete>
1.157 </sequential>
1.158 </macrodef>
1.159 </target>
1.160 <target name="-init-macrodef-junit">
1.161 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
1.162 - <attribute name="includes" default="**/*Test.java"/>
1.163 + <attribute default="${includes}" name="includes"/>
1.164 + <attribute default="${excludes}" name="excludes"/>
1.165 + <attribute default="**" name="testincludes"/>
1.166 <sequential>
1.167 - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
1.168 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
1.169 <batchtest todir="${build.test.results.dir}">
1.170 - <fileset dir="${test.src.dir}" includes="@{includes}"/>
1.171 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
1.172 + <filename name="@{testincludes}"/>
1.173 + </fileset>
1.174 </batchtest>
1.175 <classpath>
1.176 <path path="${run.test.classpath}"/>
1.177 </classpath>
1.178 <syspropertyset>
1.179 <propertyref prefix="test-sys-prop."/>
1.180 - <mapper type="glob" from="test-sys-prop.*" to="*"/>
1.181 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.182 </syspropertyset>
1.183 <formatter type="brief" usefile="false"/>
1.184 <formatter type="xml"/>
1.185 @@ -163,11 +220,11 @@
1.186 </target>
1.187 <target name="-init-macrodef-nbjpda">
1.188 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
1.189 - <attribute name="name" default="${main.class}"/>
1.190 - <attribute name="classpath" default="${debug.classpath}"/>
1.191 - <attribute name="stopclassname" default=""/>
1.192 + <attribute default="${main.class}" name="name"/>
1.193 + <attribute default="${debug.classpath}" name="classpath"/>
1.194 + <attribute default="" name="stopclassname"/>
1.195 <sequential>
1.196 - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
1.197 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
1.198 <classpath>
1.199 <path path="@{classpath}"/>
1.200 </classpath>
1.201 @@ -175,24 +232,36 @@
1.202 </sequential>
1.203 </macrodef>
1.204 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
1.205 - <attribute name="dir" default="${build.classes.dir}"/>
1.206 + <attribute default="${build.classes.dir}" name="dir"/>
1.207 <sequential>
1.208 <nbjpdareload>
1.209 - <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
1.210 + <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
1.211 </nbjpdareload>
1.212 </sequential>
1.213 </macrodef>
1.214 </target>
1.215 - <target name="-init-macrodef-debug">
1.216 + <target name="-init-debug-args">
1.217 + <property name="version-output" value="java version "${ant.java.version}"/>
1.218 + <condition property="have-jdk-older-than-1.4">
1.219 + <or>
1.220 + <contains string="${version-output}" substring="java version "1.0"/>
1.221 + <contains string="${version-output}" substring="java version "1.1"/>
1.222 + <contains string="${version-output}" substring="java version "1.2"/>
1.223 + <contains string="${version-output}" substring="java version "1.3"/>
1.224 + </or>
1.225 + </condition>
1.226 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
1.227 + <istrue value="${have-jdk-older-than-1.4}"/>
1.228 + </condition>
1.229 + </target>
1.230 + <target depends="-init-debug-args" name="-init-macrodef-debug">
1.231 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
1.232 - <attribute name="classname" default="${main.class}"/>
1.233 - <attribute name="classpath" default="${debug.classpath}"/>
1.234 + <attribute default="${main.class}" name="classname"/>
1.235 + <attribute default="${debug.classpath}" name="classpath"/>
1.236 <element name="customize" optional="true"/>
1.237 <sequential>
1.238 - <java fork="true" classname="@{classname}" dir="${work.dir}">
1.239 - <jvmarg value="-Xdebug"/>
1.240 - <jvmarg value="-Xnoagent"/>
1.241 - <jvmarg value="-Djava.compiler=none"/>
1.242 + <java classname="@{classname}" dir="${work.dir}" fork="true">
1.243 + <jvmarg line="${debug-args-line}"/>
1.244 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
1.245 <jvmarg line="${run.jvmargs}"/>
1.246 <classpath>
1.247 @@ -200,7 +269,7 @@
1.248 </classpath>
1.249 <syspropertyset>
1.250 <propertyref prefix="run-sys-prop."/>
1.251 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
1.252 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.253 </syspropertyset>
1.254 <customize/>
1.255 </java>
1.256 @@ -209,17 +278,17 @@
1.257 </target>
1.258 <target name="-init-macrodef-java">
1.259 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
1.260 - <attribute name="classname" default="${main.class}"/>
1.261 + <attribute default="${main.class}" name="classname"/>
1.262 <element name="customize" optional="true"/>
1.263 <sequential>
1.264 - <java fork="true" classname="@{classname}" dir="${work.dir}">
1.265 + <java classname="@{classname}" dir="${work.dir}" fork="true">
1.266 <jvmarg line="${run.jvmargs}"/>
1.267 <classpath>
1.268 <path path="${run.classpath}"/>
1.269 </classpath>
1.270 <syspropertyset>
1.271 <propertyref prefix="run-sys-prop."/>
1.272 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
1.273 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
1.274 </syspropertyset>
1.275 <customize/>
1.276 </java>
1.277 @@ -228,102 +297,102 @@
1.278 </target>
1.279 <target name="-init-presetdef-jar">
1.280 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
1.281 - <jar jarfile="${dist.jar}" compress="${jar.compress}">
1.282 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
1.283 <j2seproject1:fileset dir="${build.classes.dir}"/>
1.284 </jar>
1.285 </presetdef>
1.286 </target>
1.287 - <target name="init" 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"/>
1.288 + <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.289 <!--
1.290 - ===================
1.291 - COMPILATION SECTION
1.292 - ===================
1.293 - -->
1.294 - <target name="deps-jar" depends="init" unless="no.deps"/>
1.295 - <target name="-pre-pre-compile" depends="init,deps-jar">
1.296 + ===================
1.297 + COMPILATION SECTION
1.298 + ===================
1.299 + -->
1.300 + <target depends="init" name="deps-jar" unless="no.deps"/>
1.301 + <target depends="init,deps-jar" name="-pre-pre-compile">
1.302 <mkdir dir="${build.classes.dir}"/>
1.303 </target>
1.304 <target name="-pre-compile">
1.305 <!-- Empty placeholder for easier customization. -->
1.306 <!-- You can override this target in the ../build.xml file. -->
1.307 </target>
1.308 - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
1.309 + <target if="do.depend.true" name="-compile-depend">
1.310 + <j2seproject3:depend/>
1.311 + </target>
1.312 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
1.313 <j2seproject3:javac/>
1.314 <copy todir="${build.classes.dir}">
1.315 - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
1.316 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.317 </copy>
1.318 </target>
1.319 <target name="-post-compile">
1.320 <!-- Empty placeholder for easier customization. -->
1.321 <!-- You can override this target in the ../build.xml file. -->
1.322 </target>
1.323 - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
1.324 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
1.325 <target name="-pre-compile-single">
1.326 <!-- Empty placeholder for easier customization. -->
1.327 <!-- You can override this target in the ../build.xml file. -->
1.328 </target>
1.329 - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
1.330 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
1.331 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.332 - <j2seproject3:javac>
1.333 - <customize>
1.334 - <patternset includes="${javac.includes}"/>
1.335 - </customize>
1.336 - </j2seproject3:javac>
1.337 + <j2seproject3:force-recompile/>
1.338 + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
1.339 </target>
1.340 <target name="-post-compile-single">
1.341 <!-- Empty placeholder for easier customization. -->
1.342 <!-- You can override this target in the ../build.xml file. -->
1.343 </target>
1.344 - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
1.345 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
1.346 <!--
1.347 - ====================
1.348 - JAR BUILDING SECTION
1.349 - ====================
1.350 - -->
1.351 - <target name="-pre-pre-jar" depends="init">
1.352 - <dirname property="dist.jar.dir" file="${dist.jar}"/>
1.353 + ====================
1.354 + JAR BUILDING SECTION
1.355 + ====================
1.356 + -->
1.357 + <target depends="init" name="-pre-pre-jar">
1.358 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
1.359 <mkdir dir="${dist.jar.dir}"/>
1.360 </target>
1.361 <target name="-pre-jar">
1.362 <!-- Empty placeholder for easier customization. -->
1.363 <!-- You can override this target in the ../build.xml file. -->
1.364 </target>
1.365 - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
1.366 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
1.367 <j2seproject1:jar/>
1.368 </target>
1.369 - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
1.370 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
1.371 <j2seproject1:jar manifest="${manifest.file}"/>
1.372 </target>
1.373 - <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
1.374 + <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.375 <j2seproject1:jar manifest="${manifest.file}">
1.376 <j2seproject1:manifest>
1.377 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
1.378 </j2seproject1:manifest>
1.379 </j2seproject1:jar>
1.380 <echo>To run this application from the command line without Ant, try:</echo>
1.381 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
1.382 - <property name="dist.jar.resolved" location="${dist.jar}"/>
1.383 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.384 + <property location="${dist.jar}" name="dist.jar.resolved"/>
1.385 <pathconvert property="run.classpath.with.dist.jar">
1.386 <path path="${run.classpath}"/>
1.387 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1.388 </pathconvert>
1.389 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
1.390 </target>
1.391 - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
1.392 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
1.393 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
1.394 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1.395 <pathconvert property="run.classpath.without.build.classes.dir">
1.396 <path path="${run.classpath}"/>
1.397 <map from="${build.classes.dir.resolved}" to=""/>
1.398 </pathconvert>
1.399 - <pathconvert property="jar.classpath" pathsep=" ">
1.400 + <pathconvert pathsep=" " property="jar.classpath">
1.401 <path path="${run.classpath.without.build.classes.dir}"/>
1.402 <chainedmapper>
1.403 <flattenmapper/>
1.404 <globmapper from="*" to="lib/*"/>
1.405 </chainedmapper>
1.406 </pathconvert>
1.407 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
1.408 - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
1.409 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
1.410 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
1.411 <fileset dir="${build.classes.dir}"/>
1.412 <manifest>
1.413 <attribute name="Main-Class" value="${main.class}"/>
1.414 @@ -331,183 +400,194 @@
1.415 </manifest>
1.416 </copylibs>
1.417 <echo>To run this application from the command line without Ant, try:</echo>
1.418 - <property name="dist.jar.resolved" location="${dist.jar}"/>
1.419 + <property location="${dist.jar}" name="dist.jar.resolved"/>
1.420 <echo>java -jar "${dist.jar.resolved}"</echo>
1.421 </target>
1.422 <target name="-post-jar">
1.423 <!-- Empty placeholder for easier customization. -->
1.424 <!-- You can override this target in the ../build.xml file. -->
1.425 </target>
1.426 - <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
1.427 + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
1.428 <!--
1.429 - =================
1.430 - EXECUTION SECTION
1.431 - =================
1.432 - -->
1.433 - <target name="run" depends="init,compile" description="Run a main class.">
1.434 + =================
1.435 + EXECUTION SECTION
1.436 + =================
1.437 + -->
1.438 + <target depends="init,compile" description="Run a main class." name="run">
1.439 <j2seproject1:java>
1.440 <customize>
1.441 <arg line="${application.args}"/>
1.442 </customize>
1.443 </j2seproject1:java>
1.444 </target>
1.445 - <target name="run-single" depends="init,compile-single">
1.446 + <target name="-do-not-recompile">
1.447 + <property name="javac.includes.binary" value=""/>
1.448 + </target>
1.449 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
1.450 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1.451 <j2seproject1:java classname="${run.class}"/>
1.452 </target>
1.453 <!--
1.454 - =================
1.455 - DEBUGGING SECTION
1.456 - =================
1.457 - -->
1.458 - <target name="-debug-start-debugger" if="netbeans.home" depends="init">
1.459 + =================
1.460 + DEBUGGING SECTION
1.461 + =================
1.462 + -->
1.463 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
1.464 <j2seproject1:nbjpdastart name="${debug.class}"/>
1.465 </target>
1.466 - <target name="-debug-start-debuggee" depends="init,compile">
1.467 + <target depends="init,compile" name="-debug-start-debuggee">
1.468 <j2seproject3:debug>
1.469 <customize>
1.470 <arg line="${application.args}"/>
1.471 </customize>
1.472 </j2seproject3:debug>
1.473 </target>
1.474 - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
1.475 - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
1.476 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1.477 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
1.478 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
1.479 </target>
1.480 - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
1.481 - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
1.482 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
1.483 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
1.484 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1.485 <j2seproject3:debug classname="${debug.class}"/>
1.486 </target>
1.487 - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
1.488 - <target name="-pre-debug-fix" depends="init">
1.489 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1.490 + <target depends="init" name="-pre-debug-fix">
1.491 <fail unless="fix.includes">Must set fix.includes</fail>
1.492 <property name="javac.includes" value="${fix.includes}.java"/>
1.493 </target>
1.494 - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
1.495 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1.496 <j2seproject1:nbjpdareload/>
1.497 </target>
1.498 - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
1.499 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1.500 <!--
1.501 - ===============
1.502 - JAVADOC SECTION
1.503 - ===============
1.504 - -->
1.505 - <target name="-javadoc-build" depends="init">
1.506 + ===============
1.507 + JAVADOC SECTION
1.508 + ===============
1.509 + -->
1.510 + <target depends="init" name="-javadoc-build">
1.511 <mkdir dir="${dist.javadoc.dir}"/>
1.512 - <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
1.513 + <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.514 <classpath>
1.515 <path path="${javac.classpath}"/>
1.516 </classpath>
1.517 - <sourcepath>
1.518 - <pathelement location="${src.dir}"/>
1.519 - </sourcepath>
1.520 - <packageset dir="${src.dir}" includes="*/**"/>
1.521 - <fileset dir="${src.dir}" includes="*.java"/>
1.522 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1.523 + <filename name="**/*.java"/>
1.524 + </fileset>
1.525 </javadoc>
1.526 </target>
1.527 - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
1.528 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1.529 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1.530 </target>
1.531 - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
1.532 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
1.533 <!--
1.534 - =========================
1.535 - JUNIT COMPILATION SECTION
1.536 - =========================
1.537 - -->
1.538 - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
1.539 + =========================
1.540 + JUNIT COMPILATION SECTION
1.541 + =========================
1.542 + -->
1.543 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1.544 <mkdir dir="${build.test.classes.dir}"/>
1.545 </target>
1.546 <target name="-pre-compile-test">
1.547 <!-- Empty placeholder for easier customization. -->
1.548 <!-- You can override this target in the ../build.xml file. -->
1.549 </target>
1.550 - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
1.551 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
1.552 + <target if="do.depend.true" name="-compile-test-depend">
1.553 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1.554 + </target>
1.555 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1.556 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1.557 <copy todir="${build.test.classes.dir}">
1.558 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
1.559 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.560 </copy>
1.561 </target>
1.562 <target name="-post-compile-test">
1.563 <!-- Empty placeholder for easier customization. -->
1.564 <!-- You can override this target in the ../build.xml file. -->
1.565 </target>
1.566 - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
1.567 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1.568 <target name="-pre-compile-test-single">
1.569 <!-- Empty placeholder for easier customization. -->
1.570 <!-- You can override this target in the ../build.xml file. -->
1.571 </target>
1.572 - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
1.573 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1.574 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1.575 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
1.576 - <customize>
1.577 - <patternset includes="${javac.includes}"/>
1.578 - </customize>
1.579 - </j2seproject3:javac>
1.580 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
1.581 + <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.582 <copy todir="${build.test.classes.dir}">
1.583 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
1.584 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1.585 </copy>
1.586 </target>
1.587 <target name="-post-compile-test-single">
1.588 <!-- Empty placeholder for easier customization. -->
1.589 <!-- You can override this target in the ../build.xml file. -->
1.590 </target>
1.591 - <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
1.592 + <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.593 <!--
1.594 - =======================
1.595 - JUNIT EXECUTION SECTION
1.596 - =======================
1.597 - -->
1.598 - <target name="-pre-test-run" if="have.tests" depends="init">
1.599 + =======================
1.600 + JUNIT EXECUTION SECTION
1.601 + =======================
1.602 + -->
1.603 + <target depends="init" if="have.tests" name="-pre-test-run">
1.604 <mkdir dir="${build.test.results.dir}"/>
1.605 </target>
1.606 - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
1.607 - <j2seproject3:junit/>
1.608 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1.609 + <j2seproject3:junit testincludes="**/*Test.java"/>
1.610 </target>
1.611 - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
1.612 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1.613 <fail if="tests.failed">Some tests failed; see details above.</fail>
1.614 </target>
1.615 - <target name="test-report" if="have.tests" depends="init"/>
1.616 - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
1.617 - <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
1.618 - <target name="-pre-test-run-single" if="have.tests" depends="init">
1.619 + <target depends="init" if="have.tests" name="test-report"/>
1.620 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1.621 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1.622 + <target depends="init" if="have.tests" name="-pre-test-run-single">
1.623 <mkdir dir="${build.test.results.dir}"/>
1.624 </target>
1.625 - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
1.626 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1.627 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1.628 - <j2seproject3:junit includes="${test.includes}"/>
1.629 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
1.630 </target>
1.631 - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
1.632 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1.633 <fail if="tests.failed">Some tests failed; see details above.</fail>
1.634 </target>
1.635 - <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
1.636 + <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.637 <!--
1.638 - =======================
1.639 - JUNIT DEBUGGING SECTION
1.640 - =======================
1.641 - -->
1.642 - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
1.643 + =======================
1.644 + JUNIT DEBUGGING SECTION
1.645 + =======================
1.646 + -->
1.647 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
1.648 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1.649 - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
1.650 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
1.651 + <delete file="${test.report.file}"/>
1.652 + <mkdir dir="${build.test.results.dir}"/>
1.653 + <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.654 <customize>
1.655 - <arg line="${test.class}"/>
1.656 + <syspropertyset>
1.657 + <propertyref prefix="test-sys-prop."/>
1.658 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
1.659 + </syspropertyset>
1.660 + <arg value="${test.class}"/>
1.661 + <arg value="showoutput=true"/>
1.662 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
1.663 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
1.664 </customize>
1.665 </j2seproject3:debug>
1.666 </target>
1.667 - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
1.668 - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
1.669 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1.670 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1.671 </target>
1.672 - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
1.673 - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
1.674 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1.675 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1.676 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1.677 </target>
1.678 - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
1.679 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1.680 <!--
1.681 - =========================
1.682 - APPLET EXECUTION SECTION
1.683 - =========================
1.684 - -->
1.685 - <target name="run-applet" depends="init,compile-single">
1.686 + =========================
1.687 + APPLET EXECUTION SECTION
1.688 + =========================
1.689 + -->
1.690 + <target depends="init,compile-single" name="run-applet">
1.691 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1.692 <j2seproject1:java classname="sun.applet.AppletViewer">
1.693 <customize>
1.694 @@ -516,11 +596,11 @@
1.695 </j2seproject1:java>
1.696 </target>
1.697 <!--
1.698 - =========================
1.699 - APPLET DEBUGGING SECTION
1.700 - =========================
1.701 - -->
1.702 - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
1.703 + =========================
1.704 + APPLET DEBUGGING SECTION
1.705 + =========================
1.706 + -->
1.707 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
1.708 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1.709 <j2seproject3:debug classname="sun.applet.AppletViewer">
1.710 <customize>
1.711 @@ -528,14 +608,14 @@
1.712 </customize>
1.713 </j2seproject3:debug>
1.714 </target>
1.715 - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
1.716 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
1.717 <!--
1.718 - ===============
1.719 - CLEANUP SECTION
1.720 - ===============
1.721 - -->
1.722 - <target name="deps-clean" depends="init" unless="no.deps"/>
1.723 - <target name="-do-clean" depends="init">
1.724 + ===============
1.725 + CLEANUP SECTION
1.726 + ===============
1.727 + -->
1.728 + <target depends="init" name="deps-clean" unless="no.deps"/>
1.729 + <target depends="init" name="-do-clean">
1.730 <delete dir="${build.dir}"/>
1.731 <delete dir="${dist.dir}"/>
1.732 </target>
1.733 @@ -543,5 +623,5 @@
1.734 <!-- Empty placeholder for easier customization. -->
1.735 <!-- You can override this target in the ../build.xml file. -->
1.736 </target>
1.737 - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
1.738 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1.739 </project>