1.1 --- a/samples/apifest1/day1/alwayscreatenewcircuit/nbproject/project.xml Sat Jun 14 09:52:45 2008 +0200
1.2 +++ b/samples/apifest1/day1/alwayscreatenewcircuit/nbproject/project.xml Sat Jun 14 09:52:47 2008 +0200
1.3 @@ -3,7 +3,7 @@
1.4 <type>org.netbeans.modules.java.j2seproject</type>
1.5 <configuration>
1.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
1.7 - <name>alwayscreatenewcircuit</name>
1.8 + <name>alwayscreatenewcircuit - day1</name>
1.9 <minimum-ant-version>1.6.5</minimum-ant-version>
1.10 <source-roots>
1.11 <root id="src.dir"/>
2.1 --- a/samples/apifest1/day1/elementbasedsolution/nbproject/build-impl.xml Sat Jun 14 09:52:45 2008 +0200
2.2 +++ b/samples/apifest1/day1/elementbasedsolution/nbproject/build-impl.xml Sat Jun 14 09:52:47 2008 +0200
2.3 @@ -18,32 +18,35 @@
2.4 - applet
2.5 - cleanup
2.6
2.7 --->
2.8 -<project name="elementbasedsolution-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">
2.9 - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
2.10 + -->
2.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="elementbasedsolution-impl">
2.12 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
2.13 <!--
2.14 - ======================
2.15 - INITIALIZATION SECTION
2.16 - ======================
2.17 - -->
2.18 + ======================
2.19 + INITIALIZATION SECTION
2.20 + ======================
2.21 + -->
2.22 <target name="-pre-init">
2.23 <!-- Empty placeholder for easier customization. -->
2.24 <!-- You can override this target in the ../build.xml file. -->
2.25 </target>
2.26 - <target name="-init-private" depends="-pre-init">
2.27 + <target depends="-pre-init" name="-init-private">
2.28 + <property file="nbproject/private/config.properties"/>
2.29 + <property file="nbproject/private/configs/${config}.properties"/>
2.30 <property file="nbproject/private/private.properties"/>
2.31 </target>
2.32 - <target name="-init-user" depends="-pre-init,-init-private">
2.33 + <target depends="-pre-init,-init-private" name="-init-user">
2.34 <property file="${user.properties.file}"/>
2.35 <!-- The two properties below are usually overridden -->
2.36 <!-- by the active platform. Just a fallback. -->
2.37 <property name="default.javac.source" value="1.4"/>
2.38 <property name="default.javac.target" value="1.4"/>
2.39 </target>
2.40 - <target name="-init-project" depends="-pre-init,-init-private,-init-user">
2.41 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
2.42 + <property file="nbproject/configs/${config}.properties"/>
2.43 <property file="nbproject/project.properties"/>
2.44 </target>
2.45 - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
2.46 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
2.47 <available file="${manifest.file}" property="manifest.available"/>
2.48 <condition property="manifest.available+main.class">
2.49 <and>
2.50 @@ -77,7 +80,10 @@
2.51 </and>
2.52 </condition>
2.53 <condition property="no.javadoc.preview">
2.54 - <isfalse value="${javadoc.preview}"/>
2.55 + <and>
2.56 + <isset property="javadoc.preview"/>
2.57 + <isfalse value="${javadoc.preview}"/>
2.58 + </and>
2.59 </condition>
2.60 <property name="run.jvmargs" value=""/>
2.61 <property name="javac.compilerargs" value=""/>
2.62 @@ -90,12 +96,34 @@
2.63 <property name="javac.debug" value="true"/>
2.64 <property name="javadoc.preview" value="true"/>
2.65 <property name="application.args" value=""/>
2.66 + <property name="source.encoding" value="${file.encoding}"/>
2.67 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
2.68 + <and>
2.69 + <isset property="javadoc.encoding"/>
2.70 + <not>
2.71 + <equals arg1="${javadoc.encoding}" arg2=""/>
2.72 + </not>
2.73 + </and>
2.74 + </condition>
2.75 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
2.76 + <property name="includes" value="**"/>
2.77 + <property name="excludes" value=""/>
2.78 + <property name="do.depend" value="false"/>
2.79 + <condition property="do.depend.true">
2.80 + <istrue value="${do.depend}"/>
2.81 + </condition>
2.82 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
2.83 + <and>
2.84 + <isset property="jaxws.endorsed.dir"/>
2.85 + <available file="nbproject/jaxws-build.xml"/>
2.86 + </and>
2.87 + </condition>
2.88 </target>
2.89 <target name="-post-init">
2.90 <!-- Empty placeholder for easier customization. -->
2.91 <!-- You can override this target in the ../build.xml file. -->
2.92 </target>
2.93 - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
2.94 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
2.95 <fail unless="src.dir">Must set src.dir</fail>
2.96 <fail unless="test.src.dir">Must set test.src.dir</fail>
2.97 <fail unless="build.dir">Must set build.dir</fail>
2.98 @@ -118,41 +146,70 @@
2.99 </target>
2.100 <target name="-init-macrodef-javac">
2.101 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
2.102 - <attribute name="srcdir" default="${src.dir}"/>
2.103 - <attribute name="destdir" default="${build.classes.dir}"/>
2.104 - <attribute name="classpath" default="${javac.classpath}"/>
2.105 - <attribute name="debug" default="${javac.debug}"/>
2.106 + <attribute default="${src.dir}" name="srcdir"/>
2.107 + <attribute default="${build.classes.dir}" name="destdir"/>
2.108 + <attribute default="${javac.classpath}" name="classpath"/>
2.109 + <attribute default="${includes}" name="includes"/>
2.110 + <attribute default="${excludes}" name="excludes"/>
2.111 + <attribute default="${javac.debug}" name="debug"/>
2.112 + <attribute default="" name="sourcepath"/>
2.113 <element name="customize" optional="true"/>
2.114 <sequential>
2.115 - <depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
2.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}">
2.117 + <classpath>
2.118 + <path path="@{classpath}"/>
2.119 + </classpath>
2.120 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
2.121 + <customize/>
2.122 + </javac>
2.123 + </sequential>
2.124 + </macrodef>
2.125 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
2.126 + <attribute default="${src.dir}" name="srcdir"/>
2.127 + <attribute default="${build.classes.dir}" name="destdir"/>
2.128 + <attribute default="${javac.classpath}" name="classpath"/>
2.129 + <sequential>
2.130 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
2.131 <classpath>
2.132 <path path="@{classpath}"/>
2.133 </classpath>
2.134 </depend>
2.135 - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
2.136 - <classpath>
2.137 - <path path="@{classpath}"/>
2.138 - </classpath>
2.139 - <compilerarg line="${javac.compilerargs}"/>
2.140 - <customize/>
2.141 - </javac>
2.142 + </sequential>
2.143 + </macrodef>
2.144 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
2.145 + <attribute default="${build.classes.dir}" name="destdir"/>
2.146 + <sequential>
2.147 + <fail unless="javac.includes">Must set javac.includes</fail>
2.148 + <pathconvert pathsep="," property="javac.includes.binary">
2.149 + <path>
2.150 + <filelist dir="@{destdir}" files="${javac.includes}"/>
2.151 + </path>
2.152 + <globmapper from="*.java" to="*.class"/>
2.153 + </pathconvert>
2.154 + <delete>
2.155 + <files includes="${javac.includes.binary}"/>
2.156 + </delete>
2.157 </sequential>
2.158 </macrodef>
2.159 </target>
2.160 <target name="-init-macrodef-junit">
2.161 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
2.162 - <attribute name="includes" default="**/*Test.java"/>
2.163 + <attribute default="${includes}" name="includes"/>
2.164 + <attribute default="${excludes}" name="excludes"/>
2.165 + <attribute default="**" name="testincludes"/>
2.166 <sequential>
2.167 - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
2.168 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
2.169 <batchtest todir="${build.test.results.dir}">
2.170 - <fileset dir="${test.src.dir}" includes="@{includes}"/>
2.171 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
2.172 + <filename name="@{testincludes}"/>
2.173 + </fileset>
2.174 </batchtest>
2.175 <classpath>
2.176 <path path="${run.test.classpath}"/>
2.177 </classpath>
2.178 <syspropertyset>
2.179 <propertyref prefix="test-sys-prop."/>
2.180 - <mapper type="glob" from="test-sys-prop.*" to="*"/>
2.181 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
2.182 </syspropertyset>
2.183 <formatter type="brief" usefile="false"/>
2.184 <formatter type="xml"/>
2.185 @@ -163,11 +220,11 @@
2.186 </target>
2.187 <target name="-init-macrodef-nbjpda">
2.188 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
2.189 - <attribute name="name" default="${main.class}"/>
2.190 - <attribute name="classpath" default="${debug.classpath}"/>
2.191 - <attribute name="stopclassname" default=""/>
2.192 + <attribute default="${main.class}" name="name"/>
2.193 + <attribute default="${debug.classpath}" name="classpath"/>
2.194 + <attribute default="" name="stopclassname"/>
2.195 <sequential>
2.196 - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
2.197 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
2.198 <classpath>
2.199 <path path="@{classpath}"/>
2.200 </classpath>
2.201 @@ -175,24 +232,36 @@
2.202 </sequential>
2.203 </macrodef>
2.204 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
2.205 - <attribute name="dir" default="${build.classes.dir}"/>
2.206 + <attribute default="${build.classes.dir}" name="dir"/>
2.207 <sequential>
2.208 <nbjpdareload>
2.209 - <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
2.210 + <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
2.211 </nbjpdareload>
2.212 </sequential>
2.213 </macrodef>
2.214 </target>
2.215 - <target name="-init-macrodef-debug">
2.216 + <target name="-init-debug-args">
2.217 + <property name="version-output" value="java version "${ant.java.version}"/>
2.218 + <condition property="have-jdk-older-than-1.4">
2.219 + <or>
2.220 + <contains string="${version-output}" substring="java version "1.0"/>
2.221 + <contains string="${version-output}" substring="java version "1.1"/>
2.222 + <contains string="${version-output}" substring="java version "1.2"/>
2.223 + <contains string="${version-output}" substring="java version "1.3"/>
2.224 + </or>
2.225 + </condition>
2.226 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
2.227 + <istrue value="${have-jdk-older-than-1.4}"/>
2.228 + </condition>
2.229 + </target>
2.230 + <target depends="-init-debug-args" name="-init-macrodef-debug">
2.231 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
2.232 - <attribute name="classname" default="${main.class}"/>
2.233 - <attribute name="classpath" default="${debug.classpath}"/>
2.234 + <attribute default="${main.class}" name="classname"/>
2.235 + <attribute default="${debug.classpath}" name="classpath"/>
2.236 <element name="customize" optional="true"/>
2.237 <sequential>
2.238 - <java fork="true" classname="@{classname}" dir="${work.dir}">
2.239 - <jvmarg value="-Xdebug"/>
2.240 - <jvmarg value="-Xnoagent"/>
2.241 - <jvmarg value="-Djava.compiler=none"/>
2.242 + <java classname="@{classname}" dir="${work.dir}" fork="true">
2.243 + <jvmarg line="${debug-args-line}"/>
2.244 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
2.245 <jvmarg line="${run.jvmargs}"/>
2.246 <classpath>
2.247 @@ -200,7 +269,7 @@
2.248 </classpath>
2.249 <syspropertyset>
2.250 <propertyref prefix="run-sys-prop."/>
2.251 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
2.252 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
2.253 </syspropertyset>
2.254 <customize/>
2.255 </java>
2.256 @@ -209,17 +278,17 @@
2.257 </target>
2.258 <target name="-init-macrodef-java">
2.259 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
2.260 - <attribute name="classname" default="${main.class}"/>
2.261 + <attribute default="${main.class}" name="classname"/>
2.262 <element name="customize" optional="true"/>
2.263 <sequential>
2.264 - <java fork="true" classname="@{classname}" dir="${work.dir}">
2.265 + <java classname="@{classname}" dir="${work.dir}" fork="true">
2.266 <jvmarg line="${run.jvmargs}"/>
2.267 <classpath>
2.268 <path path="${run.classpath}"/>
2.269 </classpath>
2.270 <syspropertyset>
2.271 <propertyref prefix="run-sys-prop."/>
2.272 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
2.273 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
2.274 </syspropertyset>
2.275 <customize/>
2.276 </java>
2.277 @@ -228,102 +297,102 @@
2.278 </target>
2.279 <target name="-init-presetdef-jar">
2.280 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
2.281 - <jar jarfile="${dist.jar}" compress="${jar.compress}">
2.282 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
2.283 <j2seproject1:fileset dir="${build.classes.dir}"/>
2.284 </jar>
2.285 </presetdef>
2.286 </target>
2.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"/>
2.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"/>
2.289 <!--
2.290 - ===================
2.291 - COMPILATION SECTION
2.292 - ===================
2.293 - -->
2.294 - <target name="deps-jar" depends="init" unless="no.deps"/>
2.295 - <target name="-pre-pre-compile" depends="init,deps-jar">
2.296 + ===================
2.297 + COMPILATION SECTION
2.298 + ===================
2.299 + -->
2.300 + <target depends="init" name="deps-jar" unless="no.deps"/>
2.301 + <target depends="init,deps-jar" name="-pre-pre-compile">
2.302 <mkdir dir="${build.classes.dir}"/>
2.303 </target>
2.304 <target name="-pre-compile">
2.305 <!-- Empty placeholder for easier customization. -->
2.306 <!-- You can override this target in the ../build.xml file. -->
2.307 </target>
2.308 - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
2.309 + <target if="do.depend.true" name="-compile-depend">
2.310 + <j2seproject3:depend/>
2.311 + </target>
2.312 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
2.313 <j2seproject3:javac/>
2.314 <copy todir="${build.classes.dir}">
2.315 - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
2.316 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
2.317 </copy>
2.318 </target>
2.319 <target name="-post-compile">
2.320 <!-- Empty placeholder for easier customization. -->
2.321 <!-- You can override this target in the ../build.xml file. -->
2.322 </target>
2.323 - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
2.324 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
2.325 <target name="-pre-compile-single">
2.326 <!-- Empty placeholder for easier customization. -->
2.327 <!-- You can override this target in the ../build.xml file. -->
2.328 </target>
2.329 - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
2.330 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
2.331 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
2.332 - <j2seproject3:javac>
2.333 - <customize>
2.334 - <patternset includes="${javac.includes}"/>
2.335 - </customize>
2.336 - </j2seproject3:javac>
2.337 + <j2seproject3:force-recompile/>
2.338 + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
2.339 </target>
2.340 <target name="-post-compile-single">
2.341 <!-- Empty placeholder for easier customization. -->
2.342 <!-- You can override this target in the ../build.xml file. -->
2.343 </target>
2.344 - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
2.345 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
2.346 <!--
2.347 - ====================
2.348 - JAR BUILDING SECTION
2.349 - ====================
2.350 - -->
2.351 - <target name="-pre-pre-jar" depends="init">
2.352 - <dirname property="dist.jar.dir" file="${dist.jar}"/>
2.353 + ====================
2.354 + JAR BUILDING SECTION
2.355 + ====================
2.356 + -->
2.357 + <target depends="init" name="-pre-pre-jar">
2.358 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
2.359 <mkdir dir="${dist.jar.dir}"/>
2.360 </target>
2.361 <target name="-pre-jar">
2.362 <!-- Empty placeholder for easier customization. -->
2.363 <!-- You can override this target in the ../build.xml file. -->
2.364 </target>
2.365 - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
2.366 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
2.367 <j2seproject1:jar/>
2.368 </target>
2.369 - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
2.370 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
2.371 <j2seproject1:jar manifest="${manifest.file}"/>
2.372 </target>
2.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">
2.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">
2.375 <j2seproject1:jar manifest="${manifest.file}">
2.376 <j2seproject1:manifest>
2.377 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
2.378 </j2seproject1:manifest>
2.379 </j2seproject1:jar>
2.380 <echo>To run this application from the command line without Ant, try:</echo>
2.381 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
2.382 - <property name="dist.jar.resolved" location="${dist.jar}"/>
2.383 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
2.384 + <property location="${dist.jar}" name="dist.jar.resolved"/>
2.385 <pathconvert property="run.classpath.with.dist.jar">
2.386 <path path="${run.classpath}"/>
2.387 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
2.388 </pathconvert>
2.389 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
2.390 </target>
2.391 - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
2.392 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
2.393 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
2.394 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
2.395 <pathconvert property="run.classpath.without.build.classes.dir">
2.396 <path path="${run.classpath}"/>
2.397 <map from="${build.classes.dir.resolved}" to=""/>
2.398 </pathconvert>
2.399 - <pathconvert property="jar.classpath" pathsep=" ">
2.400 + <pathconvert pathsep=" " property="jar.classpath">
2.401 <path path="${run.classpath.without.build.classes.dir}"/>
2.402 <chainedmapper>
2.403 <flattenmapper/>
2.404 <globmapper from="*" to="lib/*"/>
2.405 </chainedmapper>
2.406 </pathconvert>
2.407 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
2.408 - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
2.409 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
2.410 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
2.411 <fileset dir="${build.classes.dir}"/>
2.412 <manifest>
2.413 <attribute name="Main-Class" value="${main.class}"/>
2.414 @@ -331,183 +400,194 @@
2.415 </manifest>
2.416 </copylibs>
2.417 <echo>To run this application from the command line without Ant, try:</echo>
2.418 - <property name="dist.jar.resolved" location="${dist.jar}"/>
2.419 + <property location="${dist.jar}" name="dist.jar.resolved"/>
2.420 <echo>java -jar "${dist.jar.resolved}"</echo>
2.421 </target>
2.422 <target name="-post-jar">
2.423 <!-- Empty placeholder for easier customization. -->
2.424 <!-- You can override this target in the ../build.xml file. -->
2.425 </target>
2.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."/>
2.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"/>
2.428 <!--
2.429 - =================
2.430 - EXECUTION SECTION
2.431 - =================
2.432 - -->
2.433 - <target name="run" depends="init,compile" description="Run a main class.">
2.434 + =================
2.435 + EXECUTION SECTION
2.436 + =================
2.437 + -->
2.438 + <target depends="init,compile" description="Run a main class." name="run">
2.439 <j2seproject1:java>
2.440 <customize>
2.441 <arg line="${application.args}"/>
2.442 </customize>
2.443 </j2seproject1:java>
2.444 </target>
2.445 - <target name="run-single" depends="init,compile-single">
2.446 + <target name="-do-not-recompile">
2.447 + <property name="javac.includes.binary" value=""/>
2.448 + </target>
2.449 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
2.450 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
2.451 <j2seproject1:java classname="${run.class}"/>
2.452 </target>
2.453 <!--
2.454 - =================
2.455 - DEBUGGING SECTION
2.456 - =================
2.457 - -->
2.458 - <target name="-debug-start-debugger" if="netbeans.home" depends="init">
2.459 + =================
2.460 + DEBUGGING SECTION
2.461 + =================
2.462 + -->
2.463 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
2.464 <j2seproject1:nbjpdastart name="${debug.class}"/>
2.465 </target>
2.466 - <target name="-debug-start-debuggee" depends="init,compile">
2.467 + <target depends="init,compile" name="-debug-start-debuggee">
2.468 <j2seproject3:debug>
2.469 <customize>
2.470 <arg line="${application.args}"/>
2.471 </customize>
2.472 </j2seproject3:debug>
2.473 </target>
2.474 - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
2.475 - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
2.476 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
2.477 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
2.478 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
2.479 </target>
2.480 - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
2.481 - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
2.482 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
2.483 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
2.484 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
2.485 <j2seproject3:debug classname="${debug.class}"/>
2.486 </target>
2.487 - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
2.488 - <target name="-pre-debug-fix" depends="init">
2.489 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
2.490 + <target depends="init" name="-pre-debug-fix">
2.491 <fail unless="fix.includes">Must set fix.includes</fail>
2.492 <property name="javac.includes" value="${fix.includes}.java"/>
2.493 </target>
2.494 - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
2.495 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
2.496 <j2seproject1:nbjpdareload/>
2.497 </target>
2.498 - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
2.499 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
2.500 <!--
2.501 - ===============
2.502 - JAVADOC SECTION
2.503 - ===============
2.504 - -->
2.505 - <target name="-javadoc-build" depends="init">
2.506 + ===============
2.507 + JAVADOC SECTION
2.508 + ===============
2.509 + -->
2.510 + <target depends="init" name="-javadoc-build">
2.511 <mkdir dir="${dist.javadoc.dir}"/>
2.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">
2.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}">
2.514 <classpath>
2.515 <path path="${javac.classpath}"/>
2.516 </classpath>
2.517 - <sourcepath>
2.518 - <pathelement location="${src.dir}"/>
2.519 - </sourcepath>
2.520 - <packageset dir="${src.dir}" includes="*/**"/>
2.521 - <fileset dir="${src.dir}" includes="*.java"/>
2.522 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
2.523 + <filename name="**/*.java"/>
2.524 + </fileset>
2.525 </javadoc>
2.526 </target>
2.527 - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
2.528 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
2.529 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
2.530 </target>
2.531 - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
2.532 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
2.533 <!--
2.534 - =========================
2.535 - JUNIT COMPILATION SECTION
2.536 - =========================
2.537 - -->
2.538 - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
2.539 + =========================
2.540 + JUNIT COMPILATION SECTION
2.541 + =========================
2.542 + -->
2.543 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
2.544 <mkdir dir="${build.test.classes.dir}"/>
2.545 </target>
2.546 <target name="-pre-compile-test">
2.547 <!-- Empty placeholder for easier customization. -->
2.548 <!-- You can override this target in the ../build.xml file. -->
2.549 </target>
2.550 - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
2.551 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
2.552 + <target if="do.depend.true" name="-compile-test-depend">
2.553 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
2.554 + </target>
2.555 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
2.556 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
2.557 <copy todir="${build.test.classes.dir}">
2.558 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
2.559 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
2.560 </copy>
2.561 </target>
2.562 <target name="-post-compile-test">
2.563 <!-- Empty placeholder for easier customization. -->
2.564 <!-- You can override this target in the ../build.xml file. -->
2.565 </target>
2.566 - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
2.567 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
2.568 <target name="-pre-compile-test-single">
2.569 <!-- Empty placeholder for easier customization. -->
2.570 <!-- You can override this target in the ../build.xml file. -->
2.571 </target>
2.572 - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
2.573 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
2.574 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
2.575 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
2.576 - <customize>
2.577 - <patternset includes="${javac.includes}"/>
2.578 - </customize>
2.579 - </j2seproject3:javac>
2.580 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
2.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}"/>
2.582 <copy todir="${build.test.classes.dir}">
2.583 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
2.584 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
2.585 </copy>
2.586 </target>
2.587 <target name="-post-compile-test-single">
2.588 <!-- Empty placeholder for easier customization. -->
2.589 <!-- You can override this target in the ../build.xml file. -->
2.590 </target>
2.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"/>
2.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"/>
2.593 <!--
2.594 - =======================
2.595 - JUNIT EXECUTION SECTION
2.596 - =======================
2.597 - -->
2.598 - <target name="-pre-test-run" if="have.tests" depends="init">
2.599 + =======================
2.600 + JUNIT EXECUTION SECTION
2.601 + =======================
2.602 + -->
2.603 + <target depends="init" if="have.tests" name="-pre-test-run">
2.604 <mkdir dir="${build.test.results.dir}"/>
2.605 </target>
2.606 - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
2.607 - <j2seproject3:junit/>
2.608 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
2.609 + <j2seproject3:junit testincludes="**/*Test.java"/>
2.610 </target>
2.611 - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
2.612 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
2.613 <fail if="tests.failed">Some tests failed; see details above.</fail>
2.614 </target>
2.615 - <target name="test-report" if="have.tests" depends="init"/>
2.616 - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
2.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."/>
2.618 - <target name="-pre-test-run-single" if="have.tests" depends="init">
2.619 + <target depends="init" if="have.tests" name="test-report"/>
2.620 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
2.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"/>
2.622 + <target depends="init" if="have.tests" name="-pre-test-run-single">
2.623 <mkdir dir="${build.test.results.dir}"/>
2.624 </target>
2.625 - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
2.626 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
2.627 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
2.628 - <j2seproject3:junit includes="${test.includes}"/>
2.629 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
2.630 </target>
2.631 - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
2.632 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
2.633 <fail if="tests.failed">Some tests failed; see details above.</fail>
2.634 </target>
2.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."/>
2.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"/>
2.637 <!--
2.638 - =======================
2.639 - JUNIT DEBUGGING SECTION
2.640 - =======================
2.641 - -->
2.642 - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
2.643 + =======================
2.644 + JUNIT DEBUGGING SECTION
2.645 + =======================
2.646 + -->
2.647 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
2.648 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
2.649 - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
2.650 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
2.651 + <delete file="${test.report.file}"/>
2.652 + <mkdir dir="${build.test.results.dir}"/>
2.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}">
2.654 <customize>
2.655 - <arg line="${test.class}"/>
2.656 + <syspropertyset>
2.657 + <propertyref prefix="test-sys-prop."/>
2.658 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
2.659 + </syspropertyset>
2.660 + <arg value="${test.class}"/>
2.661 + <arg value="showoutput=true"/>
2.662 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
2.663 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
2.664 </customize>
2.665 </j2seproject3:debug>
2.666 </target>
2.667 - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
2.668 - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
2.669 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
2.670 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
2.671 </target>
2.672 - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
2.673 - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
2.674 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
2.675 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
2.676 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
2.677 </target>
2.678 - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
2.679 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
2.680 <!--
2.681 - =========================
2.682 - APPLET EXECUTION SECTION
2.683 - =========================
2.684 - -->
2.685 - <target name="run-applet" depends="init,compile-single">
2.686 + =========================
2.687 + APPLET EXECUTION SECTION
2.688 + =========================
2.689 + -->
2.690 + <target depends="init,compile-single" name="run-applet">
2.691 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
2.692 <j2seproject1:java classname="sun.applet.AppletViewer">
2.693 <customize>
2.694 @@ -516,11 +596,11 @@
2.695 </j2seproject1:java>
2.696 </target>
2.697 <!--
2.698 - =========================
2.699 - APPLET DEBUGGING SECTION
2.700 - =========================
2.701 - -->
2.702 - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
2.703 + =========================
2.704 + APPLET DEBUGGING SECTION
2.705 + =========================
2.706 + -->
2.707 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
2.708 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
2.709 <j2seproject3:debug classname="sun.applet.AppletViewer">
2.710 <customize>
2.711 @@ -528,14 +608,14 @@
2.712 </customize>
2.713 </j2seproject3:debug>
2.714 </target>
2.715 - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
2.716 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
2.717 <!--
2.718 - ===============
2.719 - CLEANUP SECTION
2.720 - ===============
2.721 - -->
2.722 - <target name="deps-clean" depends="init" unless="no.deps"/>
2.723 - <target name="-do-clean" depends="init">
2.724 + ===============
2.725 + CLEANUP SECTION
2.726 + ===============
2.727 + -->
2.728 + <target depends="init" name="deps-clean" unless="no.deps"/>
2.729 + <target depends="init" name="-do-clean">
2.730 <delete dir="${build.dir}"/>
2.731 <delete dir="${dist.dir}"/>
2.732 </target>
2.733 @@ -543,5 +623,5 @@
2.734 <!-- Empty placeholder for easier customization. -->
2.735 <!-- You can override this target in the ../build.xml file. -->
2.736 </target>
2.737 - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
2.738 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
2.739 </project>
3.1 --- a/samples/apifest1/day1/elementbasedsolution/nbproject/genfiles.properties Sat Jun 14 09:52:45 2008 +0200
3.2 +++ b/samples/apifest1/day1/elementbasedsolution/nbproject/genfiles.properties Sat Jun 14 09:52:47 2008 +0200
3.3 @@ -1,8 +1,8 @@
3.4 build.xml.data.CRC32=3856b393
3.5 build.xml.script.CRC32=5c47136e
3.6 -build.xml.stylesheet.CRC32=a12b3d02
3.7 +build.xml.stylesheet.CRC32=be360661
3.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
3.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
3.10 nbproject/build-impl.xml.data.CRC32=3856b393
3.11 -nbproject/build-impl.xml.script.CRC32=6771a052
3.12 -nbproject/build-impl.xml.stylesheet.CRC32=c10f1eac
3.13 +nbproject/build-impl.xml.script.CRC32=3552e577
3.14 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
4.1 --- a/samples/apifest1/day1/elementbasedsolution/nbproject/project.properties Sat Jun 14 09:52:45 2008 +0200
4.2 +++ b/samples/apifest1/day1/elementbasedsolution/nbproject/project.properties Sat Jun 14 09:52:47 2008 +0200
4.3 @@ -15,6 +15,8 @@
4.4 dist.dir=dist
4.5 dist.jar=${dist.dir}/boolcircuit.jar
4.6 dist.javadoc.dir=${dist.dir}/javadoc
4.7 +excludes=
4.8 +includes=**
4.9 jar.compress=false
4.10 javac.classpath=
4.11 # Space-separated list of extra javac options
5.1 --- a/samples/apifest1/day1/elementbasedsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:52:45 2008 +0200
5.2 +++ b/samples/apifest1/day1/elementbasedsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:52:47 2008 +0200
5.3 @@ -21,6 +21,7 @@
5.4
5.5 /**
5.6 */
5.7 +// BEGIN: apifest.day1.elementbasedsolution.Circuit
5.8 public final class Circuit {
5.9 private Circuit() {
5.10 }
5.11 @@ -71,3 +72,4 @@
5.12 }
5.13 }
5.14 }
5.15 +// END: apifest.day1.elementbasedsolution.Circuit
6.1 --- a/samples/apifest1/day1/subclassingsolution/nbproject/build-impl.xml Sat Jun 14 09:52:45 2008 +0200
6.2 +++ b/samples/apifest1/day1/subclassingsolution/nbproject/build-impl.xml Sat Jun 14 09:52:47 2008 +0200
6.3 @@ -18,32 +18,35 @@
6.4 - applet
6.5 - cleanup
6.6
6.7 --->
6.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">
6.9 - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
6.10 + -->
6.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">
6.12 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
6.13 <!--
6.14 - ======================
6.15 - INITIALIZATION SECTION
6.16 - ======================
6.17 - -->
6.18 + ======================
6.19 + INITIALIZATION SECTION
6.20 + ======================
6.21 + -->
6.22 <target name="-pre-init">
6.23 <!-- Empty placeholder for easier customization. -->
6.24 <!-- You can override this target in the ../build.xml file. -->
6.25 </target>
6.26 - <target name="-init-private" depends="-pre-init">
6.27 + <target depends="-pre-init" name="-init-private">
6.28 + <property file="nbproject/private/config.properties"/>
6.29 + <property file="nbproject/private/configs/${config}.properties"/>
6.30 <property file="nbproject/private/private.properties"/>
6.31 </target>
6.32 - <target name="-init-user" depends="-pre-init,-init-private">
6.33 + <target depends="-pre-init,-init-private" name="-init-user">
6.34 <property file="${user.properties.file}"/>
6.35 <!-- The two properties below are usually overridden -->
6.36 <!-- by the active platform. Just a fallback. -->
6.37 <property name="default.javac.source" value="1.4"/>
6.38 <property name="default.javac.target" value="1.4"/>
6.39 </target>
6.40 - <target name="-init-project" depends="-pre-init,-init-private,-init-user">
6.41 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
6.42 + <property file="nbproject/configs/${config}.properties"/>
6.43 <property file="nbproject/project.properties"/>
6.44 </target>
6.45 - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
6.46 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
6.47 <available file="${manifest.file}" property="manifest.available"/>
6.48 <condition property="manifest.available+main.class">
6.49 <and>
6.50 @@ -77,7 +80,10 @@
6.51 </and>
6.52 </condition>
6.53 <condition property="no.javadoc.preview">
6.54 - <isfalse value="${javadoc.preview}"/>
6.55 + <and>
6.56 + <isset property="javadoc.preview"/>
6.57 + <isfalse value="${javadoc.preview}"/>
6.58 + </and>
6.59 </condition>
6.60 <property name="run.jvmargs" value=""/>
6.61 <property name="javac.compilerargs" value=""/>
6.62 @@ -90,12 +96,34 @@
6.63 <property name="javac.debug" value="true"/>
6.64 <property name="javadoc.preview" value="true"/>
6.65 <property name="application.args" value=""/>
6.66 + <property name="source.encoding" value="${file.encoding}"/>
6.67 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
6.68 + <and>
6.69 + <isset property="javadoc.encoding"/>
6.70 + <not>
6.71 + <equals arg1="${javadoc.encoding}" arg2=""/>
6.72 + </not>
6.73 + </and>
6.74 + </condition>
6.75 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
6.76 + <property name="includes" value="**"/>
6.77 + <property name="excludes" value=""/>
6.78 + <property name="do.depend" value="false"/>
6.79 + <condition property="do.depend.true">
6.80 + <istrue value="${do.depend}"/>
6.81 + </condition>
6.82 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
6.83 + <and>
6.84 + <isset property="jaxws.endorsed.dir"/>
6.85 + <available file="nbproject/jaxws-build.xml"/>
6.86 + </and>
6.87 + </condition>
6.88 </target>
6.89 <target name="-post-init">
6.90 <!-- Empty placeholder for easier customization. -->
6.91 <!-- You can override this target in the ../build.xml file. -->
6.92 </target>
6.93 - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
6.94 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
6.95 <fail unless="src.dir">Must set src.dir</fail>
6.96 <fail unless="test.src.dir">Must set test.src.dir</fail>
6.97 <fail unless="build.dir">Must set build.dir</fail>
6.98 @@ -118,41 +146,70 @@
6.99 </target>
6.100 <target name="-init-macrodef-javac">
6.101 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
6.102 - <attribute name="srcdir" default="${src.dir}"/>
6.103 - <attribute name="destdir" default="${build.classes.dir}"/>
6.104 - <attribute name="classpath" default="${javac.classpath}"/>
6.105 - <attribute name="debug" default="${javac.debug}"/>
6.106 + <attribute default="${src.dir}" name="srcdir"/>
6.107 + <attribute default="${build.classes.dir}" name="destdir"/>
6.108 + <attribute default="${javac.classpath}" name="classpath"/>
6.109 + <attribute default="${includes}" name="includes"/>
6.110 + <attribute default="${excludes}" name="excludes"/>
6.111 + <attribute default="${javac.debug}" name="debug"/>
6.112 + <attribute default="" name="sourcepath"/>
6.113 <element name="customize" optional="true"/>
6.114 <sequential>
6.115 - <depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
6.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}">
6.117 + <classpath>
6.118 + <path path="@{classpath}"/>
6.119 + </classpath>
6.120 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
6.121 + <customize/>
6.122 + </javac>
6.123 + </sequential>
6.124 + </macrodef>
6.125 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
6.126 + <attribute default="${src.dir}" name="srcdir"/>
6.127 + <attribute default="${build.classes.dir}" name="destdir"/>
6.128 + <attribute default="${javac.classpath}" name="classpath"/>
6.129 + <sequential>
6.130 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
6.131 <classpath>
6.132 <path path="@{classpath}"/>
6.133 </classpath>
6.134 </depend>
6.135 - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
6.136 - <classpath>
6.137 - <path path="@{classpath}"/>
6.138 - </classpath>
6.139 - <compilerarg line="${javac.compilerargs}"/>
6.140 - <customize/>
6.141 - </javac>
6.142 + </sequential>
6.143 + </macrodef>
6.144 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
6.145 + <attribute default="${build.classes.dir}" name="destdir"/>
6.146 + <sequential>
6.147 + <fail unless="javac.includes">Must set javac.includes</fail>
6.148 + <pathconvert pathsep="," property="javac.includes.binary">
6.149 + <path>
6.150 + <filelist dir="@{destdir}" files="${javac.includes}"/>
6.151 + </path>
6.152 + <globmapper from="*.java" to="*.class"/>
6.153 + </pathconvert>
6.154 + <delete>
6.155 + <files includes="${javac.includes.binary}"/>
6.156 + </delete>
6.157 </sequential>
6.158 </macrodef>
6.159 </target>
6.160 <target name="-init-macrodef-junit">
6.161 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
6.162 - <attribute name="includes" default="**/*Test.java"/>
6.163 + <attribute default="${includes}" name="includes"/>
6.164 + <attribute default="${excludes}" name="excludes"/>
6.165 + <attribute default="**" name="testincludes"/>
6.166 <sequential>
6.167 - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
6.168 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
6.169 <batchtest todir="${build.test.results.dir}">
6.170 - <fileset dir="${test.src.dir}" includes="@{includes}"/>
6.171 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
6.172 + <filename name="@{testincludes}"/>
6.173 + </fileset>
6.174 </batchtest>
6.175 <classpath>
6.176 <path path="${run.test.classpath}"/>
6.177 </classpath>
6.178 <syspropertyset>
6.179 <propertyref prefix="test-sys-prop."/>
6.180 - <mapper type="glob" from="test-sys-prop.*" to="*"/>
6.181 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
6.182 </syspropertyset>
6.183 <formatter type="brief" usefile="false"/>
6.184 <formatter type="xml"/>
6.185 @@ -163,11 +220,11 @@
6.186 </target>
6.187 <target name="-init-macrodef-nbjpda">
6.188 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
6.189 - <attribute name="name" default="${main.class}"/>
6.190 - <attribute name="classpath" default="${debug.classpath}"/>
6.191 - <attribute name="stopclassname" default=""/>
6.192 + <attribute default="${main.class}" name="name"/>
6.193 + <attribute default="${debug.classpath}" name="classpath"/>
6.194 + <attribute default="" name="stopclassname"/>
6.195 <sequential>
6.196 - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
6.197 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
6.198 <classpath>
6.199 <path path="@{classpath}"/>
6.200 </classpath>
6.201 @@ -175,24 +232,36 @@
6.202 </sequential>
6.203 </macrodef>
6.204 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
6.205 - <attribute name="dir" default="${build.classes.dir}"/>
6.206 + <attribute default="${build.classes.dir}" name="dir"/>
6.207 <sequential>
6.208 <nbjpdareload>
6.209 - <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
6.210 + <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
6.211 </nbjpdareload>
6.212 </sequential>
6.213 </macrodef>
6.214 </target>
6.215 - <target name="-init-macrodef-debug">
6.216 + <target name="-init-debug-args">
6.217 + <property name="version-output" value="java version "${ant.java.version}"/>
6.218 + <condition property="have-jdk-older-than-1.4">
6.219 + <or>
6.220 + <contains string="${version-output}" substring="java version "1.0"/>
6.221 + <contains string="${version-output}" substring="java version "1.1"/>
6.222 + <contains string="${version-output}" substring="java version "1.2"/>
6.223 + <contains string="${version-output}" substring="java version "1.3"/>
6.224 + </or>
6.225 + </condition>
6.226 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
6.227 + <istrue value="${have-jdk-older-than-1.4}"/>
6.228 + </condition>
6.229 + </target>
6.230 + <target depends="-init-debug-args" name="-init-macrodef-debug">
6.231 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
6.232 - <attribute name="classname" default="${main.class}"/>
6.233 - <attribute name="classpath" default="${debug.classpath}"/>
6.234 + <attribute default="${main.class}" name="classname"/>
6.235 + <attribute default="${debug.classpath}" name="classpath"/>
6.236 <element name="customize" optional="true"/>
6.237 <sequential>
6.238 - <java fork="true" classname="@{classname}" dir="${work.dir}">
6.239 - <jvmarg value="-Xdebug"/>
6.240 - <jvmarg value="-Xnoagent"/>
6.241 - <jvmarg value="-Djava.compiler=none"/>
6.242 + <java classname="@{classname}" dir="${work.dir}" fork="true">
6.243 + <jvmarg line="${debug-args-line}"/>
6.244 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
6.245 <jvmarg line="${run.jvmargs}"/>
6.246 <classpath>
6.247 @@ -200,7 +269,7 @@
6.248 </classpath>
6.249 <syspropertyset>
6.250 <propertyref prefix="run-sys-prop."/>
6.251 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
6.252 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
6.253 </syspropertyset>
6.254 <customize/>
6.255 </java>
6.256 @@ -209,17 +278,17 @@
6.257 </target>
6.258 <target name="-init-macrodef-java">
6.259 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
6.260 - <attribute name="classname" default="${main.class}"/>
6.261 + <attribute default="${main.class}" name="classname"/>
6.262 <element name="customize" optional="true"/>
6.263 <sequential>
6.264 - <java fork="true" classname="@{classname}" dir="${work.dir}">
6.265 + <java classname="@{classname}" dir="${work.dir}" fork="true">
6.266 <jvmarg line="${run.jvmargs}"/>
6.267 <classpath>
6.268 <path path="${run.classpath}"/>
6.269 </classpath>
6.270 <syspropertyset>
6.271 <propertyref prefix="run-sys-prop."/>
6.272 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
6.273 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
6.274 </syspropertyset>
6.275 <customize/>
6.276 </java>
6.277 @@ -228,102 +297,102 @@
6.278 </target>
6.279 <target name="-init-presetdef-jar">
6.280 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
6.281 - <jar jarfile="${dist.jar}" compress="${jar.compress}">
6.282 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
6.283 <j2seproject1:fileset dir="${build.classes.dir}"/>
6.284 </jar>
6.285 </presetdef>
6.286 </target>
6.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"/>
6.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"/>
6.289 <!--
6.290 - ===================
6.291 - COMPILATION SECTION
6.292 - ===================
6.293 - -->
6.294 - <target name="deps-jar" depends="init" unless="no.deps"/>
6.295 - <target name="-pre-pre-compile" depends="init,deps-jar">
6.296 + ===================
6.297 + COMPILATION SECTION
6.298 + ===================
6.299 + -->
6.300 + <target depends="init" name="deps-jar" unless="no.deps"/>
6.301 + <target depends="init,deps-jar" name="-pre-pre-compile">
6.302 <mkdir dir="${build.classes.dir}"/>
6.303 </target>
6.304 <target name="-pre-compile">
6.305 <!-- Empty placeholder for easier customization. -->
6.306 <!-- You can override this target in the ../build.xml file. -->
6.307 </target>
6.308 - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
6.309 + <target if="do.depend.true" name="-compile-depend">
6.310 + <j2seproject3:depend/>
6.311 + </target>
6.312 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
6.313 <j2seproject3:javac/>
6.314 <copy todir="${build.classes.dir}">
6.315 - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
6.316 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
6.317 </copy>
6.318 </target>
6.319 <target name="-post-compile">
6.320 <!-- Empty placeholder for easier customization. -->
6.321 <!-- You can override this target in the ../build.xml file. -->
6.322 </target>
6.323 - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
6.324 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
6.325 <target name="-pre-compile-single">
6.326 <!-- Empty placeholder for easier customization. -->
6.327 <!-- You can override this target in the ../build.xml file. -->
6.328 </target>
6.329 - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
6.330 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
6.331 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
6.332 - <j2seproject3:javac>
6.333 - <customize>
6.334 - <patternset includes="${javac.includes}"/>
6.335 - </customize>
6.336 - </j2seproject3:javac>
6.337 + <j2seproject3:force-recompile/>
6.338 + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
6.339 </target>
6.340 <target name="-post-compile-single">
6.341 <!-- Empty placeholder for easier customization. -->
6.342 <!-- You can override this target in the ../build.xml file. -->
6.343 </target>
6.344 - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
6.345 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
6.346 <!--
6.347 - ====================
6.348 - JAR BUILDING SECTION
6.349 - ====================
6.350 - -->
6.351 - <target name="-pre-pre-jar" depends="init">
6.352 - <dirname property="dist.jar.dir" file="${dist.jar}"/>
6.353 + ====================
6.354 + JAR BUILDING SECTION
6.355 + ====================
6.356 + -->
6.357 + <target depends="init" name="-pre-pre-jar">
6.358 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
6.359 <mkdir dir="${dist.jar.dir}"/>
6.360 </target>
6.361 <target name="-pre-jar">
6.362 <!-- Empty placeholder for easier customization. -->
6.363 <!-- You can override this target in the ../build.xml file. -->
6.364 </target>
6.365 - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
6.366 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
6.367 <j2seproject1:jar/>
6.368 </target>
6.369 - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
6.370 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
6.371 <j2seproject1:jar manifest="${manifest.file}"/>
6.372 </target>
6.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">
6.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">
6.375 <j2seproject1:jar manifest="${manifest.file}">
6.376 <j2seproject1:manifest>
6.377 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
6.378 </j2seproject1:manifest>
6.379 </j2seproject1:jar>
6.380 <echo>To run this application from the command line without Ant, try:</echo>
6.381 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
6.382 - <property name="dist.jar.resolved" location="${dist.jar}"/>
6.383 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
6.384 + <property location="${dist.jar}" name="dist.jar.resolved"/>
6.385 <pathconvert property="run.classpath.with.dist.jar">
6.386 <path path="${run.classpath}"/>
6.387 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
6.388 </pathconvert>
6.389 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
6.390 </target>
6.391 - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
6.392 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
6.393 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
6.394 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
6.395 <pathconvert property="run.classpath.without.build.classes.dir">
6.396 <path path="${run.classpath}"/>
6.397 <map from="${build.classes.dir.resolved}" to=""/>
6.398 </pathconvert>
6.399 - <pathconvert property="jar.classpath" pathsep=" ">
6.400 + <pathconvert pathsep=" " property="jar.classpath">
6.401 <path path="${run.classpath.without.build.classes.dir}"/>
6.402 <chainedmapper>
6.403 <flattenmapper/>
6.404 <globmapper from="*" to="lib/*"/>
6.405 </chainedmapper>
6.406 </pathconvert>
6.407 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
6.408 - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
6.409 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
6.410 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
6.411 <fileset dir="${build.classes.dir}"/>
6.412 <manifest>
6.413 <attribute name="Main-Class" value="${main.class}"/>
6.414 @@ -331,183 +400,194 @@
6.415 </manifest>
6.416 </copylibs>
6.417 <echo>To run this application from the command line without Ant, try:</echo>
6.418 - <property name="dist.jar.resolved" location="${dist.jar}"/>
6.419 + <property location="${dist.jar}" name="dist.jar.resolved"/>
6.420 <echo>java -jar "${dist.jar.resolved}"</echo>
6.421 </target>
6.422 <target name="-post-jar">
6.423 <!-- Empty placeholder for easier customization. -->
6.424 <!-- You can override this target in the ../build.xml file. -->
6.425 </target>
6.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."/>
6.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"/>
6.428 <!--
6.429 - =================
6.430 - EXECUTION SECTION
6.431 - =================
6.432 - -->
6.433 - <target name="run" depends="init,compile" description="Run a main class.">
6.434 + =================
6.435 + EXECUTION SECTION
6.436 + =================
6.437 + -->
6.438 + <target depends="init,compile" description="Run a main class." name="run">
6.439 <j2seproject1:java>
6.440 <customize>
6.441 <arg line="${application.args}"/>
6.442 </customize>
6.443 </j2seproject1:java>
6.444 </target>
6.445 - <target name="run-single" depends="init,compile-single">
6.446 + <target name="-do-not-recompile">
6.447 + <property name="javac.includes.binary" value=""/>
6.448 + </target>
6.449 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
6.450 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
6.451 <j2seproject1:java classname="${run.class}"/>
6.452 </target>
6.453 <!--
6.454 - =================
6.455 - DEBUGGING SECTION
6.456 - =================
6.457 - -->
6.458 - <target name="-debug-start-debugger" if="netbeans.home" depends="init">
6.459 + =================
6.460 + DEBUGGING SECTION
6.461 + =================
6.462 + -->
6.463 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
6.464 <j2seproject1:nbjpdastart name="${debug.class}"/>
6.465 </target>
6.466 - <target name="-debug-start-debuggee" depends="init,compile">
6.467 + <target depends="init,compile" name="-debug-start-debuggee">
6.468 <j2seproject3:debug>
6.469 <customize>
6.470 <arg line="${application.args}"/>
6.471 </customize>
6.472 </j2seproject3:debug>
6.473 </target>
6.474 - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
6.475 - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
6.476 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
6.477 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
6.478 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
6.479 </target>
6.480 - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
6.481 - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
6.482 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
6.483 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
6.484 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
6.485 <j2seproject3:debug classname="${debug.class}"/>
6.486 </target>
6.487 - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
6.488 - <target name="-pre-debug-fix" depends="init">
6.489 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
6.490 + <target depends="init" name="-pre-debug-fix">
6.491 <fail unless="fix.includes">Must set fix.includes</fail>
6.492 <property name="javac.includes" value="${fix.includes}.java"/>
6.493 </target>
6.494 - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
6.495 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
6.496 <j2seproject1:nbjpdareload/>
6.497 </target>
6.498 - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
6.499 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
6.500 <!--
6.501 - ===============
6.502 - JAVADOC SECTION
6.503 - ===============
6.504 - -->
6.505 - <target name="-javadoc-build" depends="init">
6.506 + ===============
6.507 + JAVADOC SECTION
6.508 + ===============
6.509 + -->
6.510 + <target depends="init" name="-javadoc-build">
6.511 <mkdir dir="${dist.javadoc.dir}"/>
6.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">
6.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}">
6.514 <classpath>
6.515 <path path="${javac.classpath}"/>
6.516 </classpath>
6.517 - <sourcepath>
6.518 - <pathelement location="${src.dir}"/>
6.519 - </sourcepath>
6.520 - <packageset dir="${src.dir}" includes="*/**"/>
6.521 - <fileset dir="${src.dir}" includes="*.java"/>
6.522 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
6.523 + <filename name="**/*.java"/>
6.524 + </fileset>
6.525 </javadoc>
6.526 </target>
6.527 - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
6.528 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
6.529 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
6.530 </target>
6.531 - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
6.532 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
6.533 <!--
6.534 - =========================
6.535 - JUNIT COMPILATION SECTION
6.536 - =========================
6.537 - -->
6.538 - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
6.539 + =========================
6.540 + JUNIT COMPILATION SECTION
6.541 + =========================
6.542 + -->
6.543 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
6.544 <mkdir dir="${build.test.classes.dir}"/>
6.545 </target>
6.546 <target name="-pre-compile-test">
6.547 <!-- Empty placeholder for easier customization. -->
6.548 <!-- You can override this target in the ../build.xml file. -->
6.549 </target>
6.550 - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
6.551 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
6.552 + <target if="do.depend.true" name="-compile-test-depend">
6.553 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
6.554 + </target>
6.555 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
6.556 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
6.557 <copy todir="${build.test.classes.dir}">
6.558 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
6.559 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
6.560 </copy>
6.561 </target>
6.562 <target name="-post-compile-test">
6.563 <!-- Empty placeholder for easier customization. -->
6.564 <!-- You can override this target in the ../build.xml file. -->
6.565 </target>
6.566 - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
6.567 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
6.568 <target name="-pre-compile-test-single">
6.569 <!-- Empty placeholder for easier customization. -->
6.570 <!-- You can override this target in the ../build.xml file. -->
6.571 </target>
6.572 - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
6.573 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
6.574 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
6.575 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
6.576 - <customize>
6.577 - <patternset includes="${javac.includes}"/>
6.578 - </customize>
6.579 - </j2seproject3:javac>
6.580 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
6.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}"/>
6.582 <copy todir="${build.test.classes.dir}">
6.583 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
6.584 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
6.585 </copy>
6.586 </target>
6.587 <target name="-post-compile-test-single">
6.588 <!-- Empty placeholder for easier customization. -->
6.589 <!-- You can override this target in the ../build.xml file. -->
6.590 </target>
6.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"/>
6.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"/>
6.593 <!--
6.594 - =======================
6.595 - JUNIT EXECUTION SECTION
6.596 - =======================
6.597 - -->
6.598 - <target name="-pre-test-run" if="have.tests" depends="init">
6.599 + =======================
6.600 + JUNIT EXECUTION SECTION
6.601 + =======================
6.602 + -->
6.603 + <target depends="init" if="have.tests" name="-pre-test-run">
6.604 <mkdir dir="${build.test.results.dir}"/>
6.605 </target>
6.606 - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
6.607 - <j2seproject3:junit/>
6.608 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
6.609 + <j2seproject3:junit testincludes="**/*Test.java"/>
6.610 </target>
6.611 - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
6.612 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
6.613 <fail if="tests.failed">Some tests failed; see details above.</fail>
6.614 </target>
6.615 - <target name="test-report" if="have.tests" depends="init"/>
6.616 - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
6.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."/>
6.618 - <target name="-pre-test-run-single" if="have.tests" depends="init">
6.619 + <target depends="init" if="have.tests" name="test-report"/>
6.620 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
6.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"/>
6.622 + <target depends="init" if="have.tests" name="-pre-test-run-single">
6.623 <mkdir dir="${build.test.results.dir}"/>
6.624 </target>
6.625 - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
6.626 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
6.627 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
6.628 - <j2seproject3:junit includes="${test.includes}"/>
6.629 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
6.630 </target>
6.631 - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
6.632 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
6.633 <fail if="tests.failed">Some tests failed; see details above.</fail>
6.634 </target>
6.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."/>
6.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"/>
6.637 <!--
6.638 - =======================
6.639 - JUNIT DEBUGGING SECTION
6.640 - =======================
6.641 - -->
6.642 - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
6.643 + =======================
6.644 + JUNIT DEBUGGING SECTION
6.645 + =======================
6.646 + -->
6.647 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
6.648 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
6.649 - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
6.650 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
6.651 + <delete file="${test.report.file}"/>
6.652 + <mkdir dir="${build.test.results.dir}"/>
6.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}">
6.654 <customize>
6.655 - <arg line="${test.class}"/>
6.656 + <syspropertyset>
6.657 + <propertyref prefix="test-sys-prop."/>
6.658 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
6.659 + </syspropertyset>
6.660 + <arg value="${test.class}"/>
6.661 + <arg value="showoutput=true"/>
6.662 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
6.663 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
6.664 </customize>
6.665 </j2seproject3:debug>
6.666 </target>
6.667 - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
6.668 - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
6.669 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
6.670 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
6.671 </target>
6.672 - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
6.673 - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
6.674 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
6.675 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
6.676 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
6.677 </target>
6.678 - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
6.679 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
6.680 <!--
6.681 - =========================
6.682 - APPLET EXECUTION SECTION
6.683 - =========================
6.684 - -->
6.685 - <target name="run-applet" depends="init,compile-single">
6.686 + =========================
6.687 + APPLET EXECUTION SECTION
6.688 + =========================
6.689 + -->
6.690 + <target depends="init,compile-single" name="run-applet">
6.691 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
6.692 <j2seproject1:java classname="sun.applet.AppletViewer">
6.693 <customize>
6.694 @@ -516,11 +596,11 @@
6.695 </j2seproject1:java>
6.696 </target>
6.697 <!--
6.698 - =========================
6.699 - APPLET DEBUGGING SECTION
6.700 - =========================
6.701 - -->
6.702 - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
6.703 + =========================
6.704 + APPLET DEBUGGING SECTION
6.705 + =========================
6.706 + -->
6.707 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
6.708 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
6.709 <j2seproject3:debug classname="sun.applet.AppletViewer">
6.710 <customize>
6.711 @@ -528,14 +608,14 @@
6.712 </customize>
6.713 </j2seproject3:debug>
6.714 </target>
6.715 - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
6.716 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
6.717 <!--
6.718 - ===============
6.719 - CLEANUP SECTION
6.720 - ===============
6.721 - -->
6.722 - <target name="deps-clean" depends="init" unless="no.deps"/>
6.723 - <target name="-do-clean" depends="init">
6.724 + ===============
6.725 + CLEANUP SECTION
6.726 + ===============
6.727 + -->
6.728 + <target depends="init" name="deps-clean" unless="no.deps"/>
6.729 + <target depends="init" name="-do-clean">
6.730 <delete dir="${build.dir}"/>
6.731 <delete dir="${dist.dir}"/>
6.732 </target>
6.733 @@ -543,5 +623,5 @@
6.734 <!-- Empty placeholder for easier customization. -->
6.735 <!-- You can override this target in the ../build.xml file. -->
6.736 </target>
6.737 - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
6.738 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
6.739 </project>
7.1 --- a/samples/apifest1/day1/subclassingsolution/nbproject/genfiles.properties Sat Jun 14 09:52:45 2008 +0200
7.2 +++ b/samples/apifest1/day1/subclassingsolution/nbproject/genfiles.properties Sat Jun 14 09:52:47 2008 +0200
7.3 @@ -4,5 +4,5 @@
7.4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
7.5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
7.6 nbproject/build-impl.xml.data.CRC32=0f6dc18a
7.7 -nbproject/build-impl.xml.script.CRC32=079f4b62
7.8 -nbproject/build-impl.xml.stylesheet.CRC32=c10f1eac
7.9 +nbproject/build-impl.xml.script.CRC32=fde9979b
7.10 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
8.1 --- a/samples/apifest1/day1/subclassingsolution/nbproject/project.properties Sat Jun 14 09:52:45 2008 +0200
8.2 +++ b/samples/apifest1/day1/subclassingsolution/nbproject/project.properties Sat Jun 14 09:52:47 2008 +0200
8.3 @@ -15,6 +15,8 @@
8.4 dist.dir=dist
8.5 dist.jar=${dist.dir}/boolcircuit.jar
8.6 dist.javadoc.dir=${dist.dir}/javadoc
8.7 +excludes=
8.8 +includes=**
8.9 jar.compress=false
8.10 javac.classpath=
8.11 # Space-separated list of extra javac options
9.1 --- a/samples/apifest1/day1/subclassingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:52:45 2008 +0200
9.2 +++ b/samples/apifest1/day1/subclassingsolution/src/org/netbeans/apifest/boolcircuit/Circuit.java Sat Jun 14 09:52:47 2008 +0200
9.3 @@ -20,6 +20,7 @@
9.4 package org.netbeans.apifest.boolcircuit;
9.5
9.6
9.7 +// BEGIN: apifest.day1.subclassingsolution
9.8 /** Usefull class for building your own circuits.
9.9 *
9.10 */
9.11 @@ -68,3 +69,6 @@
9.12 public abstract boolean evaluate(boolean... in);
9.13
9.14 }
9.15 +// END: apifest.day1.subclassingsolution
9.16 +
9.17 +
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/samples/apifest1/day2/RealTest.java Sat Jun 14 09:52:47 2008 +0200
10.3 @@ -0,0 +1,114 @@
10.4 +/*
10.5 + * The contents of this file are subject to the terms of the Common Development
10.6 + * and Distribution License (the License). You may not use this file except in
10.7 + * compliance with the License.
10.8 + *
10.9 + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
10.10 + * or http://www.netbeans.org/cddl.txt.
10.11 + *
10.12 + * When distributing Covered Code, include this CDDL Header Notice in each file
10.13 + * and include the License file at http://www.netbeans.org/cddl.txt.
10.14 + * If applicable, add the following below the CDDL Header, with the fields
10.15 + * enclosed by brackets [] replaced by your own identifying information:
10.16 + * "Portions Copyrighted [year] [name of copyright owner]"
10.17 + *
10.18 + * The Original Software is NetBeans. The Initial Developer of the Original
10.19 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
10.20 + * Microsystems, Inc. All Rights Reserved.
10.21 + */
10.22 +
10.23 +package org.netbeans.apifest.boolcircuit;
10.24 +
10.25 +import java.security.CodeSource;
10.26 +import java.security.Permission;
10.27 +import java.security.PermissionCollection;
10.28 +import java.security.Policy;
10.29 +import java.util.Collection;
10.30 +import java.util.Collections;
10.31 +import java.util.Enumeration;
10.32 +import junit.framework.TestCase;
10.33 +import junit.framework.*;
10.34 +
10.35 +// BEGIN: apitest.day2.RealTest
10.36 +/** This file contains the APIFest quest for day 2. Simply, turn the
10.37 + * boolean circuit into circuit that can compute with double values from 0 to 1.
10.38 + * <p>
10.39 + * This means that where ever a boolean was used to represent input or
10.40 + * output values, one can now use any double number from >= 0 and <= 1.
10.41 + * Still, to support backward compatibility, the operations with booleans
10.42 + * has to be kept available and have to work. In fact False shall be
10.43 + * treated as 0 and True as 1.
10.44 + * <p>
10.45 + * The basic elements has to be modified to work on doubles in the following
10.46 + * way:
10.47 + * <ul>
10.48 + * <li>negation - neg(x) = 1 - x, this is correct extension as neg(false)=neg(0)=1-0=1=true
10.49 + * <li>and - and(x,y) = x * y, again this is fine as and(true,true)=1*1=true and also
10.50 + * and(false,true)=0*1=0=false
10.51 + * <li>or - or(x,y) = 1 - (1 - x) * (1 - y) and this is also ok as
10.52 + * or(false,false) = 1 - (1 - 0) * (1 - 0) = 1 - 1 = 0 = false
10.53 + * or(true,false) = 1 - (1 - 1) * (1 - 0) = 1 - 0 * 1 = 1 = true
10.54 + * </ul>
10.55 + * <p>
10.56 + * However as the circuits with doubles are more rich than plain boolean circuits,
10.57 + * there is additional requirement to allow any user of your API to write its
10.58 + * own "element" type. This is all going to be exercise in the tests bellow
10.59 + * which you are supposed to implement.
10.60 + */
10.61 +public class RealTest extends TestCase {
10.62 + static {
10.63 + // your code shall run without any permissions
10.64 + }
10.65 +
10.66 + public RealTest(String testName) {
10.67 + super(testName);
10.68 + }
10.69 +
10.70 +
10.71 + /** First of all create a circuit which will evaluate
10.72 + * expression (X1 and X2) or not(x1). Hold the circuit
10.73 + * in some variable.
10.74 + *
10.75 + * Feed this circuit with x1=true, x2=false, assert result is false
10.76 + *
10.77 + * Feed the same circuit with x1=false, x2=true, assert result is true
10.78 + *
10.79 + * Feed the same circuit with x1=0.0, x2=1.0, assert result is 1.0
10.80 + *
10.81 + * Feed the same circuit with x1=0.5, x2=0.5, assert result is 0.625
10.82 + *
10.83 + * Feed the same circuit with x1=0.0, x2=2.0, make sure it throws an exception
10.84 + */
10.85 + public void testX1andX2orNotX1() {
10.86 + fail("testX1andX2orNotX1");
10.87 + }
10.88 +
10.89 + /** Ensure that one variable cannot be filled with two different values.
10.90 + * Create a circuit for x1 and x1. Make sure that for any usage of your
10.91 + * API that would not lead to x1 * x1 result, an exception is thrown.
10.92 + * For example if there was a way to feed the circuit with two different
10.93 + * values 0.3 and 0.5 an exception is thrown indicating that this is
10.94 + * improper use of the circuit.
10.95 + */
10.96 + public void testImproperUseOfTheCircuit() {
10.97 + fail("testImproperUseOfTheCircuit");
10.98 + }
10.99 +
10.100 + /** Write your own element type called "gte" that will have two inputs and one output.
10.101 + * The output value will be 1 if x1 >= x2 and 0 otherwise.
10.102 + *
10.103 + * Create
10.104 + * circuit for following expression: (x1 and not(x1)) gte x1
10.105 + *
10.106 + * Feed the circuit with 0.5 and verify the result is 0
10.107 + *
10.108 + * Feed the same circuit with 1 and verify the result is 0
10.109 + *
10.110 + * Feed the same circuit with 0 and verify the result is 1
10.111 + */
10.112 + public void testGreaterThanEqualElement() {
10.113 + fail("testGreaterThanEqualElement");
10.114 + }
10.115 +}
10.116 +// END: apitest.day2.RealTest
10.117 +
11.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/build-impl.xml Sat Jun 14 09:52:45 2008 +0200
11.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/build-impl.xml Sat Jun 14 09:52:47 2008 +0200
11.3 @@ -18,32 +18,35 @@
11.4 - applet
11.5 - cleanup
11.6
11.7 --->
11.8 -<project name="alwayscreatenewcircuit-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">
11.9 - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
11.10 + -->
11.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="alwayscreatenewcircuit-impl">
11.12 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
11.13 <!--
11.14 - ======================
11.15 - INITIALIZATION SECTION
11.16 - ======================
11.17 - -->
11.18 + ======================
11.19 + INITIALIZATION SECTION
11.20 + ======================
11.21 + -->
11.22 <target name="-pre-init">
11.23 <!-- Empty placeholder for easier customization. -->
11.24 <!-- You can override this target in the ../build.xml file. -->
11.25 </target>
11.26 - <target name="-init-private" depends="-pre-init">
11.27 + <target depends="-pre-init" name="-init-private">
11.28 + <property file="nbproject/private/config.properties"/>
11.29 + <property file="nbproject/private/configs/${config}.properties"/>
11.30 <property file="nbproject/private/private.properties"/>
11.31 </target>
11.32 - <target name="-init-user" depends="-pre-init,-init-private">
11.33 + <target depends="-pre-init,-init-private" name="-init-user">
11.34 <property file="${user.properties.file}"/>
11.35 <!-- The two properties below are usually overridden -->
11.36 <!-- by the active platform. Just a fallback. -->
11.37 <property name="default.javac.source" value="1.4"/>
11.38 <property name="default.javac.target" value="1.4"/>
11.39 </target>
11.40 - <target name="-init-project" depends="-pre-init,-init-private,-init-user">
11.41 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
11.42 + <property file="nbproject/configs/${config}.properties"/>
11.43 <property file="nbproject/project.properties"/>
11.44 </target>
11.45 - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
11.46 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
11.47 <available file="${manifest.file}" property="manifest.available"/>
11.48 <condition property="manifest.available+main.class">
11.49 <and>
11.50 @@ -77,7 +80,10 @@
11.51 </and>
11.52 </condition>
11.53 <condition property="no.javadoc.preview">
11.54 - <isfalse value="${javadoc.preview}"/>
11.55 + <and>
11.56 + <isset property="javadoc.preview"/>
11.57 + <isfalse value="${javadoc.preview}"/>
11.58 + </and>
11.59 </condition>
11.60 <property name="run.jvmargs" value=""/>
11.61 <property name="javac.compilerargs" value=""/>
11.62 @@ -90,12 +96,34 @@
11.63 <property name="javac.debug" value="true"/>
11.64 <property name="javadoc.preview" value="true"/>
11.65 <property name="application.args" value=""/>
11.66 + <property name="source.encoding" value="${file.encoding}"/>
11.67 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
11.68 + <and>
11.69 + <isset property="javadoc.encoding"/>
11.70 + <not>
11.71 + <equals arg1="${javadoc.encoding}" arg2=""/>
11.72 + </not>
11.73 + </and>
11.74 + </condition>
11.75 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
11.76 + <property name="includes" value="**"/>
11.77 + <property name="excludes" value=""/>
11.78 + <property name="do.depend" value="false"/>
11.79 + <condition property="do.depend.true">
11.80 + <istrue value="${do.depend}"/>
11.81 + </condition>
11.82 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
11.83 + <and>
11.84 + <isset property="jaxws.endorsed.dir"/>
11.85 + <available file="nbproject/jaxws-build.xml"/>
11.86 + </and>
11.87 + </condition>
11.88 </target>
11.89 <target name="-post-init">
11.90 <!-- Empty placeholder for easier customization. -->
11.91 <!-- You can override this target in the ../build.xml file. -->
11.92 </target>
11.93 - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
11.94 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
11.95 <fail unless="src.dir">Must set src.dir</fail>
11.96 <fail unless="test.src.dir">Must set test.src.dir</fail>
11.97 <fail unless="build.dir">Must set build.dir</fail>
11.98 @@ -118,41 +146,70 @@
11.99 </target>
11.100 <target name="-init-macrodef-javac">
11.101 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
11.102 - <attribute name="srcdir" default="${src.dir}"/>
11.103 - <attribute name="destdir" default="${build.classes.dir}"/>
11.104 - <attribute name="classpath" default="${javac.classpath}"/>
11.105 - <attribute name="debug" default="${javac.debug}"/>
11.106 + <attribute default="${src.dir}" name="srcdir"/>
11.107 + <attribute default="${build.classes.dir}" name="destdir"/>
11.108 + <attribute default="${javac.classpath}" name="classpath"/>
11.109 + <attribute default="${includes}" name="includes"/>
11.110 + <attribute default="${excludes}" name="excludes"/>
11.111 + <attribute default="${javac.debug}" name="debug"/>
11.112 + <attribute default="" name="sourcepath"/>
11.113 <element name="customize" optional="true"/>
11.114 <sequential>
11.115 - <depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${build.dir}/depcache">
11.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}">
11.117 + <classpath>
11.118 + <path path="@{classpath}"/>
11.119 + </classpath>
11.120 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
11.121 + <customize/>
11.122 + </javac>
11.123 + </sequential>
11.124 + </macrodef>
11.125 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
11.126 + <attribute default="${src.dir}" name="srcdir"/>
11.127 + <attribute default="${build.classes.dir}" name="destdir"/>
11.128 + <attribute default="${javac.classpath}" name="classpath"/>
11.129 + <sequential>
11.130 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
11.131 <classpath>
11.132 <path path="@{classpath}"/>
11.133 </classpath>
11.134 </depend>
11.135 - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
11.136 - <classpath>
11.137 - <path path="@{classpath}"/>
11.138 - </classpath>
11.139 - <compilerarg line="${javac.compilerargs}"/>
11.140 - <customize/>
11.141 - </javac>
11.142 + </sequential>
11.143 + </macrodef>
11.144 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
11.145 + <attribute default="${build.classes.dir}" name="destdir"/>
11.146 + <sequential>
11.147 + <fail unless="javac.includes">Must set javac.includes</fail>
11.148 + <pathconvert pathsep="," property="javac.includes.binary">
11.149 + <path>
11.150 + <filelist dir="@{destdir}" files="${javac.includes}"/>
11.151 + </path>
11.152 + <globmapper from="*.java" to="*.class"/>
11.153 + </pathconvert>
11.154 + <delete>
11.155 + <files includes="${javac.includes.binary}"/>
11.156 + </delete>
11.157 </sequential>
11.158 </macrodef>
11.159 </target>
11.160 <target name="-init-macrodef-junit">
11.161 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
11.162 - <attribute name="includes" default="**/*Test.java"/>
11.163 + <attribute default="${includes}" name="includes"/>
11.164 + <attribute default="${excludes}" name="excludes"/>
11.165 + <attribute default="**" name="testincludes"/>
11.166 <sequential>
11.167 - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
11.168 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
11.169 <batchtest todir="${build.test.results.dir}">
11.170 - <fileset dir="${test.src.dir}" includes="@{includes}"/>
11.171 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
11.172 + <filename name="@{testincludes}"/>
11.173 + </fileset>
11.174 </batchtest>
11.175 <classpath>
11.176 <path path="${run.test.classpath}"/>
11.177 </classpath>
11.178 <syspropertyset>
11.179 <propertyref prefix="test-sys-prop."/>
11.180 - <mapper type="glob" from="test-sys-prop.*" to="*"/>
11.181 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
11.182 </syspropertyset>
11.183 <formatter type="brief" usefile="false"/>
11.184 <formatter type="xml"/>
11.185 @@ -163,11 +220,11 @@
11.186 </target>
11.187 <target name="-init-macrodef-nbjpda">
11.188 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
11.189 - <attribute name="name" default="${main.class}"/>
11.190 - <attribute name="classpath" default="${debug.classpath}"/>
11.191 - <attribute name="stopclassname" default=""/>
11.192 + <attribute default="${main.class}" name="name"/>
11.193 + <attribute default="${debug.classpath}" name="classpath"/>
11.194 + <attribute default="" name="stopclassname"/>
11.195 <sequential>
11.196 - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
11.197 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
11.198 <classpath>
11.199 <path path="@{classpath}"/>
11.200 </classpath>
11.201 @@ -175,24 +232,36 @@
11.202 </sequential>
11.203 </macrodef>
11.204 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
11.205 - <attribute name="dir" default="${build.classes.dir}"/>
11.206 + <attribute default="${build.classes.dir}" name="dir"/>
11.207 <sequential>
11.208 <nbjpdareload>
11.209 - <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
11.210 + <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
11.211 </nbjpdareload>
11.212 </sequential>
11.213 </macrodef>
11.214 </target>
11.215 - <target name="-init-macrodef-debug">
11.216 + <target name="-init-debug-args">
11.217 + <property name="version-output" value="java version "${ant.java.version}"/>
11.218 + <condition property="have-jdk-older-than-1.4">
11.219 + <or>
11.220 + <contains string="${version-output}" substring="java version "1.0"/>
11.221 + <contains string="${version-output}" substring="java version "1.1"/>
11.222 + <contains string="${version-output}" substring="java version "1.2"/>
11.223 + <contains string="${version-output}" substring="java version "1.3"/>
11.224 + </or>
11.225 + </condition>
11.226 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
11.227 + <istrue value="${have-jdk-older-than-1.4}"/>
11.228 + </condition>
11.229 + </target>
11.230 + <target depends="-init-debug-args" name="-init-macrodef-debug">
11.231 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
11.232 - <attribute name="classname" default="${main.class}"/>
11.233 - <attribute name="classpath" default="${debug.classpath}"/>
11.234 + <attribute default="${main.class}" name="classname"/>
11.235 + <attribute default="${debug.classpath}" name="classpath"/>
11.236 <element name="customize" optional="true"/>
11.237 <sequential>
11.238 - <java fork="true" classname="@{classname}" dir="${work.dir}">
11.239 - <jvmarg value="-Xdebug"/>
11.240 - <jvmarg value="-Xnoagent"/>
11.241 - <jvmarg value="-Djava.compiler=none"/>
11.242 + <java classname="@{classname}" dir="${work.dir}" fork="true">
11.243 + <jvmarg line="${debug-args-line}"/>
11.244 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
11.245 <jvmarg line="${run.jvmargs}"/>
11.246 <classpath>
11.247 @@ -200,7 +269,7 @@
11.248 </classpath>
11.249 <syspropertyset>
11.250 <propertyref prefix="run-sys-prop."/>
11.251 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
11.252 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
11.253 </syspropertyset>
11.254 <customize/>
11.255 </java>
11.256 @@ -209,17 +278,17 @@
11.257 </target>
11.258 <target name="-init-macrodef-java">
11.259 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
11.260 - <attribute name="classname" default="${main.class}"/>
11.261 + <attribute default="${main.class}" name="classname"/>
11.262 <element name="customize" optional="true"/>
11.263 <sequential>
11.264 - <java fork="true" classname="@{classname}" dir="${work.dir}">
11.265 + <java classname="@{classname}" dir="${work.dir}" fork="true">
11.266 <jvmarg line="${run.jvmargs}"/>
11.267 <classpath>
11.268 <path path="${run.classpath}"/>
11.269 </classpath>
11.270 <syspropertyset>
11.271 <propertyref prefix="run-sys-prop."/>
11.272 - <mapper type="glob" from="run-sys-prop.*" to="*"/>
11.273 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
11.274 </syspropertyset>
11.275 <customize/>
11.276 </java>
11.277 @@ -228,102 +297,102 @@
11.278 </target>
11.279 <target name="-init-presetdef-jar">
11.280 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
11.281 - <jar jarfile="${dist.jar}" compress="${jar.compress}">
11.282 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
11.283 <j2seproject1:fileset dir="${build.classes.dir}"/>
11.284 </jar>
11.285 </presetdef>
11.286 </target>
11.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"/>
11.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"/>
11.289 <!--
11.290 - ===================
11.291 - COMPILATION SECTION
11.292 - ===================
11.293 - -->
11.294 - <target name="deps-jar" depends="init" unless="no.deps"/>
11.295 - <target name="-pre-pre-compile" depends="init,deps-jar">
11.296 + ===================
11.297 + COMPILATION SECTION
11.298 + ===================
11.299 + -->
11.300 + <target depends="init" name="deps-jar" unless="no.deps"/>
11.301 + <target depends="init,deps-jar" name="-pre-pre-compile">
11.302 <mkdir dir="${build.classes.dir}"/>
11.303 </target>
11.304 <target name="-pre-compile">
11.305 <!-- Empty placeholder for easier customization. -->
11.306 <!-- You can override this target in the ../build.xml file. -->
11.307 </target>
11.308 - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
11.309 + <target if="do.depend.true" name="-compile-depend">
11.310 + <j2seproject3:depend/>
11.311 + </target>
11.312 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
11.313 <j2seproject3:javac/>
11.314 <copy todir="${build.classes.dir}">
11.315 - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
11.316 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
11.317 </copy>
11.318 </target>
11.319 <target name="-post-compile">
11.320 <!-- Empty placeholder for easier customization. -->
11.321 <!-- You can override this target in the ../build.xml file. -->
11.322 </target>
11.323 - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
11.324 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
11.325 <target name="-pre-compile-single">
11.326 <!-- Empty placeholder for easier customization. -->
11.327 <!-- You can override this target in the ../build.xml file. -->
11.328 </target>
11.329 - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
11.330 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
11.331 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
11.332 - <j2seproject3:javac>
11.333 - <customize>
11.334 - <patternset includes="${javac.includes}"/>
11.335 - </customize>
11.336 - </j2seproject3:javac>
11.337 + <j2seproject3:force-recompile/>
11.338 + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
11.339 </target>
11.340 <target name="-post-compile-single">
11.341 <!-- Empty placeholder for easier customization. -->
11.342 <!-- You can override this target in the ../build.xml file. -->
11.343 </target>
11.344 - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
11.345 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
11.346 <!--
11.347 - ====================
11.348 - JAR BUILDING SECTION
11.349 - ====================
11.350 - -->
11.351 - <target name="-pre-pre-jar" depends="init">
11.352 - <dirname property="dist.jar.dir" file="${dist.jar}"/>
11.353 + ====================
11.354 + JAR BUILDING SECTION
11.355 + ====================
11.356 + -->
11.357 + <target depends="init" name="-pre-pre-jar">
11.358 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
11.359 <mkdir dir="${dist.jar.dir}"/>
11.360 </target>
11.361 <target name="-pre-jar">
11.362 <!-- Empty placeholder for easier customization. -->
11.363 <!-- You can override this target in the ../build.xml file. -->
11.364 </target>
11.365 - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
11.366 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
11.367 <j2seproject1:jar/>
11.368 </target>
11.369 - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
11.370 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
11.371 <j2seproject1:jar manifest="${manifest.file}"/>
11.372 </target>
11.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">
11.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">
11.375 <j2seproject1:jar manifest="${manifest.file}">
11.376 <j2seproject1:manifest>
11.377 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
11.378 </j2seproject1:manifest>
11.379 </j2seproject1:jar>
11.380 <echo>To run this application from the command line without Ant, try:</echo>
11.381 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
11.382 - <property name="dist.jar.resolved" location="${dist.jar}"/>
11.383 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
11.384 + <property location="${dist.jar}" name="dist.jar.resolved"/>
11.385 <pathconvert property="run.classpath.with.dist.jar">
11.386 <path path="${run.classpath}"/>
11.387 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
11.388 </pathconvert>
11.389 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
11.390 </target>
11.391 - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
11.392 - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
11.393 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
11.394 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
11.395 <pathconvert property="run.classpath.without.build.classes.dir">
11.396 <path path="${run.classpath}"/>
11.397 <map from="${build.classes.dir.resolved}" to=""/>
11.398 </pathconvert>
11.399 - <pathconvert property="jar.classpath" pathsep=" ">
11.400 + <pathconvert pathsep=" " property="jar.classpath">
11.401 <path path="${run.classpath.without.build.classes.dir}"/>
11.402 <chainedmapper>
11.403 <flattenmapper/>
11.404 <globmapper from="*" to="lib/*"/>
11.405 </chainedmapper>
11.406 </pathconvert>
11.407 - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
11.408 - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
11.409 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
11.410 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
11.411 <fileset dir="${build.classes.dir}"/>
11.412 <manifest>
11.413 <attribute name="Main-Class" value="${main.class}"/>
11.414 @@ -331,183 +400,194 @@
11.415 </manifest>
11.416 </copylibs>
11.417 <echo>To run this application from the command line without Ant, try:</echo>
11.418 - <property name="dist.jar.resolved" location="${dist.jar}"/>
11.419 + <property location="${dist.jar}" name="dist.jar.resolved"/>
11.420 <echo>java -jar "${dist.jar.resolved}"</echo>
11.421 </target>
11.422 <target name="-post-jar">
11.423 <!-- Empty placeholder for easier customization. -->
11.424 <!-- You can override this target in the ../build.xml file. -->
11.425 </target>
11.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."/>
11.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"/>
11.428 <!--
11.429 - =================
11.430 - EXECUTION SECTION
11.431 - =================
11.432 - -->
11.433 - <target name="run" depends="init,compile" description="Run a main class.">
11.434 + =================
11.435 + EXECUTION SECTION
11.436 + =================
11.437 + -->
11.438 + <target depends="init,compile" description="Run a main class." name="run">
11.439 <j2seproject1:java>
11.440 <customize>
11.441 <arg line="${application.args}"/>
11.442 </customize>
11.443 </j2seproject1:java>
11.444 </target>
11.445 - <target name="run-single" depends="init,compile-single">
11.446 + <target name="-do-not-recompile">
11.447 + <property name="javac.includes.binary" value=""/>
11.448 + </target>
11.449 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
11.450 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
11.451 <j2seproject1:java classname="${run.class}"/>
11.452 </target>
11.453 <!--
11.454 - =================
11.455 - DEBUGGING SECTION
11.456 - =================
11.457 - -->
11.458 - <target name="-debug-start-debugger" if="netbeans.home" depends="init">
11.459 + =================
11.460 + DEBUGGING SECTION
11.461 + =================
11.462 + -->
11.463 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
11.464 <j2seproject1:nbjpdastart name="${debug.class}"/>
11.465 </target>
11.466 - <target name="-debug-start-debuggee" depends="init,compile">
11.467 + <target depends="init,compile" name="-debug-start-debuggee">
11.468 <j2seproject3:debug>
11.469 <customize>
11.470 <arg line="${application.args}"/>
11.471 </customize>
11.472 </j2seproject3:debug>
11.473 </target>
11.474 - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
11.475 - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
11.476 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
11.477 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
11.478 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
11.479 </target>
11.480 - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
11.481 - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
11.482 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
11.483 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
11.484 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
11.485 <j2seproject3:debug classname="${debug.class}"/>
11.486 </target>
11.487 - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
11.488 - <target name="-pre-debug-fix" depends="init">
11.489 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
11.490 + <target depends="init" name="-pre-debug-fix">
11.491 <fail unless="fix.includes">Must set fix.includes</fail>
11.492 <property name="javac.includes" value="${fix.includes}.java"/>
11.493 </target>
11.494 - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
11.495 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
11.496 <j2seproject1:nbjpdareload/>
11.497 </target>
11.498 - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
11.499 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
11.500 <!--
11.501 - ===============
11.502 - JAVADOC SECTION
11.503 - ===============
11.504 - -->
11.505 - <target name="-javadoc-build" depends="init">
11.506 + ===============
11.507 + JAVADOC SECTION
11.508 + ===============
11.509 + -->
11.510 + <target depends="init" name="-javadoc-build">
11.511 <mkdir dir="${dist.javadoc.dir}"/>
11.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">
11.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}">
11.514 <classpath>
11.515 <path path="${javac.classpath}"/>
11.516 </classpath>
11.517 - <sourcepath>
11.518 - <pathelement location="${src.dir}"/>
11.519 - </sourcepath>
11.520 - <packageset dir="${src.dir}" includes="*/**"/>
11.521 - <fileset dir="${src.dir}" includes="*.java"/>
11.522 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
11.523 + <filename name="**/*.java"/>
11.524 + </fileset>
11.525 </javadoc>
11.526 </target>
11.527 - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
11.528 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
11.529 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
11.530 </target>
11.531 - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
11.532 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
11.533 <!--
11.534 - =========================
11.535 - JUNIT COMPILATION SECTION
11.536 - =========================
11.537 - -->
11.538 - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
11.539 + =========================
11.540 + JUNIT COMPILATION SECTION
11.541 + =========================
11.542 + -->
11.543 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
11.544 <mkdir dir="${build.test.classes.dir}"/>
11.545 </target>
11.546 <target name="-pre-compile-test">
11.547 <!-- Empty placeholder for easier customization. -->
11.548 <!-- You can override this target in the ../build.xml file. -->
11.549 </target>
11.550 - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
11.551 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
11.552 + <target if="do.depend.true" name="-compile-test-depend">
11.553 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
11.554 + </target>
11.555 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
11.556 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
11.557 <copy todir="${build.test.classes.dir}">
11.558 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
11.559 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
11.560 </copy>
11.561 </target>
11.562 <target name="-post-compile-test">
11.563 <!-- Empty placeholder for easier customization. -->
11.564 <!-- You can override this target in the ../build.xml file. -->
11.565 </target>
11.566 - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
11.567 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
11.568 <target name="-pre-compile-test-single">
11.569 <!-- Empty placeholder for easier customization. -->
11.570 <!-- You can override this target in the ../build.xml file. -->
11.571 </target>
11.572 - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
11.573 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
11.574 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
11.575 - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
11.576 - <customize>
11.577 - <patternset includes="${javac.includes}"/>
11.578 - </customize>
11.579 - </j2seproject3:javac>
11.580 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
11.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}"/>
11.582 <copy todir="${build.test.classes.dir}">
11.583 - <fileset dir="${test.src.dir}" excludes="**/*.java"/>
11.584 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
11.585 </copy>
11.586 </target>
11.587 <target name="-post-compile-test-single">
11.588 <!-- Empty placeholder for easier customization. -->
11.589 <!-- You can override this target in the ../build.xml file. -->
11.590 </target>
11.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"/>
11.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"/>
11.593 <!--
11.594 - =======================
11.595 - JUNIT EXECUTION SECTION
11.596 - =======================
11.597 - -->
11.598 - <target name="-pre-test-run" if="have.tests" depends="init">
11.599 + =======================
11.600 + JUNIT EXECUTION SECTION
11.601 + =======================
11.602 + -->
11.603 + <target depends="init" if="have.tests" name="-pre-test-run">
11.604 <mkdir dir="${build.test.results.dir}"/>
11.605 </target>
11.606 - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
11.607 - <j2seproject3:junit/>
11.608 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
11.609 + <j2seproject3:junit testincludes="**/*Test.java"/>
11.610 </target>
11.611 - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
11.612 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
11.613 <fail if="tests.failed">Some tests failed; see details above.</fail>
11.614 </target>
11.615 - <target name="test-report" if="have.tests" depends="init"/>
11.616 - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
11.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."/>
11.618 - <target name="-pre-test-run-single" if="have.tests" depends="init">
11.619 + <target depends="init" if="have.tests" name="test-report"/>
11.620 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
11.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"/>
11.622 + <target depends="init" if="have.tests" name="-pre-test-run-single">
11.623 <mkdir dir="${build.test.results.dir}"/>
11.624 </target>
11.625 - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
11.626 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
11.627 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
11.628 - <j2seproject3:junit includes="${test.includes}"/>
11.629 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
11.630 </target>
11.631 - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
11.632 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
11.633 <fail if="tests.failed">Some tests failed; see details above.</fail>
11.634 </target>
11.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."/>
11.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"/>
11.637 <!--
11.638 - =======================
11.639 - JUNIT DEBUGGING SECTION
11.640 - =======================
11.641 - -->
11.642 - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
11.643 + =======================
11.644 + JUNIT DEBUGGING SECTION
11.645 + =======================
11.646 + -->
11.647 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
11.648 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
11.649 - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
11.650 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
11.651 + <delete file="${test.report.file}"/>
11.652 + <mkdir dir="${build.test.results.dir}"/>
11.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}">
11.654 <customize>
11.655 - <arg line="${test.class}"/>
11.656 + <syspropertyset>
11.657 + <propertyref prefix="test-sys-prop."/>
11.658 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
11.659 + </syspropertyset>
11.660 + <arg value="${test.class}"/>
11.661 + <arg value="showoutput=true"/>
11.662 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
11.663 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
11.664 </customize>
11.665 </j2seproject3:debug>
11.666 </target>
11.667 - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
11.668 - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
11.669 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
11.670 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
11.671 </target>
11.672 - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
11.673 - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
11.674 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
11.675 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
11.676 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
11.677 </target>
11.678 - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
11.679 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
11.680 <!--
11.681 - =========================
11.682 - APPLET EXECUTION SECTION
11.683 - =========================
11.684 - -->
11.685 - <target name="run-applet" depends="init,compile-single">
11.686 + =========================
11.687 + APPLET EXECUTION SECTION
11.688 + =========================
11.689 + -->
11.690 + <target depends="init,compile-single" name="run-applet">
11.691 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
11.692 <j2seproject1:java classname="sun.applet.AppletViewer">
11.693 <customize>
11.694 @@ -516,11 +596,11 @@
11.695 </j2seproject1:java>
11.696 </target>
11.697 <!--
11.698 - =========================
11.699 - APPLET DEBUGGING SECTION
11.700 - =========================
11.701 - -->
11.702 - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
11.703 + =========================
11.704 + APPLET DEBUGGING SECTION
11.705 + =========================
11.706 + -->
11.707 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
11.708 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
11.709 <j2seproject3:debug classname="sun.applet.AppletViewer">
11.710 <customize>
11.711 @@ -528,14 +608,14 @@
11.712 </customize>
11.713 </j2seproject3:debug>
11.714 </target>
11.715 - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
11.716 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
11.717 <!--
11.718 - ===============
11.719 - CLEANUP SECTION
11.720 - ===============
11.721 - -->
11.722 - <target name="deps-clean" depends="init" unless="no.deps"/>
11.723 - <target name="-do-clean" depends="init">
11.724 + ===============
11.725 + CLEANUP SECTION
11.726 + ===============
11.727 + -->
11.728 + <target depends="init" name="deps-clean" unless="no.deps"/>
11.729 + <target depends="init" name="-do-clean">
11.730 <delete dir="${build.dir}"/>
11.731 <delete dir="${dist.dir}"/>
11.732 </target>
11.733 @@ -543,5 +623,5 @@
11.734 <!-- Empty placeholder for easier customization. -->
11.735 <!-- You can override this target in the ../build.xml file. -->
11.736 </target>
11.737 - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
11.738 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
11.739 </project>
12.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/genfiles.properties Sat Jun 14 09:52:45 2008 +0200
12.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/genfiles.properties Sat Jun 14 09:52:47 2008 +0200
12.3 @@ -1,8 +1,8 @@
12.4 build.xml.data.CRC32=ffd6778c
12.5 build.xml.script.CRC32=f0487089
12.6 -build.xml.stylesheet.CRC32=a12b3d02
12.7 +build.xml.stylesheet.CRC32=be360661
12.8 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
12.9 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
12.10 nbproject/build-impl.xml.data.CRC32=ffd6778c
12.11 -nbproject/build-impl.xml.script.CRC32=20ec1204
12.12 -nbproject/build-impl.xml.stylesheet.CRC32=c10f1eac
12.13 +nbproject/build-impl.xml.script.CRC32=d54dcd8c
12.14 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
13.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/project.properties Sat Jun 14 09:52:45 2008 +0200
13.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/project.properties Sat Jun 14 09:52:47 2008 +0200
13.3 @@ -15,6 +15,8 @@
13.4 dist.dir=dist
13.5 dist.jar=${dist.dir}/boolcircuit.jar
13.6 dist.javadoc.dir=${dist.dir}/javadoc
13.7 +excludes=
13.8 +includes=**
13.9 jar.compress=false
13.10 javac.classpath=
13.11 # Space-separated list of extra javac options
14.1 --- a/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/project.xml Sat Jun 14 09:52:45 2008 +0200
14.2 +++ b/samples/apifest1/day2/alwayscreatenewcircuit/nbproject/project.xml Sat Jun 14 09:52:47 2008 +0200
14.3 @@ -3,7 +3,7 @@
14.4 <type>org.netbeans.modules.java.j2seproject</type>
14.5 <configuration>
14.6 <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
14.7 - <name>alwayscreatenewcircuit</name>
14.8 + <name>alwayscreatenewcircuit - day2</name>
14.9 <minimum-ant-version>1.6.5</minimum-ant-version>
14.10 <source-roots>
14.11 <root id="src.dir"/>